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 details)
File details
Details for the file fetchabi-0.12.tar.gz
.
File metadata
- Download URL: fetchabi-0.12.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 368130b26d4833aa37dfa95eb6fe4ace58a595a9d1dc0da528b56937ec3d8b5c |
|
MD5 | 032f263d9afcbcefb9144829f01b9b4f |
|
BLAKE2b-256 | 82495310806a8bff3b970a6eecc389e155e77a6d30756da6d6e1462a1b49648f |