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%
A helper module that previews, estimates, and sends Ethereum transactions over a provided RPC endpoint while surfacing clear lifecycle feedback.
@generates
export interface ProviderConfig {
rpcUrl: string;
defaultFrom?: string;
}
export interface TransactionInput {
from?: string;
to?: string;
data?: string;
value?: string | number;
gas?: string | number;
maxFeePerGas?: string | number;
maxPriorityFeePerGas?: string | number;
nonce?: number;
}
export interface GasBufferOptions {
bufferMultiplier?: number; // e.g. 1.2 for 20% buffer
fallbackGasLimit?: number;
blockTag?: string | number;
}
export interface LifecycleHandlers {
onSending?: (tx: TransactionInput) => void;
onSent?: (tx: TransactionInput) => void;
onHash?: (hash: string) => void;
onConfirmation?: (info: { confirmations: number; receipt: unknown; latestBlockHash: string }) => void;
onReceipt?: (receipt: unknown) => void;
}
export interface SendOptions {
requiredConfirmations?: number;
timeoutMs?: number;
gasBufferMultiplier?: number;
manualGasLimit?: number;
}
export type CallPreview = { raw: unknown; success: boolean };
export async function simulateTransaction(
provider: ProviderConfig,
transaction: TransactionInput
): Promise<CallPreview>;
export async function estimateGasWithBuffer(
provider: ProviderConfig,
transaction: TransactionInput,
options?: GasBufferOptions
): Promise<number>;
export async function sendTransactionWithLifecycle(
provider: ProviderConfig,
transaction: TransactionInput,
options?: SendOptions,
handlers?: LifecycleHandlers
): Promise<{ hash: string; receipt: unknown }>;
export async function waitForConfirmations(
provider: ProviderConfig,
transactionHash: string,
requiredConfirmations?: number,
timeoutMs?: number
): Promise<{ confirmations: number; receipt: unknown }>;Used for performing read-only simulations, estimating gas, sending transactions, and polling for confirmations.
tessl i tessl/npm-web3-eth@4.8.0docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10