Generate a Python ABI constant from a Solidity contract for use with web3.py
Generate ABI for: $ARGUMENTS
Read the Solidity contract in ARIA/contracts/.
For each function, build the ABI entry.
Solidity → ABI type mapping:
uint256/uint8/int256 → {"type": "uint256"} etc.address → {"type": "address"}bool → {"type": "bool"}string/string calldata → {"type": "string"}bytes/bytes32 → {"type": "bytes"}/{"type": "bytes32"}stateMutability:
view/pure → "view"/"pure""nonpayable""payable"Events:
{"type": "event", "name": "Name", "inputs": [{"name": "p", "type": "uint256", "indexed": true}]}
Generate Python constant:
_CONTRACT_ABI: list[dict] = [
{
"type": "function",
"name": "functionName",
"inputs": [{"name": "param1", "type": "uint256"}],
"outputs": [{"name": "", "type": "uint8"}],
"stateMutability": "view",
},
]
Only include functions/events that will actually be used.
Show the generated ABI and suggest which tool file to place it in.