diff --git a/abis/0.8.28/Karma.json b/abis/0.8.28/Karma.json new file mode 100644 index 0000000..38af276 --- /dev/null +++ b/abis/0.8.28/Karma.json @@ -0,0 +1,359 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Karma", + "sourceName": "contracts/Karma.sol", + "abi": [ + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnerOnly", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "UnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numValues1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numValues2", + "type": "uint256" + } + ], + "name": "WrongArrayLength", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "mech", + "type": "address" + }, + { + "indexed": false, + "internalType": "int256", + "name": "karmaChange", + "type": "int256" + } + ], + "name": "MechKarmaChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnerUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "requester", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "mech", + "type": "address" + }, + { + "indexed": false, + "internalType": "int256", + "name": "karmaChange", + "type": "int256" + } + ], + "name": "RequesterMechKarmaChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "mechMarketplaces", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "bool[]", + "name": "statuses", + "type": "bool[]" + } + ], + "name": "SetMechMarketplaceStatuses", + "type": "event" + }, + { + "inputs": [], + "name": "KARMA_PROXY", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "changeImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "mech", + "type": "address" + }, + { + "internalType": "int256", + "name": "karmaChange", + "type": "int256" + } + ], + "name": "changeMechKarma", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "changeOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "requester", + "type": "address" + }, + { + "internalType": "address", + "name": "mech", + "type": "address" + }, + { + "internalType": "int256", + "name": "karmaChange", + "type": "int256" + } + ], + "name": "changeRequesterMechKarma", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapMechKarma", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapMechMarketplaces", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapRequesterMechKarma", + "outputs": [ + { + "internalType": "int256", + "name": "", + "type": "int256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "mechMarketplaces", + "type": "address[]" + }, + { + "internalType": "bool[]", + "name": "statuses", + "type": "bool[]" + } + ], + "name": "setMechMarketplaceStatuses", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610db18061001c5f395ff3fe608060405234801561000f575f5ffd5b50600436106100da575f3560e01c80638129fc1c11610088578063a6f9dae111610063578063a6f9dae114610206578063aaf10f4214610219578063fc3aecd014610240578063ffa1ad7414610267575f5ffd5b80638129fc1c1461019b5780638da5cb5b146101a35780639ecfd0ef146101e7575f5ffd5b80634225d37a116100b85780634225d37a1461014357806355e7d04414610156578063643f28d914610169575f5ffd5b80630aa4a379146100de57806317a68dd8146100f357806330a2c84314610106575b5f5ffd5b6100f16100ec366004610aa1565b6102b0565b005b6100f1610101366004610b64565b6104c8565b610130610114366004610b84565b600360209081525f928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6100f1610151366004610bb5565b6105ed565b6100f1610164366004610bdd565b6106bf565b61018b610177366004610b64565b60016020525f908152604090205460ff1681565b604051901515815260200161013a565b6100f16107bf565b5f546101c29073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161013a565b6101306101f5366004610b64565b60026020525f908152604090205481565b6100f1610214366004610b64565b610839565b7f1e4b6d67098d4183ce03b91c95f9376a98c5440ec22f2cf171d6dca04a5a29d8546101c2565b6101307f1e4b6d67098d4183ce03b91c95f9376a98c5440ec22f2cf171d6dca04a5a29d881565b6102a36040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b60405161013a9190610c17565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610326575f546040517fa43d6ada00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b805182511461036e57815181516040517f8151c1100000000000000000000000000000000000000000000000000000000081526004810192909252602482015260440161031d565b5f5b825181101561048a575f73ffffffffffffffffffffffffffffffffffffffff168382815181106103a2576103a2610c6a565b602002602001015173ffffffffffffffffffffffffffffffffffffffff16036103f7576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81818151811061040957610409610c6a565b602002602001015160015f85848151811061042657610426610c6a565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610370565b507fa643ff1a5a85bb4fd8c0288e824ec47c8cd49401b14544c4bcb2f40ec8adda6982826040516104bc929190610c97565b60405180910390a15050565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610539575f546040517fa43d6ada00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff909116602482015260440161031d565b73ffffffffffffffffffffffffffffffffffffffff8116610586576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f1e4b6d67098d4183ce03b91c95f9376a98c5440ec22f2cf171d6dca04a5a29d881905560405173ffffffffffffffffffffffffffffffffffffffff8216907f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca03905f90a250565b335f9081526001602052604090205460ff16610637576040517f32b2baa300000000000000000000000000000000000000000000000000000000815233600482015260240161031d565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600260205260408120805483929061066b908490610d2f565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316907f417740bdbf75bcc9cd063a95c8af25366c2a27f49d23d5eeafc2db269143af5f9060200160405180910390a25050565b335f9081526001602052604090205460ff16610709576040517f32b2baa300000000000000000000000000000000000000000000000000000000815233600482015260240161031d565b73ffffffffffffffffffffffffffffffffffffffff8084165f9081526003602090815260408083209386168352929052908120805483929061074c908490610d2f565b925050819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f3df02d68ad731eb0c4caab8f9424137610f574d333c6a00ce3e0ef6b6d032ba4836040516107b291815260200190565b60405180910390a3505050565b5f5473ffffffffffffffffffffffffffffffffffffffff161561080e576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055565b5f5473ffffffffffffffffffffffffffffffffffffffff1633146108aa575f546040517fa43d6ada00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff909116602482015260440161031d565b73ffffffffffffffffffffffffffffffffffffffff81166108f7576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b91a250565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156109d7576109d7610963565b604052919050565b5f67ffffffffffffffff8211156109f8576109f8610963565b5060051b60200190565b803573ffffffffffffffffffffffffffffffffffffffff81168114610a25575f5ffd5b919050565b5f82601f830112610a39575f5ffd5b8135610a4c610a47826109df565b610990565b8082825260208201915060208360051b860101925085831115610a6d575f5ffd5b602085015b83811015610a975780358015158114610a89575f5ffd5b835260209283019201610a72565b5095945050505050565b5f5f60408385031215610ab2575f5ffd5b823567ffffffffffffffff811115610ac8575f5ffd5b8301601f81018513610ad8575f5ffd5b8035610ae6610a47826109df565b8082825260208201915060208360051b850101925087831115610b07575f5ffd5b6020840193505b82841015610b3057610b1f84610a02565b825260209384019390910190610b0e565b9450505050602083013567ffffffffffffffff811115610b4e575f5ffd5b610b5a85828601610a2a565b9150509250929050565b5f60208284031215610b74575f5ffd5b610b7d82610a02565b9392505050565b5f5f60408385031215610b95575f5ffd5b610b9e83610a02565b9150610bac60208401610a02565b90509250929050565b5f5f60408385031215610bc6575f5ffd5b610bcf83610a02565b946020939093013593505050565b5f5f5f60608486031215610bef575f5ffd5b610bf884610a02565b9250610c0660208501610a02565b929592945050506040919091013590565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b604080825283519082018190525f9060208501906060840190835b81811015610ce657835173ffffffffffffffffffffffffffffffffffffffff16835260209384019390920191600101610cb2565b5050838103602080860191909152855180835291810192508501905f5b81811015610d235782511515845260209384019390920191600101610d03565b50919695505050505050565b8082018281125f831280158216821582161715610d73577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b50509291505056fea26469706673582212205136f6d55e626592aa0ba550233413009045fbdee203b4a62fd1450476ef353c64736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b50600436106100da575f3560e01c80638129fc1c11610088578063a6f9dae111610063578063a6f9dae114610206578063aaf10f4214610219578063fc3aecd014610240578063ffa1ad7414610267575f5ffd5b80638129fc1c1461019b5780638da5cb5b146101a35780639ecfd0ef146101e7575f5ffd5b80634225d37a116100b85780634225d37a1461014357806355e7d04414610156578063643f28d914610169575f5ffd5b80630aa4a379146100de57806317a68dd8146100f357806330a2c84314610106575b5f5ffd5b6100f16100ec366004610aa1565b6102b0565b005b6100f1610101366004610b64565b6104c8565b610130610114366004610b84565b600360209081525f928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6100f1610151366004610bb5565b6105ed565b6100f1610164366004610bdd565b6106bf565b61018b610177366004610b64565b60016020525f908152604090205460ff1681565b604051901515815260200161013a565b6100f16107bf565b5f546101c29073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161013a565b6101306101f5366004610b64565b60026020525f908152604090205481565b6100f1610214366004610b64565b610839565b7f1e4b6d67098d4183ce03b91c95f9376a98c5440ec22f2cf171d6dca04a5a29d8546101c2565b6101307f1e4b6d67098d4183ce03b91c95f9376a98c5440ec22f2cf171d6dca04a5a29d881565b6102a36040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b60405161013a9190610c17565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610326575f546040517fa43d6ada00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b805182511461036e57815181516040517f8151c1100000000000000000000000000000000000000000000000000000000081526004810192909252602482015260440161031d565b5f5b825181101561048a575f73ffffffffffffffffffffffffffffffffffffffff168382815181106103a2576103a2610c6a565b602002602001015173ffffffffffffffffffffffffffffffffffffffff16036103f7576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81818151811061040957610409610c6a565b602002602001015160015f85848151811061042657610426610c6a565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610370565b507fa643ff1a5a85bb4fd8c0288e824ec47c8cd49401b14544c4bcb2f40ec8adda6982826040516104bc929190610c97565b60405180910390a15050565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610539575f546040517fa43d6ada00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff909116602482015260440161031d565b73ffffffffffffffffffffffffffffffffffffffff8116610586576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f1e4b6d67098d4183ce03b91c95f9376a98c5440ec22f2cf171d6dca04a5a29d881905560405173ffffffffffffffffffffffffffffffffffffffff8216907f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca03905f90a250565b335f9081526001602052604090205460ff16610637576040517f32b2baa300000000000000000000000000000000000000000000000000000000815233600482015260240161031d565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600260205260408120805483929061066b908490610d2f565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316907f417740bdbf75bcc9cd063a95c8af25366c2a27f49d23d5eeafc2db269143af5f9060200160405180910390a25050565b335f9081526001602052604090205460ff16610709576040517f32b2baa300000000000000000000000000000000000000000000000000000000815233600482015260240161031d565b73ffffffffffffffffffffffffffffffffffffffff8084165f9081526003602090815260408083209386168352929052908120805483929061074c908490610d2f565b925050819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f3df02d68ad731eb0c4caab8f9424137610f574d333c6a00ce3e0ef6b6d032ba4836040516107b291815260200190565b60405180910390a3505050565b5f5473ffffffffffffffffffffffffffffffffffffffff161561080e576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055565b5f5473ffffffffffffffffffffffffffffffffffffffff1633146108aa575f546040517fa43d6ada00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff909116602482015260440161031d565b73ffffffffffffffffffffffffffffffffffffffff81166108f7576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b91a250565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156109d7576109d7610963565b604052919050565b5f67ffffffffffffffff8211156109f8576109f8610963565b5060051b60200190565b803573ffffffffffffffffffffffffffffffffffffffff81168114610a25575f5ffd5b919050565b5f82601f830112610a39575f5ffd5b8135610a4c610a47826109df565b610990565b8082825260208201915060208360051b860101925085831115610a6d575f5ffd5b602085015b83811015610a975780358015158114610a89575f5ffd5b835260209283019201610a72565b5095945050505050565b5f5f60408385031215610ab2575f5ffd5b823567ffffffffffffffff811115610ac8575f5ffd5b8301601f81018513610ad8575f5ffd5b8035610ae6610a47826109df565b8082825260208201915060208360051b850101925087831115610b07575f5ffd5b6020840193505b82841015610b3057610b1f84610a02565b825260209384019390910190610b0e565b9450505050602083013567ffffffffffffffff811115610b4e575f5ffd5b610b5a85828601610a2a565b9150509250929050565b5f60208284031215610b74575f5ffd5b610b7d82610a02565b9392505050565b5f5f60408385031215610b95575f5ffd5b610b9e83610a02565b9150610bac60208401610a02565b90509250929050565b5f5f60408385031215610bc6575f5ffd5b610bcf83610a02565b946020939093013593505050565b5f5f5f60608486031215610bef575f5ffd5b610bf884610a02565b9250610c0660208501610a02565b929592945050506040919091013590565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b604080825283519082018190525f9060208501906060840190835b81811015610ce657835173ffffffffffffffffffffffffffffffffffffffff16835260209384019390920191600101610cb2565b5050838103602080860191909152855180835291810192508501905f5b81811015610d235782511515845260209384019390920191600101610d03565b50919695505050505050565b8082018281125f831280158216821582161715610d73577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b50509291505056fea26469706673582212205136f6d55e626592aa0ba550233413009045fbdee203b4a62fd1450476ef353c64736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/abis/0.8.28/KarmaProxy.json b/abis/0.8.28/KarmaProxy.json new file mode 100644 index 0000000..d0eb6a7 --- /dev/null +++ b/abis/0.8.28/KarmaProxy.json @@ -0,0 +1,59 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "KarmaProxy", + "sourceName": "contracts/KarmaProxy.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "karmaData", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "InitializationFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroImplementationAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroKarmaData", + "type": "error" + }, + { + "stateMutability": "nonpayable", + "type": "fallback" + }, + { + "inputs": [], + "name": "KARMA_PROXY", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561000f575f5ffd5b506040516102f23803806102f283398101604081905261002e9161012d565b6001600160a01b0382166100555760405163d02c623d60e01b815260040160405180910390fd5b80515f0361007657604051630113854b60e61b815260040160405180910390fd5b817f1e4b6d67098d4183ce03b91c95f9376a98c5440ec22f2cf171d6dca04a5a29d8555f826001600160a01b0316826040516100b291906101fc565b5f60405180830381855af49150503d805f81146100ea576040519150601f19603f3d011682016040523d82523d5f602084013e6100ef565b606091505b505090508061011157604051630337323560e31b815260040160405180910390fd5b505050610212565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561013e575f5ffd5b82516001600160a01b0381168114610154575f5ffd5b60208401519092506001600160401b0381111561016f575f5ffd5b8301601f8101851361017f575f5ffd5b80516001600160401b0381111561019857610198610119565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101c6576101c6610119565b6040528181528282016020018710156101dd575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b5f82518060208501845e5f920191825250919050565b60d48061021e5f395ff3fe6080604052348015600e575f5ffd5b50600436106026575f3560e01c8063fc3aecd0146066575b7f1e4b6d67098d4183ce03b91c95f9376a98c5440ec22f2cf171d6dca04a5a29d854365f5f375f5f365f845af490503d5f5f3e806061573d5ffd5b503d5ff35b608c7f1e4b6d67098d4183ce03b91c95f9376a98c5440ec22f2cf171d6dca04a5a29d881565b60405190815260200160405180910390f3fea2646970667358221220650ce2fa202714ca25909bc154d6780801002cb669b97a48d5e72eef2763f12e64736f6c634300081c0033", + "deployedBytecode": "0x6080604052348015600e575f5ffd5b50600436106026575f3560e01c8063fc3aecd0146066575b7f1e4b6d67098d4183ce03b91c95f9376a98c5440ec22f2cf171d6dca04a5a29d854365f5f375f5f365f845af490503d5f5f3e806061573d5ffd5b503d5ff35b608c7f1e4b6d67098d4183ce03b91c95f9376a98c5440ec22f2cf171d6dca04a5a29d881565b60405190815260200160405180910390f3fea2646970667358221220650ce2fa202714ca25909bc154d6780801002cb669b97a48d5e72eef2763f12e64736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/abis/0.8.28/MechFixedPrice.json b/abis/0.8.28/MechFixedPrice.json new file mode 100644 index 0000000..671534d --- /dev/null +++ b/abis/0.8.28/MechFixedPrice.json @@ -0,0 +1,1054 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MechFixedPrice", + "sourceName": "contracts/MechFixedPrice.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_mechMarketplace", + "type": "address" + }, + { + "internalType": "address", + "name": "_serviceRegistry", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_serviceId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_price", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "agentId", + "type": "uint256" + } + ], + "name": "AgentNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "mechMarketplace", + "type": "address" + } + ], + "name": "MarketplaceExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "mechMarketplace", + "type": "address" + } + ], + "name": "MarketplaceNotAuthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "NotEnoughPaid", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "Overflow", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuard", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "name": "RequestIdNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "state", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "WrongServiceState", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroValue", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "Deliver", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "name": "PriceUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "Request", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "name": "RevokeRequest", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR_TYPE_HASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "chainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "address", + "name": "mechStakingInstance", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mechServiceId", + "type": "uint256" + } + ], + "name": "deliverToMarketplace", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "domainSeparator", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "entryPoint", + "outputs": [ + { + "internalType": "contract IEntryPoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Enum.Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "txGas", + "type": "uint256" + } + ], + "name": "exec", + "outputs": [ + { + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getDeliveriesCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDomainSeparator", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "name": "getRequestId", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "name": "getRequestStatus", + "outputs": [ + { + "internalType": "enum OlasMech.RequestStatus", + "name": "status", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getRequestsCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "size", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "offset", + "type": "uint256" + } + ], + "name": "getUndeliveredRequestIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "requestIds", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signer", + "type": "address" + } + ], + "name": "isOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "magicValue", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapDeliveryCounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapNonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "mapRequestAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapRequestCounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "mapRequestIds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapUndeliveredRequestsCounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "mechMarketplace", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "numTotalDeliveries", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "numTotalRequests", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "numUndeliveredRequests", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "price", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "payment", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "name": "requestFromMarketplace", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "name": "revokeRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newPrice", + "type": "uint256" + } + ], + "name": "setPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "initParams", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "address", + "name": "serviceRegistry", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "tokensReceived", + "outputs": [], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "initCode", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "callGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "verificationGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxPriorityFeePerGas", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct UserOperation", + "name": "userOp", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "missingAccountFunds", + "type": "uint256" + } + ], + "name": "validateUserOp", + "outputs": [ + { + "internalType": "uint256", + "name": "validationData", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x60e06040525f5f556001600455348015610017575f5ffd5b506040516137a53803806137a583398101604081905261003691610500565b8383836001600160a01b0382166100605760405163d92e233d60e01b815260040160405180910390fd5b805f0361008057604051637c946ed760e01b815260040160405180910390fd5b604080516001600160a01b03841660208201529081018290525f9060600160408051601f1981840301815290829052630846d5ff60e31b82526004820184905291505f9081906001600160a01b03861690634236aff89060240160e060405180830381865afa1580156100f5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101199190610553565b9650505050509250505f6001600160a01b0316826001600160a01b0316036101545760405163d92e233d60e01b815260040160405180910390fd5b6004816005811115610168576101686105e1565b146101a85780600581111561017f5761017f6105e1565b604051633c053f9d60e21b81526004810191909152602481018590526044015b60405180910390fd5b6101b183610202565b6001600160a01b03861660c0524660a0526101ca610264565b6080525050505f84900392506101f691505057604051637c946ed760e01b815260040160405180910390fd5b600b55506106bd915050565b61020a61032c565b51156102585760405162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a656400000000000000000000000000604482015260640161019f565b61026181610394565b50565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f493aeac1d921aa02a044029e7fe4be43b1a4e80b40706fa5819e8fbb0d093525604051806040016040528060058152602001640312e312e360dc1b8152506040516020016102d591906105f5565b60408051601f1981840301815282825280516020918201209083019490945281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b606061038f61038a604051606b60f91b6020820152602560fa1b60218201526001600160601b03193060601b166022820152600160f81b60368201525f90603701604051602081830303815290604052805190602001205f1c905090565b610458565b905090565b5f61039e826104ad565b90505f8151602083015ff09050610404604051606b60f91b6020820152602560fa1b60218201526001600160601b03193060601b166022820152600160f81b60368201525f90603701604051602081830303815290604052805190602001205f1c905090565b6001600160a01b0316816001600160a01b0316146104535760405162461bcd60e51b815260206004820152600c60248201526b15dc9a5d194819985a5b195960a21b604482015260640161019f565b505050565b6060813b6001811161047957505060408051602081019091525f8152919050565b806104838161063e565b9150506040519150601f19601f602083010116820160405280825280600160208401853c50919050565b6060815160016104bd9190610653565b826040516020016104cf92919061066c565b6040516020818303038152906040529050919050565b80516001600160a01b03811681146104fb575f5ffd5b919050565b5f5f5f5f60808587031215610513575f5ffd5b61051c856104e5565b935061052a602086016104e5565b6040860151606090960151949790965092505050565b805163ffffffff811681146104fb575f5ffd5b5f5f5f5f5f5f5f60e0888a031215610569575f5ffd5b87516001600160601b038116811461057f575f5ffd5b965061058d602089016104e5565b9550604088015194506105a260608901610540565b93506105b060808901610540565b92506105be60a08901610540565b915060c0880151600681106105d1575f5ffd5b8091505092959891949750929550565b634e487b7160e01b5f52602160045260245ffd5b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b634e487b7160e01b5f52601160045260245ffd5b5f8161064c5761064c61062a565b505f190190565b808201808211156106665761066661062a565b92915050565b606360f81b815260e083901b6001600160e01b03191660018201526880600e6000396000f360b81b60058201525f600e820181905282518060208501600f85015e5f9201600f019182525092915050565b60805160a05160c05161308d6107185f395f818161059701528181610c4701528181610e2b015281816113ba015281816118ef01526119a201525f818161056401526114cf01525f818161087a0152611504015261308d5ff3fe608060405260043610610278575f3560e01c8063a035b1fe1161014b578063d843b7f4116100c6578063f5dcb7bb1161007c578063f698da2511610062578063f698da2514610869578063fc0c546a1461089c578063ffa1ad74146108b0575f5ffd5b8063f5dcb7bb14610817578063f6171e441461084a575f5ffd5b8063e7d915cf116100ac578063e7d915cf1461079f578063ed24911d146107be578063f23a6e61146107d2575f5ffd5b8063d843b7f414610732578063d8a4676f14610773575f5ffd5b8063b0d691fe1161011b578063bdf8631711610101578063bdf86317146106c6578063c7dec3fc146106db578063cbd6407a14610707575f5ffd5b8063b0d691fe14610659578063bc197c811461067f575f5ffd5b8063a035b1fe146105fd578063a4f9edbf14610612578063a669aaf914610631578063affed0e014610646575f5ffd5b806358ce0909116101f557806391b7f5ed116101ab5780639a8a0592116101915780639a8a0592146105535780639c5e9590146105865780639ec4a5bf146105de575f5ffd5b806391b7f5ed14610509578063982c0db314610528575f5ffd5b80636d70f7ae116101db5780636d70f7ae146104585780637af73473146104875780638fb847ef146104c8575f5ffd5b806358ce09091461040d5780635f117ea914610439575f5ffd5b806317d70f7c1161024a5780633a871cdd116102305780633a871cdd146103ba5780634954bbf1146103d95780634ada3e61146103f8575f5ffd5b806317d70f7c1461037b5780631bbbeeb81461038f575f5ffd5b806223de2914610283578062427c54146102a9578063150b7a02146102e75780631626ba7e1461035c575f5ffd5b3661027f57005b5f5ffd5b34801561028e575f5ffd5b506102a761029d36600461252f565b5050505050505050565b005b3480156102b4575f5ffd5b506102d46102c33660046125de565b60066020525f908152604090205481565b6040519081526020015b60405180910390f35b3480156102f2575f5ffd5b5061032b6103013660046125f9565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016102de565b348015610367575f5ffd5b5061032b61037636600461273d565b6108f8565b348015610386575f5ffd5b506102d4610a9b565b34801561039a575f5ffd5b506102d46103a93660046125de565b60056020525f908152604090205481565b3480156103c5575f5ffd5b506102d46103d4366004612781565b610abf565b3480156103e4575f5ffd5b506102a76103f33660046127d0565b610afb565b348015610403575f5ffd5b506102d460025481565b348015610418575f5ffd5b5061042c61042736600461282d565b610cbc565b6040516102de919061284d565b348015610444575f5ffd5b506102a761045336600461288f565b610e13565b348015610463575f5ffd5b506104776104723660046125de565b610e96565b60405190151581526020016102de565b348015610492575f5ffd5b506102d46104a13660046125de565b73ffffffffffffffffffffffffffffffffffffffff165f9081526005602052604090205490565b3480156104d3575f5ffd5b506102d46104e23660046125de565b73ffffffffffffffffffffffffffffffffffffffff165f9081526006602052604090205490565b348015610514575f5ffd5b506102a76105233660046128ec565b610f89565b348015610533575f5ffd5b506102d46105423660046125de565b60076020525f908152604090205481565b34801561055e575f5ffd5b506102d47f000000000000000000000000000000000000000000000000000000000000000081565b348015610591575f5ffd5b506105b97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102de565b3480156105e9575f5ffd5b506102d46105f8366004612903565b6110b2565b348015610608575f5ffd5b506102d4600b5481565b34801561061d575f5ffd5b506102a761062c366004612959565b611166565b34801561063c575f5ffd5b506102d460035481565b348015610651575f5ffd5b505f546102d4565b348015610664575f5ffd5b50730576a174d229e3cfa37253523e645a78a0c91b576105b9565b34801561068a575f5ffd5b5061032b6106993660046129d4565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b3480156106d1575f5ffd5b506102d460015481565b3480156106e6575f5ffd5b506106fa6106f5366004612a77565b6111e2565b6040516102de9190612b35565b348015610712575f5ffd5b506102d46107213660046125de565b600a6020525f908152604090205481565b34801561073d575f5ffd5b506105b961074c3660046128ec565b60096020525f908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561077e575f5ffd5b5061079261078d3660046128ec565b6112cc565b6040516102de9190612b74565b3480156107aa575f5ffd5b506102a76107b93660046128ec565b6113a2565b3480156107c9575f5ffd5b506102d46114cc565b3480156107dd575f5ffd5b5061032b6107ec366004612bb3565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b348015610822575f5ffd5b506102d47f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b348015610855575f5ffd5b506102d461086436600461282d565b611526565b348015610874575f5ffd5b506102d47f000000000000000000000000000000000000000000000000000000000000000081565b3480156108a7575f5ffd5b506105b9611548565b3480156108bb575f5ffd5b506106fa6040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b5f5f5f5f61091885602081015160408201516060909201515f1a92909190565b9094509250905060ff81165f03610a2e578285830160200161093982610e96565b15801561095c575073ffffffffffffffffffffffffffffffffffffffff82163014155b1561098f57507fffffffff000000000000000000000000000000000000000000000000000000009450610a959350505050565b6040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831690631626ba7e906109e3908b908590600401612c2a565b602060405180830381865afa1580156109fe573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a229190612c42565b95505050505050610a95565b610a3d61047287838686611564565b15610a6e57507f1626ba7e000000000000000000000000000000000000000000000000000000009250610a95915050565b507fffffffff00000000000000000000000000000000000000000000000000000000925050505b92915050565b5f5f610aa5611580565b806020019051810190610ab89190612c81565b9392505050565b5f610ac861164f565b610ad284846116ce565b9050610ae16040850185612cad565b90505f03610af257610af2846117a2565b610ab882611820565b610b0433610e96565b80610b22575033730576a174d229e3cfa37253523e645a78a0c91b57145b610bb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e7472616374000060648201526084015b60405180910390fd5b60016004541115610bf0576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026004555f610c008585611894565b805190915015610cb0576040517f56d0819e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906356d0819e90610c82908890859088908890600401612d0e565b5f604051808303815f87803b158015610c99575f5ffd5b505af1158015610cab573d5f5f3e3d5ffd5b505050505b50506001600455505050565b6001546060905f849003610cce578093505b80610cd98486612d7c565b1115610d2657610ce98385612d7c565b6040517f7ae59685000000000000000000000000000000000000000000000000000000008152600481019190915260248101829052604401610baa565b8315610e0c578367ffffffffffffffff811115610d4557610d45612667565b604051908082528060200260200182016040528015610d6e578160200160208202803683370190505b505f80805260086020527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c8549193505b84811015610dc1575f828152600860205260409020600101549150600101610d9e565b505f5b85811015610e095781848281518110610ddf57610ddf612d8f565b6020908102919091018101919091525f838152600890915260409020600101549150600101610dc4565b50505b5092915050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610e84576040517f26b9d596000000000000000000000000000000000000000000000000000000008152336004820152602401610baa565b610e9084848484611ae7565b50505050565b5f5f5f610ea1611580565b806020019051810190610eb49190612c81565b6040517f4236aff80000000000000000000000000000000000000000000000000000000081526004810182905291935091505f9073ffffffffffffffffffffffffffffffffffffffff841690634236aff89060240160e060405180830381865afa158015610f24573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f489190612dcf565b50505050509150508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16149350505050919050565b610f9233610e96565b80610fb0575033730576a174d229e3cfa37253523e645a78a0c91b57145b61103c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e747261637400006064820152608401610baa565b600b545f03611077576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b8190556040518181527f66cbca4f3c64fecf1dcb9ce094abcf7f68c3450a1d4e3a8e917dd621edb4ebe09060200160405180910390a150565b5f6110bb6114cc565b8484846040516020016110d093929190612e66565b604051602081830303815290604052805190602001206040516020016111289291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120949350505050565b61116e611580565b51156111d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610baa565b6111df81611c8f565b50565b60606111ed33610e96565b8061120b575033730576a174d229e3cfa37253523e645a78a0c91b57145b611297576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e747261637400006064820152608401610baa565b5f6112b18787878787156112ab5787611e04565b5a611e04565b92509050806112c257815160208301fd5b5095945050505050565b5f8181526009602052604081205473ffffffffffffffffffffffffffffffffffffffff161561139d575f828152600860205260408082208151808301928390529160029082845b8154815260200190600101908083116113135750505050509050805f6002811061133f5761133f612d8f565b602002015115801561135357506020810151155b801561138857505f805260086020527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7548314155b15611396576002915061139b565b600191505b505b919050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611413576040517f26b9d596000000000000000000000000000000000000000000000000000000008152336004820152602401610baa565b5f8181526009602052604090205473ffffffffffffffffffffffffffffffffffffffff168061146e576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114788183611f07565b8073ffffffffffffffffffffffffffffffffffffffff167fa36a540c5fea3a5e69d4b1c2247b28a93fd183ef1314af26a8db7b3ae080bcd0836040516114c091815260200190565b60405180910390a25050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611501576114fc61205a565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6008602052815f5260405f20816002811061153f575f80fd5b01549150829050565b5f611551611580565b8060200190518101906114fc9190612ea4565b5f5f5f61157387878787612158565b915091506112c281612240565b60606114fc61164a6040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f010000000000000000000000000000000000000000000000000000000000000060368201525f90603701604051602081830303815290604052805190602001205f1c905090565b6123f2565b33730576a174d229e3cfa37253523e645a78a0c91b57146116cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e74000000006044820152606401610baa565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000005f908152601c829052603c81207f1626ba7e000000000000000000000000000000000000000000000000000000006117688261172f610140880188612cad565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506108f892505050565b7fffffffff000000000000000000000000000000000000000000000000000000001614611799576001915050610a95565b505f9392505050565b5f8054602083013591806117b583612ebf565b91905055146111df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610baa565b80156111df576040515f9033907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90849084818181858888f193505050503d805f8114611888576040519150601f19603f3d011682016040523d82523d5f602084013e61188d565b606091505b5050505050565b5f828152600960205260408082205490517ff2e433bf0000000000000000000000000000000000000000000000000000000081526004810185905260609273ffffffffffffffffffffffffffffffffffffffff9283169290917f00000000000000000000000000000000000000000000000000000000000000009091169063f2e433bf906024016080604051808303815f875af1158015611937573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061195b9190612ef6565b602081015190915073ffffffffffffffffffffffffffffffffffffffff1615611985575050610a95565b73ffffffffffffffffffffffffffffffffffffffff8216611a39577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16156119e457806040015191505b73ffffffffffffffffffffffffffffffffffffffff8216611a34576040517ffe23980400000000000000000000000000000000000000000000000000000000815260048101869052602401610baa565b611a43565b611a438286611f07565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600660205260408120805486955091611a7683612ebf565b909155505060038054905f611a8a83612ebf565b91905055503373ffffffffffffffffffffffffffffffffffffffff167f0cd979445339c62199996f208428d987b1cea24d18e62b79ec24d94b636e8b708685604051611ad7929190612c2a565b60405180910390a2505092915050565b611af2838284612447565b73ffffffffffffffffffffffffffffffffffffffff84165f908152600560205260408120805491611b2283612ebf565b909155505073ffffffffffffffffffffffffffffffffffffffff84165f908152600760205260408120805491611b5783612ebf565b90915550505f81815260096020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff891617905560089091528082207f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c8805460018381018290559186905580855292842085905580547f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c794929392909190611c1d83612ebf565b909155505060028054905f611c3183612ebf565b91905055508673ffffffffffffffffffffffffffffffffffffffff167f4bda649efe6b98b0f9c1d5e859c29e20910f45c66dabfe6fad4a4881f7faf9cc8587604051611c7e929190612c2a565b60405180910390a250505050505050565b5f611c9982612491565b90505f8151602083015ff09050611d6b6040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f010000000000000000000000000000000000000000000000000000000000000060368201525f90603701604051602081830303815290604052805190602001205f1c905090565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611dff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f5772697465206661696c656400000000000000000000000000000000000000006044820152606401610baa565b505050565b5f60606001846001811115611e1b57611e1b612b47565b03611e8f578673ffffffffffffffffffffffffffffffffffffffff168386604051611e469190612f90565b5f604051808303818686f4925050503d805f8114611e7f576040519150601f19603f3d011682016040523d82523d5f602084013e611e84565b606091505b509092509050611efd565b8673ffffffffffffffffffffffffffffffffffffffff16838787604051611eb69190612f90565b5f60405180830381858888f193505050503d805f8114611ef1576040519150601f19603f3d011682016040523d82523d5f602084013e611ef6565b606091505b5090925090505b9550959350505050565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600760205260408120805491611f3783612f9b565b909155505060018054905f611f4b83612f9b565b90915550505f818152600860205260408082208151808301928390529160029082845b815481526020019060010190808311611f6e5750505050509050805f60028110611f9a57611f9a612d8f565b6020020151158015611fae57506020810151155b8015611fe357505f805260086020527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7548214155b1561201d576040517ffe23980400000000000000000000000000000000000000000000000000000000815260048101839052602401610baa565b6020818101805183515f90815260089093526040808420600190810192909255935191518352838320919091559281529081208181559091015550565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f493aeac1d921aa02a044029e7fe4be43b1a4e80b40706fa5819e8fbb0d0935256040518060400160405280600581526020017f312e312e300000000000000000000000000000000000000000000000000000008152506040516020016120e39190612b35565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083019490945281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561218d57505f90506003612237565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156121de573d5f5f3e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116612231575f60019250925050612237565b91505f90505b94509492505050565b5f81600481111561225357612253612b47565b0361225b5750565b600181600481111561226f5761226f612b47565b036122d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610baa565b60028160048111156122ea576122ea612b47565b03612351576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610baa565b600381600481111561236557612365612b47565b036111df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610baa565b6060813b6001811161241357505060408051602081019091525f8152919050565b8061241d81612f9b565b9150506040519150601f19601f602083010116820160405280825280600160208401853c50919050565b600b54831015611dff57600b546040517fb4897828000000000000000000000000000000000000000000000000000000008152610baa918591600401918252602082015260400190565b6060815160016124a19190612d7c565b826040516020016124b3929190612fcf565b6040516020818303038152906040529050919050565b73ffffffffffffffffffffffffffffffffffffffff811681146111df575f5ffd5b5f5f83601f8401126124fa575f5ffd5b50813567ffffffffffffffff811115612511575f5ffd5b602083019150836020828501011115612528575f5ffd5b9250929050565b5f5f5f5f5f5f5f5f60c0898b031215612546575f5ffd5b8835612551816124c9565b97506020890135612561816124c9565b96506040890135612571816124c9565b955060608901359450608089013567ffffffffffffffff811115612593575f5ffd5b61259f8b828c016124ea565b90955093505060a089013567ffffffffffffffff8111156125be575f5ffd5b6125ca8b828c016124ea565b999c989b5096995094979396929594505050565b5f602082840312156125ee575f5ffd5b8135610ab8816124c9565b5f5f5f5f5f6080868803121561260d575f5ffd5b8535612618816124c9565b94506020860135612628816124c9565b935060408601359250606086013567ffffffffffffffff81111561264a575f5ffd5b612656888289016124ea565b969995985093965092949392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f8301126126a3575f5ffd5b813567ffffffffffffffff8111156126bd576126bd612667565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff8111828210171561270a5761270a612667565b604052818152838201602001851015612721575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f6040838503121561274e575f5ffd5b82359150602083013567ffffffffffffffff81111561276b575f5ffd5b61277785828601612694565b9150509250929050565b5f5f5f60608486031215612793575f5ffd5b833567ffffffffffffffff8111156127a9575f5ffd5b840161016081870312156127bb575f5ffd5b95602085013595506040909401359392505050565b5f5f5f5f608085870312156127e3575f5ffd5b84359350602085013567ffffffffffffffff811115612800575f5ffd5b61280c87828801612694565b935050604085013561281d816124c9565b9396929550929360600135925050565b5f5f6040838503121561283e575f5ffd5b50508035926020909101359150565b602080825282518282018190525f918401906040840190835b81811015612884578351835260209384019390920191600101612866565b509095945050505050565b5f5f5f5f608085870312156128a2575f5ffd5b84356128ad816124c9565b935060208501359250604085013567ffffffffffffffff8111156128cf575f5ffd5b6128db87828801612694565b949793965093946060013593505050565b5f602082840312156128fc575f5ffd5b5035919050565b5f5f5f60608486031215612915575f5ffd5b8335612920816124c9565b9250602084013567ffffffffffffffff81111561293b575f5ffd5b61294786828701612694565b93969395505050506040919091013590565b5f60208284031215612969575f5ffd5b813567ffffffffffffffff81111561297f575f5ffd5b61298b84828501612694565b949350505050565b5f5f83601f8401126129a3575f5ffd5b50813567ffffffffffffffff8111156129ba575f5ffd5b6020830191508360208260051b8501011115612528575f5ffd5b5f5f5f5f5f5f5f5f60a0898b0312156129eb575f5ffd5b88356129f6816124c9565b97506020890135612a06816124c9565b9650604089013567ffffffffffffffff811115612a21575f5ffd5b612a2d8b828c01612993565b909750955050606089013567ffffffffffffffff811115612a4c575f5ffd5b612a588b828c01612993565b909550935050608089013567ffffffffffffffff8111156125be575f5ffd5b5f5f5f5f5f60a08688031215612a8b575f5ffd5b8535612a96816124c9565b945060208601359350604086013567ffffffffffffffff811115612ab8575f5ffd5b612ac488828901612694565b935050606086013560028110612ad8575f5ffd5b949793965091946080013592915050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f610ab86020830184612ae9565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b6020810160038310612bad577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b91905290565b5f5f5f5f5f5f60a08789031215612bc8575f5ffd5b8635612bd3816124c9565b95506020870135612be3816124c9565b94506040870135935060608701359250608087013567ffffffffffffffff811115612c0c575f5ffd5b612c1889828a016124ea565b979a9699509497509295939492505050565b828152604060208201525f61298b6040830184612ae9565b5f60208284031215612c52575f5ffd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610ab8575f5ffd5b5f5f60408385031215612c92575f5ffd5b8251612c9d816124c9565b6020939093015192949293505050565b5f5f83357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612ce0575f5ffd5b83018035915067ffffffffffffffff821115612cfa575f5ffd5b602001915036819003821315612528575f5ffd5b848152608060208201525f612d266080830186612ae9565b73ffffffffffffffffffffffffffffffffffffffff949094166040830152506060015292915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115610a9557610a95612d4f565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b805163ffffffff8116811461139d575f5ffd5b5f5f5f5f5f5f5f60e0888a031215612de5575f5ffd5b87516bffffffffffffffffffffffff81168114612e00575f5ffd5b6020890151909750612e11816124c9565b60408901519096509450612e2760608901612dbc565b9350612e3560808901612dbc565b9250612e4360a08901612dbc565b915060c088015160068110612e56575f5ffd5b8091505092959891949750929550565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201525f612e946060830185612ae9565b9050826040830152949350505050565b5f60208284031215612eb4575f5ffd5b8151610ab8816124c9565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612eef57612eef612d4f565b5060010190565b5f6080828403128015612f07575f5ffd5b506040516080810167ffffffffffffffff81118282101715612f2b57612f2b612667565b6040528251612f39816124c9565b81526020830151612f49816124c9565b60208201526040830151612f5c816124c9565b6040820152612f6d60608401612dbc565b60608201529392505050565b5f81518060208401855e5f93019283525090919050565b5f610ab88284612f79565b5f81612fa957612fa9612d4f565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f630000000000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008360e01b1660018201527f80600e6000396000f3000000000000000000000000000000000000000000000060058201525f600e8201525f61298b600f830184612f7956fea26469706673582212201e4ec51d95904f3f48332b13c1423197c0b731cb6eba1b7d45af9d50bf09001464736f6c634300081c0033", + "deployedBytecode": "0x608060405260043610610278575f3560e01c8063a035b1fe1161014b578063d843b7f4116100c6578063f5dcb7bb1161007c578063f698da2511610062578063f698da2514610869578063fc0c546a1461089c578063ffa1ad74146108b0575f5ffd5b8063f5dcb7bb14610817578063f6171e441461084a575f5ffd5b8063e7d915cf116100ac578063e7d915cf1461079f578063ed24911d146107be578063f23a6e61146107d2575f5ffd5b8063d843b7f414610732578063d8a4676f14610773575f5ffd5b8063b0d691fe1161011b578063bdf8631711610101578063bdf86317146106c6578063c7dec3fc146106db578063cbd6407a14610707575f5ffd5b8063b0d691fe14610659578063bc197c811461067f575f5ffd5b8063a035b1fe146105fd578063a4f9edbf14610612578063a669aaf914610631578063affed0e014610646575f5ffd5b806358ce0909116101f557806391b7f5ed116101ab5780639a8a0592116101915780639a8a0592146105535780639c5e9590146105865780639ec4a5bf146105de575f5ffd5b806391b7f5ed14610509578063982c0db314610528575f5ffd5b80636d70f7ae116101db5780636d70f7ae146104585780637af73473146104875780638fb847ef146104c8575f5ffd5b806358ce09091461040d5780635f117ea914610439575f5ffd5b806317d70f7c1161024a5780633a871cdd116102305780633a871cdd146103ba5780634954bbf1146103d95780634ada3e61146103f8575f5ffd5b806317d70f7c1461037b5780631bbbeeb81461038f575f5ffd5b806223de2914610283578062427c54146102a9578063150b7a02146102e75780631626ba7e1461035c575f5ffd5b3661027f57005b5f5ffd5b34801561028e575f5ffd5b506102a761029d36600461252f565b5050505050505050565b005b3480156102b4575f5ffd5b506102d46102c33660046125de565b60066020525f908152604090205481565b6040519081526020015b60405180910390f35b3480156102f2575f5ffd5b5061032b6103013660046125f9565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016102de565b348015610367575f5ffd5b5061032b61037636600461273d565b6108f8565b348015610386575f5ffd5b506102d4610a9b565b34801561039a575f5ffd5b506102d46103a93660046125de565b60056020525f908152604090205481565b3480156103c5575f5ffd5b506102d46103d4366004612781565b610abf565b3480156103e4575f5ffd5b506102a76103f33660046127d0565b610afb565b348015610403575f5ffd5b506102d460025481565b348015610418575f5ffd5b5061042c61042736600461282d565b610cbc565b6040516102de919061284d565b348015610444575f5ffd5b506102a761045336600461288f565b610e13565b348015610463575f5ffd5b506104776104723660046125de565b610e96565b60405190151581526020016102de565b348015610492575f5ffd5b506102d46104a13660046125de565b73ffffffffffffffffffffffffffffffffffffffff165f9081526005602052604090205490565b3480156104d3575f5ffd5b506102d46104e23660046125de565b73ffffffffffffffffffffffffffffffffffffffff165f9081526006602052604090205490565b348015610514575f5ffd5b506102a76105233660046128ec565b610f89565b348015610533575f5ffd5b506102d46105423660046125de565b60076020525f908152604090205481565b34801561055e575f5ffd5b506102d47f000000000000000000000000000000000000000000000000000000000000000081565b348015610591575f5ffd5b506105b97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102de565b3480156105e9575f5ffd5b506102d46105f8366004612903565b6110b2565b348015610608575f5ffd5b506102d4600b5481565b34801561061d575f5ffd5b506102a761062c366004612959565b611166565b34801561063c575f5ffd5b506102d460035481565b348015610651575f5ffd5b505f546102d4565b348015610664575f5ffd5b50730576a174d229e3cfa37253523e645a78a0c91b576105b9565b34801561068a575f5ffd5b5061032b6106993660046129d4565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b3480156106d1575f5ffd5b506102d460015481565b3480156106e6575f5ffd5b506106fa6106f5366004612a77565b6111e2565b6040516102de9190612b35565b348015610712575f5ffd5b506102d46107213660046125de565b600a6020525f908152604090205481565b34801561073d575f5ffd5b506105b961074c3660046128ec565b60096020525f908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561077e575f5ffd5b5061079261078d3660046128ec565b6112cc565b6040516102de9190612b74565b3480156107aa575f5ffd5b506102a76107b93660046128ec565b6113a2565b3480156107c9575f5ffd5b506102d46114cc565b3480156107dd575f5ffd5b5061032b6107ec366004612bb3565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b348015610822575f5ffd5b506102d47f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b348015610855575f5ffd5b506102d461086436600461282d565b611526565b348015610874575f5ffd5b506102d47f000000000000000000000000000000000000000000000000000000000000000081565b3480156108a7575f5ffd5b506105b9611548565b3480156108bb575f5ffd5b506106fa6040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b5f5f5f5f61091885602081015160408201516060909201515f1a92909190565b9094509250905060ff81165f03610a2e578285830160200161093982610e96565b15801561095c575073ffffffffffffffffffffffffffffffffffffffff82163014155b1561098f57507fffffffff000000000000000000000000000000000000000000000000000000009450610a959350505050565b6040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831690631626ba7e906109e3908b908590600401612c2a565b602060405180830381865afa1580156109fe573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a229190612c42565b95505050505050610a95565b610a3d61047287838686611564565b15610a6e57507f1626ba7e000000000000000000000000000000000000000000000000000000009250610a95915050565b507fffffffff00000000000000000000000000000000000000000000000000000000925050505b92915050565b5f5f610aa5611580565b806020019051810190610ab89190612c81565b9392505050565b5f610ac861164f565b610ad284846116ce565b9050610ae16040850185612cad565b90505f03610af257610af2846117a2565b610ab882611820565b610b0433610e96565b80610b22575033730576a174d229e3cfa37253523e645a78a0c91b57145b610bb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e7472616374000060648201526084015b60405180910390fd5b60016004541115610bf0576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026004555f610c008585611894565b805190915015610cb0576040517f56d0819e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906356d0819e90610c82908890859088908890600401612d0e565b5f604051808303815f87803b158015610c99575f5ffd5b505af1158015610cab573d5f5f3e3d5ffd5b505050505b50506001600455505050565b6001546060905f849003610cce578093505b80610cd98486612d7c565b1115610d2657610ce98385612d7c565b6040517f7ae59685000000000000000000000000000000000000000000000000000000008152600481019190915260248101829052604401610baa565b8315610e0c578367ffffffffffffffff811115610d4557610d45612667565b604051908082528060200260200182016040528015610d6e578160200160208202803683370190505b505f80805260086020527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c8549193505b84811015610dc1575f828152600860205260409020600101549150600101610d9e565b505f5b85811015610e095781848281518110610ddf57610ddf612d8f565b6020908102919091018101919091525f838152600890915260409020600101549150600101610dc4565b50505b5092915050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610e84576040517f26b9d596000000000000000000000000000000000000000000000000000000008152336004820152602401610baa565b610e9084848484611ae7565b50505050565b5f5f5f610ea1611580565b806020019051810190610eb49190612c81565b6040517f4236aff80000000000000000000000000000000000000000000000000000000081526004810182905291935091505f9073ffffffffffffffffffffffffffffffffffffffff841690634236aff89060240160e060405180830381865afa158015610f24573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f489190612dcf565b50505050509150508473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16149350505050919050565b610f9233610e96565b80610fb0575033730576a174d229e3cfa37253523e645a78a0c91b57145b61103c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e747261637400006064820152608401610baa565b600b545f03611077576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b8190556040518181527f66cbca4f3c64fecf1dcb9ce094abcf7f68c3450a1d4e3a8e917dd621edb4ebe09060200160405180910390a150565b5f6110bb6114cc565b8484846040516020016110d093929190612e66565b604051602081830303815290604052805190602001206040516020016111289291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120949350505050565b61116e611580565b51156111d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610baa565b6111df81611c8f565b50565b60606111ed33610e96565b8061120b575033730576a174d229e3cfa37253523e645a78a0c91b57145b611297576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e747261637400006064820152608401610baa565b5f6112b18787878787156112ab5787611e04565b5a611e04565b92509050806112c257815160208301fd5b5095945050505050565b5f8181526009602052604081205473ffffffffffffffffffffffffffffffffffffffff161561139d575f828152600860205260408082208151808301928390529160029082845b8154815260200190600101908083116113135750505050509050805f6002811061133f5761133f612d8f565b602002015115801561135357506020810151155b801561138857505f805260086020527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7548314155b15611396576002915061139b565b600191505b505b919050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611413576040517f26b9d596000000000000000000000000000000000000000000000000000000008152336004820152602401610baa565b5f8181526009602052604090205473ffffffffffffffffffffffffffffffffffffffff168061146e576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114788183611f07565b8073ffffffffffffffffffffffffffffffffffffffff167fa36a540c5fea3a5e69d4b1c2247b28a93fd183ef1314af26a8db7b3ae080bcd0836040516114c091815260200190565b60405180910390a25050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614611501576114fc61205a565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6008602052815f5260405f20816002811061153f575f80fd5b01549150829050565b5f611551611580565b8060200190518101906114fc9190612ea4565b5f5f5f61157387878787612158565b915091506112c281612240565b60606114fc61164a6040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f010000000000000000000000000000000000000000000000000000000000000060368201525f90603701604051602081830303815290604052805190602001205f1c905090565b6123f2565b33730576a174d229e3cfa37253523e645a78a0c91b57146116cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e74000000006044820152606401610baa565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000005f908152601c829052603c81207f1626ba7e000000000000000000000000000000000000000000000000000000006117688261172f610140880188612cad565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506108f892505050565b7fffffffff000000000000000000000000000000000000000000000000000000001614611799576001915050610a95565b505f9392505050565b5f8054602083013591806117b583612ebf565b91905055146111df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610baa565b80156111df576040515f9033907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90849084818181858888f193505050503d805f8114611888576040519150601f19603f3d011682016040523d82523d5f602084013e61188d565b606091505b5050505050565b5f828152600960205260408082205490517ff2e433bf0000000000000000000000000000000000000000000000000000000081526004810185905260609273ffffffffffffffffffffffffffffffffffffffff9283169290917f00000000000000000000000000000000000000000000000000000000000000009091169063f2e433bf906024016080604051808303815f875af1158015611937573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061195b9190612ef6565b602081015190915073ffffffffffffffffffffffffffffffffffffffff1615611985575050610a95565b73ffffffffffffffffffffffffffffffffffffffff8216611a39577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16156119e457806040015191505b73ffffffffffffffffffffffffffffffffffffffff8216611a34576040517ffe23980400000000000000000000000000000000000000000000000000000000815260048101869052602401610baa565b611a43565b611a438286611f07565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600660205260408120805486955091611a7683612ebf565b909155505060038054905f611a8a83612ebf565b91905055503373ffffffffffffffffffffffffffffffffffffffff167f0cd979445339c62199996f208428d987b1cea24d18e62b79ec24d94b636e8b708685604051611ad7929190612c2a565b60405180910390a2505092915050565b611af2838284612447565b73ffffffffffffffffffffffffffffffffffffffff84165f908152600560205260408120805491611b2283612ebf565b909155505073ffffffffffffffffffffffffffffffffffffffff84165f908152600760205260408120805491611b5783612ebf565b90915550505f81815260096020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff891617905560089091528082207f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c8805460018381018290559186905580855292842085905580547f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c794929392909190611c1d83612ebf565b909155505060028054905f611c3183612ebf565b91905055508673ffffffffffffffffffffffffffffffffffffffff167f4bda649efe6b98b0f9c1d5e859c29e20910f45c66dabfe6fad4a4881f7faf9cc8587604051611c7e929190612c2a565b60405180910390a250505050505050565b5f611c9982612491565b90505f8151602083015ff09050611d6b6040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f010000000000000000000000000000000000000000000000000000000000000060368201525f90603701604051602081830303815290604052805190602001205f1c905090565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611dff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f5772697465206661696c656400000000000000000000000000000000000000006044820152606401610baa565b505050565b5f60606001846001811115611e1b57611e1b612b47565b03611e8f578673ffffffffffffffffffffffffffffffffffffffff168386604051611e469190612f90565b5f604051808303818686f4925050503d805f8114611e7f576040519150601f19603f3d011682016040523d82523d5f602084013e611e84565b606091505b509092509050611efd565b8673ffffffffffffffffffffffffffffffffffffffff16838787604051611eb69190612f90565b5f60405180830381858888f193505050503d805f8114611ef1576040519150601f19603f3d011682016040523d82523d5f602084013e611ef6565b606091505b5090925090505b9550959350505050565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600760205260408120805491611f3783612f9b565b909155505060018054905f611f4b83612f9b565b90915550505f818152600860205260408082208151808301928390529160029082845b815481526020019060010190808311611f6e5750505050509050805f60028110611f9a57611f9a612d8f565b6020020151158015611fae57506020810151155b8015611fe357505f805260086020527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c7548214155b1561201d576040517ffe23980400000000000000000000000000000000000000000000000000000000815260048101839052602401610baa565b6020818101805183515f90815260089093526040808420600190810192909255935191518352838320919091559281529081208181559091015550565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f493aeac1d921aa02a044029e7fe4be43b1a4e80b40706fa5819e8fbb0d0935256040518060400160405280600581526020017f312e312e300000000000000000000000000000000000000000000000000000008152506040516020016120e39190612b35565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083019490945281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561218d57505f90506003612237565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156121de573d5f5f3e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116612231575f60019250925050612237565b91505f90505b94509492505050565b5f81600481111561225357612253612b47565b0361225b5750565b600181600481111561226f5761226f612b47565b036122d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610baa565b60028160048111156122ea576122ea612b47565b03612351576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610baa565b600381600481111561236557612365612b47565b036111df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610baa565b6060813b6001811161241357505060408051602081019091525f8152919050565b8061241d81612f9b565b9150506040519150601f19601f602083010116820160405280825280600160208401853c50919050565b600b54831015611dff57600b546040517fb4897828000000000000000000000000000000000000000000000000000000008152610baa918591600401918252602082015260400190565b6060815160016124a19190612d7c565b826040516020016124b3929190612fcf565b6040516020818303038152906040529050919050565b73ffffffffffffffffffffffffffffffffffffffff811681146111df575f5ffd5b5f5f83601f8401126124fa575f5ffd5b50813567ffffffffffffffff811115612511575f5ffd5b602083019150836020828501011115612528575f5ffd5b9250929050565b5f5f5f5f5f5f5f5f60c0898b031215612546575f5ffd5b8835612551816124c9565b97506020890135612561816124c9565b96506040890135612571816124c9565b955060608901359450608089013567ffffffffffffffff811115612593575f5ffd5b61259f8b828c016124ea565b90955093505060a089013567ffffffffffffffff8111156125be575f5ffd5b6125ca8b828c016124ea565b999c989b5096995094979396929594505050565b5f602082840312156125ee575f5ffd5b8135610ab8816124c9565b5f5f5f5f5f6080868803121561260d575f5ffd5b8535612618816124c9565b94506020860135612628816124c9565b935060408601359250606086013567ffffffffffffffff81111561264a575f5ffd5b612656888289016124ea565b969995985093965092949392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f82601f8301126126a3575f5ffd5b813567ffffffffffffffff8111156126bd576126bd612667565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff8111828210171561270a5761270a612667565b604052818152838201602001851015612721575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f6040838503121561274e575f5ffd5b82359150602083013567ffffffffffffffff81111561276b575f5ffd5b61277785828601612694565b9150509250929050565b5f5f5f60608486031215612793575f5ffd5b833567ffffffffffffffff8111156127a9575f5ffd5b840161016081870312156127bb575f5ffd5b95602085013595506040909401359392505050565b5f5f5f5f608085870312156127e3575f5ffd5b84359350602085013567ffffffffffffffff811115612800575f5ffd5b61280c87828801612694565b935050604085013561281d816124c9565b9396929550929360600135925050565b5f5f6040838503121561283e575f5ffd5b50508035926020909101359150565b602080825282518282018190525f918401906040840190835b81811015612884578351835260209384019390920191600101612866565b509095945050505050565b5f5f5f5f608085870312156128a2575f5ffd5b84356128ad816124c9565b935060208501359250604085013567ffffffffffffffff8111156128cf575f5ffd5b6128db87828801612694565b949793965093946060013593505050565b5f602082840312156128fc575f5ffd5b5035919050565b5f5f5f60608486031215612915575f5ffd5b8335612920816124c9565b9250602084013567ffffffffffffffff81111561293b575f5ffd5b61294786828701612694565b93969395505050506040919091013590565b5f60208284031215612969575f5ffd5b813567ffffffffffffffff81111561297f575f5ffd5b61298b84828501612694565b949350505050565b5f5f83601f8401126129a3575f5ffd5b50813567ffffffffffffffff8111156129ba575f5ffd5b6020830191508360208260051b8501011115612528575f5ffd5b5f5f5f5f5f5f5f5f60a0898b0312156129eb575f5ffd5b88356129f6816124c9565b97506020890135612a06816124c9565b9650604089013567ffffffffffffffff811115612a21575f5ffd5b612a2d8b828c01612993565b909750955050606089013567ffffffffffffffff811115612a4c575f5ffd5b612a588b828c01612993565b909550935050608089013567ffffffffffffffff8111156125be575f5ffd5b5f5f5f5f5f60a08688031215612a8b575f5ffd5b8535612a96816124c9565b945060208601359350604086013567ffffffffffffffff811115612ab8575f5ffd5b612ac488828901612694565b935050606086013560028110612ad8575f5ffd5b949793965091946080013592915050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f610ab86020830184612ae9565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b6020810160038310612bad577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b91905290565b5f5f5f5f5f5f60a08789031215612bc8575f5ffd5b8635612bd3816124c9565b95506020870135612be3816124c9565b94506040870135935060608701359250608087013567ffffffffffffffff811115612c0c575f5ffd5b612c1889828a016124ea565b979a9699509497509295939492505050565b828152604060208201525f61298b6040830184612ae9565b5f60208284031215612c52575f5ffd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610ab8575f5ffd5b5f5f60408385031215612c92575f5ffd5b8251612c9d816124c9565b6020939093015192949293505050565b5f5f83357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112612ce0575f5ffd5b83018035915067ffffffffffffffff821115612cfa575f5ffd5b602001915036819003821315612528575f5ffd5b848152608060208201525f612d266080830186612ae9565b73ffffffffffffffffffffffffffffffffffffffff949094166040830152506060015292915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115610a9557610a95612d4f565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b805163ffffffff8116811461139d575f5ffd5b5f5f5f5f5f5f5f60e0888a031215612de5575f5ffd5b87516bffffffffffffffffffffffff81168114612e00575f5ffd5b6020890151909750612e11816124c9565b60408901519096509450612e2760608901612dbc565b9350612e3560808901612dbc565b9250612e4360a08901612dbc565b915060c088015160068110612e56575f5ffd5b8091505092959891949750929550565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201525f612e946060830185612ae9565b9050826040830152949350505050565b5f60208284031215612eb4575f5ffd5b8151610ab8816124c9565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612eef57612eef612d4f565b5060010190565b5f6080828403128015612f07575f5ffd5b506040516080810167ffffffffffffffff81118282101715612f2b57612f2b612667565b6040528251612f39816124c9565b81526020830151612f49816124c9565b60208201526040830151612f5c816124c9565b6040820152612f6d60608401612dbc565b60608201529392505050565b5f81518060208401855e5f93019283525090919050565b5f610ab88284612f79565b5f81612fa957612fa9612d4f565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f630000000000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008360e01b1660018201527f80600e6000396000f3000000000000000000000000000000000000000000000060058201525f600e8201525f61298b600f830184612f7956fea26469706673582212201e4ec51d95904f3f48332b13c1423197c0b731cb6eba1b7d45af9d50bf09001464736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/abis/0.8.28/MechMarketplace.json b/abis/0.8.28/MechMarketplace.json new file mode 100644 index 0000000..3380f01 --- /dev/null +++ b/abis/0.8.28/MechMarketplace.json @@ -0,0 +1,1439 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MechMarketplace", + "sourceName": "contracts/MechMarketplace.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_serviceRegistry", + "type": "address" + }, + { + "internalType": "address", + "name": "_stakingFactory", + "type": "address" + }, + { + "internalType": "address", + "name": "_karma", + "type": "address" + }, + { + "internalType": "address", + "name": "_wrappedNativeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_buyBackBurner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "name": "AlreadyDelivered", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "NotContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "NotEnoughPaid", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "OutOfBounds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "Overflow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnerOnly", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "current", + "type": "uint256" + } + ], + "name": "PriorityMechResponseTimeout", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuard", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "name": "RequestIdNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "name": "RequestPaid", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "stakingInstance", + "type": "address" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "ServiceNotStaked", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TransferFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "UnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numValues1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numValues2", + "type": "uint256" + } + ], + "name": "WrongArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "state", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "WrongServiceState", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroValue", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "mech", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "CreateMech", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "deliveryMech", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "payment", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "name": "DeliveryPaymentProcessed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "collectedFees", + "type": "uint256" + } + ], + "name": "Drained", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "ImplementationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "priorityMech", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "actualMech", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "requester", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mechPayment", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "marketplaceFee", + "type": "uint256" + } + ], + "name": "MarketplaceDeliver", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "fee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "minResponseTimeout", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "maxResponseTimeout", + "type": "uint256" + } + ], + "name": "MarketplaceParamsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "requester", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "requestedMech", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "MarketplaceRequest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnerUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "mechFactories", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "bool[]", + "name": "statuses", + "type": "bool[]" + } + ], + "name": "SetMechFactoryStatuses", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "mech", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR_TYPE_HASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MECH_MARKETPLACE_PROXY", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "buyBackBurner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "chainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "changeImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newMinResponseTimeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newMaxResponseTimeout", + "type": "uint256" + } + ], + "name": "changeMarketplaceParams", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "changeOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "mech", + "type": "address" + }, + { + "internalType": "address", + "name": "mechStakingInstance", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mechServiceId", + "type": "uint256" + } + ], + "name": "checkMech", + "outputs": [ + { + "internalType": "address", + "name": "multisig", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "requester", + "type": "address" + }, + { + "internalType": "address", + "name": "requesterStakingInstance", + "type": "address" + }, + { + "internalType": "uint256", + "name": "requesterServiceId", + "type": "uint256" + } + ], + "name": "checkRequester", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "stakingInstance", + "type": "address" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "checkServiceAndGetMultisig", + "outputs": [ + { + "internalType": "address", + "name": "multisig", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "stakingInstance", + "type": "address" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "checkStakingInstance", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "collectedFees", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "mechFactory", + "type": "address" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "create", + "outputs": [ + { + "internalType": "address", + "name": "mech", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "requestData", + "type": "bytes" + }, + { + "internalType": "address", + "name": "deliveryMechStakingInstance", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deliveryMechServiceId", + "type": "uint256" + } + ], + "name": "deliverMarketplace", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "domainSeparator", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "drain", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "agentMech", + "type": "address" + } + ], + "name": "getAgentMechDeliveriesCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getDeliveriesCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDomainSeparator", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "name": "getMechDeliveryInfo", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "priorityMech", + "type": "address" + }, + { + "internalType": "address", + "name": "deliveryMech", + "type": "address" + }, + { + "internalType": "address", + "name": "requester", + "type": "address" + }, + { + "internalType": "uint256", + "name": "responseTimeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "payment", + "type": "uint256" + } + ], + "internalType": "struct MechDelivery", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "mechServiceMultisig", + "type": "address" + } + ], + "name": "getMechServiceDeliveriesCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "name": "getRequestId", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "name": "getRequestStatus", + "outputs": [ + { + "internalType": "enum MechMarketplace.RequestStatus", + "name": "status", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getRequestsCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_fee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minResponseTimeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxResponseTimeout", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "karma", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapAgentMechDeliveryCounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapAgentMechFactories", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapDeliveryCounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapMechBalances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapMechFactories", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapMechServiceDeliveryCounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapNonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "mapRequestCounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "mapRequestIdDeliveries", + "outputs": [ + { + "internalType": "address", + "name": "priorityMech", + "type": "address" + }, + { + "internalType": "address", + "name": "deliveryMech", + "type": "address" + }, + { + "internalType": "address", + "name": "requester", + "type": "address" + }, + { + "internalType": "uint256", + "name": "responseTimeout", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "payment", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxResponseTimeout", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minResponseTimeout", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "numMechs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "numTotalRequests", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "numUndeliveredRequests", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "address", + "name": "priorityMech", + "type": "address" + }, + { + "internalType": "address", + "name": "priorityMechStakingInstance", + "type": "address" + }, + { + "internalType": "uint256", + "name": "priorityMechServiceId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "requesterStakingInstance", + "type": "address" + }, + { + "internalType": "uint256", + "name": "requesterServiceId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "responseTimeout", + "type": "uint256" + } + ], + "name": "request", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "serviceRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "mechFactories", + "type": "address[]" + }, + { + "internalType": "bool[]", + "name": "statuses", + "type": "bool[]" + } + ], + "name": "setMechFactoryStatuses", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "setMechs", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stakingFactory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "wrappedNativeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x6101606040526001600755348015610015575f5ffd5b50604051613c03380380613c03833981016040819052610034916101ca565b6001600160a01b038516158061005157506001600160a01b038416155b8061006357506001600160a01b038316155b8061007557506001600160a01b038216155b8061008757506001600160a01b038116155b156100a55760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b038086166101005284811660e05283811660c052828116610120528116610140524660a0526100d96100e7565b608052506102609350505050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7ff376b6313a0837eb351511248cfe7dcc1cd26c49b8e0a47e1eb369dd62c425db604051806040016040528060058152602001640312e312e360dc1b815250604051602001610158919061022b565b60408051601f1981840301815282825280516020918201209083019490945281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b80516001600160a01b03811681146101c5575f5ffd5b919050565b5f5f5f5f5f60a086880312156101de575f5ffd5b6101e7866101af565b94506101f5602087016101af565b9350610203604087016101af565b9250610211606087016101af565b915061021f608087016101af565b90509295509295909350565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b60805160a05160c05160e0516101005161012051610140516139056102fe5f395f8181610721015261217701525f818161045e015281816121a60152612c7a01525f818161098c0152818161134d015261173001525f818161053e0152610f0101525f81816106ad01528181611a9701528181611cad01526127e101525f81816108090152612a3101525f8181610c2b0152612a6601526139055ff3fe608060405260043610610318575f3560e01c806380d859111161019c578063cbcf252a116100e7578063e679803511610092578063f2e433bf1161006d578063f2e433bf14610ab5578063f5dcb7bb14610be7578063f698da2514610c1a578063ffa1ad7414610c4d575f5ffd5b8063e679803514610a43578063e8eca22d14610a6e578063ed24911d14610aa1575f5ffd5b8063ddca3f43116100c2578063ddca3f4314610a05578063ded8128614610a19578063e0cb19e814610a2e575f5ffd5b8063cbcf252a1461097b578063cbd6407a146109ae578063d8a4676f146109d9575f5ffd5b80639ec4a5bf11610147578063bdf8631711610122578063bdf863171461087c578063c69f6f9f14610891578063cb261bec146108d2575f5ffd5b80639ec4a5bf1461082b578063a6f9dae11461084a578063ad16ee7314610869575f5ffd5b80639003adfe116101775780639003adfe146107cf5780639890220b146107e45780639a8a0592146107f8575f5ffd5b806380d85911146107435780638da5cb5b146107625780638fb847ef1461078e575f5ffd5b8063291347681161026757806356d0819e1161021257806371db00c4116101ed57806371db00c41461067d57806374a8569b1461069c5780637af73473146106cf578063803551a914610710575f5ffd5b806356d0819e146105fe57806357c0762d1461061d57806360b24e0a1461063c575f5ffd5b806346fbcbb21161024257806346fbcbb21461059f5780634ada3e61146105be578063551399bb146105d3575f5ffd5b8063291347681461052d5780633ccfd60b1461056057806343be964314610574575f5ffd5b806317a68dd8116102c75780631a4d8fc8116102a25780631a4d8fc8146104c45780631bbbeeb8146104e3578063203a993c1461050e575f5ffd5b806317a68dd81461042e57806317fcb39b1461044d578063187cc7f2146104a5575f5ffd5b80630ed8078b116102f75780630ed8078b146103bc5780630f41196a146103db57806313999914146103f0575f5ffd5b8062427c541461031c57806305b040b21461035a578063087f08d41461039b575b5f5ffd5b348015610327575f5ffd5b50610347610336366004612e1a565b600a6020525f908152604090205481565b6040519081526020015b60405180910390f35b348015610365575f5ffd5b50610347610374366004612e1a565b73ffffffffffffffffffffffffffffffffffffffff165f908152600b602052604090205490565b3480156103a6575f5ffd5b506103ba6103b5366004612f7d565b610ca2565b005b3480156103c7575f5ffd5b506103ba6103d6366004613042565b610ebc565b3480156103e6575f5ffd5b5061034760015481565b3480156103fb575f5ffd5b5061041e61040a366004612e1a565b600e6020525f908152604090205460ff1681565b6040519015158152602001610351565b348015610439575f5ffd5b506103ba610448366004612e1a565b6110b8565b348015610458575f5ffd5b506104807f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610351565b3480156104b0575f5ffd5b506104806104bf36600461306c565b6111df565b3480156104cf575f5ffd5b506103ba6104de366004613083565b611214565b3480156104ee575f5ffd5b506103476104fd366004612e1a565b60096020525f908152604090205481565b348015610519575f5ffd5b50610480610528366004613042565b611300565b348015610538575f5ffd5b506104807f000000000000000000000000000000000000000000000000000000000000000081565b34801561056b575f5ffd5b506103ba61150f565b34801561057f575f5ffd5b5061034761058e366004612e1a565b600c6020525f908152604090205481565b3480156105aa575f5ffd5b506104806105b936600461314b565b61166e565b3480156105c9575f5ffd5b5061034760055481565b3480156105de575f5ffd5b506103476105ed366004612e1a565b600b6020525f908152604090205481565b348015610609575f5ffd5b506103ba6106183660046131a0565b6118a9565b348015610628575f5ffd5b506103ba6106373660046131fd565b611dc0565b348015610647575f5ffd5b50610347610656366004612e1a565b73ffffffffffffffffffffffffffffffffffffffff165f908152600c602052604090205490565b348015610688575f5ffd5b50610480610697366004613083565b611e84565b3480156106a7575f5ffd5b506104807f000000000000000000000000000000000000000000000000000000000000000081565b3480156106da575f5ffd5b506103476106e9366004612e1a565b73ffffffffffffffffffffffffffffffffffffffff165f9081526009602052604090205490565b34801561071b575f5ffd5b506104807f000000000000000000000000000000000000000000000000000000000000000081565b34801561074e575f5ffd5b506103ba61075d3660046131fd565b612024565b34801561076d575f5ffd5b506008546104809073ffffffffffffffffffffffffffffffffffffffff1681565b348015610799575f5ffd5b506103476107a8366004612e1a565b73ffffffffffffffffffffffffffffffffffffffff165f908152600a602052604090205490565b3480156107da575f5ffd5b5061034760035481565b3480156107ef575f5ffd5b506103ba6120ae565b348015610803575f5ffd5b506103477f000000000000000000000000000000000000000000000000000000000000000081565b348015610836575f5ffd5b50610347610845366004613226565b61224c565b348015610855575f5ffd5b506103ba610864366004612e1a565b612302565b61034761087736600461327c565b612430565b348015610887575f5ffd5b5061034760045481565b34801561089c575f5ffd5b506104806108ab366004612e1a565b600f6020525f908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156108dd575f5ffd5b506109356108ec36600461306c565b600d6020525f90815260409020805460018201546002830154600384015460049094015473ffffffffffffffffffffffffffffffffffffffff9384169492841693909116919085565b6040805173ffffffffffffffffffffffffffffffffffffffff9687168152948616602086015292909416918301919091526060820152608081019190915260a001610351565b348015610986575f5ffd5b506104807f000000000000000000000000000000000000000000000000000000000000000081565b3480156109b9575f5ffd5b506103476109c8366004612e1a565b60116020525f908152604090205481565b3480156109e4575f5ffd5b506109f86109f336600461306c565b61297d565b6040516103519190613336565b348015610a10575f5ffd5b506103475f5481565b348015610a24575f5ffd5b5061034760025481565b348015610a39575f5ffd5b5061034760065481565b348015610a4e575f5ffd5b50610347610a5d366004612e1a565b60106020525f908152604090205481565b348015610a79575f5ffd5b506103477fe6194b93a7bff0a54130ed8cd277223408a77f3e48bb5104a9db96d334f962ca81565b348015610aac575f5ffd5b50610347612a2e565b348015610ac0575f5ffd5b50610b64610acf36600461306c565b6040805160a0810182525f80825260208201819052918101829052606081018290526080810191909152505f908152600d6020908152604091829020825160a081018452815473ffffffffffffffffffffffffffffffffffffffff9081168252600183015481169382019390935260028201549092169282019290925260038201546060820152600490910154608082015290565b60405161035191905f60a08201905073ffffffffffffffffffffffffffffffffffffffff835116825273ffffffffffffffffffffffffffffffffffffffff602084015116602083015273ffffffffffffffffffffffffffffffffffffffff6040840151166040830152606083015160608301526080830151608083015292915050565b348015610bf2575f5ffd5b506103477f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b348015610c25575f5ffd5b506103477f000000000000000000000000000000000000000000000000000000000000000081565b348015610c58575f5ffd5b50610c956040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b60405161035191906133c1565b60085473ffffffffffffffffffffffffffffffffffffffff163314610d1a576008546040517fa43d6ada00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b8051825114610d6257815181516040517f8151c11000000000000000000000000000000000000000000000000000000000815260048101929092526024820152604401610d11565b5f5b8251811015610e7e575f73ffffffffffffffffffffffffffffffffffffffff16838281518110610d9657610d966133d3565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603610deb576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818181518110610dfd57610dfd6133d3565b6020026020010151600e5f858481518110610e1a57610e1a6133d3565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610d64565b507f8cc6be981009d13170c616af494b7d671ed2d84b7e6891e4c8f21fe065c00dfc8282604051610eb0929190613400565b60405180910390a15050565b6040517f479e372e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063479e372e90602401602060405180830381865afa158015610f46573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f6a9190613498565b610fb8576040517f32b2baa300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610d11565b6040517ffd0bba8c000000000000000000000000000000000000000000000000000000008152600481018290525f9073ffffffffffffffffffffffffffffffffffffffff84169063fd0bba8c90602401602060405180830381865afa158015611023573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061104791906134b3565b9050600181600281111561105d5761105d613309565b146110b3576040517fcaf8924d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260248101839052604401610d11565b505050565b60085473ffffffffffffffffffffffffffffffffffffffff16331461112b576008546040517fa43d6ada00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610d11565b73ffffffffffffffffffffffffffffffffffffffff8116611178576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fe6194b93a7bff0a54130ed8cd277223408a77f3e48bb5104a9db96d334f962ca81905560405173ffffffffffffffffffffffffffffffffffffffff8216907f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca03905f90a250565b601281815481106111ee575f80fd5b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b80156112b2575f6112258383611300565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146112ac576040517fa43d6ada00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808616600483015282166024820152604401610d11565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8216156110b3576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff831661144b576040517f4236aff8000000000000000000000000000000000000000000000000000000008152600481018390525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634236aff89060240160e060405180830381865afa1580156113a7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113cb91906134e9565b949750939550600494506113df9350505050565b8160058111156113f1576113f1613309565b146114455780600581111561140857611408613309565b6040517ff014fe74000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052604401610d11565b50611509565b6114558383610ebc565b6040517f82a8ea58000000000000000000000000000000000000000000000000000000008152600481018390525f9073ffffffffffffffffffffffffffffffffffffffff8516906382a8ea58906024015f60405180830381865afa1580156114bf573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526115049190810190613580565b519150505b92915050565b6001600754111561154c576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600755335f908152601060205260408120549081900361159c576040517f32b2baa3000000000000000000000000000000000000000000000000000000008152336004820152602401610d11565b6040515f90339083908381818185875af1925050503d805f81146115db576040519150601f19603f3d011682016040523d82523d5f602084013e6115e0565b606091505b5050905080611630576040517fcd3f16590000000000000000000000000000000000000000000000000000000081525f600482015230602482015233604482015260648101839052608401610d11565b60405182815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a250506001600755565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600e602052604081205460ff166116e4576040517f32b2baa300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610d11565b6040517f2732cb0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690632732cb029061175c9030907f00000000000000000000000000000000000000000000000000000000000000009089908890600401613689565b6020604051808303815f875af1158015611778573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061179c91906136e3565b905073ffffffffffffffffffffffffffffffffffffffff81166117eb576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8082165f818152600f602052604080822080549488167fffffffffffffffffffffffff0000000000000000000000000000000000000000958616179055601280546001810182558184527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec344401805490951684179094559254600655915186927f0dab9459b2f129b692750bed5cc716b07a2fb19ba9fe0a0dc378428a6204036791a39392505050565b600160075411156118e6576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026007555f6118f7338484611e84565b5f868152600d6020526040902080549192509073ffffffffffffffffffffffffffffffffffffffff1680611957576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282015473ffffffffffffffffffffffffffffffffffffffff16338190036119ae576040517f32b2baa3000000000000000000000000000000000000000000000000000000008152336004820152602401610d11565b600183015473ffffffffffffffffffffffffffffffffffffffff1615611a03576040517f5b7e830100000000000000000000000000000000000000000000000000000000815260048101899052602401610d11565b73ffffffffffffffffffffffffffffffffffffffff82163314611baf578260030154421115611b6e576040517f4225d37a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248301527f00000000000000000000000000000000000000000000000000000000000000001690634225d37a906044015f604051808303815f87803b158015611ad8575f5ffd5b505af1158015611aea573d5f5f3e3d5ffd5b50506040517fe7d915cf000000000000000000000000000000000000000000000000000000008152600481018b905273ffffffffffffffffffffffffffffffffffffffff8516925063e7d915cf91506024015f604051808303815f87803b158015611b53575f5ffd5b505af1158015611b65573d5f5f3e3d5ffd5b50505050611baf565b60038301546040517f177d0c790000000000000000000000000000000000000000000000000000000081526004810191909152426024820152604401610d11565b6001830180547fffffffffffffffffffffffff0000000000000000000000000000000000000000163317905560048054905f611bea8361372b565b909155505073ffffffffffffffffffffffffffffffffffffffff81165f908152600a60205260408120805491611c1f8361375f565b9091555050335f908152600b60205260408120805491611c3e8361375f565b909155505073ffffffffffffffffffffffffffffffffffffffff84165f908152600c60205260408120805491611c738361375f565b90915550506040517f4225d37a000000000000000000000000000000000000000000000000000000008152336004820152600160248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634225d37a906044015f604051808303815f87803b158015611d03575f5ffd5b505af1158015611d15573d5f5f3e3d5ffd5b505050505f5f611d29338660040154612a88565b915091508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f11e005e94e7fe3e65c3476728664cce8c02a074d70cfb51e10f8c7df60f3d6268d8d8787604051611da79493929190613796565b60405180910390a4505060016007555050505050505050565b60085473ffffffffffffffffffffffffffffffffffffffff163314611e33576008546040517fa43d6ada00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610d11565b611e3e838383612b4a565b60408051848152602081018490529081018290527f64d0972bd5d0c2828d80911b61084d86d61214c3081656ca3a720047a88320359060600160405180910390a1505050565b5f815f03611ebe576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8481165f908152600f602052604090205416611f33576040517f32b2baa300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610d11565b611f3d8383611300565b6040517f6d70f7ae00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808316600483015291925090851690636d70f7ae90602401602060405180830381865afa158015611fab573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fcf9190613498565b61201d576040517f32b2baa300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610d11565b9392505050565b60085473ffffffffffffffffffffffffffffffffffffffff1615612074576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61207f838383612b4a565b5050600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000163317905550565b600160075411156120eb576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026007556003545f81900361212d576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60035561213a81612c78565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303815f875af11580156121ec573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122109190613498565b506040518181527fdef931299fe61d176f949118058530c1f3f539dcb6950b4e372c9b835c33ca079060200160405180910390a1506001600755565b5f612255612a2e565b4285858560405160200161226c94939291906137c1565b604051602081830303815290604052805190602001206040516020016122c49291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120949350505050565b60085473ffffffffffffffffffffffffffffffffffffffff163314612375576008546040517fa43d6ada00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610d11565b73ffffffffffffffffffffffffffffffffffffffff81166123c2576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b905f90a250565b5f6001600754111561246e576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260075573ffffffffffffffffffffffffffffffffffffffff87166124c0576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16148015612510575073ffffffffffffffffffffffffffffffffffffffff861615155b1561255f576040517f32b2baa300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87166004820152602401610d11565b73ffffffffffffffffffffffffffffffffffffffff871633036125b0576040517f32b2baa3000000000000000000000000000000000000000000000000000000008152336004820152602401610d11565b6001548210806125c1575060025482115b1561260e576001546002546040517feb373cfe0000000000000000000000000000000000000000000000000000000081526004810185905260248101929092526044820152606401610d11565b63ffffffff61261d4284613806565b111561266d5761262d4283613806565b6040517f7ae59685000000000000000000000000000000000000000000000000000000008152600481019190915263ffffffff6024820152604401610d11565b87515f036126a7576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6126b2878787611e84565b506126be338585611214565b335f818152601160205260409020546126d991908a9061224c565b335f9081526011602052604081208054929350906126f68361375f565b90915550505f818152600d6020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff89161781556127504284613806565b60038201556002810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001633908117909155346004808401919091556040517f55e7d0440000000000000000000000000000000000000000000000000000000081529081019190915273ffffffffffffffffffffffffffffffffffffffff8981166024830152600160448301527f000000000000000000000000000000000000000000000000000000000000000016906355e7d044906064015f604051808303815f87803b158015612822575f5ffd5b505af1158015612834573d5f5f3e3d5ffd5b5050335f9081526009602052604081208054935091506128538361375f565b909155505060048054905f6128678361375f565b909155505060058054905f61287b8361375f565b90915550506040517f5f117ea900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff891690635f117ea9906128d890339034908e908890600401613819565b5f604051808303815f87803b1580156128ef575f5ffd5b505af1158015612901573d5f5f3e3d5ffd5b505050508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f4827c9fc8074fe94dd4939d4228739ff43d7072a6504a6f413ffa4967c120175848c60405161296492919061384d565b60405180910390a3506001600755979650505050505050565b5f818152600d60209081526040808320815160a081018352815473ffffffffffffffffffffffffffffffffffffffff908116808352600184015482169583019590955260028301541692810192909252600381015460608301526004015460808201529015612a2857602081015173ffffffffffffffffffffffffffffffffffffffff16612a23578060600151421115612a1a5760029150612a28565b60019150612a28565b600391505b50919050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614612a6357612a5e612cf8565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b5f808215612b43576127105f5484612aa0919061386d565b612aaa9190613884565b9050612ab681846138bc565b9150815f03612af1576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84165f9081526010602052604081208054849290612b25908490613806565b925050819055508060035f828254612b3d9190613806565b90915550505b9250929050565b821580612b55575081155b80612b5e575080155b15612b95576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612710831115612bdc576040517f7ae59685000000000000000000000000000000000000000000000000000000008152600481018490526127106024820152604401610d11565b80821115612c20576040517f7ae596850000000000000000000000000000000000000000000000000000000081526004810183905260248101829052604401610d11565b63ffffffff811115612c6b576040517f7ae596850000000000000000000000000000000000000000000000000000000081526004810182905263ffffffff6024820152604401610d11565b5f92909255600155600255565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004015f604051808303818588803b158015612cde575f5ffd5b505af1158015612cf0573d5f5f3e3d5ffd5b505050505050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7ff376b6313a0837eb351511248cfe7dcc1cd26c49b8e0a47e1eb369dd62c425db6040518060400160405280600581526020017f312e312e30000000000000000000000000000000000000000000000000000000815250604051602001612d8191906133c1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083019490945281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b73ffffffffffffffffffffffffffffffffffffffff81168114612e17575f5ffd5b50565b5f60208284031215612e2a575f5ffd5b813561201d81612df6565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612e8557612e85612e35565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715612ed257612ed2612e35565b604052919050565b5f67ffffffffffffffff821115612ef357612ef3612e35565b5060051b60200190565b8015158114612e17575f5ffd5b5f82601f830112612f19575f5ffd5b8135612f2c612f2782612eda565b612e8b565b8082825260208201915060208360051b860101925085831115612f4d575f5ffd5b602085015b83811015612f73578035612f6581612efd565b835260209283019201612f52565b5095945050505050565b5f5f60408385031215612f8e575f5ffd5b823567ffffffffffffffff811115612fa4575f5ffd5b8301601f81018513612fb4575f5ffd5b8035612fc2612f2782612eda565b8082825260208201915060208360051b850101925087831115612fe3575f5ffd5b6020840193505b8284101561300e578335612ffd81612df6565b825260209384019390910190612fea565b9450505050602083013567ffffffffffffffff81111561302c575f5ffd5b61303885828601612f0a565b9150509250929050565b5f5f60408385031215613053575f5ffd5b823561305e81612df6565b946020939093013593505050565b5f6020828403121561307c575f5ffd5b5035919050565b5f5f5f60608486031215613095575f5ffd5b83356130a081612df6565b925060208401356130b081612df6565b929592945050506040919091013590565b5f82601f8301126130d0575f5ffd5b813567ffffffffffffffff8111156130ea576130ea612e35565b61311b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601612e8b565b81815284602083860101111561312f575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f6060848603121561315d575f5ffd5b83359250602084013561316f81612df6565b9150604084013567ffffffffffffffff81111561318a575f5ffd5b613196868287016130c1565b9150509250925092565b5f5f5f5f608085870312156131b3575f5ffd5b84359350602085013567ffffffffffffffff8111156131d0575f5ffd5b6131dc878288016130c1565b93505060408501356131ed81612df6565b9396929550929360600135925050565b5f5f5f6060848603121561320f575f5ffd5b505081359360208301359350604090920135919050565b5f5f5f60608486031215613238575f5ffd5b833561324381612df6565b9250602084013567ffffffffffffffff81111561325e575f5ffd5b61326a868287016130c1565b93969395505050506040919091013590565b5f5f5f5f5f5f5f60e0888a031215613292575f5ffd5b873567ffffffffffffffff8111156132a8575f5ffd5b6132b48a828b016130c1565b97505060208801356132c581612df6565b955060408801356132d581612df6565b94506060880135935060808801356132ec81612df6565b9699959850939692959460a0840135945060c09093013592915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b602081016004831061336f577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b91905290565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61201d6020830184613375565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b604080825283519082018190525f9060208501906060840190835b8181101561344f57835173ffffffffffffffffffffffffffffffffffffffff1683526020938401939092019160010161341b565b5050838103602080860191909152855180835291810192508501905f5b8181101561348c578251151584526020938401939092019160010161346c565b50919695505050505050565b5f602082840312156134a8575f5ffd5b815161201d81612efd565b5f602082840312156134c3575f5ffd5b81516003811061201d575f5ffd5b805163ffffffff811681146134e4575f5ffd5b919050565b5f5f5f5f5f5f5f60e0888a0312156134ff575f5ffd5b87516bffffffffffffffffffffffff8116811461351a575f5ffd5b602089015190975061352b81612df6565b60408901519096509450613541606089016134d1565b935061354f608089016134d1565b925061355d60a089016134d1565b915060c088015160068110613570575f5ffd5b8091505092959891949750929550565b5f60208284031215613590575f5ffd5b815167ffffffffffffffff8111156135a6575f5ffd5b820160c081850312156135b7575f5ffd5b6135bf612e62565b81516135ca81612df6565b815260208201516135da81612df6565b6020820152604082015167ffffffffffffffff8111156135f8575f5ffd5b8201601f81018613613608575f5ffd5b8051613616612f2782612eda565b8082825260208201915060208360051b850101925088831115613637575f5ffd5b6020840193505b8284101561365957835182526020938401939091019061363e565b6040850152505050606082810151908201526080808301519082015260a091820151918101919091529392505050565b73ffffffffffffffffffffffffffffffffffffffff8516815273ffffffffffffffffffffffffffffffffffffffff84166020820152826040820152608060608201525f6136d96080830184613375565b9695505050505050565b5f602082840312156136f3575f5ffd5b815161201d81612df6565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f81613739576137396136fe565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361378f5761378f6136fe565b5060010190565b848152608060208201525f6137ae6080830186613375565b6040830194909452506060015292915050565b84815273ffffffffffffffffffffffffffffffffffffffff84166020820152608060408201525f6137f56080830185613375565b905082606083015295945050505050565b80820180821115611509576115096136fe565b73ffffffffffffffffffffffffffffffffffffffff85168152836020820152608060408201525f6137f56080830185613375565b828152604060208201525f6138656040830184613375565b949350505050565b8082028115828204841417611509576115096136fe565b5f826138b7577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b81810381811115611509576115096136fe56fea26469706673582212203f2c770afd56d0571158fed8446df27b410f091c59505b5ff22e6e16c9675dd864736f6c634300081c0033", + "deployedBytecode": "0x608060405260043610610318575f3560e01c806380d859111161019c578063cbcf252a116100e7578063e679803511610092578063f2e433bf1161006d578063f2e433bf14610ab5578063f5dcb7bb14610be7578063f698da2514610c1a578063ffa1ad7414610c4d575f5ffd5b8063e679803514610a43578063e8eca22d14610a6e578063ed24911d14610aa1575f5ffd5b8063ddca3f43116100c2578063ddca3f4314610a05578063ded8128614610a19578063e0cb19e814610a2e575f5ffd5b8063cbcf252a1461097b578063cbd6407a146109ae578063d8a4676f146109d9575f5ffd5b80639ec4a5bf11610147578063bdf8631711610122578063bdf863171461087c578063c69f6f9f14610891578063cb261bec146108d2575f5ffd5b80639ec4a5bf1461082b578063a6f9dae11461084a578063ad16ee7314610869575f5ffd5b80639003adfe116101775780639003adfe146107cf5780639890220b146107e45780639a8a0592146107f8575f5ffd5b806380d85911146107435780638da5cb5b146107625780638fb847ef1461078e575f5ffd5b8063291347681161026757806356d0819e1161021257806371db00c4116101ed57806371db00c41461067d57806374a8569b1461069c5780637af73473146106cf578063803551a914610710575f5ffd5b806356d0819e146105fe57806357c0762d1461061d57806360b24e0a1461063c575f5ffd5b806346fbcbb21161024257806346fbcbb21461059f5780634ada3e61146105be578063551399bb146105d3575f5ffd5b8063291347681461052d5780633ccfd60b1461056057806343be964314610574575f5ffd5b806317a68dd8116102c75780631a4d8fc8116102a25780631a4d8fc8146104c45780631bbbeeb8146104e3578063203a993c1461050e575f5ffd5b806317a68dd81461042e57806317fcb39b1461044d578063187cc7f2146104a5575f5ffd5b80630ed8078b116102f75780630ed8078b146103bc5780630f41196a146103db57806313999914146103f0575f5ffd5b8062427c541461031c57806305b040b21461035a578063087f08d41461039b575b5f5ffd5b348015610327575f5ffd5b50610347610336366004612e1a565b600a6020525f908152604090205481565b6040519081526020015b60405180910390f35b348015610365575f5ffd5b50610347610374366004612e1a565b73ffffffffffffffffffffffffffffffffffffffff165f908152600b602052604090205490565b3480156103a6575f5ffd5b506103ba6103b5366004612f7d565b610ca2565b005b3480156103c7575f5ffd5b506103ba6103d6366004613042565b610ebc565b3480156103e6575f5ffd5b5061034760015481565b3480156103fb575f5ffd5b5061041e61040a366004612e1a565b600e6020525f908152604090205460ff1681565b6040519015158152602001610351565b348015610439575f5ffd5b506103ba610448366004612e1a565b6110b8565b348015610458575f5ffd5b506104807f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610351565b3480156104b0575f5ffd5b506104806104bf36600461306c565b6111df565b3480156104cf575f5ffd5b506103ba6104de366004613083565b611214565b3480156104ee575f5ffd5b506103476104fd366004612e1a565b60096020525f908152604090205481565b348015610519575f5ffd5b50610480610528366004613042565b611300565b348015610538575f5ffd5b506104807f000000000000000000000000000000000000000000000000000000000000000081565b34801561056b575f5ffd5b506103ba61150f565b34801561057f575f5ffd5b5061034761058e366004612e1a565b600c6020525f908152604090205481565b3480156105aa575f5ffd5b506104806105b936600461314b565b61166e565b3480156105c9575f5ffd5b5061034760055481565b3480156105de575f5ffd5b506103476105ed366004612e1a565b600b6020525f908152604090205481565b348015610609575f5ffd5b506103ba6106183660046131a0565b6118a9565b348015610628575f5ffd5b506103ba6106373660046131fd565b611dc0565b348015610647575f5ffd5b50610347610656366004612e1a565b73ffffffffffffffffffffffffffffffffffffffff165f908152600c602052604090205490565b348015610688575f5ffd5b50610480610697366004613083565b611e84565b3480156106a7575f5ffd5b506104807f000000000000000000000000000000000000000000000000000000000000000081565b3480156106da575f5ffd5b506103476106e9366004612e1a565b73ffffffffffffffffffffffffffffffffffffffff165f9081526009602052604090205490565b34801561071b575f5ffd5b506104807f000000000000000000000000000000000000000000000000000000000000000081565b34801561074e575f5ffd5b506103ba61075d3660046131fd565b612024565b34801561076d575f5ffd5b506008546104809073ffffffffffffffffffffffffffffffffffffffff1681565b348015610799575f5ffd5b506103476107a8366004612e1a565b73ffffffffffffffffffffffffffffffffffffffff165f908152600a602052604090205490565b3480156107da575f5ffd5b5061034760035481565b3480156107ef575f5ffd5b506103ba6120ae565b348015610803575f5ffd5b506103477f000000000000000000000000000000000000000000000000000000000000000081565b348015610836575f5ffd5b50610347610845366004613226565b61224c565b348015610855575f5ffd5b506103ba610864366004612e1a565b612302565b61034761087736600461327c565b612430565b348015610887575f5ffd5b5061034760045481565b34801561089c575f5ffd5b506104806108ab366004612e1a565b600f6020525f908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156108dd575f5ffd5b506109356108ec36600461306c565b600d6020525f90815260409020805460018201546002830154600384015460049094015473ffffffffffffffffffffffffffffffffffffffff9384169492841693909116919085565b6040805173ffffffffffffffffffffffffffffffffffffffff9687168152948616602086015292909416918301919091526060820152608081019190915260a001610351565b348015610986575f5ffd5b506104807f000000000000000000000000000000000000000000000000000000000000000081565b3480156109b9575f5ffd5b506103476109c8366004612e1a565b60116020525f908152604090205481565b3480156109e4575f5ffd5b506109f86109f336600461306c565b61297d565b6040516103519190613336565b348015610a10575f5ffd5b506103475f5481565b348015610a24575f5ffd5b5061034760025481565b348015610a39575f5ffd5b5061034760065481565b348015610a4e575f5ffd5b50610347610a5d366004612e1a565b60106020525f908152604090205481565b348015610a79575f5ffd5b506103477fe6194b93a7bff0a54130ed8cd277223408a77f3e48bb5104a9db96d334f962ca81565b348015610aac575f5ffd5b50610347612a2e565b348015610ac0575f5ffd5b50610b64610acf36600461306c565b6040805160a0810182525f80825260208201819052918101829052606081018290526080810191909152505f908152600d6020908152604091829020825160a081018452815473ffffffffffffffffffffffffffffffffffffffff9081168252600183015481169382019390935260028201549092169282019290925260038201546060820152600490910154608082015290565b60405161035191905f60a08201905073ffffffffffffffffffffffffffffffffffffffff835116825273ffffffffffffffffffffffffffffffffffffffff602084015116602083015273ffffffffffffffffffffffffffffffffffffffff6040840151166040830152606083015160608301526080830151608083015292915050565b348015610bf2575f5ffd5b506103477f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b348015610c25575f5ffd5b506103477f000000000000000000000000000000000000000000000000000000000000000081565b348015610c58575f5ffd5b50610c956040518060400160405280600581526020017f312e312e3000000000000000000000000000000000000000000000000000000081525081565b60405161035191906133c1565b60085473ffffffffffffffffffffffffffffffffffffffff163314610d1a576008546040517fa43d6ada00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044015b60405180910390fd5b8051825114610d6257815181516040517f8151c11000000000000000000000000000000000000000000000000000000000815260048101929092526024820152604401610d11565b5f5b8251811015610e7e575f73ffffffffffffffffffffffffffffffffffffffff16838281518110610d9657610d966133d3565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603610deb576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818181518110610dfd57610dfd6133d3565b6020026020010151600e5f858481518110610e1a57610e1a6133d3565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610d64565b507f8cc6be981009d13170c616af494b7d671ed2d84b7e6891e4c8f21fe065c00dfc8282604051610eb0929190613400565b60405180910390a15050565b6040517f479e372e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063479e372e90602401602060405180830381865afa158015610f46573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f6a9190613498565b610fb8576040517f32b2baa300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610d11565b6040517ffd0bba8c000000000000000000000000000000000000000000000000000000008152600481018290525f9073ffffffffffffffffffffffffffffffffffffffff84169063fd0bba8c90602401602060405180830381865afa158015611023573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061104791906134b3565b9050600181600281111561105d5761105d613309565b146110b3576040517fcaf8924d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260248101839052604401610d11565b505050565b60085473ffffffffffffffffffffffffffffffffffffffff16331461112b576008546040517fa43d6ada00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610d11565b73ffffffffffffffffffffffffffffffffffffffff8116611178576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fe6194b93a7bff0a54130ed8cd277223408a77f3e48bb5104a9db96d334f962ca81905560405173ffffffffffffffffffffffffffffffffffffffff8216907f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca03905f90a250565b601281815481106111ee575f80fd5b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b80156112b2575f6112258383611300565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146112ac576040517fa43d6ada00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808616600483015282166024820152604401610d11565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8216156110b3576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff831661144b576040517f4236aff8000000000000000000000000000000000000000000000000000000008152600481018390525f907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634236aff89060240160e060405180830381865afa1580156113a7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113cb91906134e9565b949750939550600494506113df9350505050565b8160058111156113f1576113f1613309565b146114455780600581111561140857611408613309565b6040517ff014fe74000000000000000000000000000000000000000000000000000000008152600481019190915260248101849052604401610d11565b50611509565b6114558383610ebc565b6040517f82a8ea58000000000000000000000000000000000000000000000000000000008152600481018390525f9073ffffffffffffffffffffffffffffffffffffffff8516906382a8ea58906024015f60405180830381865afa1580156114bf573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526115049190810190613580565b519150505b92915050565b6001600754111561154c576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600755335f908152601060205260408120549081900361159c576040517f32b2baa3000000000000000000000000000000000000000000000000000000008152336004820152602401610d11565b6040515f90339083908381818185875af1925050503d805f81146115db576040519150601f19603f3d011682016040523d82523d5f602084013e6115e0565b606091505b5050905080611630576040517fcd3f16590000000000000000000000000000000000000000000000000000000081525f600482015230602482015233604482015260648101839052608401610d11565b60405182815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a250506001600755565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600e602052604081205460ff166116e4576040517f32b2baa300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610d11565b6040517f2732cb0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690632732cb029061175c9030907f00000000000000000000000000000000000000000000000000000000000000009089908890600401613689565b6020604051808303815f875af1158015611778573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061179c91906136e3565b905073ffffffffffffffffffffffffffffffffffffffff81166117eb576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8082165f818152600f602052604080822080549488167fffffffffffffffffffffffff0000000000000000000000000000000000000000958616179055601280546001810182558184527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec344401805490951684179094559254600655915186927f0dab9459b2f129b692750bed5cc716b07a2fb19ba9fe0a0dc378428a6204036791a39392505050565b600160075411156118e6576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026007555f6118f7338484611e84565b5f868152600d6020526040902080549192509073ffffffffffffffffffffffffffffffffffffffff1680611957576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282015473ffffffffffffffffffffffffffffffffffffffff16338190036119ae576040517f32b2baa3000000000000000000000000000000000000000000000000000000008152336004820152602401610d11565b600183015473ffffffffffffffffffffffffffffffffffffffff1615611a03576040517f5b7e830100000000000000000000000000000000000000000000000000000000815260048101899052602401610d11565b73ffffffffffffffffffffffffffffffffffffffff82163314611baf578260030154421115611b6e576040517f4225d37a00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248301527f00000000000000000000000000000000000000000000000000000000000000001690634225d37a906044015f604051808303815f87803b158015611ad8575f5ffd5b505af1158015611aea573d5f5f3e3d5ffd5b50506040517fe7d915cf000000000000000000000000000000000000000000000000000000008152600481018b905273ffffffffffffffffffffffffffffffffffffffff8516925063e7d915cf91506024015f604051808303815f87803b158015611b53575f5ffd5b505af1158015611b65573d5f5f3e3d5ffd5b50505050611baf565b60038301546040517f177d0c790000000000000000000000000000000000000000000000000000000081526004810191909152426024820152604401610d11565b6001830180547fffffffffffffffffffffffff0000000000000000000000000000000000000000163317905560048054905f611bea8361372b565b909155505073ffffffffffffffffffffffffffffffffffffffff81165f908152600a60205260408120805491611c1f8361375f565b9091555050335f908152600b60205260408120805491611c3e8361375f565b909155505073ffffffffffffffffffffffffffffffffffffffff84165f908152600c60205260408120805491611c738361375f565b90915550506040517f4225d37a000000000000000000000000000000000000000000000000000000008152336004820152600160248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690634225d37a906044015f604051808303815f87803b158015611d03575f5ffd5b505af1158015611d15573d5f5f3e3d5ffd5b505050505f5f611d29338660040154612a88565b915091508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f11e005e94e7fe3e65c3476728664cce8c02a074d70cfb51e10f8c7df60f3d6268d8d8787604051611da79493929190613796565b60405180910390a4505060016007555050505050505050565b60085473ffffffffffffffffffffffffffffffffffffffff163314611e33576008546040517fa43d6ada00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610d11565b611e3e838383612b4a565b60408051848152602081018490529081018290527f64d0972bd5d0c2828d80911b61084d86d61214c3081656ca3a720047a88320359060600160405180910390a1505050565b5f815f03611ebe576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8481165f908152600f602052604090205416611f33576040517f32b2baa300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610d11565b611f3d8383611300565b6040517f6d70f7ae00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808316600483015291925090851690636d70f7ae90602401602060405180830381865afa158015611fab573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611fcf9190613498565b61201d576040517f32b2baa300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610d11565b9392505050565b60085473ffffffffffffffffffffffffffffffffffffffff1615612074576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61207f838383612b4a565b5050600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000163317905550565b600160075411156120eb576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026007556003545f81900361212d576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60035561213a81612c78565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303815f875af11580156121ec573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122109190613498565b506040518181527fdef931299fe61d176f949118058530c1f3f539dcb6950b4e372c9b835c33ca079060200160405180910390a1506001600755565b5f612255612a2e565b4285858560405160200161226c94939291906137c1565b604051602081830303815290604052805190602001206040516020016122c49291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120949350505050565b60085473ffffffffffffffffffffffffffffffffffffffff163314612375576008546040517fa43d6ada00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610d11565b73ffffffffffffffffffffffffffffffffffffffff81166123c2576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b905f90a250565b5f6001600754111561246e576040517f8beb9d1600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260075573ffffffffffffffffffffffffffffffffffffffff87166124c0576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16148015612510575073ffffffffffffffffffffffffffffffffffffffff861615155b1561255f576040517f32b2baa300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87166004820152602401610d11565b73ffffffffffffffffffffffffffffffffffffffff871633036125b0576040517f32b2baa3000000000000000000000000000000000000000000000000000000008152336004820152602401610d11565b6001548210806125c1575060025482115b1561260e576001546002546040517feb373cfe0000000000000000000000000000000000000000000000000000000081526004810185905260248101929092526044820152606401610d11565b63ffffffff61261d4284613806565b111561266d5761262d4283613806565b6040517f7ae59685000000000000000000000000000000000000000000000000000000008152600481019190915263ffffffff6024820152604401610d11565b87515f036126a7576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6126b2878787611e84565b506126be338585611214565b335f818152601160205260409020546126d991908a9061224c565b335f9081526011602052604081208054929350906126f68361375f565b90915550505f818152600d6020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff89161781556127504284613806565b60038201556002810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001633908117909155346004808401919091556040517f55e7d0440000000000000000000000000000000000000000000000000000000081529081019190915273ffffffffffffffffffffffffffffffffffffffff8981166024830152600160448301527f000000000000000000000000000000000000000000000000000000000000000016906355e7d044906064015f604051808303815f87803b158015612822575f5ffd5b505af1158015612834573d5f5f3e3d5ffd5b5050335f9081526009602052604081208054935091506128538361375f565b909155505060048054905f6128678361375f565b909155505060058054905f61287b8361375f565b90915550506040517f5f117ea900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff891690635f117ea9906128d890339034908e908890600401613819565b5f604051808303815f87803b1580156128ef575f5ffd5b505af1158015612901573d5f5f3e3d5ffd5b505050508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f4827c9fc8074fe94dd4939d4228739ff43d7072a6504a6f413ffa4967c120175848c60405161296492919061384d565b60405180910390a3506001600755979650505050505050565b5f818152600d60209081526040808320815160a081018352815473ffffffffffffffffffffffffffffffffffffffff908116808352600184015482169583019590955260028301541692810192909252600381015460608301526004015460808201529015612a2857602081015173ffffffffffffffffffffffffffffffffffffffff16612a23578060600151421115612a1a5760029150612a28565b60019150612a28565b600391505b50919050565b5f7f00000000000000000000000000000000000000000000000000000000000000004614612a6357612a5e612cf8565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b5f808215612b43576127105f5484612aa0919061386d565b612aaa9190613884565b9050612ab681846138bc565b9150815f03612af1576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84165f9081526010602052604081208054849290612b25908490613806565b925050819055508060035f828254612b3d9190613806565b90915550505b9250929050565b821580612b55575081155b80612b5e575080155b15612b95576040517f7c946ed700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612710831115612bdc576040517f7ae59685000000000000000000000000000000000000000000000000000000008152600481018490526127106024820152604401610d11565b80821115612c20576040517f7ae596850000000000000000000000000000000000000000000000000000000081526004810183905260248101829052604401610d11565b63ffffffff811115612c6b576040517f7ae596850000000000000000000000000000000000000000000000000000000081526004810182905263ffffffff6024820152604401610d11565b5f92909255600155600255565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004015f604051808303818588803b158015612cde575f5ffd5b505af1158015612cf0573d5f5f3e3d5ffd5b505050505050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7ff376b6313a0837eb351511248cfe7dcc1cd26c49b8e0a47e1eb369dd62c425db6040518060400160405280600581526020017f312e312e30000000000000000000000000000000000000000000000000000000815250604051602001612d8191906133c1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083019490945281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b73ffffffffffffffffffffffffffffffffffffffff81168114612e17575f5ffd5b50565b5f60208284031215612e2a575f5ffd5b813561201d81612df6565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160c0810167ffffffffffffffff81118282101715612e8557612e85612e35565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715612ed257612ed2612e35565b604052919050565b5f67ffffffffffffffff821115612ef357612ef3612e35565b5060051b60200190565b8015158114612e17575f5ffd5b5f82601f830112612f19575f5ffd5b8135612f2c612f2782612eda565b612e8b565b8082825260208201915060208360051b860101925085831115612f4d575f5ffd5b602085015b83811015612f73578035612f6581612efd565b835260209283019201612f52565b5095945050505050565b5f5f60408385031215612f8e575f5ffd5b823567ffffffffffffffff811115612fa4575f5ffd5b8301601f81018513612fb4575f5ffd5b8035612fc2612f2782612eda565b8082825260208201915060208360051b850101925087831115612fe3575f5ffd5b6020840193505b8284101561300e578335612ffd81612df6565b825260209384019390910190612fea565b9450505050602083013567ffffffffffffffff81111561302c575f5ffd5b61303885828601612f0a565b9150509250929050565b5f5f60408385031215613053575f5ffd5b823561305e81612df6565b946020939093013593505050565b5f6020828403121561307c575f5ffd5b5035919050565b5f5f5f60608486031215613095575f5ffd5b83356130a081612df6565b925060208401356130b081612df6565b929592945050506040919091013590565b5f82601f8301126130d0575f5ffd5b813567ffffffffffffffff8111156130ea576130ea612e35565b61311b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601612e8b565b81815284602083860101111561312f575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f6060848603121561315d575f5ffd5b83359250602084013561316f81612df6565b9150604084013567ffffffffffffffff81111561318a575f5ffd5b613196868287016130c1565b9150509250925092565b5f5f5f5f608085870312156131b3575f5ffd5b84359350602085013567ffffffffffffffff8111156131d0575f5ffd5b6131dc878288016130c1565b93505060408501356131ed81612df6565b9396929550929360600135925050565b5f5f5f6060848603121561320f575f5ffd5b505081359360208301359350604090920135919050565b5f5f5f60608486031215613238575f5ffd5b833561324381612df6565b9250602084013567ffffffffffffffff81111561325e575f5ffd5b61326a868287016130c1565b93969395505050506040919091013590565b5f5f5f5f5f5f5f60e0888a031215613292575f5ffd5b873567ffffffffffffffff8111156132a8575f5ffd5b6132b48a828b016130c1565b97505060208801356132c581612df6565b955060408801356132d581612df6565b94506060880135935060808801356132ec81612df6565b9699959850939692959460a0840135945060c09093013592915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b602081016004831061336f577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b91905290565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61201d6020830184613375565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b604080825283519082018190525f9060208501906060840190835b8181101561344f57835173ffffffffffffffffffffffffffffffffffffffff1683526020938401939092019160010161341b565b5050838103602080860191909152855180835291810192508501905f5b8181101561348c578251151584526020938401939092019160010161346c565b50919695505050505050565b5f602082840312156134a8575f5ffd5b815161201d81612efd565b5f602082840312156134c3575f5ffd5b81516003811061201d575f5ffd5b805163ffffffff811681146134e4575f5ffd5b919050565b5f5f5f5f5f5f5f60e0888a0312156134ff575f5ffd5b87516bffffffffffffffffffffffff8116811461351a575f5ffd5b602089015190975061352b81612df6565b60408901519096509450613541606089016134d1565b935061354f608089016134d1565b925061355d60a089016134d1565b915060c088015160068110613570575f5ffd5b8091505092959891949750929550565b5f60208284031215613590575f5ffd5b815167ffffffffffffffff8111156135a6575f5ffd5b820160c081850312156135b7575f5ffd5b6135bf612e62565b81516135ca81612df6565b815260208201516135da81612df6565b6020820152604082015167ffffffffffffffff8111156135f8575f5ffd5b8201601f81018613613608575f5ffd5b8051613616612f2782612eda565b8082825260208201915060208360051b850101925088831115613637575f5ffd5b6020840193505b8284101561365957835182526020938401939091019061363e565b6040850152505050606082810151908201526080808301519082015260a091820151918101919091529392505050565b73ffffffffffffffffffffffffffffffffffffffff8516815273ffffffffffffffffffffffffffffffffffffffff84166020820152826040820152608060608201525f6136d96080830184613375565b9695505050505050565b5f602082840312156136f3575f5ffd5b815161201d81612df6565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f81613739576137396136fe565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361378f5761378f6136fe565b5060010190565b848152608060208201525f6137ae6080830186613375565b6040830194909452506060015292915050565b84815273ffffffffffffffffffffffffffffffffffffffff84166020820152608060408201525f6137f56080830185613375565b905082606083015295945050505050565b80820180821115611509576115096136fe565b73ffffffffffffffffffffffffffffffffffffffff85168152836020820152608060408201525f6137f56080830185613375565b828152604060208201525f6138656040830184613375565b949350505050565b8082028115828204841417611509576115096136fe565b5f826138b7577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b81810381811115611509576115096136fe56fea26469706673582212203f2c770afd56d0571158fed8446df27b410f091c59505b5ff22e6e16c9675dd864736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/abis/0.8.28/MechMarketplaceProxy.json b/abis/0.8.28/MechMarketplaceProxy.json new file mode 100644 index 0000000..d8e1dc1 --- /dev/null +++ b/abis/0.8.28/MechMarketplaceProxy.json @@ -0,0 +1,72 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "MechMarketplaceProxy", + "sourceName": "contracts/MechMarketplaceProxy.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "mechMarketplaceData", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "InitializationFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroData", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroImplementationAddress", + "type": "error" + }, + { + "stateMutability": "nonpayable", + "type": "fallback" + }, + { + "inputs": [], + "name": "MECH_MARKETPLACE_PROXY", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getImplementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561000f575f5ffd5b5060405161034438038061034483398101604081905261002e9161012d565b6001600160a01b0382166100555760405163d02c623d60e01b815260040160405180910390fd5b80515f036100765760405163c922446b60e01b815260040160405180910390fd5b817fe6194b93a7bff0a54130ed8cd277223408a77f3e48bb5104a9db96d334f962ca555f826001600160a01b0316826040516100b291906101fc565b5f60405180830381855af49150503d805f81146100ea576040519150601f19603f3d011682016040523d82523d5f602084013e6100ef565b606091505b505090508061011157604051630337323560e31b815260040160405180910390fd5b505050610212565b634e487b7160e01b5f52604160045260245ffd5b5f5f6040838503121561013e575f5ffd5b82516001600160a01b0381168114610154575f5ffd5b60208401519092506001600160401b0381111561016f575f5ffd5b8301601f8101851361017f575f5ffd5b80516001600160401b0381111561019857610198610119565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101c6576101c6610119565b6040528181528282016020018710156101dd575f5ffd5b8160208401602083015e5f602083830101528093505050509250929050565b5f82518060208501845e5f920191825250919050565b6101258061021f5f395ff3fe6080604052348015600e575f5ffd5b50600436106030575f3560e01c8063aaf10f42146070578063e8eca22d1460bc575b7fe6194b93a7bff0a54130ed8cd277223408a77f3e48bb5104a9db96d334f962ca54365f5f375f5f365f845af490503d5f5f3e80606b573d5ffd5b503d5ff35b7fe6194b93a7bff0a54130ed8cd277223408a77f3e48bb5104a9db96d334f962ca5460405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b60e27fe6194b93a7bff0a54130ed8cd277223408a77f3e48bb5104a9db96d334f962ca81565b60405190815260200160b356fea2646970667358221220bad1bba0929384aed9089f42d3d55d954e78fa90a17404fff9014e353150642464736f6c634300081c0033", + "deployedBytecode": "0x6080604052348015600e575f5ffd5b50600436106030575f3560e01c8063aaf10f42146070578063e8eca22d1460bc575b7fe6194b93a7bff0a54130ed8cd277223408a77f3e48bb5104a9db96d334f962ca54365f5f375f5f365f845af490503d5f5f3e80606b573d5ffd5b503d5ff35b7fe6194b93a7bff0a54130ed8cd277223408a77f3e48bb5104a9db96d334f962ca5460405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b60e27fe6194b93a7bff0a54130ed8cd277223408a77f3e48bb5104a9db96d334f962ca81565b60405190815260200160b356fea2646970667358221220bad1bba0929384aed9089f42d3d55d954e78fa90a17404fff9014e353150642464736f6c634300081c0033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/contracts/MechFixedPrice.sol b/contracts/MechFixedPrice.sol index b9a9e71..1875aae 100644 --- a/contracts/MechFixedPrice.sol +++ b/contracts/MechFixedPrice.sol @@ -19,7 +19,7 @@ contract MechFixedPrice is OlasMech { OlasMech(_mechMarketplace, _serviceRegistry, _serviceId) { // Check for zero value - if (price == 0) { + if (_price == 0) { revert ZeroValue(); } diff --git a/contracts/MechMarketplace.sol b/contracts/MechMarketplace.sol index 41ac8d8..bc87b23 100644 --- a/contracts/MechMarketplace.sol +++ b/contracts/MechMarketplace.sol @@ -132,25 +132,18 @@ contract MechMarketplace is IErrorsMarketplace { address[] public setMechs; - // TODO: able to change min/max ResponseTimeout? /// @dev MechMarketplace constructor. /// @param _serviceRegistry Service registry contract address. /// @param _stakingFactory Staking factory contract address. /// @param _karma Karma proxy contract address. /// @param _wrappedNativeToken Wrapped native token address. /// @param _buyBackBurner Buy back burner address. - /// @param _fee Marketplace fee. - /// @param _minResponseTimeout Min response time in sec. - /// @param _maxResponseTimeout Max response time in sec. constructor( address _serviceRegistry, address _stakingFactory, address _karma, address _wrappedNativeToken, - address _buyBackBurner, - uint256 _fee, - uint256 _minResponseTimeout, - uint256 _maxResponseTimeout + address _buyBackBurner ) { // Check for zero address if (_serviceRegistry == address(0) || _stakingFactory == address(0) || _karma == address(0) || @@ -158,33 +151,11 @@ contract MechMarketplace is IErrorsMarketplace { revert ZeroAddress(); } - // Check for zero values - if (_fee == 0 || _minResponseTimeout == 0 || _maxResponseTimeout == 0) { - revert ZeroValue(); - } - - // Check for fee value - if (_fee > 10_000) { - revert Overflow(_fee, 10_000); - } - - // Check for sanity values - if (_minResponseTimeout > _maxResponseTimeout) { - revert Overflow(_minResponseTimeout, _maxResponseTimeout); - } - - // responseTimeout limits - if (_maxResponseTimeout > type(uint32).max) { - revert Overflow(_maxResponseTimeout, type(uint32).max); - } - serviceRegistry = _serviceRegistry; stakingFactory = _stakingFactory; karma = _karma; wrappedNativeToken = _wrappedNativeToken; buyBackBurner = _buyBackBurner; - minResponseTimeout = _minResponseTimeout; - maxResponseTimeout = _maxResponseTimeout; // Record chain Id chainId = block.chainid; @@ -226,17 +197,58 @@ contract MechMarketplace is IErrorsMarketplace { // Record payment into mech balance mapMechBalances[mech] += mechPayment; + + // Record collected fee + collectedFees += marketplaceFee; + } + } + + /// @dev Changes marketplace params. + /// @param newFee New marketplace fee. + /// @param newMinResponseTimeout New min response time in sec. + /// @param newMaxResponseTimeout New max response time in sec. + function _changeMarketplaceParams( + uint256 newFee, + uint256 newMinResponseTimeout, + uint256 newMaxResponseTimeout + ) internal { + // Check for zero values + if (newFee == 0 || newMinResponseTimeout == 0 || newMaxResponseTimeout == 0) { + revert ZeroValue(); + } + + // Check for fee value + if (newFee > 10_000) { + revert Overflow(newFee, 10_000); + } + + // Check for sanity values + if (newMinResponseTimeout > newMaxResponseTimeout) { + revert Overflow(newMinResponseTimeout, newMaxResponseTimeout); } + + // responseTimeout limits + if (newMaxResponseTimeout > type(uint32).max) { + revert Overflow(newMaxResponseTimeout, type(uint32).max); + } + + fee = newFee; + minResponseTimeout = newMinResponseTimeout; + maxResponseTimeout = newMaxResponseTimeout; } /// @dev MechMarketplace initializer. - function initialize(uint256 _fee) external{ + /// @param _fee Marketplace fee. + /// @param _minResponseTimeout Min response time in sec. + /// @param _maxResponseTimeout Max response time in sec. + function initialize(uint256 _fee, uint256 _minResponseTimeout, uint256 _maxResponseTimeout) external { if (owner != address(0)) { revert AlreadyInitialized(); } + _changeMarketplaceParams(_fee, _minResponseTimeout, _maxResponseTimeout); + owner = msg.sender; - fee = _fee; } function _wrap(uint256 amount) internal virtual { @@ -282,6 +294,10 @@ contract MechMarketplace is IErrorsMarketplace { emit ImplementationUpdated(newImplementation); } + /// @dev Changes marketplace params. + /// @param newFee New marketplace fee. + /// @param newMinResponseTimeout New min response time in sec. + /// @param newMaxResponseTimeout New max response time in sec. function changeMarketplaceParams( uint256 newFee, uint256 newMinResponseTimeout, @@ -292,29 +308,7 @@ contract MechMarketplace is IErrorsMarketplace { revert OwnerOnly(msg.sender, owner); } - // Check for zero values - if (newFee == 0 || newMinResponseTimeout == 0 || newMaxResponseTimeout == 0) { - revert ZeroValue(); - } - - // Check for fee value - if (newFee > 10_000) { - revert Overflow(newFee, 10_000); - } - - // Check for sanity values - if (newMinResponseTimeout > newMaxResponseTimeout) { - revert Overflow(newMinResponseTimeout, newMaxResponseTimeout); - } - - // responseTimeout limits - if (newMaxResponseTimeout > type(uint32).max) { - revert Overflow(newMaxResponseTimeout, type(uint32).max); - } - - fee = newFee; - minResponseTimeout = newMinResponseTimeout; - maxResponseTimeout = newMaxResponseTimeout; + _changeMarketplaceParams(newFee, newMinResponseTimeout, newMaxResponseTimeout); emit MarketplaceParamsUpdated(newFee, newMinResponseTimeout, newMaxResponseTimeout); } @@ -622,7 +616,7 @@ contract MechMarketplace is IErrorsMarketplace { getDomainSeparator(), keccak256( abi.encode( - block.timestamp, + address(this), account, data, nonce diff --git a/contracts/MechMarketplaceProxy.sol b/contracts/MechMarketplaceProxy.sol index fd71d76..f4a8ad3 100644 --- a/contracts/MechMarketplaceProxy.sol +++ b/contracts/MechMarketplaceProxy.sol @@ -42,9 +42,11 @@ contract MechMarketplaceProxy { } // Store the mechMarketplace implementation address + // solhint-disable-next-line avoid-low-level-calls assembly { sstore(MECH_MARKETPLACE_PROXY, implementation) } + // Initialize proxy tokenomics storage (bool success, ) = implementation.delegatecall(mechMarketplaceData); if (!success) { @@ -53,7 +55,8 @@ contract MechMarketplaceProxy { } /// @dev Delegatecall to all the incoming data. - fallback() external { + fallback() external payable { + // solhint-disable-next-line avoid-low-level-calls assembly { let implementation := sload(MECH_MARKETPLACE_PROXY) calldatacopy(0, 0, calldatasize()) diff --git a/test/AgentFactory.js b/test/AgentFactory.js deleted file mode 100644 index 9939d82..0000000 --- a/test/AgentFactory.js +++ /dev/null @@ -1,61 +0,0 @@ -/*global describe, context, beforeEach, it*/ - -const { expect } = require("chai"); -const { ethers } = require("hardhat"); - -describe.skip("AgentFactory", function () { - let serviceRegistry; - let agentFactory; - let mechMarketplace; - let signers; - const agentHash = "0x" + "5".repeat(64); - const price = 1; - beforeEach(async function () { - signers = await ethers.getSigners(); - - const AgentFactory = await ethers.getContractFactory("AgentFactory"); - agentFactory = await AgentFactory.deploy(serviceRegistry.address); - await agentFactory.deployed(); - - const MechMarketplace = await ethers.getContractFactory("MechMarketplace"); - // Note, service registry and karma contract address is irrelevant for this test suite - mechMarketplace = await MechMarketplace.deploy(agentFactory.address, agentFactory.address, - agentFactory.address, 10, 10); - await mechMarketplace.deployed(); - }); - - context("Initialization", async function () { - it("Checking for arguments passed to the constructor", async function () { - expect(await agentFactory.serviceRegistry()).to.equal(serviceRegistry.address); - }); - - it("Pausing and unpausing", async function () { - const user = signers[3]; - - // Try to pause not from the owner of the service manager - await expect( - agentFactory.connect(user).pause() - ).to.be.revertedWithCustomError(agentFactory, "OwnerOnly"); - - // Pause the contract - await agentFactory.pause(); - - // Try minting when paused - await expect( - agentFactory.create(user.address, agentHash, price, mechMarketplace.address) - ).to.be.revertedWithCustomError(agentFactory, "Paused"); - - // Try to unpause not from the owner of the service manager - await expect( - agentFactory.connect(user).unpause() - ).to.be.revertedWithCustomError(agentFactory, "OwnerOnly"); - - // Unpause the contract - await agentFactory.unpause(); - - // Mint an agent - await serviceRegistry.changeManager(agentFactory.address); - await agentFactory.create(user.address, agentHash, price, mechMarketplace.address); - }); - }); -}); diff --git a/test/AgentMech.js b/test/MechFixedPrice.js similarity index 69% rename from test/AgentMech.js rename to test/MechFixedPrice.js index d7f261e..315ab6a 100644 --- a/test/AgentMech.js +++ b/test/MechFixedPrice.js @@ -4,28 +4,35 @@ const { expect } = require("chai"); const { ethers } = require("hardhat"); const helpers = require("@nomicfoundation/hardhat-network-helpers"); -describe("AgentMech", function () { - let AgentMech; +describe("MechFixedPrice", function () { + let MechFixedPrice; + let priorityMechAddress; + let priorityMech; + let deliveryMechAddress; + let deliveryMech; let serviceRegistry; let mechMarketplace; let karma; let serviceStakingMech; let serviceStakingRequester; + let mechFactoryFixedPrice; let signers; let deployer; const AddressZero = ethers.constants.AddressZero; const agentHash = "0x" + "5".repeat(64); - const price = 1; + const price = 1000; const data = "0x00"; + const fee = 10; const minResponseTimeout = 10; const maxResponceTimeout = 20; const serviceId = 1; + const priceData = ethers.utils.defaultAbiCoder.encode(["uint256"], [price]); beforeEach(async function () { signers = await ethers.getSigners(); deployer = signers[0]; - AgentMech = await ethers.getContractFactory("AgentMech"); + MechFixedPrice = await ethers.getContractFactory("MechFixedPrice"); // Karma implementation and proxy const Karma = await ethers.getContractFactory("Karma"); @@ -33,7 +40,7 @@ describe("AgentMech", function () { await karmaImplementation.deployed(); // Initialize karma - const proxyData = karmaImplementation.interface.encodeFunctionData("initialize", []); + let proxyData = karmaImplementation.interface.encodeFunctionData("initialize", []); const KarmaProxy = await ethers.getContractFactory("KarmaProxy"); const karmaProxy = await KarmaProxy.deploy(karmaImplementation.address, proxyData); await karmaProxy.deployed(); @@ -44,6 +51,7 @@ describe("AgentMech", function () { serviceRegistry = await ServiceRegistry.deploy(); await serviceRegistry.deployed(); + // Get two mock staking const ServiceStakingMech = await ethers.getContractFactory("MockServiceStaking"); serviceStakingMech = await ServiceStakingMech.deploy(); await serviceStakingMech.deployed(); @@ -51,11 +59,29 @@ describe("AgentMech", function () { serviceStakingRequester = await ServiceStakingMech.deploy(); await serviceStakingMech.deployed(); + // Deploy mech factory + const MechFactoryFixedPrice = await ethers.getContractFactory("MechFactoryFixedPrice"); + mechFactoryFixedPrice = await MechFactoryFixedPrice.deploy(); + await mechFactoryFixedPrice.deployed(); + + // Wrapped native token and buy back burner are not relevant for now const MechMarketplace = await ethers.getContractFactory("MechMarketplace"); mechMarketplace = await MechMarketplace.deploy(serviceRegistry.address, serviceStakingMech.address, - karma.address, minResponseTimeout, maxResponceTimeout); + karma.address, deployer.address, deployer.address); await mechMarketplace.deployed(); + // Deploy and initialize marketplace proxy + proxyData = MechMarketplace.interface.encodeFunctionData("initialize", + [fee, minResponseTimeout, maxResponceTimeout]); + const MechMarketplaceProxy = await ethers.getContractFactory("MechMarketplaceProxy"); + const mechMarketplaceProxy = await MechMarketplaceProxy.deploy(mechMarketplace.address, proxyData); + await mechMarketplaceProxy.deployed(); + + mechMarketplace = await ethers.getContractAt("MechMarketplace", mechMarketplaceProxy.address); + + // Whitelist mech factory + await mechMarketplace.setMechFactoryStatuses([mechFactoryFixedPrice.address], [true]); + // Whitelist marketplace in the karma proxy await karma.setMechMarketplaceStatuses([mechMarketplace.address], [true]); @@ -66,40 +92,59 @@ describe("AgentMech", function () { // Pseudo-stake mech and requester services await serviceStakingMech.setServiceInfo(serviceId, deployer.address); await serviceStakingRequester.setServiceInfo(serviceId, deployer.address); + + // Create default priority mech + let tx = await mechMarketplace.create(serviceId, mechFactoryFixedPrice.address, priceData); + let res = await tx.wait(); + // Get mech contract address from the event + priorityMechAddress = "0x" + res.logs[0].topics[1].slice(26); + // Get mech contract instance + priorityMech = await ethers.getContractAt("MechFixedPrice", priorityMechAddress); + + // Create default delivery mech + tx = await mechMarketplace.create(serviceId + 1, mechFactoryFixedPrice.address, priceData); + res = await tx.wait(); + // Get mech contract address from the event + deliveryMechAddress = "0x" + res.logs[0].topics[1].slice(26); + // Get mech contract instance + deliveryMech = await ethers.getContractAt("MechFixedPrice", deliveryMechAddress); }); context("Initialization", async function () { it("Checking for arguments passed to the constructor", async function () { - // Zero addresses + // Zero mech marketplace + await expect( + MechFixedPrice.deploy(AddressZero, AddressZero, 0, 0) + ).to.be.revertedWithCustomError(MechFixedPrice, "ZeroAddress"); + + // Zero service registry await expect( - AgentMech.deploy(AddressZero, 0, 0, AddressZero) - ).to.be.revertedWithCustomError(AgentMech, "ZeroAddress"); + MechFixedPrice.deploy(mechMarketplace.address, AddressZero, 0, 0) + ).to.be.revertedWithCustomError(MechFixedPrice, "ZeroAddress"); // Zero service Id await expect( - AgentMech.deploy(serviceRegistry.address, 0, price, AddressZero) - ).to.be.revertedWithCustomError(AgentMech, "ZeroValue"); + MechFixedPrice.deploy(mechMarketplace.address, serviceRegistry.address, 0, 0) + ).to.be.revertedWithCustomError(MechFixedPrice, "ZeroValue"); - // Zero mech marketplace + // Zero price await expect( - AgentMech.deploy(serviceRegistry.address, serviceId, price, AddressZero) - ).to.be.revertedWithCustomError(AgentMech, "ZeroAddress"); + MechFixedPrice.deploy(mechMarketplace.address, serviceRegistry.address, serviceId, 0) + ).to.be.revertedWithCustomError(MechFixedPrice, "ZeroValue"); // Agent Id does not exist await expect( - AgentMech.deploy(serviceRegistry.address, serviceId + 2, price, mechMarketplace.address) + MechFixedPrice.deploy(mechMarketplace.address, serviceRegistry.address, serviceId + 2, price) ).to.be.reverted; }); }); context("Request", async function () { it("Creating an agent mech and doing a request", async function () { - const agentMech = await AgentMech.deploy(serviceRegistry.address, serviceId, price, mechMarketplace.address); - // Try to post a request directly to the mech await expect( - agentMech.requestFromMarketplace(deployer.address, data, 0) - ).to.be.revertedWithCustomError(agentMech, "MarketplaceOnly"); + priorityMech.requestFromMarketplace(deployer.address, price, data, 0) + ).to.be.revertedWithCustomError(priorityMech, "MarketplaceNotAuthorized"); // Try to request to a zero priority mech await expect( @@ -125,7 +170,7 @@ describe("AgentMech", function () { //const closeToMaxUint96 = "4294967295"; //await mechMarketplace.deploy(minResponseTimeout, closeToMaxUint96); //await expect( - // mechMarketplace.request("0x", agentMech.address, closeToMaxUint96) + // mechMarketplace.request("0x", priorityMech.address, closeToMaxUint96) //).to.be.revertedWithCustomError(mechMarketplace, "Overflow"); // Try to request to a mech with an empty data @@ -148,34 +193,34 @@ describe("AgentMech", function () { // Try to request to a mech with an incorrect mech service Id await expect( - mechMarketplace.request(data, agentMech.address, serviceStakingMech.address, serviceId + 1, + mechMarketplace.request(data, priorityMech.address, serviceStakingMech.address, serviceId + 1, serviceStakingRequester.address, 0, minResponseTimeout) ).to.be.revertedWithCustomError(mechMarketplace, "UnauthorizedAccount"); // Try to request to a mech with an incorrect requester service Id await expect( - mechMarketplace.request(data, agentMech.address, serviceStakingMech.address, serviceId, + mechMarketplace.request(data, priorityMech.address, serviceStakingMech.address, serviceId, serviceStakingRequester.address, 0, minResponseTimeout) ).to.be.revertedWithCustomError(mechMarketplace, "ZeroValue"); // Try to request to a mech with an incorrect requester service Id await expect( - mechMarketplace.request(data, agentMech.address, serviceStakingMech.address, serviceId, + mechMarketplace.request(data, priorityMech.address, serviceStakingMech.address, serviceId, serviceStakingRequester.address, 0, minResponseTimeout) ).to.be.revertedWithCustomError(mechMarketplace, "ZeroValue"); // Try to supply less value when requesting await expect( - mechMarketplace.request(data, agentMech.address, serviceStakingMech.address, serviceId, + mechMarketplace.request(data, priorityMech.address, serviceStakingMech.address, serviceId, serviceStakingRequester.address, serviceId, minResponseTimeout) - ).to.be.revertedWithCustomError(agentMech, "NotEnoughPaid"); + ).to.be.revertedWithCustomError(priorityMech, "NotEnoughPaid"); // Create a request - await mechMarketplace.request(data, agentMech.address, serviceStakingMech.address, serviceId, + await mechMarketplace.request(data, priorityMech.address, serviceStakingMech.address, serviceId, serviceStakingRequester.address, serviceId, minResponseTimeout, {value: price}); // Get the requests count - let requestsCount = await agentMech.getRequestsCount(deployer.address); + let requestsCount = await priorityMech.getRequestsCount(deployer.address); expect(requestsCount).to.equal(1); requestsCount = await mechMarketplace.numTotalRequests(); expect(requestsCount).to.equal(1); @@ -184,30 +229,24 @@ describe("AgentMech", function () { context("Deliver", async function () { it("Delivering a request by a priority mech", async function () { - const agentMech = await AgentMech.deploy(serviceRegistry.address, serviceId, price, mechMarketplace.address); const requestId = await mechMarketplace.getRequestId(deployer.address, data, 0); // Get the non-existent request status let status = await mechMarketplace.getRequestStatus(requestId); expect(status).to.equal(0); - // Try to deliver not via a Marketplace when the Marketplace exists - await expect( - agentMech.deliver(requestId, data) - ).to.be.revertedWithCustomError(agentMech, "MarketplaceExists"); - // Try to deliver a non existent request await expect( - agentMech.deliverToMarketplace(requestId, data, serviceStakingMech.address, serviceId) - ).to.be.revertedWithCustomError(agentMech, "RequestIdNotFound"); + priorityMech.deliverToMarketplace(requestId, data, serviceStakingMech.address, serviceId) + ).to.be.revertedWithCustomError(priorityMech, "RequestIdNotFound"); // Create a request - await mechMarketplace.request(data, agentMech.address, serviceStakingMech.address, serviceId, + await mechMarketplace.request(data, priorityMech.address, serviceStakingMech.address, serviceId, serviceStakingRequester.address, serviceId, minResponseTimeout, {value: price}); // Try to deliver not by the operator (agent owner) await expect( - agentMech.connect(signers[1]).deliverToMarketplace(requestId, data, serviceStakingMech.address, serviceId) + priorityMech.connect(signers[1]).deliverToMarketplace(requestId, data, serviceStakingMech.address, serviceId) ).to.be.reverted; // Get the request status (requested priority) @@ -220,20 +259,20 @@ describe("AgentMech", function () { ).to.be.reverted; // Deliver a request - await agentMech.deliverToMarketplace(requestId, data, serviceStakingMech.address, serviceId); + await priorityMech.deliverToMarketplace(requestId, data, serviceStakingMech.address, serviceId); // Get the request status (delivered) status = await mechMarketplace.getRequestStatus(requestId); expect(status).to.equal(3); // Try to deliver the same request again - await agentMech.deliverToMarketplace(requestId, data, serviceStakingMech.address, serviceId); + await priorityMech.deliverToMarketplace(requestId, data, serviceStakingMech.address, serviceId); // Check mech karma - let mechKarma = await karma.mapMechKarma(agentMech.address); + let mechKarma = await karma.mapMechKarma(priorityMech.address); expect(mechKarma).to.equal(1); // Check requester mech karma - mechKarma = await karma.mapRequesterMechKarma(deployer.address, agentMech.address); + mechKarma = await karma.mapRequesterMechKarma(deployer.address, priorityMech.address); expect(mechKarma).to.equal(1); }); @@ -241,8 +280,6 @@ describe("AgentMech", function () { // Take a snapshot of the current state of the blockchain const snapshot = await helpers.takeSnapshot(); - const priorityMech = await AgentMech.deploy(serviceRegistry.address, serviceId, price, mechMarketplace.address); - const deliveryMech = await AgentMech.deploy(serviceRegistry.address, serviceId + 1, price, mechMarketplace.address); // Register the info for the delivery service mech await serviceStakingMech.setServiceInfo(serviceId + 1, deployer.address); @@ -290,8 +327,6 @@ describe("AgentMech", function () { }); it("Getting undelivered requests info", async function () { - const agentMech = await AgentMech.deploy(serviceRegistry.address, serviceId, price, mechMarketplace.address); - const numRequests = 5; const datas = new Array(); const requestIds = new Array(); @@ -305,23 +340,23 @@ describe("AgentMech", function () { requestCount++; // Check request Ids - let uRequestIds = await agentMech.getUndeliveredRequestIds(0, 0); + let uRequestIds = await priorityMech.getUndeliveredRequestIds(0, 0); expect(uRequestIds.length).to.equal(0); // Create a first request - await mechMarketplace.request(datas[0], agentMech.address, serviceStakingMech.address, serviceId, + await mechMarketplace.request(datas[0], priorityMech.address, serviceStakingMech.address, serviceId, serviceStakingRequester.address, serviceId, minResponseTimeout, {value: price}); // Check request Ids - uRequestIds = await agentMech.getUndeliveredRequestIds(0, 0); + uRequestIds = await priorityMech.getUndeliveredRequestIds(0, 0); expect(uRequestIds.length).to.equal(1); expect(uRequestIds[0]).to.equal(requestIds[0]); // Deliver a request - await agentMech.deliverToMarketplace(requestIds[0], data, serviceStakingMech.address, serviceId); + await priorityMech.deliverToMarketplace(requestIds[0], data, serviceStakingMech.address, serviceId); // Check request Ids - uRequestIds = await agentMech.getUndeliveredRequestIds(0, 0); + uRequestIds = await priorityMech.getUndeliveredRequestIds(0, 0); expect(uRequestIds.length).to.equal(0); // Update the delivered request in array as one of them was already delivered @@ -332,12 +367,12 @@ describe("AgentMech", function () { // Stack all requests for (let i = 0; i < numRequests; i++) { - await mechMarketplace.request(datas[i], agentMech.address, serviceStakingMech.address, serviceId, + await mechMarketplace.request(datas[i], priorityMech.address, serviceStakingMech.address, serviceId, serviceStakingRequester.address, serviceId, minResponseTimeout, {value: price}); } // Check request Ids - uRequestIds = await agentMech.getUndeliveredRequestIds(0, 0); + uRequestIds = await priorityMech.getUndeliveredRequestIds(0, 0); expect(uRequestIds.length).to.equal(numRequests); // Requests are added in the reverse order for (let i = 0; i < numRequests; i++) { @@ -346,26 +381,26 @@ describe("AgentMech", function () { // Deliver all requests for (let i = 0; i < numRequests; i++) { - await agentMech.deliverToMarketplace(requestIds[i], datas[i], serviceStakingMech.address, serviceId); + await priorityMech.deliverToMarketplace(requestIds[i], datas[i], serviceStakingMech.address, serviceId); } // Check request Ids - uRequestIds = await agentMech.getUndeliveredRequestIds(0, 0); + uRequestIds = await priorityMech.getUndeliveredRequestIds(0, 0); expect(uRequestIds.length).to.equal(0); // Update all requests again and post them for (let i = 0; i < numRequests; i++) { requestIds[i] = await mechMarketplace.getRequestId(deployer.address, datas[i], requestCount); requestCount++; - await mechMarketplace.request(datas[i], agentMech.address, serviceStakingMech.address, serviceId, + await mechMarketplace.request(datas[i], priorityMech.address, serviceStakingMech.address, serviceId, serviceStakingRequester.address, serviceId, minResponseTimeout, {value: price}); } // Deliver the first request - await agentMech.deliverToMarketplace(requestIds[0], datas[0], serviceStakingMech.address, serviceId); + await priorityMech.deliverToMarketplace(requestIds[0], datas[0], serviceStakingMech.address, serviceId); // Check request Ids - uRequestIds = await agentMech.getUndeliveredRequestIds(0, 0); + uRequestIds = await priorityMech.getUndeliveredRequestIds(0, 0); expect(uRequestIds.length).to.equal(numRequests - 1); // Requests are added in the reverse order for (let i = 1; i < numRequests; i++) { @@ -373,11 +408,11 @@ describe("AgentMech", function () { } // Deliver the last request - await agentMech.deliverToMarketplace(requestIds[numRequests - 1], datas[numRequests - 1], + await priorityMech.deliverToMarketplace(requestIds[numRequests - 1], datas[numRequests - 1], serviceStakingMech.address, serviceId); // Check request Ids - uRequestIds = await agentMech.getUndeliveredRequestIds(0, 0); + uRequestIds = await priorityMech.getUndeliveredRequestIds(0, 0); expect(uRequestIds.length).to.equal(numRequests - 2); for (let i = 1; i < numRequests - 1; i++) { expect(uRequestIds[numRequests - i - 2]).to.eq(requestIds[i]); @@ -385,10 +420,10 @@ describe("AgentMech", function () { // Deliver the middle request const middle = Math.floor(numRequests / 2); - await agentMech.deliverToMarketplace(requestIds[middle], datas[middle], serviceStakingMech.address, serviceId); + await priorityMech.deliverToMarketplace(requestIds[middle], datas[middle], serviceStakingMech.address, serviceId); // Check request Ids - uRequestIds = await agentMech.getUndeliveredRequestIds(0, 0); + uRequestIds = await priorityMech.getUndeliveredRequestIds(0, 0); expect(uRequestIds.length).to.equal(numRequests - 3); for (let i = 1; i < middle; i++) { expect(uRequestIds[middle - i]).to.eq(requestIds[i]); @@ -399,8 +434,6 @@ describe("AgentMech", function () { }); it("Getting undelivered requests info for even and odd requests", async function () { - const agentMech = await AgentMech.deploy(serviceRegistry.address, serviceId, price, mechMarketplace.address); - const numRequests = 9; const datas = new Array(); const requestIds = new Array(); @@ -410,19 +443,19 @@ describe("AgentMech", function () { datas[i] = data + "00".repeat(i); requestIds[i] = await mechMarketplace.getRequestId(deployer.address, datas[i], requestCount); requestCount++; - await mechMarketplace.request(datas[i], agentMech.address, serviceStakingMech.address, serviceId, + await mechMarketplace.request(datas[i], priorityMech.address, serviceStakingMech.address, serviceId, serviceStakingRequester.address, serviceId, minResponseTimeout, {value: price}); } // Deliver even requests for (let i = 0; i < numRequests; i++) { if (i % 2 != 0) { - await agentMech.deliverToMarketplace(requestIds[i], datas[i], serviceStakingMech.address, serviceId); + await priorityMech.deliverToMarketplace(requestIds[i], datas[i], serviceStakingMech.address, serviceId); } } // Check request Ids - let uRequestIds = await agentMech.getUndeliveredRequestIds(0, 0); + let uRequestIds = await priorityMech.getUndeliveredRequestIds(0, 0); const half = Math.floor(numRequests / 2) + 1; expect(uRequestIds.length).to.equal(half); for (let i = 0; i < half; i++) { @@ -432,18 +465,16 @@ describe("AgentMech", function () { // Deliver the rest of requests for (let i = 0; i < numRequests; i++) { if (i % 2 == 0) { - await agentMech.deliverToMarketplace(requestIds[i], datas[i], serviceStakingMech.address, serviceId); + await priorityMech.deliverToMarketplace(requestIds[i], datas[i], serviceStakingMech.address, serviceId); } } // Check request Ids - uRequestIds = await agentMech.getUndeliveredRequestIds(0, 0); + uRequestIds = await priorityMech.getUndeliveredRequestIds(0, 0); expect(uRequestIds.length).to.equal(0); }); it("Getting undelivered requests info for a specified part of a batch", async function () { - const agentMech = await AgentMech.deploy(serviceRegistry.address, serviceId, price, mechMarketplace.address); - const numRequests = 10; const datas = new Array(); const requestIds = new Array(); @@ -453,7 +484,7 @@ describe("AgentMech", function () { datas[i] = data + "00".repeat(i); requestIds[i] = await mechMarketplace.getRequestId(deployer.address, datas[i], requestCount); requestCount++; - await mechMarketplace.request(datas[i], agentMech.address, serviceStakingMech.address, serviceId, + await mechMarketplace.request(datas[i], priorityMech.address, serviceStakingMech.address, serviceId, serviceStakingRequester.address, serviceId, minResponseTimeout, {value: price}); } @@ -461,11 +492,11 @@ describe("AgentMech", function () { const half = Math.floor(numRequests / 2); // Try to get more elements than there are await expect( - agentMech.getUndeliveredRequestIds(0, half) - ).to.be.revertedWithCustomError(agentMech, "Overflow"); + priorityMech.getUndeliveredRequestIds(0, half) + ).to.be.revertedWithCustomError(priorityMech, "Overflow"); // Grab the last half of requests - let uRequestIds = await agentMech.getUndeliveredRequestIds(half, 0); + let uRequestIds = await priorityMech.getUndeliveredRequestIds(half, 0); expect(uRequestIds.length).to.equal(half); for (let i = 0; i < half; i++) { expect(uRequestIds[half - i - 1]).to.eq(requestIds[half + i]); @@ -474,14 +505,14 @@ describe("AgentMech", function () { expect(uRequestIds[0]).to.eq(requestIds[numRequests - 1]); // Grab the last half of requests and a bit more - uRequestIds = await agentMech.getUndeliveredRequestIds(half + 2, 0); + uRequestIds = await priorityMech.getUndeliveredRequestIds(half + 2, 0); expect(uRequestIds.length).to.equal(half + 2); for (let i = 0; i < half + 2; i++) { expect(uRequestIds[half + 2 - i - 1]).to.eq(requestIds[half - 2 + i]); } // Grab the first half of requests - uRequestIds = await agentMech.getUndeliveredRequestIds(half, half); + uRequestIds = await priorityMech.getUndeliveredRequestIds(half, half); expect(uRequestIds.length).to.equal(half); for (let i = 0; i < half; i++) { expect(uRequestIds[numRequests - half - i - 1]).to.eq(requestIds[i]); @@ -491,19 +522,18 @@ describe("AgentMech", function () { // Deliver all requests for (let i = 0; i < numRequests; i++) { - await agentMech.deliverToMarketplace(requestIds[i], datas[i], serviceStakingMech.address, serviceId); + await priorityMech.deliverToMarketplace(requestIds[i], datas[i], serviceStakingMech.address, serviceId); } }); }); context("Changing parameters", async function () { it("Set another minimum price", async function () { - const agentMech = await AgentMech.deploy(serviceRegistry.address, serviceId, price, mechMarketplace.address); - await agentMech.setPrice(price + 1); + await priorityMech.setPrice(price + 1); // Try to set price not by the operator (agent owner) await expect( - agentMech.connect(signers[1]).setPrice(price + 2) + priorityMech.connect(signers[1]).setPrice(price + 2) ).to.be.reverted; }); });