Files
B.Tech-Project-III/negot8/backend/blockchain_web3/contract_abi.py
2026-04-05 00:43:23 +05:30

68 lines
2.7 KiB
Python

"""
ABI for the AgreementRegistry smart contract deployed on Polygon Amoy.
Contract: 0xEcD97DFfd525BEa4C49F68c11cEfbABF73A30F9e
"""
AGREEMENT_REGISTRY_ABI = [
{
"inputs": [
{"internalType": "string", "name": "negotiationId", "type": "string"},
{"internalType": "bytes32", "name": "agreementHash", "type": "bytes32"},
{"internalType": "string", "name": "featureType", "type": "string"},
{"internalType": "string", "name": "summary", "type": "string"}
],
"name": "registerAgreement",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{"internalType": "string", "name": "negotiationId", "type": "string"}
],
"name": "getAgreement",
"outputs": [
{
"components": [
{"internalType": "bytes32", "name": "agreementHash", "type": "bytes32"},
{"internalType": "string", "name": "featureType", "type": "string"},
{"internalType": "string", "name": "summary", "type": "string"},
{"internalType": "uint256", "name": "timestamp", "type": "uint256"},
{"internalType": "address", "name": "registeredBy", "type": "address"}
],
"internalType": "struct AgreementRegistry.Agreement",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalAgreements",
"outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
"name": "agreementIds",
"outputs": [{"internalType": "string", "name": "", "type": "string"}],
"stateMutability": "view",
"type": "function"
},
{
"anonymous": False,
"inputs": [
{"indexed": True, "internalType": "string", "name": "negotiationId", "type": "string"},
{"indexed": False, "internalType": "bytes32", "name": "agreementHash", "type": "bytes32"},
{"indexed": False, "internalType": "string", "name": "featureType", "type": "string"},
{"indexed": False, "internalType": "string", "name": "summary", "type": "string"},
{"indexed": False, "internalType": "uint256", "name": "timestamp", "type": "uint256"}
],
"name": "AgreementRegistered",
"type": "event"
}
]