aave-protocol-v2/helpers/tenderly-utils.ts
2021-06-08 17:41:09 +02:00

18 lines
577 B
TypeScript

import { Contract } from 'ethers';
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DRE } from './misc-utils';
export const usingTenderly = () =>
DRE &&
((DRE as HardhatRuntimeEnvironment).network.name.includes('tenderly') ||
process.env.TENDERLY === 'true');
export const verifyAtTenderly = async (id: string, instance: Contract) => {
console.log('\n- Doing Tenderly contract verification of', id);
await (DRE as any).tenderlyRPC.verify({
name: id,
address: instance.address,
});
console.log(` - Verified ${id} at Tenderly!`);
};