-
Notifications
You must be signed in to change notification settings - Fork 0
Home
-
sendTransaction(params) ⇒
Promise
-
Wrapper function that creates, signs, and sends a raw transaction. transactions you send with this function will typically be state-changing and thus be included in the blockchain
-
call(params) ⇒
Promise
-
Sends a message call to a contract. Use this function to read state variables or to call constant functions
-
createSignedRawTransaction(params) ⇒
Promise
-
Creates a raw transaction object and signs it with ethereumjs-tx. The purpose of this function is to take care of the tedious formatting and hex-encoding required for creating a raw transaction
-
sendRawTransaction(rawTransaction, web3) ⇒
Promise
-
Promise based version of web3.eth.sendRawTransaction
Wrapper function that creates, signs, and sends a raw transaction. transactions you send with this function will typically be state-changing and thus be included in the blockchain
Kind: global function
Param | Type | Description |
---|---|---|
params | object |
object containing all required parameters |
params.from | string |
account that pays for the transaction |
params.privateKey | string |
the key of the account specified in 'from' |
params.contractAddress | string |
the address of the contract you want to interact with |
params.abi | array |
the abi of the contract you want to interact with |
params.functionName | string |
the name of the function you want to call |
params.functionArguments | array |
the arguments in an array |
params.provider | string |
the url of the provider of the remote node |
params.value | integer |
(optional) value in wei you want to send with this transaction |
Sends a message call to a contract. Use this function to read state variables or to call constant functions
Kind: global function
Param | Type | Description |
---|---|---|
params | object |
object containing all required parameters |
params.contractAddress | string |
the address of the contract you want to interact with |
params.abi | array |
the abi of the contract you want to interact with |
params.functionName | string |
the name of the function you want to call |
params.functionArguments | array |
the arguments in an array |
params.provider | string |
the url of the provider of the remote node |
Creates a raw transaction object and signs it with ethereumjs-tx. The purpose of this function is to take care of the tedious formatting and hex-encoding required for creating a raw transaction
Kind: global function
Param | Type | Description |
---|---|---|
params | object |
object containing all required parameters |
params.from | string |
account that pays for the transaction |
params.privateKey | string |
the key of the account specified in 'from' |
params.contractAddress | string |
the address of the contract you want to interact with |
params.abi | array |
the abi of the contract you want to interact with |
params.functionName | string |
the name of the function you want to call |
params.functionArguments | array |
the arguments in an array |
params.web3 | Web3 |
Web3 instance |
params.value | integer |
(optional) value in wei you want to send with this transaction |
Promise based version of web3.eth.sendRawTransaction
Kind: global function
Param | Type | Description |
---|---|---|
rawTransaction | string |
signed and serialized transaction. Output from createSignedRawTransaction. |
web3 | Web3 |
Web3 instance |