@elizaos/plugin-conflux
A plugin for interacting with the Conflux blockchain network within the ElizaOS ecosystem.
Description​
The Conflux plugin enables seamless interaction with both Conflux Core Space and eSpace networks. It provides functionality for token transfers, cross-space bridge operations, and ConfiPump token management (creation, buying, and selling).
Installation​
bun install @elizaos/plugin-conflux
Configuration​
The plugin requires the following environment variables to be set:
CONFLUX_CORE_PRIVATE_KEY=<Your Conflux Core Space private key>
CONFLUX_CORE_SPACE_RPC_URL=<Conflux Core Space RPC endpoint>
CONFLUX_MEME_CONTRACT_ADDRESS=<ConfiPump contract address>
Usage​
Basic Integration​
import { confluxPlugin } from '@elizaos/plugin-conflux';
Example Usage​
// Core Space Transfer
'Send 1 CFX to cfx:aaejuaaaaaaaaaaaaaaaaaaaaaaaaaaaa2eaeg85p5';
// Cross-Space Bridge Transfer
'Send 1 CFX to eSpace Address 0x119DA8bbe74B1C5c987D0c64D10eC1dB301d4752';
// ConfiPump Token Creation
'Create a new token called GLITCHIZA with symbol GLITCHIZA and generate a description about it';
// ConfiPump Token Trading
'Buy 0.00069 CFX worth of GLITCHIZA(0x1234567890abcdef)';
'Sell 0.00069 CFX worth of GLITCHIZA(0x1234567890abcdef)';
API Reference​
Actions​
SEND_CFX​
Transfers CFX tokens within Conflux Core Space.
Aliases:
- SEND_CONFLUX
- SEND_CFX_CORE_SPACE
- TRANSFER_CFX
Input Content:
interface TransferContent {
to: string; // Conflux Core Space address (cfx: prefix)
amount: string; // Amount of CFX to send
}
BRIDGE_SEND_CFX​
Transfers CFX tokens from Core Space to eSpace.
Aliases:
- BRIDGE_SEND_CONFLUX
- CROSS_SPACE_SEND_CFX
- BRIDGE_TRANSFER_CFX
- CROSS_SPACE_TRANSFER_CFX
Input Content:
interface TransferContent {
to: string; // Conflux eSpace address (0x prefix)
amount: string; // Amount of CFX to send
}
CONFI_PUMP​
Manages ConfiPump token operations.
Aliases:
- SELL_TOKEN
- BUY_TOKEN
- CREATE_TOKEN
Input Content:
interface PumpContent {
action: 'CREATE_TOKEN' | 'BUY_TOKEN' | 'SELL_TOKEN';
params: {
name?: string;
symbol?: string;
description?: string;
tokenAddress?: string;
value?: string;
};
}
Common Issues & Troubleshooting​
- Transaction Failures
- Ensure sufficient CFX balance for transactions
- Verify correct address format (cfx: for Core Space, 0x for eSpace)
- Check RPC endpoint connectivity
Security Best Practices​
- Private Key Management
- Store private keys securely using environment variables
- Never expose private keys in code or logs
- Use separate accounts for development and production
Development Guide​
Setting Up Development Environment​
- Clone the repository
- Install dependencies:
bun install
- Build the plugin:
bun run build
- Run the plugin:
bun run dev
Future Enhancements​
-
Advanced Token Management
- Batch token transfers
- Token allowance management
- Advanced meme token features
- Token metadata management
-
Enhanced Bridge Operations
- Multi-token bridge support
- Automated bridge fee optimization
- Bridge transaction status tracking
- Cross-space batch operations
-
Smart Contract Integration
- Contract deployment tools
- Contract interaction templates
- ABI management system
- Contract verification tools
-
Performance Optimizations
- Transaction batching
- Improved caching mechanisms
- Gas optimization strategies
- Network request optimization
-
Developer Tools
- CLI tools for common operations
- Development environment templates
- Testing utilities
- Documentation generator
-
Security Features
- Transaction simulation
- Risk assessment tools
- Address validation improvements
- Rate limiting controls
-
Monitoring and Analytics
- Transaction tracking dashboard
- Performance metrics
- Error reporting system
- Usage analytics
We welcome community feedback and contributions to help prioritize these enhancements.
Contributing​
Contributions are welcome! Please see the CONTRIBUTING.md file for more information.
Credits​
This plugin integrates with and builds upon several key technologies:
- Conflux Network: Hybrid consensus blockchain
- js-conflux-sdk: Official Conflux JavaScript SDK
- ConfiPump: Meme token creation platform
- @conflux-dev/conflux-address-js: Address utilities
Special thanks to:
- The Conflux Foundation for developing the network
- The Conflux Developer community
- The ConfiPump team for meme token infrastructure
- The js-conflux-sdk maintainers
- The Eliza community for their contributions and feedback
For more information about Conflux capabilities:
License​
This plugin is part of the Eliza project. See the main project repository for license information.