ContractOptions
Index
Properties
optionaladdress
optionalreadonlydata
The byte code of the contract. Used when the contract gets deployed
optionalreadonlyfrom
The address transactions should be made from.
optionalreadonlygas
The maximum gas provided for a transaction (gas limit).
optionalreadonlygasLimit
optionalreadonlygasPrice
The gas price in wei to use for transactions.
Accessors
jsonInterface
The json interface object derived from the ABI of this contract.
Re-setting this will regenerate the methods and events of the contract instance.
myContract.options.jsonInterface;
> [{
"type":"function",
"name":"foo",
"inputs": [{"name":"a","type":"uint256"}],
"outputs": [{"name":"b","type":"address"}],
"signature": "0x...",
},{
"type":"event",
"name":"Event",
"inputs": [{"name":"a","type":"uint256","indexed":true},{"name":"b","type":"bytes32","indexed":false}],
"signature": "0x...",
}]
// Set a new ABI interface
// Note: the "signature" of every function and event's ABI is not needed to be provided when assigning.
// It will be calculated and set automatically inside the setter.
myContract.options.jsonInterface = [...];Returns ContractAbiWithSignature
The json interface object derived from the ABI of this contract.
Re-setting this will regenerate the methods and events of the contract instance.
myContract.options.jsonInterface;
> [{
"type":"function",
"name":"foo",
"inputs": [{"name":"a","type":"uint256"}],
"outputs": [{"name":"b","type":"address"}],
"signature": "0x...",
},{
"type":"event",
"name":"Event",
"inputs": [{"name":"a","type":"uint256","indexed":true},{"name":"b","type":"bytes32","indexed":false}],
"signature": "0x...",
}]
// Set a new ABI interface
// Note: the "signature" of every function and event's ABI is not needed to be provided when assigning.
// It will be calculated and set automatically inside the setter.
myContract.options.jsonInterface = [...];Parameters
value: ContractAbi
Returns void
The address used for this contract instance. All transactions generated by web3.js from this contract will contain this address as the
to
.The address will be stored in lowercase.