A quick python script used to fetch an ethereum smart contracts ABI, if it is available on etherscan.
Project description
fetch abi
A quick python script used to fetch an ethereum smart contracts ABI, if it is available on etherscan.
How to use
Simply import the fetch-abi function and use the contract address as an argument. Target smart contract must be verified thus have its ABI available on etherscan.
from fetchabi import *
abi = fetch_abi("0xe11c90922BB5d6fe661B44039DA64c04b5B153E9")
print(abi)
Gives
{
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"stateMutability": "payable",
"type": "fallback"
},
{
"inputs": [],
"name": "implementation",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
]
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fetchabi-0.12.tar.gz
(3.3 kB
view hashes)