Contract

Contract

Contract class for providing a simple interface for classes to read a specific contract from compiler output.

For more information on these properties, please see the Solidity documentation on solc regarding the output: https://solidity.readthedocs.io/en/v0.5.8/using-the-compiler.html#output-description

Constructor

new Contract(name, raw, sol)

Source:

Initialize a Contract object.

Parameters:
Name Type Description
name string

Contract name

raw JSON | object

The raw piece of the compiler output JSON pertaining to the contract. For more information, please see the solc docs on compiler output: https://solidity.readthedocs.io/en/v0.5.0/using-the-compiler.html#output-description

sol string

Name of the .sol file the contract was compiled in.

Members

abi

Source:

Returns the ABI object as defined within the JSON.

bytecode

Source:

Returns the compiled bytecode of the contract, as a hex string.

compilerVersion

Source:

Returns the compiler version.

metadata

Source:

Returns the compiler metadata.

optimizer

Source:

Returns the optimizer metadata object.