EthereumContract - ARitz-Cracker/arc-web3 GitHub Wiki

Smart contracts are presumably the entire reason why you're thinking of using this library.

Properties:

  • (Object) _jsproperties: I consider this internal, so don't write in here.
    • (EthereumABI) abi: The ABI used when defining this contract.
    • (Array) abiSelectors: An array of function selectors. (Not hashed)
    • (Web3Connection) connection: The connection this contract uses (Changing this might break things so don't do it)
    • (EthereumAccount) account: See below
  • (EthereumAccount) _account: If you want to know the contract's ether balance, this is where you'd get that.
  • (AddressString) address: The address of this smart contract
  • (EthereumContractEventEmitter) event: This is how you access current and previous logs

Note: _account has underscore an underscore prefix in order to prevent conflict with publicly accessible solidity variable name account. If your contract actually has functions or public variables named _account you'll have to access them with using EthereumContract["_account()"]. address and event will not have a conflict as those are reserved solidity key-words.

Methods:

  • Defined by ABI (see below)

new EthereumContract(Web3Connection,AddressString,EthereumABI)

Constructions the EthereumContract according to the ABI.

// No example. (Feel free to suggest one!)

Promise(ABIDefinedType || EthereumContractResult) EthereumContract.ABIDefinedReadFunction(ABIDefinedType[,...])

Click the links above to learn more.

// No example. (Feel free to suggest one!)

Promise(TransactionHash) EthereumContract.ABIDefinedWriteFunction(ABIDefinedType[,...])

Click the links above to learn more.

// No example. (Feel free to suggest one!)