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-9/

Account Snapshot Tool

Summarizes an Ethereum account's state using a JSON-RPC endpoint.

Capabilities

Account selection

  • When an explicit address is supplied, returns a snapshot using its checksum-normalized form; rejects clearly invalid address formats. @test
  • When no address is supplied, uses the first account exposed by the connected node and surfaces it in checksum-normalized form. @test

Balance and nonce

  • Returns the current balance (wei as decimal string) and transaction count (nonce) for the selected address at the latest finalized block. @test

Contract code detection

  • Includes the runtime code at the address as a 0x-prefixed hex string; empty code is reported as "0x". @test

Storage slot read

  • When a storage slot identifier is provided, returns the 0x-prefixed value stored at that slot; defaults to slot 0 when omitted. @test

Implementation

@generates

API

export type AccountSnapshot = {
  address: string; // checksum-normalized address used for all lookups
  balanceWei: string; // decimal string balance from the latest finalized block
  nonce: number; // transaction count from the latest finalized block
  code: string; // 0x-prefixed runtime code ("0x" when none)
  storageSlot: {
    slot: string; // 0x-prefixed slot identifier used for the lookup
    value: string; // 0x-prefixed storage value
  };
};

export async function fetchAccountSnapshot(
  providerUrl: string,
  targetAddress?: string,
  slot?: string | number
): Promise<AccountSnapshot>;

Dependencies { .dependencies }

web3-eth { .dependency }

Provides account and state inspection helpers for Ethereum JSON-RPC nodes.

tessl i tessl/npm-web3-eth@4.8.0

tile.json