Namespace loaders

Verified contract source code:

const loader = whatsabi.loaders.defaultsWithEnv(env);
const result = await loader.getContract(address);
const sources = await result.getSources();

for (const s of sources) {
console.log(s.path, " -> ", s.content + "...");
}

Combine loaders with custom settings behind a single interface, or use defaultsWithEnv as a shortcut for this.

const loader = new whatsabi.loaders.MultiABILoader([
new whatsabi.loaders.SourcifyABILoader({ chainId: 8453 }),
new whatsabi.loaders.EtherscanABILoader({
baseURL: "https://api.basescan.org/api",
apiKey: "...", // Replace the value with your API key
}),
]);

Index

Variables

Functions

Classes

Interfaces

Type Aliases