Skip to main content
Glama
omnioperand-mcp

omnioperand-mcp

omni_smart_contract_gas_limit

Calculate EVM opcode execution gas for Solidity contracts, including SSTORE, SLOAD, logs, memory expansion, total gas cost, storage dominance, and gas-packing savings.

Instructions

Smart Contract EVM Opcode Gas Execution Cost Analyzer. Calculate granular EVM opcode execution gas (SSTORE, SLOAD, KECCAK256, LOG, Memory expansion) for Solidity smart contracts. Discipline: CRYPTO. Governing mathematical model / formula: Total Gas = 21,000 Base + Σ (Opcode Cost) + Memory Expansion Gas.

USAGE GUIDELINES:

  • WHEN TO USE: Invoke for deterministic calculation of total_execution_gas (Total EVM Execution Gas), storage_cost_percentage (Storage Dominance Ratio), cost_at_30_gwei_usd (Execution Cost @ 30 Gwei ($3,200 ETH)), optimization_potential (Gas Packing Optimization Potential) using storage_writes_sstore_new (New Storage Slots Written (Zero to Non-Zero)), storage_updates_sstore_mod (Existing Storage Slots Modified), storage_reads_sload (Storage Read Operations (SLOAD)), emitted_events_count (Emitted Events / Logs (LOG3)). Guarantees exact machine floating-point precision, eliminating LLM arithmetic mistakes and formula hallucinations.

  • WHEN NOT TO USE: Do not use for qualitative evaluations or unquantified reasoning. All input parameters must be valid numerical values.

DISAMBIGUATION & BOUNDARIES:

  • Use this dedicated specialist tool for 'Smart Contract EVM Opcode Gas Execution Cost Analyzer' rather than generic dispatchers like omni_universal_query.

  • For multi-calculation chained jobs, use 'omni_batch_calculate'.

  • To inspect schema fields, see 'omni_describe_solver'.

BEHAVIOR & SAFETY:

  • Pure deterministic computation with machine floating-point precision.

  • Read-only, idempotent, and stateless. Zero side effects or persistent state mutations.

  • Input validation: All arguments are validated against physical and domain bounds. Out-of-bounds inputs return a safe diagnostic error status without throwing runtime exceptions.

RETURNS:

  • Structured JSON object containing:

    • status (string): "success" on valid execution or "error" if validation fails

    • calculator (string): "smart-contract-gas-limit"

    • category (string): "crypto"

    • name (string): "Smart Contract EVM Opcode Gas Execution Cost Analyzer"

    • formula (string): Governing mathematical formula string

    • inputs (object): Echoed input parameter dictionary with applied defaults

    • metrics (object): Dictionary of computed outputs:

      • metrics.total_execution_gas (Total EVM Execution Gas): Formatted display string (e.g. '73,800 Gas')

      • metrics.storage_cost_percentage (Storage Dominance Ratio): Formatted display string (e.g. '67.8% of Total Gas (State Storage)')

      • metrics.cost_at_30_gwei_usd (Execution Cost @ 30 Gwei ($3,200 ETH)): Formatted display string (e.g. '$7.08 USD')

      • metrics.optimization_potential (Gas Packing Optimization Potential): Formatted display string (e.g. 'Save ~20,000 Gas by Packing Structs')

    • execution_time_ms (number): Latency in milliseconds.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "omni_smart_contract_gas_limit"
  }
}

Input Schema

NameRequiredDescriptionDefault
storage_reads_sloadNoStorage Read Operations (SLOAD). Cold SLOAD = 2,100 gas, Warm SLOAD = 100 gas. Default: 4. Min: 0. Max: 100.
emitted_events_countNoEmitted Events / Logs (LOG3). Event emission with 2-3 indexed topics (~1,500 gas). Default: 1. Min: 0. Max: 10.
storage_writes_sstore_newNoNew Storage Slots Written (Zero to Non-Zero). SSTORE (20,000 gas each for new storage slot). Default: 2. Min: 0. Max: 50.
storage_updates_sstore_modNoExisting Storage Slots Modified. SSTORE (2,900 gas each for non-zero to non-zero). Default: 1. Min: 0. Max: 50.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

Score is being calculated.

Deploy Server

Other Tools