@dethcrypto/eth-sdk
Version:
🛠Generate type-safe, lightweight SDK for your Ethereum smart contracts
21 lines (20 loc) • 771 B
TypeScript
import type { Address } from '../../config';
import { FetchJson } from '../../peripherals/fetchJson';
import type { Abi } from '../../types';
import { NetworkSymbol } from '../networks';
import { UserEtherscanKeys, UserEtherscanURLs } from './explorerEndpoints';
export declare function getAbiFromEtherscan(networkSymbol: NetworkSymbol, address: Address, config: EtherscanConfig, fetch: FetchJson<EtherscanResponse>): Promise<Abi>;
/**
* @see https://docs.etherscan.io/api-endpoints/contracts
*/
export interface EtherscanResponse {
status: string | number;
result: string;
message: 'OK' | 'NOTOK';
}
interface EtherscanConfig {
etherscanKey?: string | undefined;
etherscanKeys: UserEtherscanKeys;
etherscanURLs: UserEtherscanURLs;
}
export {};