invoke
Invoke allows for the generic execution of smart contracts on behalf of the user. It is reccommended to have a general understanding of the NEO blockchain, and to be able successfully use all other commands listed previously in this document before attempting a generic contract execution.
Input Arguments
Parameter | Description |
---|---|
| Script hash of the smart contract to invoke |
| Operation on the smart contract to call |
Any input arguments for the operation | |
| The parsed amount of network fee (in GAS) to include with transaction |
| Network to submit this request to. If omitted, will default to network the wallet is currently set to |
Describes the assets to attach with the smart contract, e.g. attaching assets to mint tokens during a token sale | |
A hard override of all transaction utxo inputs and outputs. IMPORTANT: If provided, fee and attachedAssets will be ignored. | |
| Adds the instruction to invoke the contract verification trigger |
| In the case that the dApp would like to be responsible for broadcasting the signed transaction rather than the wallet provider |
Adds transaction attributes for the "Hash" usage block |
Argument
Parameter | Description |
---|---|
| The type of the argument with you are using |
| String representation of the argument which you are using |
TxHashAttribute
Parameter | Description |
---|---|
| The type of the argument with you are using |
| String representation of the argument which you are using |
| Attribute usage value |
AttachedAssets
Parameter | Description |
---|---|
| The amount of NEO to attach to the contract invocation |
| The amount of GAS to attach to the contract invocation |
AssetIntentOverrides
Parameter | Description |
---|---|
A list of UTXO inputs to use for this transaction | |
A list of UTXO outputs to use for this transaction |
AssetInput
Parameter | Description |
---|---|
| Transaction id to be used as input |
| Index of the UTXO, can be found from transaction details |
AssetOutput
Parameter | Description |
---|---|
| Asset of the UTXO |
| Address to receive the UTXO |
| String representation of double or integer value to be used as output |
Success Response
In the case where the "broadcastOverride" input argument is not set, or set to false.
Parameter | Description |
---|---|
| The transaction ID of the invocation |
| The node which the transaction was broadcast to. Returned if transaction is broadcast by wallet provider |
In the case where the "broadcastOverride" input argument is set to True.
Parameter | Description |
---|---|
| The transaction ID of the invocation |
| The serialized signed transaction. Only returned if the broadcastOverride input argument was set to True |
Error Response
Parameter | Description |
---|---|
| The type of error which has occured |
| A description of the error which has occured |
| Any raw data associated with the error |
Example
Request
Response
最后更新于