CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-web3-eth

Web3 module to interact with the Ethereum blockchain and smart contracts.

Agent Success

Agent success rate when using this tile

67%

Improvement

Agent success rate improvement when using this tile compared to baseline

0.99x

Baseline

Agent success rate without this tile

68%

Overview
Eval results
Files

task.mdevals/scenario-6/

Fee Signal Toolkit

A module that surfaces EIP-1559 fee suggestions and simple historical fee insights from an Ethereum node.

Capabilities

Recommend next-block fee caps

  • When the node returns a base fee of 30 gwei for the next block and a priority tip suggestion of 2 gwei, a default target multiplier of 1.2 yields type "eip1559", maxFeePerGas "38000000000", maxPriorityFeePerGas "2000000000", and baseFeePerGas "30000000000". @test
  • When the node does not expose base fees but provides a legacy gas price of 15 gwei, the recommendation is type "legacy" with both maxFeePerGas and maxPriorityFeePerGas set to "15000000000". @test

Summarize recent fees

  • For a 5-block window with base fees [20, 22, 24, 26, 28] gwei and reward percentiles at the 50th percentile [1, 1.5, 2, 2.5, 3] gwei, it returns baseFeeMedian "24000000000", rewardAtPercentile "2000000000", oldestBlock matching the window start, and newestBlock matching the latest block number. @test

Check priority sufficiency

  • Given a node-suggested priority tip of 2 gwei, a candidate of 1 gwei is insufficient (false) and 3 gwei is sufficient (true). @test

Implementation

@generates

API

All fee values are returned as decimal strings representing wei.

export interface FeeRecommendation {
  type: "eip1559" | "legacy";
  maxFeePerGas: string;
  maxPriorityFeePerGas: string;
  baseFeePerGas?: string;
}

export interface FeeWindowSummary {
  baseFeeMedian: string;
  rewardAtPercentile: string;
  oldestBlock: number;
  newestBlock: number;
}

export async function recommendNextBlockFees(targetMultiplier?: number): Promise<FeeRecommendation>;
export async function summarizeRecentFees(blockCount: number, percentile: number): Promise<FeeWindowSummary>;
export async function isPrioritySufficient(candidateTipWei: string): Promise<boolean>;

Dependencies { .dependencies }

web3-eth { .dependency }

Ethereum JSON-RPC client used for fee and gas discovery operations.

tessl i tessl/npm-web3-eth@4.8.0

tile.json