Skip to main content

@elizaos/plugin-fuel

A plugin for interacting with the Fuel blockchain within the ElizaOS ecosystem.

Description​

This plugin provides essential functionality for interacting with the Fuel blockchain, focusing on ETH transfers on the Fuel Ignition network. It offers a streamlined way to manage Fuel blockchain transactions through natural language commands.

Installation​

bun install @elizaos/plugin-fuel

Configuration​

The plugin requires the following environment variables to be set:

FUEL_PRIVATE_KEY=<Private key for the Fuel wallet starting with 0x>
FUEL_PROVIDER_URL=<Custom RPC endpoint URL (optional, defaults to "https://mainnet.fuel.network/v1/graphql")>

Usage​

Basic Integration​

import { fuelPlugin } from '@elizaos/plugin-fuel';

Example Usage​

The plugin supports natural language commands for ETH transfers:

'Transfer 1 ETH to 0x8F8afB12402C9a4bD9678Bec363E51360142f8443FB171655eEd55dB298828D1';

API Reference​

Actions​

TRANSFER​

Transfers ETH between addresses on the Fuel Ignition network.

Aliases:

  • TRANSFER_FUEL_ETH
  • SEND_TOKENS

Input Content:

interface TransferParams {
toAddress: string; // Recipient's Fuel address
amount: string; // Amount of ETH to transfer
}

Common Issues & Troubleshooting​

  1. Connection Issues

    • Verify provider URL is accessible
    • Check network connectivity
    • Ensure proper network configuration
  2. Transaction Failures

    • Verify sufficient balance for transfers
    • Check correct address format
    • Ensure gas fees can be covered
  3. Authentication Issues

    • Validate private key format
    • Verify wallet configuration
    • Check network permissions

Security Best Practices​

  1. Key Management

    • Store private keys securely
    • Use environment variables for sensitive data
    • Never expose private keys in code or logs
  2. Transaction Safety

    • Validate recipient addresses
    • Implement proper error handling
    • Double-check transaction amounts

Development Guide​

Setting Up Development Environment​

  1. Clone the repository
  2. Install dependencies:
bun install
  1. Build the plugin:
bun run build
  1. Run tests:
bun test

Future Enhancements​

  • Support for token transfers
  • Enhanced error handling and recovery
  • Additional Fuel blockchain interactions
  • Transaction status monitoring
  • Balance tracking improvements

Contributing​

Contributions are welcome! Please see the CONTRIBUTING.md file for more information.

Credits​

This plugin integrates with and builds upon several key technologies:

Special thanks to:

  • The Fuel Labs team for developing the Fuel Network
  • The Fuel Developer community
  • The fuels-ts SDK maintainers
  • The Eliza community for their contributions and feedback

For more information about Fuel capabilities:

License​

This plugin is part of the Eliza project. See the main project repository for license information.