Documentation for eth_defi.abi.get_abi_by_filename function.
Reads a embedded ABI file and returns it.
abi = get_abi_by_filename("ERC20Mock.json")
You are most likely interested in the keys abi and bytecode of the JSON file.
Loaded ABI files are cache in in-process memory to speed up future loading.
Any results are cached.
web3 – Web3 instance
fname (str) – JSON filename from supported contract lists.
Full contract interface, including bytecode.
- Return type