get_abi_by_filename
Documentation for eth_defi.abi.get_abi_by_filename function.
- get_abi_by_filename(fname)[source]
Reads a embedded ABI file and returns it.
Example:
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.
- Parameters
web3 – Web3 instance
fname (str) – JSON filename from supported contract lists.
- Returns
Full contract interface, including bytecode.
- Return type