Vana SDK - v2.2.2
    Preparing search index...

    Class BlockchainError

    Thrown when blockchain operations fail due to network, contract, or transaction issues.

    This error encompasses various blockchain-related failures including network connectivity issues, contract execution failures, insufficient gas, invalid transaction parameters, or smart contract reverts. The original error is preserved to provide detailed debugging information while maintaining a consistent SDK error interface.

    Common causes:

    • Network connectivity problems
    • Insufficient gas or gas price too low
    • Contract function reverts
    • Invalid transaction parameters
    • Blockchain congestion or downtime
    try {
    await vana.permissions.grant({
    grantee: '0x742d35...',
    operation: 'read'
    });
    } catch (error) {
    if (error instanceof BlockchainError) {
    console.error('Blockchain operation failed:', error.message);

    // Check if it's a network issue
    if (error.originalError?.message.includes('network')) {
    // Retry with exponential backoff
    await retryOperation();
    }
    }
    }

    Hierarchy (View Summary)