← all adapters

etherscan-style

simulates Etherscan API 1.0

restadapter v0.1.01 routes

verification

VMVM tier — no SDK suite yet· surface 1 · not implemented 3 · differs 2

use it

# add to stunt.yaml
services:
  etherscan:
    adapter: embedded:etherscan-style

# then
$ stunt up

The embedded: source extracts this adapter from the binary — no git clone, fully offline.

how to mock the Etherscan API locally

Install stunt, paste the service block above into stunt.yaml, run stunt up — then point your client at localhost instead of Etherscan API. It works offline, keeps state across requests and restarts, and every response is synthetic: the route shapes, status codes, pagination, and webhook delivery follow the real Etherscan API 1.0 surface — the data is fake, the behavior is real.

backing stores

accountstransactionscontractstoken_holders

api surface (1)

generated from the adapter manifest — exactly what boots, nothing more

1 routes
GET/api

VM-verified behaviors (6)

  • the apikey query parameter gates every module call
  • unknown modules and actions answer the NOTOK envelope over HTTP 200
  • balance reads the seeded ledger; unknown addresses default to "0"
  • txlist scopes by address then applies block filters, sort and paging
  • contract verification: ABI, source, and the unverified fallback
  • stats and token holders keep every number a decimal string

Not implemented (3)

  • No getLogs action (txlistinternal/tokentx are served, hard-coded empty)
  • No logs, proxy, or gastracker modules (gasoracle, eth_call passthrough)
  • No getminedblocks, getblocknobytime, or nodecount actions

Differs from the real API (2)

  • Auth accepts any non-empty apikey; only a missing key yields the error envelope
  • txlistinternal/tokentx/tokenbalance return hard-coded empty results
want more of the Etherscan API surface? adapters are YAML + Starlark — the authoring guide covers adding routes, fixtures, and state machines. Open an issue for anything big first, or just file a PR — merged routes ship in the next release.