Created
December 8, 2021 16:16
-
-
Save alexkroeger/d3ee86e32fb52ed41f796ad27ac11f9f to your computer and use it in GitHub Desktop.
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
async function getContractAbiFromEtherscan(contractAddress: string): Promise<string> { | |
const url = `https://api.etherscan.io/api?module=contract&action=getabi&address=${contractAddress}`; | |
const response = await axios.get(url); | |
return response.data.result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment