invokeRead
Execute a contract invocation in read-only mode.
Input Arguments
Parameter | Description |
---|---|
| Script hash of the smart contract to invoke a read on |
| Operation on the smart contract to call |
Any input arguments for the operation | |
Sender and the effective scope of signature |
Success Response
The wallet will return the direct response from the RPC node.
Parameter | Description |
---|---|
| The script which was run |
| Status of the executeion |
| Estimated amount of GAS to be used to execute the invocation. (Up to 10 free per transaction) |
An array of response arguments |
Argument
Parameter | Description |
---|---|
| The type of the argument with you are using. The type is an array, please see the example for the value. |
| String representation of the argument which you are using |
Signer
Parameter | Description |
---|---|
| scriptHash of the address |
Effective range of the signature | |
| Contracts of the signature can take effect, if scopes is CustomContracts |
| Pubkeys of the signature can take effect, if scopes is CustomGroups |
Custom rules for witness to adhere by, if scopes is WitnessRules |
Scopes
Field | Description |
---|---|
| Only transactions are signed and no contracts are allowed to use this signature. |
| It only applies to the chain call entry. That is, if the user invokes contract A, and then contract A calls contract B, only contract A can use the signature. It is recommended as the default value for the wallet. |
| Custom contract. The signature can be used in the specified contract. It can be used in conjunction with CalledByEntry. |
| Custom contract groups that can be used in a specified contract group. It can be used in conjunction with CalledByEntry. |
| Indicates that the current context must satisfy the specified rules. |
| Global. The risk is extremely high because the contract may transfer all assets in the address. Only choose it when the contract is extremely trusted. |
WitnessRule
Parameter | Description |
---|---|
| Represents the action of a WitnessRule. |
Represents the condition of a WitnessRule. |
WitnessCondition
Field | Description |
---|---|
Indicates that the condition will always be met or not met. | |
Indicates that all conditions must be met. | |
Reverse another condition. | |
Indicates that any of the conditions meets. | |
Indicates that the condition is met when the current context has the specified script hash. | |
Indicates that the condition is met when the current context has the specified group. | |
Indicates that the condition is met when the current context is the entry point or is called by the entry point. | |
Indicates that the condition is met when the current context is called by the specified contract. | |
Indicates that the condition is met when the current context is called by the specified group. |
BooleanWitnessCondition
Parameter | Description |
---|---|
| The type of the BooleanWitnessCondition. |
| The expression of the BooleanWitnessCondition. |
AndWitnessCondition
Parameter | Description |
---|---|
| The type of the AndWitnessCondition. |
The expressions of the AndWitnessCondition. |
NotWitnessCondition
Parameter | Description |
---|---|
| The type of the NotWitnessCondition. |
The expression of the NotWitnessCondition. |
OrWitnessCondition
Parameter | Description |
---|---|
| The type of the OrWitnessCondition. |
The expressions of the OrWitnessCondition. |
ScriptHashWitnessCondition
Parameter | Description |
---|---|
| The type of the ScriptHashWitnessCondition. |
| The hash of the ScriptHashWitnessCondition. |
GroupWitnessCondition
Parameter | Description |
---|---|
| The type of the GroupWitnessCondition. |
| The group of the GroupWitnessCondition. |
CalledByEntryWitnessCondition
Parameter | Description |
---|---|
| The type of the CalledByEntryWitnessCondition. |
CalledByContractWitnessCondition
Parameter | Description |
---|---|
| The type of the CalledByContractWitnessCondition. |
| The hash of the CalledByContractWitnessCondition. |
CalledByGroupWitnessCondition
Parameter | Description |
---|---|
| The type of the CalledByGroupWitnessCondition. |
| The group of the CalledByGroupWitnessCondition. |
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
最后更新于