diff --git a/abis/0.8.25/MechActivityChecker.json b/abis/0.8.25/MechActivityChecker.json index f40e4d8..4a16059 100644 --- a/abis/0.8.25/MechActivityChecker.json +++ b/abis/0.8.25/MechActivityChecker.json @@ -7,7 +7,7 @@ "inputs": [ { "internalType": "address", - "name": "_agentMech", + "name": "_mechMarketplace", "type": "address" }, { @@ -21,7 +21,7 @@ }, { "inputs": [], - "name": "ZeroMechAgentAddress", + "name": "ZeroAddress", "type": "error" }, { @@ -29,19 +29,6 @@ "name": "ZeroValue", "type": "error" }, - { - "inputs": [], - "name": "agentMech", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -102,10 +89,23 @@ ], "stateMutability": "view", "type": "function" + }, + { + "inputs": [], + "name": "mechMarketplace", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" } ], - "bytecode": "0x60c060405234801561000f575f80fd5b506040516107b33803806107b383398101604081905261002e9161008a565b80805f0361004f57604051637c946ed760e01b815260040160405180910390fd5b6080526001600160a01b0382166100785760405162ca95f960e81b815260040160405180910390fd5b506001600160a01b031660a0526100c1565b5f806040838503121561009b575f80fd5b82516001600160a01b03811681146100b1575f80fd5b6020939093015192949293505050565b60805160a0516106c56100ee5f395f818160b0015261036501525f8181607b015261024701526106c55ff3fe608060405234801561000f575f80fd5b506004361061004a575f3560e01c8063184023a51461004e578063592cf3fb1461007657806375af4b6d146100ab578063d564c4bf146100f7575b5f80fd5b61006161005c3660046104d8565b610117565b60405190151581526020015b60405180910390f35b61009d7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161006d565b6100d27f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161006d565b61010a610105366004610540565b610276565b60405161006d9190610573565b5f80821180156101585750825f81518110610134576101346105b6565b6020026020010151845f8151811061014e5761014e6105b6565b6020026020010151115b8015610197575082600181518110610172576101726105b6565b60200260200101518460018151811061018d5761018d6105b6565b6020026020010151115b1561026f575f835f815181106101af576101af6105b6565b6020026020010151855f815181106101c9576101c96105b6565b60200260200101516101db9190610610565b90505f846001815181106101f1576101f16105b6565b60200260200101518660018151811061020c5761020c6105b6565b602002602001015161021e9190610610565b905081811161026c575f8461023b83670de0b6b3a7640000610629565b6102459190610640565b7f000000000000000000000000000000000000000000000000000000000000000011159350505b50505b9392505050565b60408051600280825260608083018452926020830190803683370190505090508173ffffffffffffffffffffffffffffffffffffffff1663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102df573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103039190610678565b815f81518110610315576103156105b6565b60209081029190910101526040517f8fb847ef00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527f00000000000000000000000000000000000000000000000000000000000000001690638fb847ef90602401602060405180830381865afa1580156103aa573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ce9190610678565b816001815181106103e1576103e16105b6565b602002602001018181525050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f83011261042e575f80fd5b8135602067ffffffffffffffff8083111561044b5761044b6103f2565b8260051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110848211171561048e5761048e6103f2565b60405293845260208187018101949081019250878511156104ad575f80fd5b6020870191505b848210156104cd578135835291830191908301906104b4565b979650505050505050565b5f805f606084860312156104ea575f80fd5b833567ffffffffffffffff80821115610501575f80fd5b61050d8783880161041f565b94506020860135915080821115610522575f80fd5b5061052f8682870161041f565b925050604084013590509250925092565b5f60208284031215610550575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461026f575f80fd5b602080825282518282018190525f9190848201906040850190845b818110156105aa5783518352928401929184019160010161058e565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610623576106236105e3565b92915050565b8082028115828204841417610623576106236105e3565b5f82610673577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f60208284031215610688575f80fd5b505191905056fea2646970667358221220ee356c8aa816c1ef6086e526bf945a37391c083ffc753f1dfb85f9779f3b7e0f64736f6c63430008190033", - "deployedBytecode": "0x608060405234801561000f575f80fd5b506004361061004a575f3560e01c8063184023a51461004e578063592cf3fb1461007657806375af4b6d146100ab578063d564c4bf146100f7575b5f80fd5b61006161005c3660046104d8565b610117565b60405190151581526020015b60405180910390f35b61009d7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161006d565b6100d27f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161006d565b61010a610105366004610540565b610276565b60405161006d9190610573565b5f80821180156101585750825f81518110610134576101346105b6565b6020026020010151845f8151811061014e5761014e6105b6565b6020026020010151115b8015610197575082600181518110610172576101726105b6565b60200260200101518460018151811061018d5761018d6105b6565b6020026020010151115b1561026f575f835f815181106101af576101af6105b6565b6020026020010151855f815181106101c9576101c96105b6565b60200260200101516101db9190610610565b90505f846001815181106101f1576101f16105b6565b60200260200101518660018151811061020c5761020c6105b6565b602002602001015161021e9190610610565b905081811161026c575f8461023b83670de0b6b3a7640000610629565b6102459190610640565b7f000000000000000000000000000000000000000000000000000000000000000011159350505b50505b9392505050565b60408051600280825260608083018452926020830190803683370190505090508173ffffffffffffffffffffffffffffffffffffffff1663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102df573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103039190610678565b815f81518110610315576103156105b6565b60209081029190910101526040517f8fb847ef00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527f00000000000000000000000000000000000000000000000000000000000000001690638fb847ef90602401602060405180830381865afa1580156103aa573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ce9190610678565b816001815181106103e1576103e16105b6565b602002602001018181525050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f83011261042e575f80fd5b8135602067ffffffffffffffff8083111561044b5761044b6103f2565b8260051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110848211171561048e5761048e6103f2565b60405293845260208187018101949081019250878511156104ad575f80fd5b6020870191505b848210156104cd578135835291830191908301906104b4565b979650505050505050565b5f805f606084860312156104ea575f80fd5b833567ffffffffffffffff80821115610501575f80fd5b61050d8783880161041f565b94506020860135915080821115610522575f80fd5b5061052f8682870161041f565b925050604084013590509250925092565b5f60208284031215610550575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461026f575f80fd5b602080825282518282018190525f9190848201906040850190845b818110156105aa5783518352928401929184019160010161058e565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610623576106236105e3565b92915050565b8082028115828204841417610623576106236105e3565b5f82610673577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f60208284031215610688575f80fd5b505191905056fea2646970667358221220ee356c8aa816c1ef6086e526bf945a37391c083ffc753f1dfb85f9779f3b7e0f64736f6c63430008190033", + "bytecode": "0x60c060405234801561000f575f80fd5b506040516107b43803806107b483398101604081905261002e9161008b565b80805f0361004f57604051637c946ed760e01b815260040160405180910390fd5b6080526001600160a01b0382166100795760405163d92e233d60e01b815260040160405180910390fd5b506001600160a01b031660a0526100c2565b5f806040838503121561009c575f80fd5b82516001600160a01b03811681146100b2575f80fd5b6020939093015192949293505050565b60805160a0516106c56100ef5f395f818160b0015261036501525f8181607b015261024701526106c55ff3fe608060405234801561000f575f80fd5b506004361061004a575f3560e01c8063184023a51461004e578063592cf3fb146100765780639c5e9590146100ab578063d564c4bf146100f7575b5f80fd5b61006161005c3660046104d8565b610117565b60405190151581526020015b60405180910390f35b61009d7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161006d565b6100d27f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161006d565b61010a610105366004610540565b610276565b60405161006d9190610573565b5f80821180156101585750825f81518110610134576101346105b6565b6020026020010151845f8151811061014e5761014e6105b6565b6020026020010151115b8015610197575082600181518110610172576101726105b6565b60200260200101518460018151811061018d5761018d6105b6565b6020026020010151115b1561026f575f835f815181106101af576101af6105b6565b6020026020010151855f815181106101c9576101c96105b6565b60200260200101516101db9190610610565b90505f846001815181106101f1576101f16105b6565b60200260200101518660018151811061020c5761020c6105b6565b602002602001015161021e9190610610565b905081811161026c575f8461023b83670de0b6b3a7640000610629565b6102459190610640565b7f000000000000000000000000000000000000000000000000000000000000000011159350505b50505b9392505050565b60408051600280825260608083018452926020830190803683370190505090508173ffffffffffffffffffffffffffffffffffffffff1663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102df573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103039190610678565b815f81518110610315576103156105b6565b60209081029190910101526040517fb44fad7d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063b44fad7d90602401602060405180830381865afa1580156103aa573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ce9190610678565b816001815181106103e1576103e16105b6565b602002602001018181525050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f83011261042e575f80fd5b8135602067ffffffffffffffff8083111561044b5761044b6103f2565b8260051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110848211171561048e5761048e6103f2565b60405293845260208187018101949081019250878511156104ad575f80fd5b6020870191505b848210156104cd578135835291830191908301906104b4565b979650505050505050565b5f805f606084860312156104ea575f80fd5b833567ffffffffffffffff80821115610501575f80fd5b61050d8783880161041f565b94506020860135915080821115610522575f80fd5b5061052f8682870161041f565b925050604084013590509250925092565b5f60208284031215610550575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461026f575f80fd5b602080825282518282018190525f9190848201906040850190845b818110156105aa5783518352928401929184019160010161058e565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610623576106236105e3565b92915050565b8082028115828204841417610623576106236105e3565b5f82610673577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f60208284031215610688575f80fd5b505191905056fea2646970667358221220565cf4add490ceb00866fb56945ac7be7a8914d24fa4b563111f51b851922d8c64736f6c63430008190033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b506004361061004a575f3560e01c8063184023a51461004e578063592cf3fb146100765780639c5e9590146100ab578063d564c4bf146100f7575b5f80fd5b61006161005c3660046104d8565b610117565b60405190151581526020015b60405180910390f35b61009d7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161006d565b6100d27f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161006d565b61010a610105366004610540565b610276565b60405161006d9190610573565b5f80821180156101585750825f81518110610134576101346105b6565b6020026020010151845f8151811061014e5761014e6105b6565b6020026020010151115b8015610197575082600181518110610172576101726105b6565b60200260200101518460018151811061018d5761018d6105b6565b6020026020010151115b1561026f575f835f815181106101af576101af6105b6565b6020026020010151855f815181106101c9576101c96105b6565b60200260200101516101db9190610610565b90505f846001815181106101f1576101f16105b6565b60200260200101518660018151811061020c5761020c6105b6565b602002602001015161021e9190610610565b905081811161026c575f8461023b83670de0b6b3a7640000610629565b6102459190610640565b7f000000000000000000000000000000000000000000000000000000000000000011159350505b50505b9392505050565b60408051600280825260608083018452926020830190803683370190505090508173ffffffffffffffffffffffffffffffffffffffff1663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102df573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103039190610678565b815f81518110610315576103156105b6565b60209081029190910101526040517fb44fad7d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063b44fad7d90602401602060405180830381865afa1580156103aa573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ce9190610678565b816001815181106103e1576103e16105b6565b602002602001018181525050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f83011261042e575f80fd5b8135602067ffffffffffffffff8083111561044b5761044b6103f2565b8260051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110848211171561048e5761048e6103f2565b60405293845260208187018101949081019250878511156104ad575f80fd5b6020870191505b848210156104cd578135835291830191908301906104b4565b979650505050505050565b5f805f606084860312156104ea575f80fd5b833567ffffffffffffffff80821115610501575f80fd5b61050d8783880161041f565b94506020860135915080821115610522575f80fd5b5061052f8682870161041f565b925050604084013590509250925092565b5f60208284031215610550575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461026f575f80fd5b602080825282518282018190525f9190848201906040850190845b818110156105aa5783518352928401929184019160010161058e565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610623576106236105e3565b92915050565b8082028115828204841417610623576106236105e3565b5f82610673577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f60208284031215610688575f80fd5b505191905056fea2646970667358221220565cf4add490ceb00866fb56945ac7be7a8914d24fa4b563111f51b851922d8c64736f6c63430008190033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/abis/0.8.25/RequesterActivityChecker.json b/abis/0.8.25/RequesterActivityChecker.json index 5763ad8..73415a0 100644 --- a/abis/0.8.25/RequesterActivityChecker.json +++ b/abis/0.8.25/RequesterActivityChecker.json @@ -21,7 +21,7 @@ }, { "inputs": [], - "name": "ZeroMechAgentAddress", + "name": "ZeroAddress", "type": "error" }, { @@ -104,8 +104,8 @@ "type": "function" } ], - "bytecode": "0x60c060405234801561000f575f80fd5b506040516107b33803806107b383398101604081905261002e9161008a565b80805f0361004f57604051637c946ed760e01b815260040160405180910390fd5b6080526001600160a01b0382166100785760405162ca95f960e81b815260040160405180910390fd5b506001600160a01b031660a0526100c1565b5f806040838503121561009b575f80fd5b82516001600160a01b03811681146100b1575f80fd5b6020939093015192949293505050565b60805160a0516106c56100ee5f395f818160b0015261036501525f8181607b015261024701526106c55ff3fe608060405234801561000f575f80fd5b506004361061004a575f3560e01c8063184023a51461004e578063592cf3fb146100765780639c5e9590146100ab578063d564c4bf146100f7575b5f80fd5b61006161005c3660046104d8565b610117565b60405190151581526020015b60405180910390f35b61009d7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161006d565b6100d27f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161006d565b61010a610105366004610540565b610276565b60405161006d9190610573565b5f80821180156101585750825f81518110610134576101346105b6565b6020026020010151845f8151811061014e5761014e6105b6565b6020026020010151115b8015610197575082600181518110610172576101726105b6565b60200260200101518460018151811061018d5761018d6105b6565b6020026020010151115b1561026f575f835f815181106101af576101af6105b6565b6020026020010151855f815181106101c9576101c96105b6565b60200260200101516101db9190610610565b90505f846001815181106101f1576101f16105b6565b60200260200101518660018151811061020c5761020c6105b6565b602002602001015161021e9190610610565b905081811161026c575f8461023b83670de0b6b3a7640000610629565b6102459190610640565b7f000000000000000000000000000000000000000000000000000000000000000011159350505b50505b9392505050565b60408051600280825260608083018452926020830190803683370190505090508173ffffffffffffffffffffffffffffffffffffffff1663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102df573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103039190610678565b815f81518110610315576103156105b6565b60209081029190910101526040517f7af7347300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527f00000000000000000000000000000000000000000000000000000000000000001690637af7347390602401602060405180830381865afa1580156103aa573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ce9190610678565b816001815181106103e1576103e16105b6565b602002602001018181525050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f83011261042e575f80fd5b8135602067ffffffffffffffff8083111561044b5761044b6103f2565b8260051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110848211171561048e5761048e6103f2565b60405293845260208187018101949081019250878511156104ad575f80fd5b6020870191505b848210156104cd578135835291830191908301906104b4565b979650505050505050565b5f805f606084860312156104ea575f80fd5b833567ffffffffffffffff80821115610501575f80fd5b61050d8783880161041f565b94506020860135915080821115610522575f80fd5b5061052f8682870161041f565b925050604084013590509250925092565b5f60208284031215610550575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461026f575f80fd5b602080825282518282018190525f9190848201906040850190845b818110156105aa5783518352928401929184019160010161058e565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610623576106236105e3565b92915050565b8082028115828204841417610623576106236105e3565b5f82610673577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f60208284031215610688575f80fd5b505191905056fea2646970667358221220940f902e19bd56dc80474421a6371987491c7eb36924e7d5fcadcecd032fe28564736f6c63430008190033", - "deployedBytecode": "0x608060405234801561000f575f80fd5b506004361061004a575f3560e01c8063184023a51461004e578063592cf3fb146100765780639c5e9590146100ab578063d564c4bf146100f7575b5f80fd5b61006161005c3660046104d8565b610117565b60405190151581526020015b60405180910390f35b61009d7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161006d565b6100d27f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161006d565b61010a610105366004610540565b610276565b60405161006d9190610573565b5f80821180156101585750825f81518110610134576101346105b6565b6020026020010151845f8151811061014e5761014e6105b6565b6020026020010151115b8015610197575082600181518110610172576101726105b6565b60200260200101518460018151811061018d5761018d6105b6565b6020026020010151115b1561026f575f835f815181106101af576101af6105b6565b6020026020010151855f815181106101c9576101c96105b6565b60200260200101516101db9190610610565b90505f846001815181106101f1576101f16105b6565b60200260200101518660018151811061020c5761020c6105b6565b602002602001015161021e9190610610565b905081811161026c575f8461023b83670de0b6b3a7640000610629565b6102459190610640565b7f000000000000000000000000000000000000000000000000000000000000000011159350505b50505b9392505050565b60408051600280825260608083018452926020830190803683370190505090508173ffffffffffffffffffffffffffffffffffffffff1663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102df573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103039190610678565b815f81518110610315576103156105b6565b60209081029190910101526040517f7af7347300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527f00000000000000000000000000000000000000000000000000000000000000001690637af7347390602401602060405180830381865afa1580156103aa573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ce9190610678565b816001815181106103e1576103e16105b6565b602002602001018181525050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f83011261042e575f80fd5b8135602067ffffffffffffffff8083111561044b5761044b6103f2565b8260051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110848211171561048e5761048e6103f2565b60405293845260208187018101949081019250878511156104ad575f80fd5b6020870191505b848210156104cd578135835291830191908301906104b4565b979650505050505050565b5f805f606084860312156104ea575f80fd5b833567ffffffffffffffff80821115610501575f80fd5b61050d8783880161041f565b94506020860135915080821115610522575f80fd5b5061052f8682870161041f565b925050604084013590509250925092565b5f60208284031215610550575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461026f575f80fd5b602080825282518282018190525f9190848201906040850190845b818110156105aa5783518352928401929184019160010161058e565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610623576106236105e3565b92915050565b8082028115828204841417610623576106236105e3565b5f82610673577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f60208284031215610688575f80fd5b505191905056fea2646970667358221220940f902e19bd56dc80474421a6371987491c7eb36924e7d5fcadcecd032fe28564736f6c63430008190033", + "bytecode": "0x60c060405234801561000f575f80fd5b506040516107b43803806107b483398101604081905261002e9161008b565b80805f0361004f57604051637c946ed760e01b815260040160405180910390fd5b6080526001600160a01b0382166100795760405163d92e233d60e01b815260040160405180910390fd5b506001600160a01b031660a0526100c2565b5f806040838503121561009c575f80fd5b82516001600160a01b03811681146100b2575f80fd5b6020939093015192949293505050565b60805160a0516106c56100ef5f395f818160b0015261036501525f8181607b015261024701526106c55ff3fe608060405234801561000f575f80fd5b506004361061004a575f3560e01c8063184023a51461004e578063592cf3fb146100765780639c5e9590146100ab578063d564c4bf146100f7575b5f80fd5b61006161005c3660046104d8565b610117565b60405190151581526020015b60405180910390f35b61009d7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161006d565b6100d27f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161006d565b61010a610105366004610540565b610276565b60405161006d9190610573565b5f80821180156101585750825f81518110610134576101346105b6565b6020026020010151845f8151811061014e5761014e6105b6565b6020026020010151115b8015610197575082600181518110610172576101726105b6565b60200260200101518460018151811061018d5761018d6105b6565b6020026020010151115b1561026f575f835f815181106101af576101af6105b6565b6020026020010151855f815181106101c9576101c96105b6565b60200260200101516101db9190610610565b90505f846001815181106101f1576101f16105b6565b60200260200101518660018151811061020c5761020c6105b6565b602002602001015161021e9190610610565b905081811161026c575f8461023b83670de0b6b3a7640000610629565b6102459190610640565b7f000000000000000000000000000000000000000000000000000000000000000011159350505b50505b9392505050565b60408051600280825260608083018452926020830190803683370190505090508173ffffffffffffffffffffffffffffffffffffffff1663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102df573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103039190610678565b815f81518110610315576103156105b6565b60209081029190910101526040517f7af7347300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527f00000000000000000000000000000000000000000000000000000000000000001690637af7347390602401602060405180830381865afa1580156103aa573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ce9190610678565b816001815181106103e1576103e16105b6565b602002602001018181525050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f83011261042e575f80fd5b8135602067ffffffffffffffff8083111561044b5761044b6103f2565b8260051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110848211171561048e5761048e6103f2565b60405293845260208187018101949081019250878511156104ad575f80fd5b6020870191505b848210156104cd578135835291830191908301906104b4565b979650505050505050565b5f805f606084860312156104ea575f80fd5b833567ffffffffffffffff80821115610501575f80fd5b61050d8783880161041f565b94506020860135915080821115610522575f80fd5b5061052f8682870161041f565b925050604084013590509250925092565b5f60208284031215610550575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461026f575f80fd5b602080825282518282018190525f9190848201906040850190845b818110156105aa5783518352928401929184019160010161058e565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610623576106236105e3565b92915050565b8082028115828204841417610623576106236105e3565b5f82610673577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f60208284031215610688575f80fd5b505191905056fea26469706673582212207d2d622fb2a98a97e70a598e42d992d549df8f2ed401f4d4ba67415f8da4b7d364736f6c63430008190033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b506004361061004a575f3560e01c8063184023a51461004e578063592cf3fb146100765780639c5e9590146100ab578063d564c4bf146100f7575b5f80fd5b61006161005c3660046104d8565b610117565b60405190151581526020015b60405180910390f35b61009d7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161006d565b6100d27f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161006d565b61010a610105366004610540565b610276565b60405161006d9190610573565b5f80821180156101585750825f81518110610134576101346105b6565b6020026020010151845f8151811061014e5761014e6105b6565b6020026020010151115b8015610197575082600181518110610172576101726105b6565b60200260200101518460018151811061018d5761018d6105b6565b6020026020010151115b1561026f575f835f815181106101af576101af6105b6565b6020026020010151855f815181106101c9576101c96105b6565b60200260200101516101db9190610610565b90505f846001815181106101f1576101f16105b6565b60200260200101518660018151811061020c5761020c6105b6565b602002602001015161021e9190610610565b905081811161026c575f8461023b83670de0b6b3a7640000610629565b6102459190610640565b7f000000000000000000000000000000000000000000000000000000000000000011159350505b50505b9392505050565b60408051600280825260608083018452926020830190803683370190505090508173ffffffffffffffffffffffffffffffffffffffff1663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102df573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103039190610678565b815f81518110610315576103156105b6565b60209081029190910101526040517f7af7347300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527f00000000000000000000000000000000000000000000000000000000000000001690637af7347390602401602060405180830381865afa1580156103aa573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ce9190610678565b816001815181106103e1576103e16105b6565b602002602001018181525050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f83011261042e575f80fd5b8135602067ffffffffffffffff8083111561044b5761044b6103f2565b8260051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110848211171561048e5761048e6103f2565b60405293845260208187018101949081019250878511156104ad575f80fd5b6020870191505b848210156104cd578135835291830191908301906104b4565b979650505050505050565b5f805f606084860312156104ea575f80fd5b833567ffffffffffffffff80821115610501575f80fd5b61050d8783880161041f565b94506020860135915080821115610522575f80fd5b5061052f8682870161041f565b925050604084013590509250925092565b5f60208284031215610550575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461026f575f80fd5b602080825282518282018190525f9190848201906040850190845b818110156105aa5783518352928401929184019160010161058e565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b81810381811115610623576106236105e3565b92915050565b8082028115828204841417610623576106236105e3565b5f82610673577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f60208284031215610688575f80fd5b505191905056fea26469706673582212207d2d622fb2a98a97e70a598e42d992d549df8f2ed401f4d4ba67415f8da4b7d364736f6c63430008190033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/mech_usage/MechActivityChecker.sol b/contracts/mech_usage/MechActivityChecker.sol index c3a3a90..7207823 100644 --- a/contracts/mech_usage/MechActivityChecker.sol +++ b/contracts/mech_usage/MechActivityChecker.sol @@ -10,42 +10,42 @@ interface IMultisig { function nonce() external view returns (uint256); } -// AgentMech interface -interface IAgentMech { - /// @dev Gets the deliveries count for a specific account. - /// @param account Account address. +// Mech Marketplace interface +interface IMechMarketplace { + /// @dev Gets deliveries count for a specific operator. + /// @param operator Operator address. /// @return Deliveries count. - function getDeliveriesCount(address account) external view returns (uint256); + function getOperatorDeliveriesCount(address operator) external view returns (uint256); } -/// @dev Provided zero mech agent address. -error ZeroMechAgentAddress(); +/// @dev Provided zero address. +error ZeroAddress(); /// @title MechActivityChecker - Smart contract for mech staking activity checking /// @author Aleksandr Kuperman - /// @author Andrey Lebedev - /// @author Mariapia Moscatiello - contract MechActivityChecker is StakingActivityChecker{ - // AI agent mech contract address. - address public immutable agentMech; + // AI agent mech marketplace contract address. + address public immutable mechMarketplace; - /// @dev MechAgentMod constructor. - /// @param _agentMech AI agent mech contract address. + /// @dev MechActivityChecker constructor. + /// @param _mechMarketplace AI agent mech marketplace contract address. /// @param _livenessRatio Liveness ratio in the format of 1e18. - constructor(address _agentMech, uint256 _livenessRatio) StakingActivityChecker(_livenessRatio) { - if (_agentMech == address(0)) { - revert ZeroMechAgentAddress(); + constructor(address _mechMarketplace, uint256 _livenessRatio) StakingActivityChecker(_livenessRatio) { + if (_mechMarketplace == address(0)) { + revert ZeroAddress(); } - agentMech = _agentMech; + mechMarketplace = _mechMarketplace; } - + /// @dev Gets service multisig nonces. /// @param multisig Service multisig address. - /// @return nonces Set of a nonce and a requests count for the multisig. + /// @return nonces Set of a nonce and a deliveries count for the multisig. function getMultisigNonces(address multisig) external view virtual override returns (uint256[] memory nonces) { nonces = new uint256[](2); nonces[0] = IMultisig(multisig).nonce(); - nonces[1] = IAgentMech(agentMech).getDeliveriesCount(multisig); + nonces[1] = IMechMarketplace(mechMarketplace).getOperatorDeliveriesCount(multisig); } /// @dev Checks if the service multisig liveness ratio passes the defined liveness threshold. diff --git a/contracts/mech_usage/RequesterActivityChecker.sol b/contracts/mech_usage/RequesterActivityChecker.sol index 5a025a1..7ba4dfc 100644 --- a/contracts/mech_usage/RequesterActivityChecker.sol +++ b/contracts/mech_usage/RequesterActivityChecker.sol @@ -18,8 +18,8 @@ interface IMechMarketplace { function getRequestsCount(address account) external view returns (uint256 requestsCount); } -/// @dev Provided zero mech agent address. -error ZeroMechAgentAddress(); +/// @dev Provided zero address. +error ZeroAddress(); /// @title RequesterActivityChecker - Smart contract for requester staking activity checking /// @author Aleksandr Kuperman - @@ -29,12 +29,12 @@ contract RequesterActivityChecker is StakingActivityChecker{ // AI agent mech marketplace contract address. address public immutable mechMarketplace; - /// @dev MechAgentMod constructor. + /// @dev RequesterActivityChecker constructor. /// @param _mechMarketplace AI agent mech marketplace contract address. /// @param _livenessRatio Liveness ratio in the format of 1e18. constructor(address _mechMarketplace, uint256 _livenessRatio) StakingActivityChecker(_livenessRatio) { if (_mechMarketplace == address(0)) { - revert ZeroMechAgentAddress(); + revert ZeroAddress(); } mechMarketplace = _mechMarketplace; } diff --git a/contracts/test/MockAgentMech.sol b/contracts/test/MockAgentMech.sol index 4e60990..dcf0474 100644 --- a/contracts/test/MockAgentMech.sol +++ b/contracts/test/MockAgentMech.sol @@ -5,11 +5,15 @@ pragma solidity ^0.8.25; contract MockAgentMech { event requestsCountIncreased(address indexed account, uint256 requestsCount); event deliveriesCountIncreased(address indexed account, uint256 deliveriesCount); + event operatorDeliveriesCountIncreased(address indexed operator, uint256 deliveriesCount); - // Map of requests counts for corresponding addresses + // Map of requests counts for corresponding requester mapping (address => uint256) public mapRequestCounts; - // Map of requests counts for corresponding addresses + // Map of requests counts for corresponding requester mapping (address => uint256) public mapDeliveryCounts; + // Map of requests counts for corresponding operator + mapping (address => uint256) public mapOperatorDeliveryCounts; + function increaseRequestsCount(address account) external { mapRequestCounts[account]++; @@ -21,6 +25,11 @@ contract MockAgentMech { emit deliveriesCountIncreased(account, mapDeliveryCounts[account]); } + function increaseOperatorDeliveriesCount(address operator) external { + mapOperatorDeliveryCounts[operator]++; + emit operatorDeliveriesCountIncreased(operator, mapOperatorDeliveryCounts[operator]); + } + function getRequestsCount(address account) external view returns (uint256) { return mapRequestCounts[account]; } @@ -28,4 +37,8 @@ contract MockAgentMech { function getDeliveriesCount(address account) external view returns (uint256) { return mapDeliveryCounts[account]; } + + function getOperatorDeliveriesCount(address account) external view returns (uint256) { + return mapOperatorDeliveryCounts[account]; + } } diff --git a/test/StakingMechUsage.js b/test/StakingMechUsage.js index 63a076a..21ab451 100644 --- a/test/StakingMechUsage.js +++ b/test/StakingMechUsage.js @@ -10,7 +10,7 @@ describe("StakingMechUsage", function () { let serviceRegistry; let serviceRegistryTokenUtility; let token; - let agentMech; + let mechMarketplace; let gnosisSafe; let gnosisSafeProxyFactory; let gnosisSafeMultisig; @@ -86,8 +86,8 @@ describe("StakingMechUsage", function () { await token.deployed(); const AgentMech = await ethers.getContractFactory("MockAgentMech"); - agentMech = await AgentMech.deploy(); - await agentMech.deployed(); + mechMarketplace = await AgentMech.deploy(); + await mechMarketplace.deployed(); const GnosisSafe = await ethers.getContractFactory("GnosisSafe"); gnosisSafe = await GnosisSafe.deploy(); @@ -113,12 +113,12 @@ describe("StakingMechUsage", function () { await stakingFactory.deployed(); const RequesterActivityChecker = await ethers.getContractFactory("RequesterActivityChecker"); - requesterActivityChecker = await RequesterActivityChecker.deploy(agentMech.address, livenessRatio); + requesterActivityChecker = await RequesterActivityChecker.deploy(mechMarketplace.address, livenessRatio); await requesterActivityChecker.deployed(); serviceParams.activityChecker = requesterActivityChecker.address; const MechActivityChecker = await ethers.getContractFactory("MechActivityChecker"); - mechActivityChecker = await MechActivityChecker.deploy(agentMech.address, livenessRatio); + mechActivityChecker = await MechActivityChecker.deploy(mechMarketplace.address, livenessRatio); await mechActivityChecker.deployed(); const StakingNativeToken = await ethers.getContractFactory("StakingNativeToken"); @@ -181,7 +181,7 @@ describe("StakingMechUsage", function () { const StakingActivityChecker = await ethers.getContractFactory("MechActivityChecker"); await expect( StakingActivityChecker.deploy(AddressZero, livenessRatio) - ).to.be.revertedWithCustomError(StakingActivityChecker, "ZeroMechAgentAddress"); + ).to.be.revertedWithCustomError(StakingActivityChecker, "ZeroAddress"); }); }); @@ -252,7 +252,7 @@ describe("StakingMechUsage", function () { const multisig = await ethers.getContractAt("GnosisSafe", service.multisig); // Increase the requests count, but the nonce is not increased - await agentMech.increaseRequestsCount(service.multisig); + await mechMarketplace.increaseRequestsCount(service.multisig); // Increase the time while the service does not reach the required amount of transactions per second (TPS) await helpers.time.increase(maxInactivity); @@ -296,7 +296,7 @@ describe("StakingMechUsage", function () { // Make transactions by the service multisig to increase the requests count let nonce = await multisig.nonce(); - let txHashData = await safeContracts.buildContractCall(agentMech, "increaseRequestsCount", + let txHashData = await safeContracts.buildContractCall(mechMarketplace, "increaseRequestsCount", [multisig.address], nonce, 0, 0); let signMessageData = await safeContracts.safeSignMessage(agentInstances[0], multisig, txHashData, 0); await safeContracts.executeTx(multisig, txHashData, [signMessageData], 0); @@ -369,7 +369,7 @@ describe("StakingMechUsage", function () { // Make transactions by the service multisig to increase the requests count let nonce = await multisig.nonce(); - let txHashData = await safeContracts.buildContractCall(agentMech, "increaseDeliveriesCount", + let txHashData = await safeContracts.buildContractCall(mechMarketplace, "increaseOperatorDeliveriesCount", [multisig.address], nonce, 0, 0); let signMessageData = await safeContracts.safeSignMessage(agentInstances[0], multisig, txHashData, 0); await safeContracts.executeTx(multisig, txHashData, [signMessageData], 0); @@ -451,7 +451,7 @@ describe("StakingMechUsage", function () { // Make transactions by the service multisig to increase the requests count let nonce = await multisig.nonce(); - let txHashData = await safeContracts.buildContractCall(agentMech, "increaseRequestsCount", + let txHashData = await safeContracts.buildContractCall(mechMarketplace, "increaseRequestsCount", [multisig.address], nonce, 0, 0); let signMessageData = await safeContracts.safeSignMessage(agentInstances[2], multisig, txHashData, 0); await safeContracts.executeTx(multisig, txHashData, [signMessageData], 0); diff --git a/test/StakingMechUsages.t.sol b/test/StakingMechUsages.t.sol index 71f754c..f560f1a 100644 --- a/test/StakingMechUsages.t.sol +++ b/test/StakingMechUsages.t.sol @@ -39,7 +39,7 @@ contract BaseSetup is Test { StakingVerifier internal stakingVerifier; StakingFactory internal stakingFactory; RequesterActivityChecker internal requesterActivityChecker; - MockAgentMech internal agentMech; + MockAgentMech internal mechMarketplace; SafeNonceLib internal safeNonceLib; address payable[] internal users; @@ -122,7 +122,7 @@ contract BaseSetup is Test { bytes32 multisigProxyHash = keccak256(address(gnosisSafeProxy).code); // Agent mech - agentMech = new MockAgentMech(); + mechMarketplace = new MockAgentMech(); // Deploy service staking verifier stakingVerifier = new StakingVerifier(address(token), address(serviceRegistry), @@ -132,7 +132,7 @@ contract BaseSetup is Test { stakingFactory = new StakingFactory(address(0)); // Deploy RequesterActivityChecker (staking activity checker) - requesterActivityChecker = new RequesterActivityChecker(address(agentMech), livenessRatio); + requesterActivityChecker = new RequesterActivityChecker(address(mechMarketplace), livenessRatio); // Deploy service staking native token and arbitrary ERC20 token StakingBase.StakingParams memory stakingParams = StakingBase.StakingParams( @@ -248,7 +248,7 @@ contract StakingMechUsages is BaseSetup { // Post a specified number of requests for (uint8 n = 0; n < numRequests; ++n) { - agentMech.increaseRequestsCount(service.multisig); + mechMarketplace.increaseRequestsCount(service.multisig); } // Get the nonce before @@ -399,7 +399,7 @@ contract StakingMechUsages is BaseSetup { // Post a specified number of requests for (uint8 n = 0; n < numRequests; ++n) { - agentMech.increaseRequestsCount(service.multisig); + mechMarketplace.increaseRequestsCount(service.multisig); } // Get the nonce before @@ -480,7 +480,7 @@ contract StakingMechUsages is BaseSetup { // Post a specified number of requests for (uint8 n = 0; n < numRequests; ++n) { - agentMech.increaseRequestsCount(service.multisig); + mechMarketplace.increaseRequestsCount(service.multisig); } // Get the nonce before