UNPKG

@wagmi/cli

Version:

Manage and generate code from Ethereum ABIs

46 lines 3.5 kB
import type { ContractConfig } from '../config.js'; import type { Compute } from '../types.js'; export type SourcifyConfig<chainId extends number> = { /** * Duration in milliseconds to cache ABIs. * * @default 1_800_000 // 30m in ms */ cacheDuration?: number | undefined; /** * Chain id to use for fetching ABI. * * If `address` is an object, `chainId` is used to select the address. * * See https://docs.sourcify.dev/docs/chains for supported chains. */ chainId: (chainId extends ChainId ? chainId : never) | (ChainId & {}); /** * Contracts to fetch ABIs for. */ contracts: Compute<Omit<ContractConfig<ChainId, chainId>, 'abi'>>[]; }; /** Fetches contract ABIs from Sourcify. */ export declare function sourcify<chainId extends ChainId>(config: SourcifyConfig<chainId>): { contracts: () => import("../types.js").MaybePromise<ContractConfig[]>; name: string; run?: ((config: { contracts: import("../config.js").Contract[]; isTypeScript: boolean; outputs: readonly { plugin: Pick<import("../config.js").Plugin, "name">; imports?: string; prepend?: string; content: string; }[]; }) => import("../types.js").MaybePromise<{ imports?: string; prepend?: string; content: string; }>) | undefined | undefined; validate?: (() => import("../types.js").MaybePromise<void>) | undefined | undefined; watch?: import("../config.js").Watch | undefined; }; type ChainId = 1 | 560048 | 11155111 | 17000 | 5 | 3 | 4 | 96969696 | 180 | 78430 | 1339 | 421613 | 42170 | 42161 | 421614 | 421611 | 10242 | 10243 | 592 | 6321 | 6322 | 1313161554 | 1313161555 | 43114 | 43113 | 223 | 56 | 97 | 8453 | 84531 | 84532 | 4337 | 13337 | 641230 | 200901 | 200810 | 7171 | 7771 | 81457 | 288 | 28 | 78431 | 534 | 7700 | 7701 | 44787 | 62320 | 42220 | 11142220 | 5115 | 78432 | 1030 | 1116 | 1115 | 1114 | 21000000 | 44 | 25 | 4157 | 3737 | 103090 | 33111 | 53935 | 335 | 46 | 43 | 666666666 | 432204 | 432201 | 2000 | 2021 | 648 | 39797 | 49797 | 246 | 73799 | 61 | 42793 | 128123 | 9001 | 9000 | 250 | 26100 | 314159 | 314 | 14 | 252 | 2522 | 122 | 17069 | 486217935 | 192837465 | 356256156 | 100 | 10200 | 71402 | 71401 | 19011 | 216 | 54211 | 11235 | 295 | 16350 | 96 | 25925 | 1001 | 8217 | 2222 | 2221 | 420420 | 420666 | 2037 | 255 | 2358 | 10849 | 10850 | 767368 | 764984 | 1891 | 1890 | 59144 | 59141 | 1135 | 957 | 22776 | 212 | 5000 | 5003 | 7078815900 | 333000333 | 222000222 | 4200 | 82 | 83 | 1088 | 59902 | 31612 | 9996 | 9977 | 34443 | 919 | 1287 | 1284 | 1285 | 62621 | 10 | 11155420 | 42262 | 42261 | 23294 | 23295 | 311752642 | 4216137055 | 970 | 28528 | 420 | 69 | 4000 | 16180 | 62831 | 99 | 77 | 11297108109 | 11297108099 | 13381 | 2206132 | 210425 | 12898 | 80002 | 137 | 80001 | 1101 | 2442 | 16969696 | 369 | 35441 | 35443 | 690 | 1433 | 570 | 57000 | 2020 | 30 | 534352 | 534351 | 336 | 2044 | 2038 | 111000 | 19 | 1516 | 105105 | 205205 | 2048 | 2047 | 5330 | 1291 | 1149 | 57 | 5700 | 167000 | 167006 | 167005 | 5845 | 841 | 842 | 2017 | 40 | 41 | 7668 | 7672 | 710420 | 1127469 | 723107 | 6119 | 8 | 130 | 100009 | 100010 | 106 | 11111 | 888 | 999 | 51 | 50 | 660279 | 37714555429 | 202401 | 42766 | 383414847825 | 7000 | 7001 | 32769 | 32770 | 33103 | 33101 | 48898 | 48900 | 48899 | 7777777 | 999999999 | 7200 | 839999 | 3338 | 300; export {}; //# sourceMappingURL=sourcify.d.ts.map