Class Web3Contract<Methods, Events>
Type Parameters
Methods = any
Events = any
Constructors
constructor
Type Parameters
Methods = any
Events = any
Parameters
web3: default
abi: AbiItem[]
Optional address: string
Returns Web3Contract<Methods, Events>
Properties
Readonly abi
abi: AbiItem[]
Optional Readonly address
address?: string
Readonly self
self: Contract
Readonly web3
web3: default
Methods
deploy
- deploy(abi: AbiItem[], deployOptions: DeployOptions, account?: Account): Promise<TransactionReceipt<any>>
Parameters
abi: AbiItem[]
deployOptions: DeployOptions
Optional account: Account
Returns Promise<TransactionReceipt<any>>
parseReceiptLogs
- parseReceiptLogs<T>(receipt: TransactionReceipt<any>): TransactionReceipt<T>
Type Parameters
Parameters
receipt: TransactionReceipt<any>
Returns TransactionReceipt<T>
sendSignedTx
- sendSignedTx(account: Account, data: string, value?: string, txOptions: Partial<TransactionConfig>, __namedParameters?: Partial<Web3ConnectionOptions>): Promise<TransactionReceipt<any>>
Parameters
account: Account
data: string
value: string = ...
txOptions: Partial<TransactionConfig>
Returns Promise<TransactionReceipt<any>>
txOptions
- txOptions(method: ContractSendMethod, value?: string, from?: string): Promise<{ gas: undefined | number; gasPrice: undefined | string }>
Parameters
method: ContractSendMethod
Optional value: string
Optional from: string
Returns Promise<{ gas: undefined | number; gasPrice: undefined | string }>
Transaction options that will be used on each transaction. While this object is readonly, is values are not and can be changed.
myWeb3Connection.options.gas = 10000;
{auto: true}