Skip to content

About

A read-only tool to check EVM chain IDs, block heights, and contract bytecode.

Resources

Stars

52 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

EVM RPC Check

A small command line tool for checking an EVM RPC endpoint. It prints the chain ID and latest block number, verifies the expected chain when supplied, and can report the size of the bytecode at an address.

Usage

Requires Node.js 22 or later. The tool has no package dependencies.

node rpc-check.mjs --help
node rpc-check.mjs https://cloudflare-eth.com --chain 1
node rpc-check.mjs https://cloudflare-eth.com --chain 1 --address 0xdAC17F958D2ee523a2206206994597C13D831ec7

Use EVM_RPC_URL in place of the positional URL when your endpoint includes a private API key. The address you supply is sent to the selected endpoint. The tool only calls eth_chainId, eth_blockNumber, and eth_getCode.

Chain ID and block number are emitted as decimal strings to preserve precision. codeBytes is the bytecode length at the reported block. A positive value shows that the endpoint returned bytecode for the address. Confirm contract identity, permissions, and behavior separately before using it. The command exits with status 1 on a failed check, including a chain ID mismatch.

About

A read-only tool to check EVM chain IDs, block heights, and contract bytecode.

Resources

Stars

52 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages