feat: add coinbase ERC20, ERC721, and ERC1155 tokenContract deployment / invokement plugin
Pull Request Description
Relates to:
N/A - New feature implementation
Risks
Low - This PR adds new functionality without modifying existing features. The token contract plugin is only enabled when proper Coinbase credentials are present.
Background
What does this PR do?
This PR adds a new Coinbase token contract plugin that enables:
- Deployment of ERC20, ERC721, and ERC1155 token contracts
- Interaction with deployed smart contracts through method invocation
- Automatic logging of contract deployments and interactions to CSV files
- Integration with existing Coinbase wallet management system
What kind of change is this?
Features (non-breaking change which adds functionality)
- Adds new token contract deployment capabilities
- Adds contract interaction functionality
- Extends existing Coinbase plugin suite
Documentation changes needed?
My changes require a change to the project documentation.
- Added comprehensive documentation for the token contract plugin in
docs/docs/packages/plugins.md - Updated plugin documentation with new features and usage examples
- Added configuration instructions and best practices
Testing
Where should a reviewer start?
-
Review the token contract plugin implementation:
packages/plugin-coinbase/src/plugins/tokenContract.tspackages/plugin-coinbase/src/types.ts(new token contract types)packages/plugin-coinbase/src/templates.ts(new templates)
-
Review the integration:
agent/src/index.ts(plugin initialization)packages/plugin-coinbase/src/index.ts(plugin exports)
Detailed testing steps
-
Configure Coinbase credentials:
export COINBASE_API_KEY=your_api_key export COINBASE_PRIVATE_KEY=your_private_key -
Test ERC20 token deployment:
await runtime.triggerAction("DEPLOY_TOKEN_CONTRACT", { contractType: "ERC20", name: "TestToken", symbol: "TST", network: "base", totalSupply: 1000000 }); -
Test ERC721 (NFT) deployment:
await runtime.triggerAction("DEPLOY_TOKEN_CONTRACT", { contractType: "ERC721", name: "TestNFT", symbol: "TNFT", network: "eth", baseURI: "https://api.test.com/metadata/" }); -
Test contract interaction:
await runtime.triggerAction("INVOKE_CONTRACT", { contractAddress: "0x123...", method: "transfer", abi: [...], args: { to: "0x456...", amount: "1000000000000000000" }, network: "base" }); -
Verify CSV logging:
- Check
contracts.csvfor deployment records - Verify transaction details are properly logged
- Check
https://drive.google.com/file/d/1q5ezLF6KOgJdQ6x04m_lStiO2Y-jzCEq/view?usp=sharing
https://drive.google.com/file/d/1cFK9RbxTw7GaD3J0sfxva0t4UIuZrmpQ/view?usp=sharing
Files changed:
packages/plugin-coinbase/src/plugins/tokenContract.ts(new)packages/plugin-coinbase/src/types.ts(updated)packages/plugin-coinbase/src/templates.ts(updated)packages/plugin-coinbase/src/index.ts(updated)agent/src/index.ts(updated)docs/docs/packages/plugins.md(updated)
Deploy Notes
No special deployment steps required. The plugin is automatically enabled when Coinbase credentials are present.
Discord username
N/A