This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am attesting that this GitHub handle anonymoussprocket is linked to the Tezos account tz1eU1NCk7U6sNxDKos7CJMM7P97bW3wyGB1 for tzprofiles | |
sig:edsigtwwTgkiJZuqnGFDgsHsfV1Ejt8K2WXhD6Nei8WKgHr8CnbHrvcqJoUpT1LwRgzHWtPzqxQZ5itS4LHTC3KNX7iyNbhSCq1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fetch from 'node-fetch'; | |
import { smock } from '@defi-wonderland/smock'; | |
async function deployMockContractFromAddress(contractAddress: string, etherscanKey: string) { | |
const abi = await fetch(`https://api.etherscan.io/api?module=contract&action=getabi&address=${contractAddress}&apikey=${etherscanKey}`) | |
.then(response => response.json()) | |
.then(data => JSON.parse(data['result'])); | |
return smock.fake(abi, {address: contractAddress}); | |
} |
OlderNewer