Skip to content

BuildOnViction/plugin-viction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@elizaos/plugin-viction

Core Viction blockchain plugin for Eliza OS that provides essential services and actions for token operations, trading, and DeFi integrations.

Overview

The Viction plugin serves as a foundational component of Eliza OS, bridging Viction blockchain capabilities with the Eliza ecosystem. It provides crucial services for token operations, trading, portfolio management, and DeFi integrations, enabling both automated and user-directed interactions with the Viction blockchain.

Features

Token Operations

  • Token Information: Provide Viction information
  • Token Transfers: Send and receive tokens securely native and non-native

Installation

npm install @elizaos/plugin-viction

Configuration

Configure the plugin by setting the following environment variables:

const victionEnvSchema = {
    VICTION_ADDRESS: string,
    VICTION_PRIVATE_KEY: string,
    VICTION_RPC_URL: string
};

Usage

Basic Setup

import { victionPlugin } from "@elizaos/plugin-viction";

// Initialize the plugin
const runtime = await initializeRuntime({
    plugins: [victionPlugin],
});

Actions

vic_infomations

Provide Viction's information

// Example usage
const result = await runtime.executeAction("GIVE_VICTION_INFOMATION", {});

transferVic

Transfers VIC between wallets.

// Example usage
const result = await runtime.executeAction("SEND_VIC", {
    recipient: "RecipientAddressHere",
    amount: "1000",
});

transferTokens

Transfers tokens between wallets.

// Example usage
const result = await runtime.executeAction("SEND_TOKEN", {
    recipient: "RecipientAddressHere",
    tokenAddress: "TokenAddressHere"
    amount: "1000",
});

Performance Optimization

  1. Cache Management

    • Implement token data caching
    • Configure cache TTL settings
    • Monitor cache hit rates
  2. RPC Optimization

    • Use connection pooling
    • Implement request batching
    • Monitor RPC usage
  3. Transaction Management

    • Optimize transaction bundling
    • Implement retry strategies
    • Monitor transaction success rates

System Requirements

  • Node.js 16.x or higher
  • Minimum 4GB RAM recommended
  • Stable internet connection
  • Access to Viction RPC endpoint

Troubleshooting

Common Issues

  1. Wallet Connection Failures
Error: Failed to connect to wallet
  • Verify RPC endpoint is accessible
  • Check wallet configuration settings
  • Ensure proper network selection
  1. Transaction Errors
Error: Transaction failed
  • Check account balances
  • Verify transaction parameters
  • Ensure proper fee configuration

Safety & Security

Best Practices

  1. Environment Variables

    • Store sensitive keys in environment variables
    • Use .env.example for non-sensitive defaults
    • Never commit real credentials to version control

Performance Optimization

  1. Cache Management

    • Implement token data caching
    • Configure cache TTL settings
    • Monitor cache hit rates
  2. RPC Optimization

    • Use connection pooling
    • Implement request batching
    • Monitor RPC usage
  3. Transaction Management

    • Optimize transaction bundling
    • Implement retry strategies
    • Monitor transaction success rates

Support

For issues and feature requests, please:

  1. Check the troubleshooting guide above
  2. Review existing GitHub issues
  3. Submit a new issue with:
    • System information
    • Error logs
    • Steps to reproduce
    • Transaction IDs (if applicable)

Contributing

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

License

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published