Overview
This node, named "Base Agent," allows users to interact with Base on-chain AI agents by performing blockchain-related operations. Specifically, it supports creating new tokens, retrieving token details, and swapping tokens on a blockchain network.
The createToken
operation enables users to create a new cryptocurrency token by specifying its name, symbol, decimal precision, and total supply. This is useful for developers or projects looking to launch their own tokens on the Base blockchain.
Practical examples:
- Launching a new utility token for a decentralized application.
- Creating a custom stablecoin with specific decimal places and supply.
- Experimenting with token creation for educational or testing purposes.
Properties
Name | Meaning |
---|---|
Token Name | The name of the token to create (e.g., "MyToken"). |
Token Symbol | The symbol representing the token (e.g., "MTK"). |
Decimals | Number of decimal places the token supports (e.g., 9 means token can be divided to 10^-9). |
Total Supply | The total number of tokens to be created initially (e.g., 1000000). |
Output
The node outputs an array of JSON objects, each representing the result of the executed operation.
For the createToken
operation, the output JSON contains details about the newly created token, such as transaction information or token contract address (exact structure depends on the underlying implementation of the token creation function).
If an error occurs, the output JSON will contain an error
field describing the issue.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential that provides a private key and RPC URL to interact with the blockchain.
- Uses external functions to perform blockchain operations: creating tokens, getting token details, and swapping tokens.
- The node expects the blockchain network chain ID to be set internally (default chain ID).
- Proper configuration of the private key and RPC endpoint is necessary for successful execution.
Troubleshooting
- Missing Credentials: If the private key or RPC URL is not provided, the node returns an error stating both are required.
- Unsupported Operation: If an unsupported operation is specified, the node returns an error indicating the operation is not supported.
- Blockchain Transaction Failures: Errors during token creation (e.g., insufficient funds, invalid parameters) will be returned in the error field.
- Continue On Fail: If enabled, the node continues processing subsequent items even if one fails, returning error details per item.
To resolve common errors:
- Ensure valid private key and RPC URL credentials are configured.
- Verify input parameters like token name, symbol, decimals, and total supply are correctly set.
- Confirm the blockchain network is accessible and the account has sufficient permissions/funds.