diff --git a/packages/packages.json b/packages/packages.json index da717896..6eb149af 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -2,18 +2,18 @@ "dev": { "connection/valory/websocket_client/0.1.0": "bafybeiflmystocxaqblhpzqlcop2vkhsknpzjx2jomohomaxamwskeokzm", "skill/valory/contract_subscription/0.1.0": "bafybeicyugrkx5glat4p4ezwf6i7oduh26eycfie6ftd4uxrknztzl3ik4", - "agent/valory/mech/0.1.0": "bafybeia4hfn4yvcpirwfhyk6uq7v7mwxqoawxi5dvhudc2x5wpqzfklyle", - "skill/valory/mech_abci/0.1.0": "bafybeihriybbmuepuiz44f4wgi6tcdzgw4avhgxibpmpztqzs7ys6adkqu", - "contract/valory/agent_mech/0.1.0": "bafybeih6fyszhp5kloosiqnmim2l4kgj7g6cetbe5fwvzojahm34smjvhu", - "service/valory/mech/0.1.0": "bafybeiaxjikctwp77axs3oqhpsp7w4lamp7nq7femo2ch7ffsgqjweydte", + "agent/valory/mech/0.1.0": "bafybeiflfz2kcy2adgjtx3ad47u5axbkjjcej56xladjkoa3i4ufpqdyua", + "skill/valory/mech_abci/0.1.0": "bafybeiaex75imhmpgherc2n5ycjfctecyphu6rgia4wgwfnpwklrfvs6e4", + "contract/valory/agent_mech/0.1.0": "bafybeig7zpqhcpt6z4eutedx6prciuq4g7mpadw636zkkcx3ach6oytdry", + "service/valory/mech/0.1.0": "bafybeicgxvwznlahv6yk2lyz23x4di6px2r5o2ot7v3dxztwclqghfxs5a", "protocol/valory/acn_data_share/0.1.0": "bafybeih5ydonnvrwvy2ygfqgfabkr47s4yw3uqxztmwyfprulwfsoe7ipq", - "skill/valory/task_submission_abci/0.1.0": "bafybeideyqmjbn5ipk6kdiaq6fdh7se4vsgzmpzncapb4hkqb7awjodzki", - "skill/valory/task_execution/0.1.0": "bafybeiazisnaig7sswkcrjga5runappjwmk4va2gvbhj4w4456auoduspu", + "skill/valory/task_submission_abci/0.1.0": "bafybeifb3vw25nlz2tecbpsbzrynwva2ey4r624htty62rjg6lrqwmh6l4", + "skill/valory/task_execution/0.1.0": "bafybeidld3hvlu6b54kkmaykiahu37oyb4l3f725tldjfpmxuuiiokv6ua", "contract/valory/agent_registry/0.1.0": "bafybeiargayav6yiztdnwzejoejstcx4idssch2h4f5arlgtzj3tgsgfmu", "protocol/valory/websocket_client/0.1.0": "bafybeih43mnztdv3v2hetr2k3gezg7d3yj4ur7cxdvcyaqhg65e52s5sf4", "skill/valory/websocket_client/0.1.0": "bafybeidwntmkk4b2ixq5454ycbkknclqx7a6vpn7aqpm2nw3duszqrxvta", "contract/valory/hash_checkpoint/0.1.0": "bafybeieys27hidb5m267jwqsxdgorf5v37o6lvrfy2oga557stjn4xgoaa", - "skill/valory/subscription_abci/0.1.0": "bafybeiadm75c5bytop2zqyftstl53ggtocc4gassbpqiq3ybtpumar3pye" + "skill/valory/subscription_abci/0.1.0": "bafybeibgnw53s5nh6up35z6fgjisrrvrlt4nnjmx3ia7fcgwpmcprvja5u" }, "third_party": { "skill/valory/transaction_settlement_abci/0.1.0": "bafybeiaefgqbs7zsn5xe5kdwrujj7ivygkn3ujpw6crnvi3knvxw75qmja", diff --git a/packages/valory/agents/mech/aea-config.yaml b/packages/valory/agents/mech/aea-config.yaml index 87f6b874..0db54da2 100644 --- a/packages/valory/agents/mech/aea-config.yaml +++ b/packages/valory/agents/mech/aea-config.yaml @@ -15,7 +15,7 @@ connections: - valory/p2p_libp2p_client:0.1.0:bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq - valory/websocket_client:0.1.0:bafybeiflmystocxaqblhpzqlcop2vkhsknpzjx2jomohomaxamwskeokzm contracts: -- valory/agent_mech:0.1.0:bafybeih6fyszhp5kloosiqnmim2l4kgj7g6cetbe5fwvzojahm34smjvhu +- valory/agent_mech:0.1.0:bafybeig7zpqhcpt6z4eutedx6prciuq4g7mpadw636zkkcx3ach6oytdry - valory/agent_registry:0.1.0:bafybeiargayav6yiztdnwzejoejstcx4idssch2h4f5arlgtzj3tgsgfmu - valory/gnosis_safe:0.1.0:bafybeidll7frtdsq2ckiluazkwk4zpkp7natt4kdejjehwvykqwzyuf6ei - valory/gnosis_safe_proxy_factory:0.1.0:bafybeidvcgnbbmjtha6tl7st2ysna2l3iiqfhnzjfasyvml5unecozeeka @@ -38,12 +38,12 @@ skills: - valory/abstract_abci:0.1.0:bafybeiflcfufixmsrhobf56bn5745m2iipcfqyulwk2qegtnagb3kvaaxi - valory/abstract_round_abci:0.1.0:bafybeiaqcl7h2famylusiffigwem7tevkcsyocdu5xd42jkmgq6kvowzgq - valory/contract_subscription:0.1.0:bafybeicyugrkx5glat4p4ezwf6i7oduh26eycfie6ftd4uxrknztzl3ik4 -- valory/mech_abci:0.1.0:bafybeihriybbmuepuiz44f4wgi6tcdzgw4avhgxibpmpztqzs7ys6adkqu +- valory/mech_abci:0.1.0:bafybeiaex75imhmpgherc2n5ycjfctecyphu6rgia4wgwfnpwklrfvs6e4 - valory/registration_abci:0.1.0:bafybeic2ynseiak7jpta7jfwuqwyp453b4p7lolr4wihxmpn633uekv5am - valory/reset_pause_abci:0.1.0:bafybeidzajbe3erygeh2xbd6lrjv7nsptznjuzrt24ykgvhgotdeyhfnba -- valory/subscription_abci:0.1.0:bafybeiadm75c5bytop2zqyftstl53ggtocc4gassbpqiq3ybtpumar3pye -- valory/task_execution:0.1.0:bafybeiazisnaig7sswkcrjga5runappjwmk4va2gvbhj4w4456auoduspu -- valory/task_submission_abci:0.1.0:bafybeideyqmjbn5ipk6kdiaq6fdh7se4vsgzmpzncapb4hkqb7awjodzki +- valory/subscription_abci:0.1.0:bafybeibgnw53s5nh6up35z6fgjisrrvrlt4nnjmx3ia7fcgwpmcprvja5u +- valory/task_execution:0.1.0:bafybeidld3hvlu6b54kkmaykiahu37oyb4l3f725tldjfpmxuuiiokv6ua +- valory/task_submission_abci:0.1.0:bafybeifb3vw25nlz2tecbpsbzrynwva2ey4r624htty62rjg6lrqwmh6l4 - valory/termination_abci:0.1.0:bafybeie4zvjfxvdu7qrulmur3chpjz3kpj5m4bjsxvpk4gvj5zbyyayfaa - valory/transaction_settlement_abci:0.1.0:bafybeiaefgqbs7zsn5xe5kdwrujj7ivygkn3ujpw6crnvi3knvxw75qmja - valory/websocket_client:0.1.0:bafybeidwntmkk4b2ixq5454ycbkknclqx7a6vpn7aqpm2nw3duszqrxvta diff --git a/packages/valory/contracts/agent_mech/build/AgentMech.json b/packages/valory/contracts/agent_mech/build/AgentMech.json index a3fd4e97..9efb8c20 100644 --- a/packages/valory/contracts/agent_mech/build/AgentMech.json +++ b/packages/valory/contracts/agent_mech/build/AgentMech.json @@ -1,7 +1,7 @@ { "_format": "hh-sol-artifact-1", - "contractName": "AgentMech", - "sourceName": "contracts/AgentMech.sol", + "contractName": "AgentMechX", + "sourceName": "contracts/AgentMechX.sol", "abi": [ { "inputs": [ @@ -52,28 +52,36 @@ "type": "error" }, { - "inputs": [], - "name": "ZeroAddress", + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "Overflow", "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "uint256", "name": "requestId", "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], - "name": "Deliver", - "type": "event" + "name": "RequestIdNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" }, { "anonymous": false, @@ -86,12 +94,18 @@ }, { "indexed": false, - "internalType": "bytes32", - "name": "taskHash", - "type": "bytes32" + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "Perform", + "name": "Deliver", "type": "event" }, { @@ -122,6 +136,12 @@ "name": "requestId", "type": "uint256" }, + { + "indexed": false, + "internalType": "uint256", + "name": "requestIdWithNonce", + "type": "uint256" + }, { "indexed": false, "internalType": "bytes", @@ -132,6 +152,70 @@ "name": "Request", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Subscription", + "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": [ { @@ -139,6 +223,11 @@ "name": "requestId", "type": "uint256" }, + { + "internalType": "uint256", + "name": "requestIdWithNonce", + "type": "uint256" + }, { "internalType": "bytes", "name": "data", @@ -150,6 +239,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "domainSeparator", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "entryPoint", @@ -202,6 +304,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "getDomainSeparator", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -226,6 +341,97 @@ "stateMutability": "pure", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "name": "getRequestIdWithNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "name": "getRequestStatus", + "outputs": [ + { + "internalType": "enum AgentMech.RequestStatus", + "name": "status", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getRequestsCount", + "outputs": [ + { + "internalType": "uint256", + "name": "requestsCount", + "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": [ { @@ -269,6 +475,87 @@ "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": "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": "mapRequestsCounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "nonce", @@ -282,6 +569,32 @@ "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": [ { @@ -421,6 +734,11 @@ "internalType": "uint256", "name": "requestId", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requestIdWithNonce", + "type": "uint256" } ], "stateMutability": "payable", @@ -452,6 +770,44 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "subscribe", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "subscriptionBalanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "token", @@ -651,8 +1007,8 @@ "type": "receive" } ], - "bytecode": "0x6080604052600080553480156200001557600080fd5b5060405162001d4538038062001d4583398101604081905262000038916200039f565b604080516001600160a01b038516602082015280820184905281518082038301815260609091019091528390839062000071816200014a565b5050506001600160a01b0383166200009c5760405163d92e233d60e01b815260040160405180910390fd5b6040516331a9108f60e11b8152600481018390526000906001600160a01b03851690636352211e90602401602060405180830381865afa158015620000e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200010b9190620003d7565b90506001600160a01b0381166200013d57604051630ede975960e01b8152600481018490526024015b60405180910390fd5b5060015550620004b39050565b62000154620001b2565b5115620001a45760405162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a656400000000000000000000000000604482015260640162000134565b620001af816200021f565b50565b60606200021a62000214604051606b60f91b6020820152602560fa1b60218201526001600160601b03193060601b166022820152600160f81b60368201526000906037016040516020818303038152906040528051906020012060001c905090565b620002ed565b905090565b60006200022c8262000346565b905060008151602083016000f0905062000297604051606b60f91b6020820152602560fa1b60218201526001600160601b03193060601b166022820152600160f81b60368201526000906037016040516020818303038152906040528051906020012060001c905090565b6001600160a01b0316816001600160a01b031614620002e85760405162461bcd60e51b815260206004820152600c60248201526b15dc9a5d194819985a5b195960a21b604482015260640162000134565b505050565b6060813b6001811162000310575050604080516020810190915260008152919050565b806200031c8162000412565b9150506040519150601f19601f602083010116820160405280825280600160208401853c50919050565b6060815160016200035891906200042c565b826040516020016200036c92919062000448565b6040516020818303038152906040529050919050565b80516001600160a01b03811681146200039a57600080fd5b919050565b600080600060608486031215620003b557600080fd5b620003c08462000382565b925060208401519150604084015190509250925092565b600060208284031215620003ea57600080fd5b620003f58262000382565b9392505050565b634e487b7160e01b600052601160045260246000fd5b600081620004245762000424620003fc565b506000190190565b80820180821115620004425762000442620003fc565b92915050565b606360f81b815260e083901b6001600160e01b03191660018201526880600e6000396000f360b81b60058201526000600e82018190528251815b81811015620004a1576020818601810151600f86840101520162000482565b5060009201600f019182525092915050565b61188280620004c36000396000f3fe60806040526004361061012c5760003560e01c8063a4f9edbf116100a5578063bc197c8111610074578063e00b911811610059578063e00b911814610371578063f23a6e6114610391578063fc0c546a146103be57600080fd5b8063bc197c8114610315578063c7dec3fc1461034457600080fd5b8063a4f9edbf14610292578063affed0e0146102b2578063b0d691fe146102c7578063b94207d31461030257600080fd5b806317d70f7c116100fc5780636d70f7ae116100e15780636d70f7ae1461022c57806391b7f5ed1461025c578063a035b1fe1461027c57600080fd5b806317d70f7c146101e95780633a871cdd1461020c57600080fd5b806223de2914610138578063150b7a021461015f578063157305fe146101a95780631626ba7e146101c957600080fd5b3661013357005b600080fd5b34801561014457600080fd5b5061015d610153366004611118565b5050505050505050565b005b34801561016b57600080fd5b5061018b61017a3660046111c9565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020015b60405180910390f35b3480156101b557600080fd5b5061015d6101c43660046112df565b6103d3565b3480156101d557600080fd5b5061018b6101e43660046112df565b6104ae565b3480156101f557600080fd5b506101fe6105db565b6040519081526020016101a0565b34801561021857600080fd5b506101fe610227366004611326565b610600565b34801561023857600080fd5b5061024c61024736600461137a565b61063e565b60405190151581526020016101a0565b34801561026857600080fd5b5061015d610277366004611397565b6106ed565b34801561028857600080fd5b506101fe60015481565b34801561029e57600080fd5b5061015d6102ad3660046113b0565b6107c1565b3480156102be57600080fd5b506000546101fe565b3480156102d357600080fd5b50730576a174d229e3cfa37253523e645a78a0c91b575b6040516001600160a01b0390911681526020016101a0565b6101fe6103103660046113b0565b610823565b34801561032157600080fd5b5061018b610330366004611432565b63bc197c8160e01b98975050505050505050565b34801561035057600080fd5b5061036461035f3660046114d0565b6108a9565b6040516101a09190611598565b34801561037d57600080fd5b506101fe61038c3660046115ab565b61097a565b34801561039d57600080fd5b5061018b6103ac3660046115e5565b63f23a6e6160e01b9695505050505050565b3480156103ca57600080fd5b506102ea6109ae565b6103dc3361063e565b806103fa575033730576a174d229e3cfa37253523e645a78a0c91b57145b6104715760405162461bcd60e51b815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e7472616374000060648201526084015b60405180910390fd5b7f3ec84da2cdc1ce60c063642b69ff2e65f3b69787a2b90443457ba274e51e7c7282826040516104a2929190611661565b60405180910390a15050565b6000806000806104d1856020810151604082015160609092015160001a92909190565b9094509250905060ff811660000361059f57828583016020016104f38261063e565b15801561050957506001600160a01b0382163014155b1561052457506001600160e01b031994506105d59350505050565b604051630b135d3f60e11b81526001600160a01b03831690631626ba7e90610552908b908590600401611661565b602060405180830381865afa15801561056f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610593919061167a565b955050505050506105d5565b6105ae610247878386866109cc565b156105c65750630b135d3f60e11b92506105d5915050565b506001600160e01b0319925050505b92915050565b6000806105e66109ea565b8060200190518101906105f991906116a4565b9392505050565b600061060a610a59565b6106148484610abe565b905061062360408501856116d2565b90506000036106355761063584610b91565b6105f982610bf6565b600080600061064b6109ea565b80602001905181019061065e91906116a4565b91509150836001600160a01b0316826001600160a01b0316636352211e836040518263ffffffff1660e01b815260040161069a91815260200190565b602060405180830381865afa1580156106b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106db9190611719565b6001600160a01b031614949350505050565b6106f63361063e565b80610714575033730576a174d229e3cfa37253523e645a78a0c91b57145b6107865760405162461bcd60e51b815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e747261637400006064820152608401610468565b60018190556040518181527f66cbca4f3c64fecf1dcb9ce094abcf7f68c3450a1d4e3a8e917dd621edb4ebe09060200160405180910390a150565b6107c96109ea565b51156108175760405162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610468565b61082081610c4f565b50565b6000600154341015610855576001546040516316912f0560e31b81523460048201526024810191909152604401610468565b61085f338361097a565b9050336001600160a01b03167f4bda649efe6b98b0f9c1d5e859c29e20910f45c66dabfe6fad4a4881f7faf9cc828460405161089c929190611661565b60405180910390a2919050565b60606108b43361063e565b806108d2575033730576a174d229e3cfa37253523e645a78a0c91b57145b6109445760405162461bcd60e51b815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e747261637400006064820152608401610468565b600061095f8787878787156109595787610d2e565b5a610d2e565b925090508061097057815160208301fd5b5095945050505050565b6000828260405160200161098f929190611736565b60408051601f1981840301815291905280516020909101209392505050565b6000806109b96109ea565b8060200190518101906105d59190611719565b60008060006109dd87878787610e1e565b9150915061097081610ee2565b6060610a54610a4f604051606b60f91b6020820152602560fa1b60218201526bffffffffffffffffffffffff193060601b166022820152600160f81b60368201526000906037016040516020818303038152906040528051906020012060001c905090565b61102c565b905090565b33730576a174d229e3cfa37253523e645a78a0c91b5714610abc5760405162461bcd60e51b815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e74000000006044820152606401610468565b565b600080610b18836040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050630b135d3f60e11b610b6e82610b346101408801886116d2565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104ae92505050565b6001600160e01b03191614610b875760019150506105d5565b5060009392505050565b6000805460208301359180610ba58361176e565b91905055146108205760405162461bcd60e51b815260206004820152600d60248201527f496e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610468565b801561082057604051600090339060001990849084818181858888f193505050503d8060008114610c43576040519150601f19603f3d011682016040523d82523d6000602084013e610c48565b606091505b5050505050565b6000610c5a82611082565b905060008151602083016000f09050610cc9604051606b60f91b6020820152602560fa1b60218201526bffffffffffffffffffffffff193060601b166022820152600160f81b60368201526000906037016040516020818303038152906040528051906020012060001c905090565b6001600160a01b0316816001600160a01b031614610d295760405162461bcd60e51b815260206004820152600c60248201527f5772697465206661696c656400000000000000000000000000000000000000006044820152606401610468565b505050565b600060606001846001811115610d4657610d46611787565b03610db057866001600160a01b03168386604051610d64919061179d565b6000604051808303818686f4925050503d8060008114610da0576040519150601f19603f3d011682016040523d82523d6000602084013e610da5565b606091505b509092509050610e14565b866001600160a01b0316838787604051610dca919061179d565b600060405180830381858888f193505050503d8060008114610e08576040519150601f19603f3d011682016040523d82523d6000602084013e610e0d565b606091505b5090925090505b9550959350505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610e555750600090506003610ed9565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610ea9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610ed257600060019250925050610ed9565b9150600090505b94509492505050565b6000816004811115610ef657610ef6611787565b03610efe5750565b6001816004811115610f1257610f12611787565b03610f5f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610468565b6002816004811115610f7357610f73611787565b03610fc05760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610468565b6003816004811115610fd457610fd4611787565b036108205760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610468565b6060813b6001811161104e575050604080516020810190915260008152919050565b80611058816117b9565b9150506040519150601f19601f602083010116820160405280825280600160208401853c50919050565b60608151600161109291906117d0565b826040516020016110a49291906117e3565b6040516020818303038152906040529050919050565b6001600160a01b038116811461082057600080fd5b60008083601f8401126110e157600080fd5b50813567ffffffffffffffff8111156110f957600080fd5b60208301915083602082850101111561111157600080fd5b9250929050565b60008060008060008060008060c0898b03121561113457600080fd5b883561113f816110ba565b9750602089013561114f816110ba565b9650604089013561115f816110ba565b955060608901359450608089013567ffffffffffffffff8082111561118357600080fd5b61118f8c838d016110cf565b909650945060a08b01359150808211156111a857600080fd5b506111b58b828c016110cf565b999c989b5096995094979396929594505050565b6000806000806000608086880312156111e157600080fd5b85356111ec816110ba565b945060208601356111fc816110ba565b935060408601359250606086013567ffffffffffffffff81111561121f57600080fd5b61122b888289016110cf565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261126357600080fd5b813567ffffffffffffffff8082111561127e5761127e61123c565b604051601f8301601f19908116603f011681019082821181831017156112a6576112a661123c565b816040528381528660208588010111156112bf57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156112f257600080fd5b82359150602083013567ffffffffffffffff81111561131057600080fd5b61131c85828601611252565b9150509250929050565b60008060006060848603121561133b57600080fd5b833567ffffffffffffffff81111561135257600080fd5b8401610160818703121561136557600080fd5b95602085013595506040909401359392505050565b60006020828403121561138c57600080fd5b81356105f9816110ba565b6000602082840312156113a957600080fd5b5035919050565b6000602082840312156113c257600080fd5b813567ffffffffffffffff8111156113d957600080fd5b6113e584828501611252565b949350505050565b60008083601f8401126113ff57600080fd5b50813567ffffffffffffffff81111561141757600080fd5b6020830191508360208260051b850101111561111157600080fd5b60008060008060008060008060a0898b03121561144e57600080fd5b8835611459816110ba565b97506020890135611469816110ba565b9650604089013567ffffffffffffffff8082111561148657600080fd5b6114928c838d016113ed565b909850965060608b01359150808211156114ab57600080fd5b6114b78c838d016113ed565b909650945060808b01359150808211156111a857600080fd5b600080600080600060a086880312156114e857600080fd5b85356114f3816110ba565b945060208601359350604086013567ffffffffffffffff81111561151657600080fd5b61152288828901611252565b93505060608601356002811061153757600080fd5b949793965091946080013592915050565b60005b8381101561156357818101518382015260200161154b565b50506000910152565b60008151808452611584816020860160208601611548565b601f01601f19169290920160200192915050565b6020815260006105f9602083018461156c565b600080604083850312156115be57600080fd5b82356115c9816110ba565b9150602083013567ffffffffffffffff81111561131057600080fd5b60008060008060008060a087890312156115fe57600080fd5b8635611609816110ba565b95506020870135611619816110ba565b94506040870135935060608701359250608087013567ffffffffffffffff81111561164357600080fd5b61164f89828a016110cf565b979a9699509497509295939492505050565b8281526040602082015260006113e5604083018461156c565b60006020828403121561168c57600080fd5b81516001600160e01b0319811681146105f957600080fd5b600080604083850312156116b757600080fd5b82516116c2816110ba565b6020939093015192949293505050565b6000808335601e198436030181126116e957600080fd5b83018035915067ffffffffffffffff82111561170457600080fd5b60200191503681900382131561111157600080fd5b60006020828403121561172b57600080fd5b81516105f9816110ba565b6001600160a01b03831681526040602082015260006113e5604083018461156c565b634e487b7160e01b600052601160045260246000fd5b60006001820161178057611780611758565b5060010190565b634e487b7160e01b600052602160045260246000fd5b600082516117af818460208701611548565b9190910192915050565b6000816117c8576117c8611758565b506000190190565b808201808211156105d5576105d5611758565b606360f81b815263ffffffff60e01b8360e01b1660018201527f80600e6000396000f3000000000000000000000000000000000000000000000060058201526000600e8201526000825161183e81600f850160208701611548565b91909101600f01939250505056fea26469706673582212202a03e14f0f05f58be9cbbba4646c39d989209350f0ee3edaaf0da00994a368d164736f6c63430008130033", - "deployedBytecode": "0x60806040526004361061012c5760003560e01c8063a4f9edbf116100a5578063bc197c8111610074578063e00b911811610059578063e00b911814610371578063f23a6e6114610391578063fc0c546a146103be57600080fd5b8063bc197c8114610315578063c7dec3fc1461034457600080fd5b8063a4f9edbf14610292578063affed0e0146102b2578063b0d691fe146102c7578063b94207d31461030257600080fd5b806317d70f7c116100fc5780636d70f7ae116100e15780636d70f7ae1461022c57806391b7f5ed1461025c578063a035b1fe1461027c57600080fd5b806317d70f7c146101e95780633a871cdd1461020c57600080fd5b806223de2914610138578063150b7a021461015f578063157305fe146101a95780631626ba7e146101c957600080fd5b3661013357005b600080fd5b34801561014457600080fd5b5061015d610153366004611118565b5050505050505050565b005b34801561016b57600080fd5b5061018b61017a3660046111c9565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020015b60405180910390f35b3480156101b557600080fd5b5061015d6101c43660046112df565b6103d3565b3480156101d557600080fd5b5061018b6101e43660046112df565b6104ae565b3480156101f557600080fd5b506101fe6105db565b6040519081526020016101a0565b34801561021857600080fd5b506101fe610227366004611326565b610600565b34801561023857600080fd5b5061024c61024736600461137a565b61063e565b60405190151581526020016101a0565b34801561026857600080fd5b5061015d610277366004611397565b6106ed565b34801561028857600080fd5b506101fe60015481565b34801561029e57600080fd5b5061015d6102ad3660046113b0565b6107c1565b3480156102be57600080fd5b506000546101fe565b3480156102d357600080fd5b50730576a174d229e3cfa37253523e645a78a0c91b575b6040516001600160a01b0390911681526020016101a0565b6101fe6103103660046113b0565b610823565b34801561032157600080fd5b5061018b610330366004611432565b63bc197c8160e01b98975050505050505050565b34801561035057600080fd5b5061036461035f3660046114d0565b6108a9565b6040516101a09190611598565b34801561037d57600080fd5b506101fe61038c3660046115ab565b61097a565b34801561039d57600080fd5b5061018b6103ac3660046115e5565b63f23a6e6160e01b9695505050505050565b3480156103ca57600080fd5b506102ea6109ae565b6103dc3361063e565b806103fa575033730576a174d229e3cfa37253523e645a78a0c91b57145b6104715760405162461bcd60e51b815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e7472616374000060648201526084015b60405180910390fd5b7f3ec84da2cdc1ce60c063642b69ff2e65f3b69787a2b90443457ba274e51e7c7282826040516104a2929190611661565b60405180910390a15050565b6000806000806104d1856020810151604082015160609092015160001a92909190565b9094509250905060ff811660000361059f57828583016020016104f38261063e565b15801561050957506001600160a01b0382163014155b1561052457506001600160e01b031994506105d59350505050565b604051630b135d3f60e11b81526001600160a01b03831690631626ba7e90610552908b908590600401611661565b602060405180830381865afa15801561056f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610593919061167a565b955050505050506105d5565b6105ae610247878386866109cc565b156105c65750630b135d3f60e11b92506105d5915050565b506001600160e01b0319925050505b92915050565b6000806105e66109ea565b8060200190518101906105f991906116a4565b9392505050565b600061060a610a59565b6106148484610abe565b905061062360408501856116d2565b90506000036106355761063584610b91565b6105f982610bf6565b600080600061064b6109ea565b80602001905181019061065e91906116a4565b91509150836001600160a01b0316826001600160a01b0316636352211e836040518263ffffffff1660e01b815260040161069a91815260200190565b602060405180830381865afa1580156106b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106db9190611719565b6001600160a01b031614949350505050565b6106f63361063e565b80610714575033730576a174d229e3cfa37253523e645a78a0c91b57145b6107865760405162461bcd60e51b815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e747261637400006064820152608401610468565b60018190556040518181527f66cbca4f3c64fecf1dcb9ce094abcf7f68c3450a1d4e3a8e917dd621edb4ebe09060200160405180910390a150565b6107c96109ea565b51156108175760405162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610468565b61082081610c4f565b50565b6000600154341015610855576001546040516316912f0560e31b81523460048201526024810191909152604401610468565b61085f338361097a565b9050336001600160a01b03167f4bda649efe6b98b0f9c1d5e859c29e20910f45c66dabfe6fad4a4881f7faf9cc828460405161089c929190611661565b60405180910390a2919050565b60606108b43361063e565b806108d2575033730576a174d229e3cfa37253523e645a78a0c91b57145b6109445760405162461bcd60e51b815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e747261637400006064820152608401610468565b600061095f8787878787156109595787610d2e565b5a610d2e565b925090508061097057815160208301fd5b5095945050505050565b6000828260405160200161098f929190611736565b60408051601f1981840301815291905280516020909101209392505050565b6000806109b96109ea565b8060200190518101906105d59190611719565b60008060006109dd87878787610e1e565b9150915061097081610ee2565b6060610a54610a4f604051606b60f91b6020820152602560fa1b60218201526bffffffffffffffffffffffff193060601b166022820152600160f81b60368201526000906037016040516020818303038152906040528051906020012060001c905090565b61102c565b905090565b33730576a174d229e3cfa37253523e645a78a0c91b5714610abc5760405162461bcd60e51b815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e74000000006044820152606401610468565b565b600080610b18836040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050630b135d3f60e11b610b6e82610b346101408801886116d2565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104ae92505050565b6001600160e01b03191614610b875760019150506105d5565b5060009392505050565b6000805460208301359180610ba58361176e565b91905055146108205760405162461bcd60e51b815260206004820152600d60248201527f496e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610468565b801561082057604051600090339060001990849084818181858888f193505050503d8060008114610c43576040519150601f19603f3d011682016040523d82523d6000602084013e610c48565b606091505b5050505050565b6000610c5a82611082565b905060008151602083016000f09050610cc9604051606b60f91b6020820152602560fa1b60218201526bffffffffffffffffffffffff193060601b166022820152600160f81b60368201526000906037016040516020818303038152906040528051906020012060001c905090565b6001600160a01b0316816001600160a01b031614610d295760405162461bcd60e51b815260206004820152600c60248201527f5772697465206661696c656400000000000000000000000000000000000000006044820152606401610468565b505050565b600060606001846001811115610d4657610d46611787565b03610db057866001600160a01b03168386604051610d64919061179d565b6000604051808303818686f4925050503d8060008114610da0576040519150601f19603f3d011682016040523d82523d6000602084013e610da5565b606091505b509092509050610e14565b866001600160a01b0316838787604051610dca919061179d565b600060405180830381858888f193505050503d8060008114610e08576040519150601f19603f3d011682016040523d82523d6000602084013e610e0d565b606091505b5090925090505b9550959350505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610e555750600090506003610ed9565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610ea9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610ed257600060019250925050610ed9565b9150600090505b94509492505050565b6000816004811115610ef657610ef6611787565b03610efe5750565b6001816004811115610f1257610f12611787565b03610f5f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610468565b6002816004811115610f7357610f73611787565b03610fc05760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610468565b6003816004811115610fd457610fd4611787565b036108205760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610468565b6060813b6001811161104e575050604080516020810190915260008152919050565b80611058816117b9565b9150506040519150601f19601f602083010116820160405280825280600160208401853c50919050565b60608151600161109291906117d0565b826040516020016110a49291906117e3565b6040516020818303038152906040529050919050565b6001600160a01b038116811461082057600080fd5b60008083601f8401126110e157600080fd5b50813567ffffffffffffffff8111156110f957600080fd5b60208301915083602082850101111561111157600080fd5b9250929050565b60008060008060008060008060c0898b03121561113457600080fd5b883561113f816110ba565b9750602089013561114f816110ba565b9650604089013561115f816110ba565b955060608901359450608089013567ffffffffffffffff8082111561118357600080fd5b61118f8c838d016110cf565b909650945060a08b01359150808211156111a857600080fd5b506111b58b828c016110cf565b999c989b5096995094979396929594505050565b6000806000806000608086880312156111e157600080fd5b85356111ec816110ba565b945060208601356111fc816110ba565b935060408601359250606086013567ffffffffffffffff81111561121f57600080fd5b61122b888289016110cf565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261126357600080fd5b813567ffffffffffffffff8082111561127e5761127e61123c565b604051601f8301601f19908116603f011681019082821181831017156112a6576112a661123c565b816040528381528660208588010111156112bf57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156112f257600080fd5b82359150602083013567ffffffffffffffff81111561131057600080fd5b61131c85828601611252565b9150509250929050565b60008060006060848603121561133b57600080fd5b833567ffffffffffffffff81111561135257600080fd5b8401610160818703121561136557600080fd5b95602085013595506040909401359392505050565b60006020828403121561138c57600080fd5b81356105f9816110ba565b6000602082840312156113a957600080fd5b5035919050565b6000602082840312156113c257600080fd5b813567ffffffffffffffff8111156113d957600080fd5b6113e584828501611252565b949350505050565b60008083601f8401126113ff57600080fd5b50813567ffffffffffffffff81111561141757600080fd5b6020830191508360208260051b850101111561111157600080fd5b60008060008060008060008060a0898b03121561144e57600080fd5b8835611459816110ba565b97506020890135611469816110ba565b9650604089013567ffffffffffffffff8082111561148657600080fd5b6114928c838d016113ed565b909850965060608b01359150808211156114ab57600080fd5b6114b78c838d016113ed565b909650945060808b01359150808211156111a857600080fd5b600080600080600060a086880312156114e857600080fd5b85356114f3816110ba565b945060208601359350604086013567ffffffffffffffff81111561151657600080fd5b61152288828901611252565b93505060608601356002811061153757600080fd5b949793965091946080013592915050565b60005b8381101561156357818101518382015260200161154b565b50506000910152565b60008151808452611584816020860160208601611548565b601f01601f19169290920160200192915050565b6020815260006105f9602083018461156c565b600080604083850312156115be57600080fd5b82356115c9816110ba565b9150602083013567ffffffffffffffff81111561131057600080fd5b60008060008060008060a087890312156115fe57600080fd5b8635611609816110ba565b95506020870135611619816110ba565b94506040870135935060608701359250608087013567ffffffffffffffff81111561164357600080fd5b61164f89828a016110cf565b979a9699509497509295939492505050565b8281526040602082015260006113e5604083018461156c565b60006020828403121561168c57600080fd5b81516001600160e01b0319811681146105f957600080fd5b600080604083850312156116b757600080fd5b82516116c2816110ba565b6020939093015192949293505050565b6000808335601e198436030181126116e957600080fd5b83018035915067ffffffffffffffff82111561170457600080fd5b60200191503681900382131561111157600080fd5b60006020828403121561172b57600080fd5b81516105f9816110ba565b6001600160a01b03831681526040602082015260006113e5604083018461156c565b634e487b7160e01b600052601160045260246000fd5b60006001820161178057611780611758565b5060010190565b634e487b7160e01b600052602160045260246000fd5b600082516117af818460208701611548565b9190910192915050565b6000816117c8576117c8611758565b506000190190565b808201808211156105d5576105d5611758565b606360f81b815263ffffffff60e01b8360e01b1660018201527f80600e6000396000f3000000000000000000000000000000000000000000000060058201526000600e8201526000825161183e81600f850160208701611548565b91909101600f01939250505056fea26469706673582212202a03e14f0f05f58be9cbbba4646c39d989209350f0ee3edaaf0da00994a368d164736f6c63430008130033", + "bytecode": "0x60c0604052600080553480156200001557600080fd5b506040516200318d3803806200318d833981016040819052620000389162000494565b828282828260008282604051602001620000679291906001600160a01b03929092168252602082015260400190565b60408051601f198184030181529190529050620000848162000174565b5050506001600160a01b038316620000af5760405163d92e233d60e01b815260040160405180910390fd5b6040516331a9108f60e11b8152600481018390526000906001600160a01b03851690636352211e90602401602060405180830381865afa158015620000f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011e9190620004cc565b90506001600160a01b0381166200015057604051630ede975960e01b8152600481018490526024015b60405180910390fd5b60018290554660a05262000163620001dc565b60805250620005f195505050505050565b6200017e620002a7565b5115620001ce5760405162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a656400000000000000000000000000604482015260640162000147565b620001d98162000314565b50565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f493aeac1d921aa02a044029e7fe4be43b1a4e80b40706fa5819e8fbb0d093525604051806040016040528060058152602001640312e302e360dc1b81525060405160200162000250919062000517565b60408051601f1981840301815282825280516020918201209083019490945281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60606200030f62000309604051606b60f91b6020820152602560fa1b60218201526001600160601b03193060601b166022820152600160f81b60368201526000906037016040516020818303038152906040528051906020012060001c905090565b620003e2565b905090565b600062000321826200043b565b905060008151602083016000f090506200038c604051606b60f91b6020820152602560fa1b60218201526001600160601b03193060601b166022820152600160f81b60368201526000906037016040516020818303038152906040528051906020012060001c905090565b6001600160a01b0316816001600160a01b031614620003dd5760405162461bcd60e51b815260206004820152600c60248201526b15dc9a5d194819985a5b195960a21b604482015260640162000147565b505050565b6060813b6001811162000405575050604080516020810190915260008152919050565b80620004118162000562565b9150506040519150601f19601f602083010116820160405280825280600160208401853c50919050565b6060815160016200044d91906200057c565b826040516020016200046192919062000598565b6040516020818303038152906040529050919050565b80516001600160a01b03811681146200048f57600080fd5b919050565b600080600060608486031215620004aa57600080fd5b620004b58462000477565b925060208401519150604084015190509250925092565b600060208284031215620004df57600080fd5b620004ea8262000477565b9392505050565b60005b838110156200050e578181015183820152602001620004f4565b50506000910152565b602081526000825180602084015262000538816040850160208701620004f1565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b6000816200057457620005746200054c565b506000190190565b808201808211156200059257620005926200054c565b92915050565b606360f81b815260e083901b6001600160e01b03191660018201526880600e6000396000f360b81b60058201526000600e82018190528251620005e381600f850160208701620004f1565b91909101600f019392505050565b60805160a051612b68620006256000396000818161049d015261124f01526000818161078301526112840152612b686000f3fe6080604052600436106102375760003560e01c8063b0d691fe11610138578063ed24911d116100b0578063f698da251161007f578063fc0c546a11610064578063fc0c546a146107c5578063fe266bb9146107da578063ffa1ad74146107fa57600080fd5b8063f698da2514610771578063fba5c56b146107a557600080fd5b8063ed24911d146106c2578063f23a6e61146106d7578063f5dcb7bb1461071d578063f6171e441461075157600080fd5b8063c7dec3fc11610107578063d843b7f4116100ec578063d843b7f414610632578063d8a4676f14610675578063e00b9118146106a257600080fd5b8063c7dec3fc146105d8578063cbd6407a1461060557600080fd5b8063b0d691fe1461050a578063b94207d314610552578063bc197c811461057a578063bdf86317146105c257600080fd5b80635e988032116101cb57806391b7f5ed1161019a578063a035b1fe1161017f578063a035b1fe146104bf578063a4f9edbf146104d5578063affed0e0146104f557600080fd5b806391b7f5ed1461046b5780639a8a05921461048b57600080fd5b80635e988032146103ae5780635fee6085146103db5780636d70f7ae146104085780637af734731461042857600080fd5b80633a871cdd116102075780633a871cdd1461032857806341a7726a146103485780634ada3e611461036b57806358ce09091461038157600080fd5b806223de2914610243578063150b7a021461026a5780631626ba7e146102e557806317d70f7c1461030557600080fd5b3661023e57005b600080fd5b34801561024f57600080fd5b5061026861025e3660046120c9565b5050505050505050565b005b34801561027657600080fd5b506102af61028536600461217a565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b3480156102f157600080fd5b506102af6103003660046122c7565b610843565b34801561031157600080fd5b5061031a6109ec565b6040519081526020016102dc565b34801561033457600080fd5b5061031a61034336600461230e565b610a11565b61035b610356366004612362565b610a4f565b60405190151581526020016102dc565b34801561037757600080fd5b5061031a60035481565b34801561038d57600080fd5b506103a161039c36600461237f565b610ae7565b6040516102dc91906123a1565b3480156103ba57600080fd5b5061031a6103c9366004612362565b60086020526000908152604090205481565b3480156103e757600080fd5b5061031a6103f6366004612362565b60046020526000908152604090205481565b34801561041457600080fd5b5061035b610423366004612362565b610c57565b34801561043457600080fd5b5061031a610443366004612362565b73ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b34801561047757600080fd5b506102686104863660046123e5565b610d2d565b34801561049757600080fd5b5061031a7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cb57600080fd5b5061031a60015481565b3480156104e157600080fd5b506102686104f03660046123fe565b610e1b565b34801561050157600080fd5b5060005461031a565b34801561051657600080fd5b50730576a174d229e3cfa37253523e645a78a0c91b575b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102dc565b6105656105603660046123fe565b610e97565b604080519283526020830191909152016102dc565b34801561058657600080fd5b506102af610595366004612480565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b3480156105ce57600080fd5b5061031a60025481565b3480156105e457600080fd5b506105f86105f336600461251e565b611034565b6040516102dc9190612604565b34801561061157600080fd5b5061031a610620366004612362565b60076020526000908152604090205481565b34801561063e57600080fd5b5061052d61064d3660046123e5565b60066020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561068157600080fd5b506106956106903660046123e5565b61111f565b6040516102dc9190612646565b3480156106ae57600080fd5b5061031a6106bd366004612687565b6111f9565b3480156106ce57600080fd5b5061031a61124b565b3480156106e357600080fd5b506102af6106f23660046126c1565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b34801561072957600080fd5b5061031a7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b34801561075d57600080fd5b5061031a61076c36600461237f565b6112a6565b34801561077d57600080fd5b5061031a7f000000000000000000000000000000000000000000000000000000000000000081565b3480156107b157600080fd5b5061031a6107c036600461273d565b6112cb565b3480156107d157600080fd5b5061052d611380565b3480156107e657600080fd5b506102686107f5366004612796565b61139e565b34801561080657600080fd5b506105f86040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b600080600080610866856020810151604082015160609092015160001a92909190565b9094509250905060ff811660000361097f578285830160200161088882610c57565b1580156108ab575073ffffffffffffffffffffffffffffffffffffffff82163014155b156108de57507fffffffff0000000000000000000000000000000000000000000000000000000094506109e69350505050565b6040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831690631626ba7e90610932908b9085906004016127e6565b602060405180830381865afa15801561094f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097391906127ff565b955050505050506109e6565b61098e610423878386866115cb565b156109bf57507f1626ba7e0000000000000000000000000000000000000000000000000000000092506109e6915050565b507fffffffff00000000000000000000000000000000000000000000000000000000925050505b92915050565b6000806109f76115e9565b806020019051810190610a0a9190612841565b9392505050565b6000610a1b6116ba565b610a258484611739565b9050610a34604085018561286f565b9050600003610a4657610a4684611810565b610a0a8261188f565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260086020526040812080543491908390610a86908490612903565b90915550506040805133815273ffffffffffffffffffffffffffffffffffffffff84166020820152348183015290517f4d1db39debc799df6a6a3bad1c8809c46cbe6eb3b784df03f50a061c487994c69181900360600190a1506001919050565b6002546060906000849003610afa578093505b80610b058486612903565b1115610b5757610b158385612903565b6040517f7ae596850000000000000000000000000000000000000000000000000000000081526004810191909152602481018290526044015b60405180910390fd5b8315610c50578367ffffffffffffffff811115610b7657610b766121ed565b604051908082528060200260200182016040528015610b9f578160200160208202803683370190505b50600080805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bd549193505b84811015610bfc576000828152600560205260409020600101549150610bf581612945565b9050610bd0565b5060005b85811015610c4d5781848281518110610c1b57610c1b612916565b60209081029190910181019190915260009283526005905260409091206001015490610c4681612945565b9050610c00565b50505b5092915050565b6000806000610c646115e9565b806020019051810190610c779190612841565b915091508373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401610ccd91815260200190565b602060405180830381865afa158015610cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0e919061297d565b73ffffffffffffffffffffffffffffffffffffffff1614949350505050565b610d3633610c57565b80610d54575033730576a174d229e3cfa37253523e645a78a0c91b57145b610de0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e747261637400006064820152608401610b4e565b60018190556040518181527f66cbca4f3c64fecf1dcb9ce094abcf7f68c3450a1d4e3a8e917dd621edb4ebe09060200160405180910390a150565b610e236115e9565b5115610e8b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610b4e565b610e9481611906565b50565b600080610ea433846111f9565b33600081815260076020526040902054919350610ec29185906112cb565b9050610ecf348285611a80565b336000908152600460205260408120805491610eea83612945565b9091555050600081815260066020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001633908117909155835260079091528120805491610f4083612945565b90915550506005602052600081815260408082207f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bd80546001830181905590859055808452918320849055600280547f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc94929392909190610fc083612945565b909155505060038054906000610fd583612945565b91905055503373ffffffffffffffffffffffffffffffffffffffff167f415baea36dd0457eaf27cbe8dd3691cb1d0b387aac1539c4d118198aba024db38686896040516110249392919061299a565b60405180910390a2505050915091565b606061103f33610c57565b8061105d575033730576a174d229e3cfa37253523e645a78a0c91b57145b6110e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e747261637400006064820152608401610b4e565b60006111048787878787156110fe5787611adb565b5a611adb565b925090508061111557815160208301fd5b5095945050505050565b60008181526006602052604081205473ffffffffffffffffffffffffffffffffffffffff16156111f4576000828152600560205260408082208151808301928390529160029082845b81548152602001906001019080831161116857505050505090508060006002811061119557611195612916565b60200201511580156111a957506020810151155b80156111df57506000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc548314155b156111ed57600291506111f2565b600191505b505b919050565b6000828260405160200161120e9291906129c2565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209392505050565b60007f000000000000000000000000000000000000000000000000000000000000000046146112815761127c611be5565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b600560205281600052604060002081600281106112c257600080fd5b01549150829050565b60006112d561124b565b8484846040516020016112ea939291906129f1565b604051602081830303815290604052805190602001206040516020016113429291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120949350505050565b60008061138b6115e9565b8060200190518101906109e6919061297d565b6113a733610c57565b806113c5575033730576a174d229e3cfa37253523e645a78a0c91b57145b611451576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e747261637400006064820152608401610b4e565b60008281526005602052604080822081518083019283905284939290919060029082845b8154815260200190600101908083116114755750505050509050806000600281106114a2576114a2612916565b60200201511580156114b657506020810151155b80156114ec57506000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc548414155b15611526576040517ffe23980400000000000000000000000000000000000000000000000000000000815260048101859052602401610b4e565b6020818101805183516000908152600590935260408084206001908101929092558451925184528084209290925586835290822082815501819055600280549161156f83612a30565b91905055503373ffffffffffffffffffffffffffffffffffffffff167f0cd979445339c62199996f208428d987b1cea24d18e62b79ec24d94b636e8b7086846040516115bc9291906127e6565b60405180910390a25050505050565b60008060006115dc87878787611ce4565b9150915061111581611dd3565b606061127c6116b56040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f010000000000000000000000000000000000000000000000000000000000000060368201526000906037016040516020818303038152906040528051906020012060001c905090565b611f86565b33730576a174d229e3cfa37253523e645a78a0c91b5714611737576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e74000000006044820152606401610b4e565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c829052603c81207f1626ba7e000000000000000000000000000000000000000000000000000000006117d58261179b61014088018861286f565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061084392505050565b7fffffffff0000000000000000000000000000000000000000000000000000000016146118065760019150506109e6565b5060009392505050565b600080546020830135918061182483612945565b9190505514610e94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610b4e565b8015610e945760405160009033907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90849084818181858888f193505050503d80600081146118fa576040519150601f19603f3d011682016040523d82523d6000602084013e6118ff565b606091505b5050505050565b600061191182611fdc565b905060008151602083016000f090506119e76040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f010000000000000000000000000000000000000000000000000000000000000060368201526000906037016040516020818303038152906040528051906020012060001c905090565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611a7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f5772697465206661696c656400000000000000000000000000000000000000006044820152606401610b4e565b505050565b82158015611a9f57503360009081526008602052604090205460015411155b15611ad0576001543360009081526008602052604081208054909190611ac6908490612a65565b9091555050505050565b611a7b838383612014565b600060606001846001811115611af357611af3612617565b03611b6a578673ffffffffffffffffffffffffffffffffffffffff168386604051611b1e9190612a78565b6000604051808303818686f4925050503d8060008114611b5a576040519150601f19603f3d011682016040523d82523d6000602084013e611b5f565b606091505b509092509050611bdb565b8673ffffffffffffffffffffffffffffffffffffffff16838787604051611b919190612a78565b600060405180830381858888f193505050503d8060008114611bcf576040519150601f19603f3d011682016040523d82523d6000602084013e611bd4565b606091505b5090925090505b9550959350505050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f493aeac1d921aa02a044029e7fe4be43b1a4e80b40706fa5819e8fbb0d0935256040518060400160405280600581526020017f312e302e30000000000000000000000000000000000000000000000000000000815250604051602001611c6f9190612604565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083019490945281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611d1b5750600090506003611dca565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611d6f573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611dc357600060019250925050611dca565b9150600090505b94509492505050565b6000816004811115611de757611de7612617565b03611def5750565b6001816004811115611e0357611e03612617565b03611e6a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b4e565b6002816004811115611e7e57611e7e612617565b03611ee5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b4e565b6003816004811115611ef957611ef9612617565b03610e94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610b4e565b6060813b60018111611fa8575050604080516020810190915260008152919050565b80611fb281612a30565b9150506040519150601f19601f602083010116820160405280825280600160208401853c50919050565b606081516001611fec9190612903565b82604051602001611ffe929190612a94565b6040516020818303038152906040529050919050565b600154831015611a7b576001546040517fb4897828000000000000000000000000000000000000000000000000000000008152610b4e918591600401918252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff81168114610e9457600080fd5b60008083601f84011261209257600080fd5b50813567ffffffffffffffff8111156120aa57600080fd5b6020830191508360208285010111156120c257600080fd5b9250929050565b60008060008060008060008060c0898b0312156120e557600080fd5b88356120f08161205e565b975060208901356121008161205e565b965060408901356121108161205e565b955060608901359450608089013567ffffffffffffffff8082111561213457600080fd5b6121408c838d01612080565b909650945060a08b013591508082111561215957600080fd5b506121668b828c01612080565b999c989b5096995094979396929594505050565b60008060008060006080868803121561219257600080fd5b853561219d8161205e565b945060208601356121ad8161205e565b935060408601359250606086013567ffffffffffffffff8111156121d057600080fd5b6121dc88828901612080565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261222d57600080fd5b813567ffffffffffffffff80821115612248576122486121ed565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561228e5761228e6121ed565b816040528381528660208588010111156122a757600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156122da57600080fd5b82359150602083013567ffffffffffffffff8111156122f857600080fd5b6123048582860161221c565b9150509250929050565b60008060006060848603121561232357600080fd5b833567ffffffffffffffff81111561233a57600080fd5b8401610160818703121561234d57600080fd5b95602085013595506040909401359392505050565b60006020828403121561237457600080fd5b8135610a0a8161205e565b6000806040838503121561239257600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156123d9578351835292840192918401916001016123bd565b50909695505050505050565b6000602082840312156123f757600080fd5b5035919050565b60006020828403121561241057600080fd5b813567ffffffffffffffff81111561242757600080fd5b6124338482850161221c565b949350505050565b60008083601f84011261244d57600080fd5b50813567ffffffffffffffff81111561246557600080fd5b6020830191508360208260051b85010111156120c257600080fd5b60008060008060008060008060a0898b03121561249c57600080fd5b88356124a78161205e565b975060208901356124b78161205e565b9650604089013567ffffffffffffffff808211156124d457600080fd5b6124e08c838d0161243b565b909850965060608b01359150808211156124f957600080fd5b6125058c838d0161243b565b909650945060808b013591508082111561215957600080fd5b600080600080600060a0868803121561253657600080fd5b85356125418161205e565b945060208601359350604086013567ffffffffffffffff81111561256457600080fd5b6125708882890161221c565b93505060608601356002811061258557600080fd5b949793965091946080013592915050565b60005b838110156125b1578181015183820152602001612599565b50506000910152565b600081518084526125d2816020860160208601612596565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610a0a60208301846125ba565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310612681577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b6000806040838503121561269a57600080fd5b82356126a58161205e565b9150602083013567ffffffffffffffff8111156122f857600080fd5b60008060008060008060a087890312156126da57600080fd5b86356126e58161205e565b955060208701356126f58161205e565b94506040870135935060608701359250608087013567ffffffffffffffff81111561271f57600080fd5b61272b89828a01612080565b979a9699509497509295939492505050565b60008060006060848603121561275257600080fd5b833561275d8161205e565b9250602084013567ffffffffffffffff81111561277957600080fd5b6127858682870161221c565b925050604084013590509250925092565b6000806000606084860312156127ab57600080fd5b8335925060208401359150604084013567ffffffffffffffff8111156127d057600080fd5b6127dc8682870161221c565b9150509250925092565b82815260406020820152600061243360408301846125ba565b60006020828403121561281157600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610a0a57600080fd5b6000806040838503121561285457600080fd5b825161285f8161205e565b6020939093015192949293505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126128a457600080fd5b83018035915067ffffffffffffffff8211156128bf57600080fd5b6020019150368190038213156120c257600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156109e6576109e66128d4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612976576129766128d4565b5060010190565b60006020828403121561298f57600080fd5b8151610a0a8161205e565b8381528260208201526060604082015260006129b960608301846125ba565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff8316815260406020820152600061243360408301846125ba565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201526000612a2060608301856125ba565b9050826040830152949350505050565b600081612a3f57612a3f6128d4565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b818103818111156109e6576109e66128d4565b60008251612a8a818460208701612596565b9190910192915050565b7f630000000000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008360e01b1660018201527f80600e6000396000f3000000000000000000000000000000000000000000000060058201526000600e82015260008251612b2481600f850160208701612596565b91909101600f01939250505056fea26469706673582212209a0ab5e2ee30980a5f0e6bb806a575bc80cefff6d9d9a6dba6545ff1c3ef9df864736f6c63430008150033", + "deployedBytecode": "0x6080604052600436106102375760003560e01c8063b0d691fe11610138578063ed24911d116100b0578063f698da251161007f578063fc0c546a11610064578063fc0c546a146107c5578063fe266bb9146107da578063ffa1ad74146107fa57600080fd5b8063f698da2514610771578063fba5c56b146107a557600080fd5b8063ed24911d146106c2578063f23a6e61146106d7578063f5dcb7bb1461071d578063f6171e441461075157600080fd5b8063c7dec3fc11610107578063d843b7f4116100ec578063d843b7f414610632578063d8a4676f14610675578063e00b9118146106a257600080fd5b8063c7dec3fc146105d8578063cbd6407a1461060557600080fd5b8063b0d691fe1461050a578063b94207d314610552578063bc197c811461057a578063bdf86317146105c257600080fd5b80635e988032116101cb57806391b7f5ed1161019a578063a035b1fe1161017f578063a035b1fe146104bf578063a4f9edbf146104d5578063affed0e0146104f557600080fd5b806391b7f5ed1461046b5780639a8a05921461048b57600080fd5b80635e988032146103ae5780635fee6085146103db5780636d70f7ae146104085780637af734731461042857600080fd5b80633a871cdd116102075780633a871cdd1461032857806341a7726a146103485780634ada3e611461036b57806358ce09091461038157600080fd5b806223de2914610243578063150b7a021461026a5780631626ba7e146102e557806317d70f7c1461030557600080fd5b3661023e57005b600080fd5b34801561024f57600080fd5b5061026861025e3660046120c9565b5050505050505050565b005b34801561027657600080fd5b506102af61028536600461217a565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b3480156102f157600080fd5b506102af6103003660046122c7565b610843565b34801561031157600080fd5b5061031a6109ec565b6040519081526020016102dc565b34801561033457600080fd5b5061031a61034336600461230e565b610a11565b61035b610356366004612362565b610a4f565b60405190151581526020016102dc565b34801561037757600080fd5b5061031a60035481565b34801561038d57600080fd5b506103a161039c36600461237f565b610ae7565b6040516102dc91906123a1565b3480156103ba57600080fd5b5061031a6103c9366004612362565b60086020526000908152604090205481565b3480156103e757600080fd5b5061031a6103f6366004612362565b60046020526000908152604090205481565b34801561041457600080fd5b5061035b610423366004612362565b610c57565b34801561043457600080fd5b5061031a610443366004612362565b73ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b34801561047757600080fd5b506102686104863660046123e5565b610d2d565b34801561049757600080fd5b5061031a7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cb57600080fd5b5061031a60015481565b3480156104e157600080fd5b506102686104f03660046123fe565b610e1b565b34801561050157600080fd5b5060005461031a565b34801561051657600080fd5b50730576a174d229e3cfa37253523e645a78a0c91b575b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102dc565b6105656105603660046123fe565b610e97565b604080519283526020830191909152016102dc565b34801561058657600080fd5b506102af610595366004612480565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b3480156105ce57600080fd5b5061031a60025481565b3480156105e457600080fd5b506105f86105f336600461251e565b611034565b6040516102dc9190612604565b34801561061157600080fd5b5061031a610620366004612362565b60076020526000908152604090205481565b34801561063e57600080fd5b5061052d61064d3660046123e5565b60066020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561068157600080fd5b506106956106903660046123e5565b61111f565b6040516102dc9190612646565b3480156106ae57600080fd5b5061031a6106bd366004612687565b6111f9565b3480156106ce57600080fd5b5061031a61124b565b3480156106e357600080fd5b506102af6106f23660046126c1565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b34801561072957600080fd5b5061031a7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b34801561075d57600080fd5b5061031a61076c36600461237f565b6112a6565b34801561077d57600080fd5b5061031a7f000000000000000000000000000000000000000000000000000000000000000081565b3480156107b157600080fd5b5061031a6107c036600461273d565b6112cb565b3480156107d157600080fd5b5061052d611380565b3480156107e657600080fd5b506102686107f5366004612796565b61139e565b34801561080657600080fd5b506105f86040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b600080600080610866856020810151604082015160609092015160001a92909190565b9094509250905060ff811660000361097f578285830160200161088882610c57565b1580156108ab575073ffffffffffffffffffffffffffffffffffffffff82163014155b156108de57507fffffffff0000000000000000000000000000000000000000000000000000000094506109e69350505050565b6040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831690631626ba7e90610932908b9085906004016127e6565b602060405180830381865afa15801561094f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097391906127ff565b955050505050506109e6565b61098e610423878386866115cb565b156109bf57507f1626ba7e0000000000000000000000000000000000000000000000000000000092506109e6915050565b507fffffffff00000000000000000000000000000000000000000000000000000000925050505b92915050565b6000806109f76115e9565b806020019051810190610a0a9190612841565b9392505050565b6000610a1b6116ba565b610a258484611739565b9050610a34604085018561286f565b9050600003610a4657610a4684611810565b610a0a8261188f565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260086020526040812080543491908390610a86908490612903565b90915550506040805133815273ffffffffffffffffffffffffffffffffffffffff84166020820152348183015290517f4d1db39debc799df6a6a3bad1c8809c46cbe6eb3b784df03f50a061c487994c69181900360600190a1506001919050565b6002546060906000849003610afa578093505b80610b058486612903565b1115610b5757610b158385612903565b6040517f7ae596850000000000000000000000000000000000000000000000000000000081526004810191909152602481018290526044015b60405180910390fd5b8315610c50578367ffffffffffffffff811115610b7657610b766121ed565b604051908082528060200260200182016040528015610b9f578160200160208202803683370190505b50600080805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bd549193505b84811015610bfc576000828152600560205260409020600101549150610bf581612945565b9050610bd0565b5060005b85811015610c4d5781848281518110610c1b57610c1b612916565b60209081029190910181019190915260009283526005905260409091206001015490610c4681612945565b9050610c00565b50505b5092915050565b6000806000610c646115e9565b806020019051810190610c779190612841565b915091508373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401610ccd91815260200190565b602060405180830381865afa158015610cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0e919061297d565b73ffffffffffffffffffffffffffffffffffffffff1614949350505050565b610d3633610c57565b80610d54575033730576a174d229e3cfa37253523e645a78a0c91b57145b610de0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e747261637400006064820152608401610b4e565b60018190556040518181527f66cbca4f3c64fecf1dcb9ce094abcf7f68c3450a1d4e3a8e917dd621edb4ebe09060200160405180910390a150565b610e236115e9565b5115610e8b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a6564000000000000000000000000006044820152606401610b4e565b610e9481611906565b50565b600080610ea433846111f9565b33600081815260076020526040902054919350610ec29185906112cb565b9050610ecf348285611a80565b336000908152600460205260408120805491610eea83612945565b9091555050600081815260066020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001633908117909155835260079091528120805491610f4083612945565b90915550506005602052600081815260408082207f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bd80546001830181905590859055808452918320849055600280547f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc94929392909190610fc083612945565b909155505060038054906000610fd583612945565b91905055503373ffffffffffffffffffffffffffffffffffffffff167f415baea36dd0457eaf27cbe8dd3691cb1d0b387aac1539c4d118198aba024db38686896040516110249392919061299a565b60405180910390a2505050915091565b606061103f33610c57565b8061105d575033730576a174d229e3cfa37253523e645a78a0c91b57145b6110e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e747261637400006064820152608401610b4e565b60006111048787878787156110fe5787611adb565b5a611adb565b925090508061111557815160208301fd5b5095945050505050565b60008181526006602052604081205473ffffffffffffffffffffffffffffffffffffffff16156111f4576000828152600560205260408082208151808301928390529160029082845b81548152602001906001019080831161116857505050505090508060006002811061119557611195612916565b60200201511580156111a957506020810151155b80156111df57506000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc548314155b156111ed57600291506111f2565b600191505b505b919050565b6000828260405160200161120e9291906129c2565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209392505050565b60007f000000000000000000000000000000000000000000000000000000000000000046146112815761127c611be5565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b600560205281600052604060002081600281106112c257600080fd5b01549150829050565b60006112d561124b565b8484846040516020016112ea939291906129f1565b604051602081830303815290604052805190602001206040516020016113429291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120949350505050565b60008061138b6115e9565b8060200190518101906109e6919061297d565b6113a733610c57565b806113c5575033730576a174d229e3cfa37253523e645a78a0c91b57145b611451576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4f6e6c792063616c6c61626c6520627920746865206d656368206f706572617460448201527f6f72206f722074686520656e74727920706f696e7420636f6e747261637400006064820152608401610b4e565b60008281526005602052604080822081518083019283905284939290919060029082845b8154815260200190600101908083116114755750505050509050806000600281106114a2576114a2612916565b60200201511580156114b657506020810151155b80156114ec57506000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc548414155b15611526576040517ffe23980400000000000000000000000000000000000000000000000000000000815260048101859052602401610b4e565b6020818101805183516000908152600590935260408084206001908101929092558451925184528084209290925586835290822082815501819055600280549161156f83612a30565b91905055503373ffffffffffffffffffffffffffffffffffffffff167f0cd979445339c62199996f208428d987b1cea24d18e62b79ec24d94b636e8b7086846040516115bc9291906127e6565b60405180910390a25050505050565b60008060006115dc87878787611ce4565b9150915061111581611dd3565b606061127c6116b56040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f010000000000000000000000000000000000000000000000000000000000000060368201526000906037016040516020818303038152906040528051906020012060001c905090565b611f86565b33730576a174d229e3cfa37253523e645a78a0c91b5714611737576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e74000000006044820152606401610b4e565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c829052603c81207f1626ba7e000000000000000000000000000000000000000000000000000000006117d58261179b61014088018861286f565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061084392505050565b7fffffffff0000000000000000000000000000000000000000000000000000000016146118065760019150506109e6565b5060009392505050565b600080546020830135918061182483612945565b9190505514610e94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610b4e565b8015610e945760405160009033907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90849084818181858888f193505050503d80600081146118fa576040519150601f19603f3d011682016040523d82523d6000602084013e6118ff565b606091505b5050505050565b600061191182611fdc565b905060008151602083016000f090506119e76040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f010000000000000000000000000000000000000000000000000000000000000060368201526000906037016040516020818303038152906040528051906020012060001c905090565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611a7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f5772697465206661696c656400000000000000000000000000000000000000006044820152606401610b4e565b505050565b82158015611a9f57503360009081526008602052604090205460015411155b15611ad0576001543360009081526008602052604081208054909190611ac6908490612a65565b9091555050505050565b611a7b838383612014565b600060606001846001811115611af357611af3612617565b03611b6a578673ffffffffffffffffffffffffffffffffffffffff168386604051611b1e9190612a78565b6000604051808303818686f4925050503d8060008114611b5a576040519150601f19603f3d011682016040523d82523d6000602084013e611b5f565b606091505b509092509050611bdb565b8673ffffffffffffffffffffffffffffffffffffffff16838787604051611b919190612a78565b600060405180830381858888f193505050503d8060008114611bcf576040519150601f19603f3d011682016040523d82523d6000602084013e611bd4565b606091505b5090925090505b9550959350505050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f493aeac1d921aa02a044029e7fe4be43b1a4e80b40706fa5819e8fbb0d0935256040518060400160405280600581526020017f312e302e30000000000000000000000000000000000000000000000000000000815250604051602001611c6f9190612604565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083019490945281019190915260608101919091524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611d1b5750600090506003611dca565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611d6f573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611dc357600060019250925050611dca565b9150600090505b94509492505050565b6000816004811115611de757611de7612617565b03611def5750565b6001816004811115611e0357611e03612617565b03611e6a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b4e565b6002816004811115611e7e57611e7e612617565b03611ee5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b4e565b6003816004811115611ef957611ef9612617565b03610e94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610b4e565b6060813b60018111611fa8575050604080516020810190915260008152919050565b80611fb281612a30565b9150506040519150601f19601f602083010116820160405280825280600160208401853c50919050565b606081516001611fec9190612903565b82604051602001611ffe929190612a94565b6040516020818303038152906040529050919050565b600154831015611a7b576001546040517fb4897828000000000000000000000000000000000000000000000000000000008152610b4e918591600401918252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff81168114610e9457600080fd5b60008083601f84011261209257600080fd5b50813567ffffffffffffffff8111156120aa57600080fd5b6020830191508360208285010111156120c257600080fd5b9250929050565b60008060008060008060008060c0898b0312156120e557600080fd5b88356120f08161205e565b975060208901356121008161205e565b965060408901356121108161205e565b955060608901359450608089013567ffffffffffffffff8082111561213457600080fd5b6121408c838d01612080565b909650945060a08b013591508082111561215957600080fd5b506121668b828c01612080565b999c989b5096995094979396929594505050565b60008060008060006080868803121561219257600080fd5b853561219d8161205e565b945060208601356121ad8161205e565b935060408601359250606086013567ffffffffffffffff8111156121d057600080fd5b6121dc88828901612080565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261222d57600080fd5b813567ffffffffffffffff80821115612248576122486121ed565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561228e5761228e6121ed565b816040528381528660208588010111156122a757600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156122da57600080fd5b82359150602083013567ffffffffffffffff8111156122f857600080fd5b6123048582860161221c565b9150509250929050565b60008060006060848603121561232357600080fd5b833567ffffffffffffffff81111561233a57600080fd5b8401610160818703121561234d57600080fd5b95602085013595506040909401359392505050565b60006020828403121561237457600080fd5b8135610a0a8161205e565b6000806040838503121561239257600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b818110156123d9578351835292840192918401916001016123bd565b50909695505050505050565b6000602082840312156123f757600080fd5b5035919050565b60006020828403121561241057600080fd5b813567ffffffffffffffff81111561242757600080fd5b6124338482850161221c565b949350505050565b60008083601f84011261244d57600080fd5b50813567ffffffffffffffff81111561246557600080fd5b6020830191508360208260051b85010111156120c257600080fd5b60008060008060008060008060a0898b03121561249c57600080fd5b88356124a78161205e565b975060208901356124b78161205e565b9650604089013567ffffffffffffffff808211156124d457600080fd5b6124e08c838d0161243b565b909850965060608b01359150808211156124f957600080fd5b6125058c838d0161243b565b909650945060808b013591508082111561215957600080fd5b600080600080600060a0868803121561253657600080fd5b85356125418161205e565b945060208601359350604086013567ffffffffffffffff81111561256457600080fd5b6125708882890161221c565b93505060608601356002811061258557600080fd5b949793965091946080013592915050565b60005b838110156125b1578181015183820152602001612599565b50506000910152565b600081518084526125d2816020860160208601612596565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610a0a60208301846125ba565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310612681577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b6000806040838503121561269a57600080fd5b82356126a58161205e565b9150602083013567ffffffffffffffff8111156122f857600080fd5b60008060008060008060a087890312156126da57600080fd5b86356126e58161205e565b955060208701356126f58161205e565b94506040870135935060608701359250608087013567ffffffffffffffff81111561271f57600080fd5b61272b89828a01612080565b979a9699509497509295939492505050565b60008060006060848603121561275257600080fd5b833561275d8161205e565b9250602084013567ffffffffffffffff81111561277957600080fd5b6127858682870161221c565b925050604084013590509250925092565b6000806000606084860312156127ab57600080fd5b8335925060208401359150604084013567ffffffffffffffff8111156127d057600080fd5b6127dc8682870161221c565b9150509250925092565b82815260406020820152600061243360408301846125ba565b60006020828403121561281157600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610a0a57600080fd5b6000806040838503121561285457600080fd5b825161285f8161205e565b6020939093015192949293505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126128a457600080fd5b83018035915067ffffffffffffffff8211156128bf57600080fd5b6020019150368190038213156120c257600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156109e6576109e66128d4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612976576129766128d4565b5060010190565b60006020828403121561298f57600080fd5b8151610a0a8161205e565b8381528260208201526060604082015260006129b960608301846125ba565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff8316815260406020820152600061243360408301846125ba565b73ffffffffffffffffffffffffffffffffffffffff84168152606060208201526000612a2060608301856125ba565b9050826040830152949350505050565b600081612a3f57612a3f6128d4565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b818103818111156109e6576109e66128d4565b60008251612a8a818460208701612596565b9190910192915050565b7f630000000000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008360e01b1660018201527f80600e6000396000f3000000000000000000000000000000000000000000000060058201526000600e82015260008251612b2481600f850160208701612596565b91909101600f01939250505056fea26469706673582212209a0ab5e2ee30980a5f0e6bb806a575bc80cefff6d9d9a6dba6545ff1c3ef9df864736f6c63430008150033", "linkReferences": {}, "deployedLinkReferences": {} -} +} \ No newline at end of file diff --git a/packages/valory/contracts/agent_mech/contract.py b/packages/valory/contracts/agent_mech/contract.py index 0205ec3e..a118fe10 100644 --- a/packages/valory/contracts/agent_mech/contract.py +++ b/packages/valory/contracts/agent_mech/contract.py @@ -19,7 +19,7 @@ """This module contains the dynamic_contribution contract definition.""" from enum import Enum -from typing import Any, Dict, List, cast +from typing import Any, Dict, List, Optional, cast from aea.common import JSONLike from aea.configurations.base import PublicId @@ -50,9 +50,65 @@ ], "name": "Deliver", "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", + }, + { + "indexed": False, + "internalType": "uint256", + "name": "requestIdWithNonce", + "type": "uint256", + }, + { + "indexed": False, + "internalType": "bytes", + "name": "data", + "type": "bytes", + }, + ], + "name": "Request", + "type": "event", + }, { "anonymous": False, "inputs": [ @@ -77,7 +133,7 @@ ], "name": "Deliver", "type": "event", - } + }, ], ] @@ -147,7 +203,12 @@ def get_state( @classmethod def get_deliver_data( - cls, ledger_api: LedgerApi, contract_address: str, request_id: int, data: str + cls, + ledger_api: LedgerApi, + contract_address: str, + request_id: int, + data: str, + request_id_nonce: Optional[int], ) -> JSONLike: """ Deliver a response to a request. @@ -156,6 +217,7 @@ def get_deliver_data( :param contract_address: the address of the token to be used :param request_id: the id of the target request :param data: the response data + :param request_id_nonce: request id with nonce, to ensure uniqueness on-chain. :return: the deliver data """ ledger_api = cast(EthereumApi, ledger_api) @@ -163,10 +225,36 @@ def get_deliver_data( if not isinstance(ledger_api, EthereumApi): raise ValueError(f"Only EthereumApi is supported, got {type(ledger_api)}") - contract_instance = cls.get_instance(ledger_api, contract_address) - data = contract_instance.encodeABI( - fn_name="deliver", args=[request_id, bytes.fromhex(data)] - ) + deliver_with_nonce = [ + { + "inputs": [ + {"internalType": "uint256", "name": "requestId", "type": "uint256"}, + { + "internalType": "uint256", + "name": "requestIdWithNonce", + "type": "uint256", + }, + {"internalType": "bytes", "name": "data", "type": "bytes"}, + ], + "name": "deliver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function", + } + ] + if request_id_nonce is not None: + contract_instance = ledger_api.api.eth.contract( + contract_address, abi=deliver_with_nonce + ) + data = contract_instance.encodeABI( + fn_name="deliver", + args=[request_id, request_id_nonce, bytes.fromhex(data)], + ) + else: + contract_instance = cls.get_instance(ledger_api, contract_address) + data = contract_instance.encodeABI( + fn_name="deliver", args=[request_id, bytes.fromhex(data)] + ) return {"data": bytes.fromhex(data[2:])} # type: ignore @classmethod @@ -179,19 +267,23 @@ def get_request_events( ) -> JSONLike: """Get the Request events emitted by the contract.""" ledger_api = cast(EthereumApi, ledger_api) - contract_instance = cls.get_instance(ledger_api, contract_address) - entries = contract_instance.events.Request.create_filter( - fromBlock=from_block, - toBlock=to_block, - ).get_all_entries() + all_entries = [] + for abi in partial_abis: + contract_instance = ledger_api.api.eth.contract(contract_address, abi=abi) + entries = contract_instance.events.Request.create_filter( + fromBlock=from_block, + toBlock=to_block, + ).get_all_entries() + all_entries.extend(entries) + request_events = list( { "tx_hash": entry.transactionHash.hex(), "block_number": entry.blockNumber, - "contract_address": contract_address, **entry["args"], + "contract_address": contract_address, } - for entry in entries + for entry in all_entries ) return {"data": request_events} diff --git a/packages/valory/contracts/agent_mech/contract.yaml b/packages/valory/contracts/agent_mech/contract.yaml index 51cd8205..0189d98f 100644 --- a/packages/valory/contracts/agent_mech/contract.yaml +++ b/packages/valory/contracts/agent_mech/contract.yaml @@ -7,8 +7,8 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeigpq5lxfj2aza6ok3fjuywtdafelkbvoqwaits7regfbgu4oynmku - build/AgentMech.json: bafybeienu4zryyvn6jvjfuhlzxonij7oim7hm3nf2atpjl7swx2amagv4q - contract.py: bafybeiadqkaqo5b2upmrubn7jmezhwyib7ybyxhoanhujdipl3cza76xqi + build/AgentMech.json: bafybeigo2x7njyx5ttawfrf5pdjewe2dbh2u56vra7bm6vrohuu4xcmz3u + contract.py: bafybeiawilbhsix4ui3whuoyk6sgundbbpeatbidv4krp2c45cpayhfu7m fingerprint_ignore_patterns: [] class_name: AgentMechContract contract_interface_paths: diff --git a/packages/valory/services/mech/service.yaml b/packages/valory/services/mech/service.yaml index 99447062..b30e0e74 100644 --- a/packages/valory/services/mech/service.yaml +++ b/packages/valory/services/mech/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeif7ia4jdlazy6745ke2k2x5yoqlwsgwr6sbztbgqtwvs3ndm2p7ba fingerprint_ignore_patterns: [] -agent: valory/mech:0.1.0:bafybeia4hfn4yvcpirwfhyk6uq7v7mwxqoawxi5dvhudc2x5wpqzfklyle +agent: valory/mech:0.1.0:bafybeiflfz2kcy2adgjtx3ad47u5axbkjjcej56xladjkoa3i4ufpqdyua number_of_agents: 4 deployment: agent: diff --git a/packages/valory/skills/mech_abci/skill.yaml b/packages/valory/skills/mech_abci/skill.yaml index e8604f59..b43c5238 100644 --- a/packages/valory/skills/mech_abci/skill.yaml +++ b/packages/valory/skills/mech_abci/skill.yaml @@ -23,10 +23,10 @@ skills: - valory/abstract_round_abci:0.1.0:bafybeiaqcl7h2famylusiffigwem7tevkcsyocdu5xd42jkmgq6kvowzgq - valory/registration_abci:0.1.0:bafybeic2ynseiak7jpta7jfwuqwyp453b4p7lolr4wihxmpn633uekv5am - valory/reset_pause_abci:0.1.0:bafybeidzajbe3erygeh2xbd6lrjv7nsptznjuzrt24ykgvhgotdeyhfnba -- valory/task_submission_abci:0.1.0:bafybeideyqmjbn5ipk6kdiaq6fdh7se4vsgzmpzncapb4hkqb7awjodzki +- valory/task_submission_abci:0.1.0:bafybeifb3vw25nlz2tecbpsbzrynwva2ey4r624htty62rjg6lrqwmh6l4 - valory/termination_abci:0.1.0:bafybeie4zvjfxvdu7qrulmur3chpjz3kpj5m4bjsxvpk4gvj5zbyyayfaa - valory/transaction_settlement_abci:0.1.0:bafybeiaefgqbs7zsn5xe5kdwrujj7ivygkn3ujpw6crnvi3knvxw75qmja -- valory/subscription_abci:0.1.0:bafybeiadm75c5bytop2zqyftstl53ggtocc4gassbpqiq3ybtpumar3pye +- valory/subscription_abci:0.1.0:bafybeibgnw53s5nh6up35z6fgjisrrvrlt4nnjmx3ia7fcgwpmcprvja5u behaviours: main: args: {} diff --git a/packages/valory/skills/subscription_abci/skill.yaml b/packages/valory/skills/subscription_abci/skill.yaml index e7e0559b..0576281e 100644 --- a/packages/valory/skills/subscription_abci/skill.yaml +++ b/packages/valory/skills/subscription_abci/skill.yaml @@ -18,7 +18,7 @@ fingerprint: fingerprint_ignore_patterns: [] connections: [] contracts: -- valory/agent_mech:0.1.0:bafybeih6fyszhp5kloosiqnmim2l4kgj7g6cetbe5fwvzojahm34smjvhu +- valory/agent_mech:0.1.0:bafybeig7zpqhcpt6z4eutedx6prciuq4g7mpadw636zkkcx3ach6oytdry - valory/gnosis_safe:0.1.0:bafybeidll7frtdsq2ckiluazkwk4zpkp7natt4kdejjehwvykqwzyuf6ei - valory/multisend:0.1.0:bafybeig5byt5urg2d2bsecufxe5ql7f4mezg3mekfleeh32nmuusx66p4y protocols: diff --git a/packages/valory/skills/task_execution/behaviours.py b/packages/valory/skills/task_execution/behaviours.py index 82c67389..d3959ea1 100644 --- a/packages/valory/skills/task_execution/behaviours.py +++ b/packages/valory/skills/task_execution/behaviours.py @@ -277,6 +277,7 @@ def _handle_done_task(self, task_result: Any) -> None: """Handle done tasks""" executing_task = cast(Dict[str, Any], self._executing_task) req_id = executing_task.get("requestId", None) + request_id_nonce = executing_task.get("requestIdWithNonce", None) mech_address = executing_task.get("contract_address", None) tool = executing_task.get("tool", None) response = {"requestId": req_id, "result": "Invalid response"} @@ -286,6 +287,7 @@ def _handle_done_task(self, task_result: Any) -> None: "mech_address": mech_address, "task_executor_address": task_executor, "tool": tool, + "request_id_nonce": request_id_nonce, } if task_result is not None: # task succeeded diff --git a/packages/valory/skills/task_execution/skill.yaml b/packages/valory/skills/task_execution/skill.yaml index 2d3f622f..a378bcc8 100644 --- a/packages/valory/skills/task_execution/skill.yaml +++ b/packages/valory/skills/task_execution/skill.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeidqhvvlnthkbnmrdkdeyjyx2f2ab6z4xdgmagh7welqnh2v6wczx4 - behaviours.py: bafybeib6ft3iigddo37zv7iejgzcc4wp3v7ocvwvx2czwzt4jhdyadmluu + behaviours.py: bafybeifa72egwarcmfneqmo3ak6wfygjc3i7hplxl6ptafb263vuaey3fm dialogues.py: bafybeid4zxalqdlo5mw4yfbuf34hx4jp5ay5z6chm4zviwu4cj7fudtwca handlers.py: bafybeidbt5ezj74cgfogk3w4uw4si2grlnk5g54veyumw7g5yh6gdscywu models.py: bafybeihgclxctyltuehj2f4fzj26edptqugrrm4phd6ovuulezrqot6qo4 @@ -20,7 +20,7 @@ connections: - valory/ipfs:0.1.0:bafybeihx7wb5hngjobw2salzqqryrhxvmxfuw7o2npjyqd2talmh2flqeq - valory/p2p_libp2p_client:0.1.0:bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq contracts: -- valory/agent_mech:0.1.0:bafybeih6fyszhp5kloosiqnmim2l4kgj7g6cetbe5fwvzojahm34smjvhu +- valory/agent_mech:0.1.0:bafybeig7zpqhcpt6z4eutedx6prciuq4g7mpadw636zkkcx3ach6oytdry protocols: - valory/acn_data_share:0.1.0:bafybeih5ydonnvrwvy2ygfqgfabkr47s4yw3uqxztmwyfprulwfsoe7ipq - valory/contract_api:1.0.0:bafybeialhbjvwiwcnqq3ysxcyemobcbie7xza66gaofcvla5njezkvhcka diff --git a/packages/valory/skills/task_submission_abci/behaviours.py b/packages/valory/skills/task_submission_abci/behaviours.py index 29fe824e..40885c01 100644 --- a/packages/valory/skills/task_submission_abci/behaviours.py +++ b/packages/valory/skills/task_submission_abci/behaviours.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2023 Valory AG +# Copyright 2023-2024 Valory AG # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -819,6 +819,7 @@ def _get_deliver_tx( contract_callable="get_deliver_data", request_id=task_data["request_id"], data=task_data["task_result"], + request_id_nonce=task_data["request_id_nonce"], ) if ( contract_api_msg.performative != ContractApiMessage.Performative.STATE diff --git a/packages/valory/skills/task_submission_abci/skill.yaml b/packages/valory/skills/task_submission_abci/skill.yaml index 1aa07792..71094b9c 100644 --- a/packages/valory/skills/task_submission_abci/skill.yaml +++ b/packages/valory/skills/task_submission_abci/skill.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeiholqak7ltw6bbmn2c5tn3j7xgzkdlfzp3kcskiqsvmxoih6m4muq - behaviours.py: bafybeig7wngxnzdshonx7fblsy3nbxior6bxu7bfz77rsn5mq2njhxu7ya + behaviours.py: bafybeif74c5ieukt56bgq3ynpwfxdpp36ug2rrejm76vxhuw5r2lqjpsqq dialogues.py: bafybeibmac3m5u5h6ucoyjr4dazay72dyga656wvjl6z6saapluvjo54ne fsm_specification.yaml: bafybeig6bhn554qyou7kef5bstnlv54zke32avyti63uu4hvsol3lzqkoi handlers.py: bafybeibe5n7my2vd2wlwo73sbma65epjqc7kxgtittewlylcmvnmoxtxzq @@ -19,7 +19,7 @@ fingerprint: fingerprint_ignore_patterns: [] connections: [] contracts: -- valory/agent_mech:0.1.0:bafybeih6fyszhp5kloosiqnmim2l4kgj7g6cetbe5fwvzojahm34smjvhu +- valory/agent_mech:0.1.0:bafybeig7zpqhcpt6z4eutedx6prciuq4g7mpadw636zkkcx3ach6oytdry - valory/agent_registry:0.1.0:bafybeiargayav6yiztdnwzejoejstcx4idssch2h4f5arlgtzj3tgsgfmu - valory/gnosis_safe:0.1.0:bafybeidll7frtdsq2ckiluazkwk4zpkp7natt4kdejjehwvykqwzyuf6ei - valory/multisend:0.1.0:bafybeig5byt5urg2d2bsecufxe5ql7f4mezg3mekfleeh32nmuusx66p4y @@ -141,7 +141,6 @@ models: tendermint_url: http://localhost:26657 tx_timeout: 10.0 use_termination: false - manual_gas_limit: 1000000 validate_timeout: 1205 use_slashing: false service_owner_share: 0.1