Documentation
¶
Overview ¶
Package evm reads an Ethereum-compatible wallet (Ledger, MetaMask…) from its public address: native coin and ERC-20 history and balances, on one or more networks. Nothing is signed and no secret is needed.
Data comes from each network's Blockscout instance through its Etherscan-compatible API (module=account: txlist, txlistinternal, tokentx, balance, tokenbalance), or from Etherscan's v2 API (one host, chainid parameter) when an Etherscan key is given.
Limits of this first version:
- a swap on a DEX shows as its two legs (a Withdrawal of what was sent and a Deposit of what was received), not as a Trade;
- spam tokens are skipped by heuristics (see spam), and well-known symbols (USDC, USDT, DAI, WETH, WBTC) only count from their canonical contract, so a counterfeit "USDT" airdrop is ignored;
- the L1 data fee of rollups is added when the API returns it (l1Fee, L1FeesPaid); Blockscout's txlist does not, so ETH on L2s can show a tiny reconciliation gap.
Index ¶
Constants ¶
View Source
const All = "all"
All is the "chains" value that reads every supported network.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chain ¶
type Chain struct {
Name string // as typed in the settings
ID int // EIP-155 chain id (Etherscan v2, Blockscout PRO)
Native string // native coin symbol
Decimal int32
// Free: an Etherscan-compatible explorer that answers without a key
// ("" when none does any more).
Free string
// Pro: indexed by Blockscout's PRO API, free with a key.
Pro bool
}
Chain is a supported network.
Click to show internal directories.
Click to hide internal directories.