Actions27
- Contract Event Actions
- Contract Method Actions
- Prompt Actions
- Transaction Actions
- Wallet Actions
- X402 Request Actions
- Chain Actions
Contract Method → Read
AI-generatedOverview
This node interacts with the 1Shot API to perform a 'read' operation on a specified Contract Method within EVM blockchains. It allows users to retrieve data from smart contract methods by specifying the contract method name or ID and providing necessary parameters. This is useful for scenarios where blockchain data needs to be fetched without altering the state, such as querying token balances or contract states.
Use Case Examples
- Reading the balance of a token for a specific address by calling the 'balanceOf' contract method.
- Fetching the current state or configuration of a smart contract by reading its public methods.
Properties
| Name | Meaning |
|---|---|
| Contract Method Name or ID | The identifier or name of the contract method to read. Users can select from a list or specify an ID using an expression. |
| Parameters | A JSON object containing the parameters to pass to the contract method. This allows specifying input values required by the method. |
Output
JSON
response- The response data returned from the contract method read operation.
Dependencies
- Requires an OAuth2 API credential for authentication with the 1Shot API.
Troubleshooting
- Ensure the contract method ID or name is correct and exists in the 1Shot API.
- Verify that the parameters JSON is correctly formatted and matches the contract method's expected inputs.
- Check that the OAuth2 API credentials are valid and have the necessary permissions.
- If the node throws an unsupported operation error, confirm that the resource is set to 'Contract Method' and the operation to 'Read'.