Skip to content
docs

EtherscanSource

Defined in: protocol-approvals-evm/src/sources/etherscan.ts:26

Discovery through the Etherscan V2 API: GET /v2/api?chainid=<id>&module=logs&action=getLogs&fromBlock&toBlock&topic1=<owner>&page=1&offset=1000&apikey=….

A key is required (the free tier covers Ethereum, Arbitrum, Polygon and more at 5 requests/s; Base, Optimism, BNB and Avalanche need a paid plan — the API answers “Free API access is not supported for this chain”). Keep the key server-side: point baseUrl at your own proxy that appends it, and pass headers for the proxy’s auth.

new EtherscanSource(__namedParameters?): EtherscanSource

Defined in: protocol-approvals-evm/src/sources/etherscan.ts:31

EtherscanSourceOptions = {}

EtherscanSource

IndexerLogsSource.constructor

protected readonly _concurrency: number

Defined in: protocol-approvals-evm/src/sources/indexer-logs.ts:63

IndexerLogsSource._concurrency


protected readonly _fetch: FetchLike

Defined in: protocol-approvals-evm/src/sources/indexer-logs.ts:61

IndexerLogsSource._fetch


protected readonly _headers: Record<string, string>

Defined in: protocol-approvals-evm/src/sources/indexer-logs.ts:62

IndexerLogsSource._headers


protected readonly _maxRetryWait: number

Defined in: protocol-approvals-evm/src/sources/indexer-logs.ts:66

IndexerLogsSource._maxRetryWait


protected readonly _perTopic: boolean

Defined in: protocol-approvals-evm/src/sources/indexer-logs.ts:60

IndexerLogsSource._perTopic


protected readonly _retries: number

Defined in: protocol-approvals-evm/src/sources/indexer-logs.ts:64

IndexerLogsSource._retries


protected readonly _retryDelay: number

Defined in: protocol-approvals-evm/src/sources/indexer-logs.ts:65

IndexerLogsSource._retryDelay


readonly name: string

Defined in: protocol-approvals-evm/src/sources/indexer-logs.ts:57

Source name reported in coverage.source.

IndexerLogsSource.name


requests: number

Defined in: protocol-approvals-evm/src/sources/indexer-logs.ts:59

Requests issued by the last collect (diagnostics).

IndexerLogsSource.requests

protected _getLogs(query): Promise<RawLog[]>

Defined in: protocol-approvals-evm/src/sources/indexer-logs.ts:129

IndexerQuery

Promise<RawLog[]>

IndexerLogsSource._getLogs


protected _url(__namedParameters): string

Defined in: protocol-approvals-evm/src/sources/etherscan.ts:39

The request URL for one query; implemented by each source.

IndexerQuery

string

IndexerLogsSource._url


collect(owner, __namedParameters): Promise<CollectResult>

Defined in: protocol-approvals-evm/src/sources/indexer-logs.ts:86

string

number

number

Promise<CollectResult>

IndexerLogsSource.collect