This was originally merged via #113 but after sleeping on it, it still feels underbaked so I reverted it and now re-opening here for progress tracking.
Feels like this might be better done by adding additional fallback loaders instead. Would be nice if we could verify that the bytecode matches, but we can do that with the getContract API.
Example:
// USDT, available on both PulseChain and Mainnet (but only verified on mainnet)
const address = "0xdAC17F958D2ee523a2206206994597C13D831ec7";
const result = await autoload(address, {
provider: pulseChainProvider,
fallbackLoad: {
mainnnetProvider,
...whatsabi.loaders.defaultsWithEnv(env),
}
});
console.log(result); // {isVerified: true, abi: [...], ...}
This was originally merged via #113 but after sleeping on it, it still feels underbaked so I reverted it and now re-opening here for progress tracking.
Feels like this might be better done by adding additional fallback loaders instead. Would be nice if we could verify that the bytecode matches, but we can do that with the getContract API.
Example: