diff --git a/.gitleaksignore b/.gitleaksignore index e628813c..fc4ff507 100644 --- a/.gitleaksignore +++ b/.gitleaksignore @@ -65,3 +65,9 @@ b655baf97c240fe09ce8c33cb311cb8cc90d181d:scripts/deployment/l2/globals_polygon_m 1b4ec3abe37c5a421a210e8a05a5b958bcc7cfb0:scripts/deployment/l2/globals_gnosis_chiado.json:generic-api-key:2 4bbbf2f312aea50f56a717bdca1dcba20b7c65f7:scripts/deployment/globals_goerli.json:generic-api-key:2 4bbbf2f312aea50f56a717bdca1dcba20b7c65f7:scripts/deployment/l2/globals_gnosis_chiado.json:generic-api-key:2 +e60c98c6953abb0bc2da5e609e4feb0808cdfcd0:scripts/deployment/l2/globals_gnosis_mainnet.json:generic-api-key:20 +e60c98c6953abb0bc2da5e609e4feb0808cdfcd0:scripts/deployment/l2/globals_gnosis_chiado.json:generic-api-key:1 +e60c98c6953abb0bc2da5e609e4feb0808cdfcd0:scripts/deployment/l2/globals_gnosis_chiado.json:generic-api-key:2 +e60c98c6953abb0bc2da5e609e4feb0808cdfcd0:scripts/deployment/l2/globals_gnosis_mainnet.json:generic-api-key:21 +f1e395c1b3dae68fb7a74f9e493d7115d5784bf3:scripts/deployment/globals_mainnet.json:generic-api-key:2 +f1e395c1b3dae68fb7a74f9e493d7115d5784bf3:scripts/deployment/l2/globals_gnosis_mainnet.json:generic-api-key:2 \ No newline at end of file diff --git a/abis/0.8.21/ServiceStakingMechUsage.json b/abis/0.8.21/ServiceStakingMechUsage.json new file mode 100644 index 00000000..4aaa45eb --- /dev/null +++ b/abis/0.8.21/ServiceStakingMechUsage.json @@ -0,0 +1,1028 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ServiceStakingMechUsage", + "sourceName": "contracts/staking/ServiceStakingMechUsage.sol", + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "maxNumServices", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardsPerSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minStakingDeposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "livenessPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "livenessRatio", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numAgentInstances", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "agentIds", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "configHash", + "type": "bytes32" + } + ], + "internalType": "struct ServiceStakingBase.StakingParams", + "name": "_stakingParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_serviceRegistry", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_proxyHash", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_agentMech", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "AgentInstanceRegistered", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "AgentInstancesSlotsFilled", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "agentId", + "type": "uint256" + } + ], + "name": "AgentNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "agentId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "AgentNotInService", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "componentId", + "type": "uint256" + } + ], + "name": "ComponentNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "HashExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "IncorrectAgentBondingValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "IncorrectRegistrationDepositValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "LowerThan", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "manager", + "type": "address" + } + ], + "name": "ManagerOnly", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxNumServices", + "type": "uint256" + } + ], + "name": "MaxNumServicesReached", + "type": "error" + }, + { + "inputs": [], + "name": "NoRewardsAvailable", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "provided", + "type": "address" + }, + { + "internalType": "address", + "name": "expected", + "type": "address" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "OnlyOwnServiceMultisig", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "OperatorHasNoInstances", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "Overflow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnerOnly", + "type": "error" + }, + { + "inputs": [], + "name": "Paused", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuard", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "ServiceMustBeInactive", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "ServiceNotStaked", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "multisig", + "type": "address" + } + ], + "name": "UnauthorizedMultisig", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "agentId", + "type": "uint256" + } + ], + "name": "WrongAgentId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numValues1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numValues2", + "type": "uint256" + } + ], + "name": "WrongArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "WrongOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "WrongServiceConfiguration", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "state", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "WrongServiceState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxThreshold", + "type": "uint256" + } + ], + "name": "WrongThreshold", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroMechAgentAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroValue", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "availableRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "numServices", + "type": "uint256" + } + ], + "name": "Checkpoint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "availableRewards", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "multisig", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "nonces", + "type": "uint256[]" + } + ], + "name": "ServiceStaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "multisig", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "nonces", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "reward", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tsStart", + "type": "uint256" + } + ], + "name": "ServiceUnstaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "agentIds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "agentMech", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "availableRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "calculateServiceStakingReward", + "outputs": [ + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "checkpoint", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[][]", + "name": "", + "type": "uint256[][]" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "configHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "isServiceStaked", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "livenessPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "livenessRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "mapServiceInfo", + "outputs": [ + { + "internalType": "address", + "name": "multisig", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tsStart", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxNumServices", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minStakingDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "numAgentInstances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proxyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardsPerSecond", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "serviceRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "setServiceIds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "threshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tsCheckpoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "unstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x6101e060405234801562000011575f80fd5b50604051620026ab380380620026ab83398101604081905262000034916200039c565b80848484828282825f01515f14806200004f57506020830151155b806200005d57506060830151155b806200006b57506080830151155b8062000079575060a0830151155b156200009857604051637c946ed760e01b815260040160405180910390fd5b600283604001511015620000d457604080840151905163491a2bb160e01b81526004810191909152600260248201526044015b60405180910390fd5b6001600160a01b038216620000fc5760405163d92e233d60e01b815260040160405180910390fd5b82516080908152602084015160a0908152604085015160c052606085015160e09081529185015161010090815290850151610120526001600160a01b038416610180529084015161014052830151610160525f805b8460c00151518110156200023257818560c0015182815181106200017957620001796200048d565b602002602001015111620001c5578460c001518181518110620001a057620001a06200048d565b6020026020010151604051632ab10b0b60e21b8152600401620000cb91815260200190565b8460c001518181518110620001de57620001de6200048d565b6020908102919091010151600380546001810182555f919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0181905591506200022a81620004a1565b905062000151565b50816200025257604051637c946ed760e01b815260040160405180910390fd5b506101a0525050426002555050506001600160a01b038116620002875760405162ca95f960e81b815260040160405180910390fd5b6001600160a01b03166101c05250620004c692505050565b634e487b7160e01b5f52604160045260245ffd5b60405161012081016001600160401b0381118282101715620002d957620002d96200029f565b60405290565b5f82601f830112620002ef575f80fd5b815160206001600160401b03808311156200030e576200030e6200029f565b8260051b604051601f19603f830116810181811084821117156200033657620003366200029f565b60405293845285810183019383810192508785111562000354575f80fd5b83870191505b8482101562000375578151835291830191908301906200035a565b979650505050505050565b80516001600160a01b038116811462000397575f80fd5b919050565b5f805f8060808587031215620003b0575f80fd5b84516001600160401b0380821115620003c7575f80fd5b908601906101208289031215620003dc575f80fd5b620003e6620002b3565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c0830151828111156200042e575f80fd5b6200043c8a828601620002df565b60c08301525060e0838101519082015261010092830151928101929092525093506200046b6020860162000380565b925060408501519150620004826060860162000380565b905092959194509250565b634e487b7160e01b5f52603260045260245ffd5b5f60018201620004bf57634e487b7160e01b5f52601160045260245ffd5b5060010190565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516120f4620005b75f395f81816103d3015261193301525f818161043d0152610e0801525f8181610558015281816108a901528181610bcb015261100501525f81816105cb01528181610c8f0152610cbe01525f81816102e801528181610d040152610d3801525f818161036d0152610c4d01525f81816103a00152611af001525f818161031b015261150b01525f81816105fe015281816117e6015261182201525f8181610631015261172d01525f818161027101528181610b530152610b8701526120f45ff3fe608060405260043610610186575f3560e01c8063879d9090116100d1578063cd25fe381161007c578063eacdaabc11610057578063eacdaabc14610620578063eb338c9614610653578063ffa1ad7414610672575f80fd5b8063cd25fe381461057a578063e1f1176d146105ba578063e77cdcc9146105ed575f80fd5b8063b69ef8a8116100ac578063b69ef8a81461050d578063c2c4c5c114610521578063cbcf252a14610547575f80fd5b8063879d90901461045f578063a694fc3a14610474578063a74466ad14610493575f80fd5b806356e760581161013157806375af4b6d1161010c57806375af4b6d146103c257806378e061361461040d578063809cee2f1461042c575f80fd5b806356e760581461033d5780635829c5ec1461035c578063592cf3fb1461038f575f80fd5b80633e732997116101615780633e732997146102c257806342cde4e8146102d757806352c824f51461030a575f80fd5b8063150b7a02146101ff57806316a75172146102605780632e17de78146102a1575f80fd5b366101fb575f345f546101999190611bae565b90505f346001546101aa9190611bae565b5f8390556001819055604080513481526020810185905290810182905290915033907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2005b5f80fd5b34801561020a575f80fd5b5061022a610219366004611bd5565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561026b575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610257565b3480156102ac575f80fd5b506102c06102bb366004611c6c565b6106af565b005b3480156102cd575f80fd5b5061029360025481565b3480156102e2575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b348015610315575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b348015610348575f80fd5b50610293610357366004611c6c565b61096c565b348015610367575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b34801561039a575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b3480156103cd575f80fd5b506103f57f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610257565b348015610418575f80fd5b50610293610427366004611c6c565b61098b565b348015610437575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b34801561046a575f80fd5b5061029360015481565b34801561047f575f80fd5b506102c061048e366004611c6c565b610b2c565b34801561049e575f80fd5b506104e26104ad366004611c6c565b600460208190525f918252604090912080546001820154600383015492909301546001600160a01b0391821693909116919084565b604080516001600160a01b039586168152949093166020850152918301526060820152608001610257565b348015610518575f80fd5b506102935f5481565b34801561052c575f80fd5b506105356110bd565b60405161025796959493929190611cbc565b348015610552575f80fd5b506103f57f000000000000000000000000000000000000000000000000000000000000000081565b348015610585575f80fd5b506105aa610594366004611c6c565b5f90815260046020526040902060030154151590565b6040519015158152602001610257565b3480156105c5575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f8575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b34801561062b575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b34801561065e575f80fd5b5061029361066d366004611c6c565b6113a5565b34801561067d575f80fd5b506106a2604051806040016040528060058152602001640302e312e360dc1b81525081565b6040516102579190611d92565b5f81815260046020526040902060018101546001600160a01b0316331461070557600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b5f61070e6110bd565b505050505090505f5b8151811015610751578382828151811061073357610733611ddd565b602002602001015103156107515761074a81611df1565b9050610717565b6004830154600284018054604080516020808402820181019092528281525f93909290918301828280156107a257602002820191905f5260205f20905b81548152602001906001019080831161078e575b505050600388015488545f8b8152600460205260408120805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018054909116905595965091946001600160a01b03909116935091506108026002830182611b1f565b505f600382018190556004909101556005805461082190600190611e09565b8154811061083157610831611ddd565b905f5260205f2001546005868154811061084d5761084d611ddd565b5f91825260209091200155600580548061086957610869611e1c565b5f8281526020812082015f1990810191909155019055604051632142170760e11b8152306004820152336024820152604481018990526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e906064015f604051808303815f87803b1580156108ea575f80fd5b505af11580156108fc573d5f803e3d5ffd5b505050505f8411156109125761091281856113b4565b806001600160a01b0316336001600160a01b0316897f246ee6115bfd84e00097b16569c2ff2f822026bb9595a82cd2c1e69d4b6ea50c86888760405161095a93929190611e30565b60405180910390a45050505050505050565b6003818154811061097b575f80fd5b5f91825260209091200154905081565b5f818152600460209081526040808320815160a08101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181528796939586019390929190830182828015610a0857602002820191905f5260205f20905b8154815260200190600101908083116109f4575b505050505081526020016003820154815260200160048201548152505090508060800151915080606001515f03610a555760405163e0606b6360e01b8152600481018490526024016106fc565b5f805f805f610a6261145b565b5050945094509450945094505f841115610b21575f5b8251811015610b1f5788838281518110610a9457610a94611ddd565b602002602001015103610b0f5785841115610aea578386838381518110610abd57610abd611ddd565b6020026020010151610acf9190611e54565b610ad99190611e6b565b610ae39089611bae565b9750610b1f565b818181518110610afc57610afc611ddd565b602002602001015188610ae39190611bae565b610b1881611df1565b9050610a78565b505b505050505050919050565b6001545f03610b4e5760405163afb0be3360e01b815260040160405180910390fd5b6005547f00000000000000000000000000000000000000000000000000000000000000008103610bb35760405163fd20861560e01b81527f000000000000000000000000000000000000000000000000000000000000000060048201526024016106fc565b60405163ef0e239b60e01b8152600481018390525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b906024015f60405180830381865afa158015610c17573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610c3e9190810190611fa8565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610c8d57604051637ad404bf60e11b8152600481018490526024016106fc565b7f000000000000000000000000000000000000000000000000000000000000000015801590610ce0575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b15610d0157604051637ad404bf60e11b8152600481018490526024016106fc565b5f7f0000000000000000000000000000000000000000000000000000000000000000118015610d5a5750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b15610d7b57604051637ad404bf60e11b8152600481018490526024016106fc565b60048160c001516005811115610d9357610d93612081565b14610dd2578060c001516005811115610dae57610dae612081565b604051633c053f9d60e21b81526004810191909152602481018490526044016106fc565b5f81602001516001600160a01b0316803b806020016040519081016040528181525f908060200190933c805190602001209050807f000000000000000000000000000000000000000000000000000000000000000014610e5557602082015160405162a2307960e51b81526001600160a01b0390911660048201526024016106fc565b6003548015610f215760e083015151818114610e8757604051637ad404bf60e11b8152600481018790526024016106fc565b5f5b81811015610f1e578460e001518181518110610ea757610ea7611ddd565b602002602001015163ffffffff1660038281548110610ec857610ec8611ddd565b905f5260205f20015414610f0e5760038181548110610ee957610ee9611ddd565b905f5260205f200154604051632ab10b0b60e21b81526004016106fc91815260200190565b610f1781611df1565b9050610e89565b50505b610f3c85845f01516bffffffffffffffffffffffff166117e4565b5f85815260046020908152604082209085015181546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff1991821617835560018301805490911633179055909190610f9090611852565b8051909150610fa89060028401906020840190611b3d565b50426003830155600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e906064015f604051808303815f87803b15801561104e575f80fd5b505af1158015611060573d5f803e3d5ffd5b5050505084602001516001600160a01b0316336001600160a01b0316887f5d43ac9b1b213902df90d405b0006308578486b6c62182c5df202ed572c844e4846040516110ac9190612095565b60405180910390a450505050505050565b6060805f6060805f805f805f805f806110d461145b565b96509650965096509650965096505f8611156112ca575f8786111561123d575f8060015b8981101561119357888b88838151811061111457611114611ddd565b60200260200101516111269190611e54565b6111309190611e6b565b925061113c8383611bae565b915087818151811061115057611150611ddd565b602002602001015193508260045f8681526020019081526020015f206004015f82825461117d9190611bae565b9091555061118c905081611df1565b90506110f8565b50878a875f815181106111a8576111a8611ddd565b60200260200101516111ba9190611e54565b6111c49190611e6b565b91506111d08282611bae565b9050865f815181106111e4576111e4611ddd565b60200260200101519250808a111561120d57611200818b611e09565b61120a9083611bae565b91505b5f838152600460208190526040822001805484929061122d908490611bae565b909155505f9a506112c392505050565b5f5b878110156112b55785818151811061125957611259611ddd565b6020026020010151915084818151811061127557611275611ddd565b602002602001015160045f8481526020019081526020015f206004015f82825461129f9190611bae565b909155506112ae905081611df1565b905061123f565b506112c08689611e09565b97505b5060018790555b805115611390575f5b825181101561134d575f8382815181106112ef576112ef611ddd565b6020026020010151905082828151811061130b5761130b611ddd565b602002602001015160045f8381526020019081526020015f20600201908051906020019061133a929190611b3d565b50508061134690611df1565b90506112d3565b50426002556040805188815260208101889052600199507f21d81d5d656869e8ce3ba8d65526a2f0dbbcd3d36f5f9999eb7c84360e45eced910160405180910390a15b909c909b509399509097509550929350915050565b6005818154811061097b575f80fd5b805f808282546113c49190611e09565b90915550506040515f906001600160a01b0384169083908381818185875af1925050503d805f8114611411576040519150601f19603f3d011682016040523d82523d5f602084013e611416565b606091505b50509050806114565760405163cd3f165960e01b81525f60048201523060248201526001600160a01b0384166044820152606481018390526084016106fc565b505050565b5f805f6060806060805f60058054905090508067ffffffffffffffff81111561148657611486611e8a565b6040519080825280602002602001820160405280156114af578160200160208202803683370190505b5092505f5b8181101561150557600581815481106114cf576114cf611ddd565b905f5260205f2001548482815181106114ea576114ea611ddd565b60209081029190910101526114fe81611df1565b90506114b4565b506002547f00000000000000000000000000000000000000000000000000000000000000006115348242611e09565b106117d957600154985088156117d9578167ffffffffffffffff81111561155d5761155d611e8a565b604051908082528060200260200182016040528015611586578160200160208202803683370190505b5095508167ffffffffffffffff8111156115a2576115a2611e8a565b6040519080825280602002602001820160405280156115cb578160200160208202803683370190505b5094508167ffffffffffffffff8111156115e7576115e7611e8a565b60405190808252806020026020018201604052801561161a57816020015b60608152602001906001900390816116055790505b5092505f5b828110156117d7575f60045f87848151811061163d5761163d611ddd565b60209081029190910181015182528101919091526040015f20805490915061166d906001600160a01b0316611852565b85838151811061167f5761167f611ddd565b6020908102919091010152600381015483908181111561169d578091505b6116a78242611e09565b90505f61171e8886815181106116bf576116bf611ddd565b60200260200101518560020180548060200260200160405190810160405280929190818152602001828054801561171357602002820191905f5260205f20905b8154815260200190600101908083116116ff575b505050505084611863565b905080156117c2575f611751837f0000000000000000000000000000000000000000000000000000000000000000611e54565b905061175d818e611bae565b9c50808b8f8151811061177257611772611ddd565b60200260200101818152505089868151811061179057611790611ddd565b60200260200101518c8f815181106117aa576117aa611ddd565b60209081029190910101526117be8e611df1565b9d50505b50505050806117d090611df1565b905061161f565b505b505090919293949596565b7f000000000000000000000000000000000000000000000000000000000000000081101561184e5760405163491a2bb160e01b8152600481018290527f000000000000000000000000000000000000000000000000000000000000000060248201526044016106fc565b5050565b606061185d82611877565b92915050565b5f61186f8484846119c0565b949350505050565b6040805160028082526060808301845292602083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118d3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118f791906120a7565b815f8151811061190957611909611ddd565b6020908102919091010152604051637af7347360e01b81526001600160a01b0383811660048301527f00000000000000000000000000000000000000000000000000000000000000001690637af7347390602401602060405180830381865afa158015611978573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061199c91906120a7565b816001815181106119af576119af611ddd565b602002602001018181525050919050565b5f8082118015611a015750825f815181106119dd576119dd611ddd565b6020026020010151845f815181106119f7576119f7611ddd565b6020026020010151115b8015611a40575082600181518110611a1b57611a1b611ddd565b602002602001015184600181518110611a3657611a36611ddd565b6020026020010151115b15611b18575f835f81518110611a5857611a58611ddd565b6020026020010151855f81518110611a7257611a72611ddd565b6020026020010151611a849190611e09565b90505f84600181518110611a9a57611a9a611ddd565b602002602001015186600181518110611ab557611ab5611ddd565b6020026020010151611ac79190611e09565b9050818111611b15575f84611ae483670de0b6b3a7640000611e54565b611aee9190611e6b565b7f000000000000000000000000000000000000000000000000000000000000000011159350505b50505b9392505050565b5080545f8255905f5260205f2090810190611b3a9190611b86565b50565b828054828255905f5260205f20908101928215611b76579160200282015b82811115611b76578251825591602001919060010190611b5b565b50611b82929150611b86565b5090565b5b80821115611b82575f8155600101611b87565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561185d5761185d611b9a565b6001600160a01b0381168114611b3a575f80fd5b5f805f805f60808688031215611be9575f80fd5b8535611bf481611bc1565b94506020860135611c0481611bc1565b935060408601359250606086013567ffffffffffffffff80821115611c27575f80fd5b818801915088601f830112611c3a575f80fd5b813581811115611c48575f80fd5b896020828501011115611c59575f80fd5b9699959850939650602001949392505050565b5f60208284031215611c7c575f80fd5b5035919050565b5f8151808452602080850194508084015f5b83811015611cb157815187529582019590820190600101611c95565b509495945050505050565b60c081525f611cce60c0830189611c83565b6020838203818501528189518084528284019150828160051b850101838c015f805b84811015611d4357878403601f19018652825180518086529088019088860190845b81811015611d2e5783518352928a0192918a0191600101611d12565b50509688019694505091860191600101611cf0565b5050508a60408801528681036060880152611d5e818b611c83565b9450505050508281036080840152611d768186611c83565b915050611d8760a083018415159052565b979650505050505050565b5f6020808352835180828501525f5b81811015611dbd57858101830151858201604001528201611da1565b505f604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b5f52603260045260245ffd5b5f60018201611e0257611e02611b9a565b5060010190565b8181038181111561185d5761185d611b9a565b634e487b7160e01b5f52603160045260245ffd5b606081525f611e426060830186611c83565b60208301949094525060400152919050565b808202811582820484141761185d5761185d611b9a565b5f82611e8557634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52604160045260245ffd5b604051610100810167ffffffffffffffff81118282101715611ec257611ec2611e8a565b60405290565b80516bffffffffffffffffffffffff81168114611ee3575f80fd5b919050565b8051611ee381611bc1565b805163ffffffff81168114611ee3575f80fd5b805160068110611ee3575f80fd5b5f82601f830112611f23575f80fd5b8151602067ffffffffffffffff80831115611f4057611f40611e8a565b8260051b604051601f19603f83011681018181108482111715611f6557611f65611e8a565b604052938452858101830193838101925087851115611f82575f80fd5b83870191505b84821015611d8757611f9982611ef3565b83529183019190830190611f88565b5f60208284031215611fb8575f80fd5b815167ffffffffffffffff80821115611fcf575f80fd5b908301906101008286031215611fe3575f80fd5b611feb611e9e565b611ff483611ec8565b815261200260208401611ee8565b60208201526040830151604082015261201d60608401611ef3565b606082015261202e60808401611ef3565b608082015261203f60a08401611ef3565b60a082015261205060c08401611f06565b60c082015260e083015182811115612066575f80fd5b61207287828601611f14565b60e08301525095945050505050565b634e487b7160e01b5f52602160045260245ffd5b602081525f611b186020830184611c83565b5f602082840312156120b7575f80fd5b505191905056fea26469706673582212209fa34cdd93a4f652771ea27455eff3fbba2015d4998ab933fee9b65e99c3959f64736f6c63430008150033", + "deployedBytecode": "0x608060405260043610610186575f3560e01c8063879d9090116100d1578063cd25fe381161007c578063eacdaabc11610057578063eacdaabc14610620578063eb338c9614610653578063ffa1ad7414610672575f80fd5b8063cd25fe381461057a578063e1f1176d146105ba578063e77cdcc9146105ed575f80fd5b8063b69ef8a8116100ac578063b69ef8a81461050d578063c2c4c5c114610521578063cbcf252a14610547575f80fd5b8063879d90901461045f578063a694fc3a14610474578063a74466ad14610493575f80fd5b806356e760581161013157806375af4b6d1161010c57806375af4b6d146103c257806378e061361461040d578063809cee2f1461042c575f80fd5b806356e760581461033d5780635829c5ec1461035c578063592cf3fb1461038f575f80fd5b80633e732997116101615780633e732997146102c257806342cde4e8146102d757806352c824f51461030a575f80fd5b8063150b7a02146101ff57806316a75172146102605780632e17de78146102a1575f80fd5b366101fb575f345f546101999190611bae565b90505f346001546101aa9190611bae565b5f8390556001819055604080513481526020810185905290810182905290915033907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2005b5f80fd5b34801561020a575f80fd5b5061022a610219366004611bd5565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561026b575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610257565b3480156102ac575f80fd5b506102c06102bb366004611c6c565b6106af565b005b3480156102cd575f80fd5b5061029360025481565b3480156102e2575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b348015610315575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b348015610348575f80fd5b50610293610357366004611c6c565b61096c565b348015610367575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b34801561039a575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b3480156103cd575f80fd5b506103f57f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610257565b348015610418575f80fd5b50610293610427366004611c6c565b61098b565b348015610437575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b34801561046a575f80fd5b5061029360015481565b34801561047f575f80fd5b506102c061048e366004611c6c565b610b2c565b34801561049e575f80fd5b506104e26104ad366004611c6c565b600460208190525f918252604090912080546001820154600383015492909301546001600160a01b0391821693909116919084565b604080516001600160a01b039586168152949093166020850152918301526060820152608001610257565b348015610518575f80fd5b506102935f5481565b34801561052c575f80fd5b506105356110bd565b60405161025796959493929190611cbc565b348015610552575f80fd5b506103f57f000000000000000000000000000000000000000000000000000000000000000081565b348015610585575f80fd5b506105aa610594366004611c6c565b5f90815260046020526040902060030154151590565b6040519015158152602001610257565b3480156105c5575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f8575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b34801561062b575f80fd5b506102937f000000000000000000000000000000000000000000000000000000000000000081565b34801561065e575f80fd5b5061029361066d366004611c6c565b6113a5565b34801561067d575f80fd5b506106a2604051806040016040528060058152602001640302e312e360dc1b81525081565b6040516102579190611d92565b5f81815260046020526040902060018101546001600160a01b0316331461070557600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b5f61070e6110bd565b505050505090505f5b8151811015610751578382828151811061073357610733611ddd565b602002602001015103156107515761074a81611df1565b9050610717565b6004830154600284018054604080516020808402820181019092528281525f93909290918301828280156107a257602002820191905f5260205f20905b81548152602001906001019080831161078e575b505050600388015488545f8b8152600460205260408120805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018054909116905595965091946001600160a01b03909116935091506108026002830182611b1f565b505f600382018190556004909101556005805461082190600190611e09565b8154811061083157610831611ddd565b905f5260205f2001546005868154811061084d5761084d611ddd565b5f91825260209091200155600580548061086957610869611e1c565b5f8281526020812082015f1990810191909155019055604051632142170760e11b8152306004820152336024820152604481018990526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e906064015f604051808303815f87803b1580156108ea575f80fd5b505af11580156108fc573d5f803e3d5ffd5b505050505f8411156109125761091281856113b4565b806001600160a01b0316336001600160a01b0316897f246ee6115bfd84e00097b16569c2ff2f822026bb9595a82cd2c1e69d4b6ea50c86888760405161095a93929190611e30565b60405180910390a45050505050505050565b6003818154811061097b575f80fd5b5f91825260209091200154905081565b5f818152600460209081526040808320815160a08101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181528796939586019390929190830182828015610a0857602002820191905f5260205f20905b8154815260200190600101908083116109f4575b505050505081526020016003820154815260200160048201548152505090508060800151915080606001515f03610a555760405163e0606b6360e01b8152600481018490526024016106fc565b5f805f805f610a6261145b565b5050945094509450945094505f841115610b21575f5b8251811015610b1f5788838281518110610a9457610a94611ddd565b602002602001015103610b0f5785841115610aea578386838381518110610abd57610abd611ddd565b6020026020010151610acf9190611e54565b610ad99190611e6b565b610ae39089611bae565b9750610b1f565b818181518110610afc57610afc611ddd565b602002602001015188610ae39190611bae565b610b1881611df1565b9050610a78565b505b505050505050919050565b6001545f03610b4e5760405163afb0be3360e01b815260040160405180910390fd5b6005547f00000000000000000000000000000000000000000000000000000000000000008103610bb35760405163fd20861560e01b81527f000000000000000000000000000000000000000000000000000000000000000060048201526024016106fc565b60405163ef0e239b60e01b8152600481018390525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b906024015f60405180830381865afa158015610c17573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610c3e9190810190611fa8565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610c8d57604051637ad404bf60e11b8152600481018490526024016106fc565b7f000000000000000000000000000000000000000000000000000000000000000015801590610ce0575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b15610d0157604051637ad404bf60e11b8152600481018490526024016106fc565b5f7f0000000000000000000000000000000000000000000000000000000000000000118015610d5a5750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b15610d7b57604051637ad404bf60e11b8152600481018490526024016106fc565b60048160c001516005811115610d9357610d93612081565b14610dd2578060c001516005811115610dae57610dae612081565b604051633c053f9d60e21b81526004810191909152602481018490526044016106fc565b5f81602001516001600160a01b0316803b806020016040519081016040528181525f908060200190933c805190602001209050807f000000000000000000000000000000000000000000000000000000000000000014610e5557602082015160405162a2307960e51b81526001600160a01b0390911660048201526024016106fc565b6003548015610f215760e083015151818114610e8757604051637ad404bf60e11b8152600481018790526024016106fc565b5f5b81811015610f1e578460e001518181518110610ea757610ea7611ddd565b602002602001015163ffffffff1660038281548110610ec857610ec8611ddd565b905f5260205f20015414610f0e5760038181548110610ee957610ee9611ddd565b905f5260205f200154604051632ab10b0b60e21b81526004016106fc91815260200190565b610f1781611df1565b9050610e89565b50505b610f3c85845f01516bffffffffffffffffffffffff166117e4565b5f85815260046020908152604082209085015181546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff1991821617835560018301805490911633179055909190610f9090611852565b8051909150610fa89060028401906020840190611b3d565b50426003830155600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e906064015f604051808303815f87803b15801561104e575f80fd5b505af1158015611060573d5f803e3d5ffd5b5050505084602001516001600160a01b0316336001600160a01b0316887f5d43ac9b1b213902df90d405b0006308578486b6c62182c5df202ed572c844e4846040516110ac9190612095565b60405180910390a450505050505050565b6060805f6060805f805f805f805f806110d461145b565b96509650965096509650965096505f8611156112ca575f8786111561123d575f8060015b8981101561119357888b88838151811061111457611114611ddd565b60200260200101516111269190611e54565b6111309190611e6b565b925061113c8383611bae565b915087818151811061115057611150611ddd565b602002602001015193508260045f8681526020019081526020015f206004015f82825461117d9190611bae565b9091555061118c905081611df1565b90506110f8565b50878a875f815181106111a8576111a8611ddd565b60200260200101516111ba9190611e54565b6111c49190611e6b565b91506111d08282611bae565b9050865f815181106111e4576111e4611ddd565b60200260200101519250808a111561120d57611200818b611e09565b61120a9083611bae565b91505b5f838152600460208190526040822001805484929061122d908490611bae565b909155505f9a506112c392505050565b5f5b878110156112b55785818151811061125957611259611ddd565b6020026020010151915084818151811061127557611275611ddd565b602002602001015160045f8481526020019081526020015f206004015f82825461129f9190611bae565b909155506112ae905081611df1565b905061123f565b506112c08689611e09565b97505b5060018790555b805115611390575f5b825181101561134d575f8382815181106112ef576112ef611ddd565b6020026020010151905082828151811061130b5761130b611ddd565b602002602001015160045f8381526020019081526020015f20600201908051906020019061133a929190611b3d565b50508061134690611df1565b90506112d3565b50426002556040805188815260208101889052600199507f21d81d5d656869e8ce3ba8d65526a2f0dbbcd3d36f5f9999eb7c84360e45eced910160405180910390a15b909c909b509399509097509550929350915050565b6005818154811061097b575f80fd5b805f808282546113c49190611e09565b90915550506040515f906001600160a01b0384169083908381818185875af1925050503d805f8114611411576040519150601f19603f3d011682016040523d82523d5f602084013e611416565b606091505b50509050806114565760405163cd3f165960e01b81525f60048201523060248201526001600160a01b0384166044820152606481018390526084016106fc565b505050565b5f805f6060806060805f60058054905090508067ffffffffffffffff81111561148657611486611e8a565b6040519080825280602002602001820160405280156114af578160200160208202803683370190505b5092505f5b8181101561150557600581815481106114cf576114cf611ddd565b905f5260205f2001548482815181106114ea576114ea611ddd565b60209081029190910101526114fe81611df1565b90506114b4565b506002547f00000000000000000000000000000000000000000000000000000000000000006115348242611e09565b106117d957600154985088156117d9578167ffffffffffffffff81111561155d5761155d611e8a565b604051908082528060200260200182016040528015611586578160200160208202803683370190505b5095508167ffffffffffffffff8111156115a2576115a2611e8a565b6040519080825280602002602001820160405280156115cb578160200160208202803683370190505b5094508167ffffffffffffffff8111156115e7576115e7611e8a565b60405190808252806020026020018201604052801561161a57816020015b60608152602001906001900390816116055790505b5092505f5b828110156117d7575f60045f87848151811061163d5761163d611ddd565b60209081029190910181015182528101919091526040015f20805490915061166d906001600160a01b0316611852565b85838151811061167f5761167f611ddd565b6020908102919091010152600381015483908181111561169d578091505b6116a78242611e09565b90505f61171e8886815181106116bf576116bf611ddd565b60200260200101518560020180548060200260200160405190810160405280929190818152602001828054801561171357602002820191905f5260205f20905b8154815260200190600101908083116116ff575b505050505084611863565b905080156117c2575f611751837f0000000000000000000000000000000000000000000000000000000000000000611e54565b905061175d818e611bae565b9c50808b8f8151811061177257611772611ddd565b60200260200101818152505089868151811061179057611790611ddd565b60200260200101518c8f815181106117aa576117aa611ddd565b60209081029190910101526117be8e611df1565b9d50505b50505050806117d090611df1565b905061161f565b505b505090919293949596565b7f000000000000000000000000000000000000000000000000000000000000000081101561184e5760405163491a2bb160e01b8152600481018290527f000000000000000000000000000000000000000000000000000000000000000060248201526044016106fc565b5050565b606061185d82611877565b92915050565b5f61186f8484846119c0565b949350505050565b6040805160028082526060808301845292602083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118d3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118f791906120a7565b815f8151811061190957611909611ddd565b6020908102919091010152604051637af7347360e01b81526001600160a01b0383811660048301527f00000000000000000000000000000000000000000000000000000000000000001690637af7347390602401602060405180830381865afa158015611978573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061199c91906120a7565b816001815181106119af576119af611ddd565b602002602001018181525050919050565b5f8082118015611a015750825f815181106119dd576119dd611ddd565b6020026020010151845f815181106119f7576119f7611ddd565b6020026020010151115b8015611a40575082600181518110611a1b57611a1b611ddd565b602002602001015184600181518110611a3657611a36611ddd565b6020026020010151115b15611b18575f835f81518110611a5857611a58611ddd565b6020026020010151855f81518110611a7257611a72611ddd565b6020026020010151611a849190611e09565b90505f84600181518110611a9a57611a9a611ddd565b602002602001015186600181518110611ab557611ab5611ddd565b6020026020010151611ac79190611e09565b9050818111611b15575f84611ae483670de0b6b3a7640000611e54565b611aee9190611e6b565b7f000000000000000000000000000000000000000000000000000000000000000011159350505b50505b9392505050565b5080545f8255905f5260205f2090810190611b3a9190611b86565b50565b828054828255905f5260205f20908101928215611b76579160200282015b82811115611b76578251825591602001919060010190611b5b565b50611b82929150611b86565b5090565b5b80821115611b82575f8155600101611b87565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561185d5761185d611b9a565b6001600160a01b0381168114611b3a575f80fd5b5f805f805f60808688031215611be9575f80fd5b8535611bf481611bc1565b94506020860135611c0481611bc1565b935060408601359250606086013567ffffffffffffffff80821115611c27575f80fd5b818801915088601f830112611c3a575f80fd5b813581811115611c48575f80fd5b896020828501011115611c59575f80fd5b9699959850939650602001949392505050565b5f60208284031215611c7c575f80fd5b5035919050565b5f8151808452602080850194508084015f5b83811015611cb157815187529582019590820190600101611c95565b509495945050505050565b60c081525f611cce60c0830189611c83565b6020838203818501528189518084528284019150828160051b850101838c015f805b84811015611d4357878403601f19018652825180518086529088019088860190845b81811015611d2e5783518352928a0192918a0191600101611d12565b50509688019694505091860191600101611cf0565b5050508a60408801528681036060880152611d5e818b611c83565b9450505050508281036080840152611d768186611c83565b915050611d8760a083018415159052565b979650505050505050565b5f6020808352835180828501525f5b81811015611dbd57858101830151858201604001528201611da1565b505f604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b5f52603260045260245ffd5b5f60018201611e0257611e02611b9a565b5060010190565b8181038181111561185d5761185d611b9a565b634e487b7160e01b5f52603160045260245ffd5b606081525f611e426060830186611c83565b60208301949094525060400152919050565b808202811582820484141761185d5761185d611b9a565b5f82611e8557634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52604160045260245ffd5b604051610100810167ffffffffffffffff81118282101715611ec257611ec2611e8a565b60405290565b80516bffffffffffffffffffffffff81168114611ee3575f80fd5b919050565b8051611ee381611bc1565b805163ffffffff81168114611ee3575f80fd5b805160068110611ee3575f80fd5b5f82601f830112611f23575f80fd5b8151602067ffffffffffffffff80831115611f4057611f40611e8a565b8260051b604051601f19603f83011681018181108482111715611f6557611f65611e8a565b604052938452858101830193838101925087851115611f82575f80fd5b83870191505b84821015611d8757611f9982611ef3565b83529183019190830190611f88565b5f60208284031215611fb8575f80fd5b815167ffffffffffffffff80821115611fcf575f80fd5b908301906101008286031215611fe3575f80fd5b611feb611e9e565b611ff483611ec8565b815261200260208401611ee8565b60208201526040830151604082015261201d60608401611ef3565b606082015261202e60808401611ef3565b608082015261203f60a08401611ef3565b60a082015261205060c08401611f06565b60c082015260e083015182811115612066575f80fd5b61207287828601611f14565b60e08301525095945050505050565b634e487b7160e01b5f52602160045260245ffd5b602081525f611b186020830184611c83565b5f602082840312156120b7575f80fd5b505191905056fea26469706673582212209fa34cdd93a4f652771ea27455eff3fbba2015d4998ab933fee9b65e99c3959f64736f6c63430008150033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/abis/0.8.21/ServiceStakingNativeToken.json b/abis/0.8.21/ServiceStakingNativeToken.json new file mode 100644 index 00000000..641a6059 --- /dev/null +++ b/abis/0.8.21/ServiceStakingNativeToken.json @@ -0,0 +1,1005 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ServiceStakingNativeToken", + "sourceName": "contracts/staking/ServiceStakingNativeToken.sol", + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "maxNumServices", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardsPerSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minStakingDeposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "livenessPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "livenessRatio", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numAgentInstances", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "agentIds", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "configHash", + "type": "bytes32" + } + ], + "internalType": "struct ServiceStakingBase.StakingParams", + "name": "_stakingParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_serviceRegistry", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_proxyHash", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "AgentInstanceRegistered", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "AgentInstancesSlotsFilled", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "agentId", + "type": "uint256" + } + ], + "name": "AgentNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "agentId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "AgentNotInService", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "componentId", + "type": "uint256" + } + ], + "name": "ComponentNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "HashExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "IncorrectAgentBondingValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "IncorrectRegistrationDepositValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "LowerThan", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "manager", + "type": "address" + } + ], + "name": "ManagerOnly", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxNumServices", + "type": "uint256" + } + ], + "name": "MaxNumServicesReached", + "type": "error" + }, + { + "inputs": [], + "name": "NoRewardsAvailable", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "provided", + "type": "address" + }, + { + "internalType": "address", + "name": "expected", + "type": "address" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "OnlyOwnServiceMultisig", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "OperatorHasNoInstances", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "Overflow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnerOnly", + "type": "error" + }, + { + "inputs": [], + "name": "Paused", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuard", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "ServiceMustBeInactive", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "ServiceNotStaked", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "multisig", + "type": "address" + } + ], + "name": "UnauthorizedMultisig", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "agentId", + "type": "uint256" + } + ], + "name": "WrongAgentId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numValues1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numValues2", + "type": "uint256" + } + ], + "name": "WrongArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "WrongOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "WrongServiceConfiguration", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "state", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "WrongServiceState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxThreshold", + "type": "uint256" + } + ], + "name": "WrongThreshold", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroValue", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "availableRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "numServices", + "type": "uint256" + } + ], + "name": "Checkpoint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "availableRewards", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "multisig", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "nonces", + "type": "uint256[]" + } + ], + "name": "ServiceStaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "multisig", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "nonces", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "reward", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tsStart", + "type": "uint256" + } + ], + "name": "ServiceUnstaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "agentIds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "availableRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "calculateServiceStakingReward", + "outputs": [ + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "checkpoint", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[][]", + "name": "", + "type": "uint256[][]" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "configHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "isServiceStaked", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "livenessPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "livenessRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "mapServiceInfo", + "outputs": [ + { + "internalType": "address", + "name": "multisig", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tsStart", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxNumServices", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minStakingDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "numAgentInstances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proxyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardsPerSecond", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "serviceRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "setServiceIds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "threshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tsCheckpoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "unstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x6101c060405234801562000011575f80fd5b50604051620024da380380620024da833981016040819052620000349162000360565b828282825f01515f14806200004b57506020830151155b806200005957506060830151155b806200006757506080830151155b8062000075575060a0830151155b156200009457604051637c946ed760e01b815260040160405180910390fd5b600283604001511015620000d057604080840151905163491a2bb160e01b81526004810191909152600260248201526044015b60405180910390fd5b6001600160a01b038216620000f85760405163d92e233d60e01b815260040160405180910390fd5b82516080908152602084015160a0908152604085015160c052606085015160e09081529185015161010090815290850151610120526001600160a01b038416610180529084015161014052830151610160525f805b8460c00151518110156200022e57818560c0015182815181106200017557620001756200043e565b602002602001015111620001c1578460c0015181815181106200019c576200019c6200043e565b6020026020010151604051632ab10b0b60e21b8152600401620000c791815260200190565b8460c001518181518110620001da57620001da6200043e565b6020908102919091010151600380546001810182555f919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b018190559150620002268162000452565b90506200014d565b50816200024e57604051637c946ed760e01b815260040160405180910390fd5b506101a0525050426002555062000477915050565b634e487b7160e01b5f52604160045260245ffd5b60405161012081016001600160401b03811182821017156200029d576200029d62000263565b60405290565b5f82601f830112620002b3575f80fd5b815160206001600160401b0380831115620002d257620002d262000263565b8260051b604051601f19603f83011681018181108482111715620002fa57620002fa62000263565b60405293845285810183019383810192508785111562000318575f80fd5b83870191505b8482101562000339578151835291830191908301906200031e565b979650505050505050565b80516001600160a01b03811681146200035b575f80fd5b919050565b5f805f6060848603121562000373575f80fd5b83516001600160401b03808211156200038a575f80fd5b9085019061012082880312156200039f575f80fd5b620003a962000277565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115620003f1575f80fd5b620003ff89828601620002a3565b60c08301525060e0838101519082015261010092830151928101929092525092506200042e6020850162000344565b9150604084015190509250925092565b634e487b7160e01b5f52603260045260245ffd5b5f600182016200047057634e487b7160e01b5f52601160045260245ffd5b5060010190565b60805160a05160c05160e05161010051610120516101405161016051610180516101a051611f83620005575f395f81816103e70152610dca01525f81816105020152818161086b01528181610b8d0152610fc701525f818161058d01528181610c510152610c8001525f81816102dd01528181610cc60152610cfa01525f81816103620152610c0f01525f8181610395015261198201525f818161031001526114cd01525f81816105c0015281816117a801526117e401525f81816105f301526116ef01525f818161026601528181610b150152610b490152611f835ff3fe60806040526004361061017b575f3560e01c8063879d9090116100d1578063cd25fe381161007c578063eacdaabc11610057578063eacdaabc146105e2578063eb338c9614610615578063ffa1ad7414610634575f80fd5b8063cd25fe381461053c578063e1f1176d1461057c578063e77cdcc9146105af575f80fd5b8063b69ef8a8116100ac578063b69ef8a8146104b7578063c2c4c5c1146104cb578063cbcf252a146104f1575f80fd5b8063879d909014610409578063a694fc3a1461041e578063a74466ad1461043d575f80fd5b806352c824f511610131578063592cf3fb1161010c578063592cf3fb1461038457806378e06136146103b7578063809cee2f146103d6575f80fd5b806352c824f5146102ff57806356e76058146103325780635829c5ec14610351575f80fd5b80632e17de78116101615780632e17de78146102965780633e732997146102b757806342cde4e8146102cc575f80fd5b8063150b7a02146101f457806316a7517214610255575f80fd5b366101f0575f345f5461018e9190611a3d565b90505f3460015461019f9190611a3d565b5f8390556001819055604080513481526020810185905290810182905290915033907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2005b5f80fd5b3480156101ff575f80fd5b5061021f61020e366004611a64565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b348015610260575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161024c565b3480156102a1575f80fd5b506102b56102b0366004611afb565b610671565b005b3480156102c2575f80fd5b5061028860025481565b3480156102d7575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b34801561030a575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d575f80fd5b5061028861034c366004611afb565b61092e565b34801561035c575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b34801561038f575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b3480156103c2575f80fd5b506102886103d1366004611afb565b61094d565b3480156103e1575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b348015610414575f80fd5b5061028860015481565b348015610429575f80fd5b506102b5610438366004611afb565b610aee565b348015610448575f80fd5b5061048c610457366004611afb565b600460208190525f918252604090912080546001820154600383015492909301546001600160a01b0391821693909116919084565b604080516001600160a01b03958616815294909316602085015291830152606082015260800161024c565b3480156104c2575f80fd5b506102885f5481565b3480156104d6575f80fd5b506104df61107f565b60405161024c96959493929190611b4b565b3480156104fc575f80fd5b506105247f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161024c565b348015610547575f80fd5b5061056c610556366004611afb565b5f90815260046020526040902060030154151590565b604051901515815260200161024c565b348015610587575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ba575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ed575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b348015610620575f80fd5b5061028861062f366004611afb565b611367565b34801561063f575f80fd5b50610664604051806040016040528060058152602001640302e312e360dc1b81525081565b60405161024c9190611c21565b5f81815260046020526040902060018101546001600160a01b031633146106c757600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b5f6106d061107f565b505050505090505f5b815181101561071357838282815181106106f5576106f5611c6c565b602002602001015103156107135761070c81611c80565b90506106d9565b6004830154600284018054604080516020808402820181019092528281525f939092909183018282801561076457602002820191905f5260205f20905b815481526020019060010190808311610750575b505050600388015488545f8b8152600460205260408120805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018054909116905595965091946001600160a01b03909116935091506107c460028301826119ae565b505f60038201819055600490910155600580546107e390600190611c98565b815481106107f3576107f3611c6c565b905f5260205f2001546005868154811061080f5761080f611c6c565b5f91825260209091200155600580548061082b5761082b611cab565b5f8281526020812082015f1990810191909155019055604051632142170760e11b8152306004820152336024820152604481018990526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e906064015f604051808303815f87803b1580156108ac575f80fd5b505af11580156108be573d5f803e3d5ffd5b505050505f8411156108d4576108d48185611376565b806001600160a01b0316336001600160a01b0316897f246ee6115bfd84e00097b16569c2ff2f822026bb9595a82cd2c1e69d4b6ea50c86888760405161091c93929190611cbf565b60405180910390a45050505050505050565b6003818154811061093d575f80fd5b5f91825260209091200154905081565b5f818152600460209081526040808320815160a08101835281546001600160a01b03908116825260018301541681850152600282018054845181870281018701865281815287969395860193909291908301828280156109ca57602002820191905f5260205f20905b8154815260200190600101908083116109b6575b505050505081526020016003820154815260200160048201548152505090508060800151915080606001515f03610a175760405163e0606b6360e01b8152600481018490526024016106be565b5f805f805f610a2461141d565b5050945094509450945094505f841115610ae3575f5b8251811015610ae15788838281518110610a5657610a56611c6c565b602002602001015103610ad15785841115610aac578386838381518110610a7f57610a7f611c6c565b6020026020010151610a919190611ce3565b610a9b9190611cfa565b610aa59089611a3d565b9750610ae1565b818181518110610abe57610abe611c6c565b602002602001015188610aa59190611a3d565b610ada81611c80565b9050610a3a565b505b505050505050919050565b6001545f03610b105760405163afb0be3360e01b815260040160405180910390fd5b6005547f00000000000000000000000000000000000000000000000000000000000000008103610b755760405163fd20861560e01b81527f000000000000000000000000000000000000000000000000000000000000000060048201526024016106be565b60405163ef0e239b60e01b8152600481018390525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b906024015f60405180830381865afa158015610bd9573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610c009190810190611e37565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610c4f57604051637ad404bf60e11b8152600481018490526024016106be565b7f000000000000000000000000000000000000000000000000000000000000000015801590610ca2575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b15610cc357604051637ad404bf60e11b8152600481018490526024016106be565b5f7f0000000000000000000000000000000000000000000000000000000000000000118015610d1c5750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b15610d3d57604051637ad404bf60e11b8152600481018490526024016106be565b60048160c001516005811115610d5557610d55611f10565b14610d94578060c001516005811115610d7057610d70611f10565b604051633c053f9d60e21b81526004810191909152602481018490526044016106be565b5f81602001516001600160a01b0316803b806020016040519081016040528181525f908060200190933c805190602001209050807f000000000000000000000000000000000000000000000000000000000000000014610e1757602082015160405162a2307960e51b81526001600160a01b0390911660048201526024016106be565b6003548015610ee35760e083015151818114610e4957604051637ad404bf60e11b8152600481018790526024016106be565b5f5b81811015610ee0578460e001518181518110610e6957610e69611c6c565b602002602001015163ffffffff1660038281548110610e8a57610e8a611c6c565b905f5260205f20015414610ed05760038181548110610eab57610eab611c6c565b905f5260205f200154604051632ab10b0b60e21b81526004016106be91815260200190565b610ed981611c80565b9050610e4b565b50505b610efe85845f01516bffffffffffffffffffffffff166117a6565b5f85815260046020908152604082209085015181546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff1991821617835560018301805490911633179055909190610f5290611814565b8051909150610f6a90600284019060208401906119cc565b50426003830155600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e906064015f604051808303815f87803b158015611010575f80fd5b505af1158015611022573d5f803e3d5ffd5b5050505084602001516001600160a01b0316336001600160a01b0316887f5d43ac9b1b213902df90d405b0006308578486b6c62182c5df202ed572c844e48460405161106e9190611f24565b60405180910390a450505050505050565b6060805f6060805f805f805f805f8061109661141d565b96509650965096509650965096505f86111561128c575f878611156111ff575f8060015b8981101561115557888b8883815181106110d6576110d6611c6c565b60200260200101516110e89190611ce3565b6110f29190611cfa565b92506110fe8383611a3d565b915087818151811061111257611112611c6c565b602002602001015193508260045f8681526020019081526020015f206004015f82825461113f9190611a3d565b9091555061114e905081611c80565b90506110ba565b50878a875f8151811061116a5761116a611c6c565b602002602001015161117c9190611ce3565b6111869190611cfa565b91506111928282611a3d565b9050865f815181106111a6576111a6611c6c565b60200260200101519250808a11156111cf576111c2818b611c98565b6111cc9083611a3d565b91505b5f83815260046020819052604082200180548492906111ef908490611a3d565b909155505f9a5061128592505050565b5f5b878110156112775785818151811061121b5761121b611c6c565b6020026020010151915084818151811061123757611237611c6c565b602002602001015160045f8481526020019081526020015f206004015f8282546112619190611a3d565b90915550611270905081611c80565b9050611201565b506112828689611c98565b97505b5060018790555b805115611352575f5b825181101561130f575f8382815181106112b1576112b1611c6c565b602002602001015190508282815181106112cd576112cd611c6c565b602002602001015160045f8381526020019081526020015f2060020190805190602001906112fc9291906119cc565b50508061130890611c80565b9050611295565b50426002556040805188815260208101889052600199507f21d81d5d656869e8ce3ba8d65526a2f0dbbcd3d36f5f9999eb7c84360e45eced910160405180910390a15b909c909b509399509097509550929350915050565b6005818154811061093d575f80fd5b805f808282546113869190611c98565b90915550506040515f906001600160a01b0384169083908381818185875af1925050503d805f81146113d3576040519150601f19603f3d011682016040523d82523d5f602084013e6113d8565b606091505b50509050806114185760405163cd3f165960e01b81525f60048201523060248201526001600160a01b0384166044820152606481018390526084016106be565b505050565b5f805f6060806060805f60058054905090508067ffffffffffffffff81111561144857611448611d19565b604051908082528060200260200182016040528015611471578160200160208202803683370190505b5092505f5b818110156114c7576005818154811061149157611491611c6c565b905f5260205f2001548482815181106114ac576114ac611c6c565b60209081029190910101526114c081611c80565b9050611476565b506002547f00000000000000000000000000000000000000000000000000000000000000006114f68242611c98565b1061179b576001549850881561179b578167ffffffffffffffff81111561151f5761151f611d19565b604051908082528060200260200182016040528015611548578160200160208202803683370190505b5095508167ffffffffffffffff81111561156457611564611d19565b60405190808252806020026020018201604052801561158d578160200160208202803683370190505b5094508167ffffffffffffffff8111156115a9576115a9611d19565b6040519080825280602002602001820160405280156115dc57816020015b60608152602001906001900390816115c75790505b5092505f5b82811015611799575f60045f8784815181106115ff576115ff611c6c565b60209081029190910181015182528101919091526040015f20805490915061162f906001600160a01b0316611814565b85838151811061164157611641611c6c565b6020908102919091010152600381015483908181111561165f578091505b6116698242611c98565b90505f6116e088868151811061168157611681611c6c565b6020026020010151856002018054806020026020016040519081016040528092919081815260200182805480156116d557602002820191905f5260205f20905b8154815260200190600101908083116116c1575b505050505084611825565b90508015611784575f611713837f0000000000000000000000000000000000000000000000000000000000000000611ce3565b905061171f818e611a3d565b9c50808b8f8151811061173457611734611c6c565b60200260200101818152505089868151811061175257611752611c6c565b60200260200101518c8f8151811061176c5761176c611c6c565b60209081029190910101526117808e611c80565b9d50505b505050508061179290611c80565b90506115e1565b505b505090919293949596565b7f00000000000000000000000000000000000000000000000000000000000000008110156118105760405163491a2bb160e01b8152600481018290527f000000000000000000000000000000000000000000000000000000000000000060248201526044016106be565b5050565b606061181f82611839565b92915050565b5f6118318484846118de565b949350505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015611897573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118bb9190611f36565b815f815181106118cd576118cd611c6c565b602002602001018181525050919050565b5f808211801561191f5750825f815181106118fb576118fb611c6c565b6020026020010151845f8151811061191557611915611c6c565b6020026020010151115b156119a7575f82845f8151811061193857611938611c6c565b6020026020010151865f8151811061195257611952611c6c565b60200260200101516119649190611c98565b61197690670de0b6b3a7640000611ce3565b6119809190611cfa565b7f000000000000000000000000000000000000000000000000000000000000000011159150505b9392505050565b5080545f8255905f5260205f20908101906119c99190611a15565b50565b828054828255905f5260205f20908101928215611a05579160200282015b82811115611a055782518255916020019190600101906119ea565b50611a11929150611a15565b5090565b5b80821115611a11575f8155600101611a16565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561181f5761181f611a29565b6001600160a01b03811681146119c9575f80fd5b5f805f805f60808688031215611a78575f80fd5b8535611a8381611a50565b94506020860135611a9381611a50565b935060408601359250606086013567ffffffffffffffff80821115611ab6575f80fd5b818801915088601f830112611ac9575f80fd5b813581811115611ad7575f80fd5b896020828501011115611ae8575f80fd5b9699959850939650602001949392505050565b5f60208284031215611b0b575f80fd5b5035919050565b5f8151808452602080850194508084015f5b83811015611b4057815187529582019590820190600101611b24565b509495945050505050565b60c081525f611b5d60c0830189611b12565b6020838203818501528189518084528284019150828160051b850101838c015f805b84811015611bd257878403601f19018652825180518086529088019088860190845b81811015611bbd5783518352928a0192918a0191600101611ba1565b50509688019694505091860191600101611b7f565b5050508a60408801528681036060880152611bed818b611b12565b9450505050508281036080840152611c058186611b12565b915050611c1660a083018415159052565b979650505050505050565b5f6020808352835180828501525f5b81811015611c4c57858101830151858201604001528201611c30565b505f604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b5f52603260045260245ffd5b5f60018201611c9157611c91611a29565b5060010190565b8181038181111561181f5761181f611a29565b634e487b7160e01b5f52603160045260245ffd5b606081525f611cd16060830186611b12565b60208301949094525060400152919050565b808202811582820484141761181f5761181f611a29565b5f82611d1457634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52604160045260245ffd5b604051610100810167ffffffffffffffff81118282101715611d5157611d51611d19565b60405290565b80516bffffffffffffffffffffffff81168114611d72575f80fd5b919050565b8051611d7281611a50565b805163ffffffff81168114611d72575f80fd5b805160068110611d72575f80fd5b5f82601f830112611db2575f80fd5b8151602067ffffffffffffffff80831115611dcf57611dcf611d19565b8260051b604051601f19603f83011681018181108482111715611df457611df4611d19565b604052938452858101830193838101925087851115611e11575f80fd5b83870191505b84821015611c1657611e2882611d82565b83529183019190830190611e17565b5f60208284031215611e47575f80fd5b815167ffffffffffffffff80821115611e5e575f80fd5b908301906101008286031215611e72575f80fd5b611e7a611d2d565b611e8383611d57565b8152611e9160208401611d77565b602082015260408301516040820152611eac60608401611d82565b6060820152611ebd60808401611d82565b6080820152611ece60a08401611d82565b60a0820152611edf60c08401611d95565b60c082015260e083015182811115611ef5575f80fd5b611f0187828601611da3565b60e08301525095945050505050565b634e487b7160e01b5f52602160045260245ffd5b602081525f6119a76020830184611b12565b5f60208284031215611f46575f80fd5b505191905056fea2646970667358221220fce902e52cfe37cc6f4eb03125b4f2a3a0e3897a370dbfb7587fecc7067a04a064736f6c63430008150033", + "deployedBytecode": "0x60806040526004361061017b575f3560e01c8063879d9090116100d1578063cd25fe381161007c578063eacdaabc11610057578063eacdaabc146105e2578063eb338c9614610615578063ffa1ad7414610634575f80fd5b8063cd25fe381461053c578063e1f1176d1461057c578063e77cdcc9146105af575f80fd5b8063b69ef8a8116100ac578063b69ef8a8146104b7578063c2c4c5c1146104cb578063cbcf252a146104f1575f80fd5b8063879d909014610409578063a694fc3a1461041e578063a74466ad1461043d575f80fd5b806352c824f511610131578063592cf3fb1161010c578063592cf3fb1461038457806378e06136146103b7578063809cee2f146103d6575f80fd5b806352c824f5146102ff57806356e76058146103325780635829c5ec14610351575f80fd5b80632e17de78116101615780632e17de78146102965780633e732997146102b757806342cde4e8146102cc575f80fd5b8063150b7a02146101f457806316a7517214610255575f80fd5b366101f0575f345f5461018e9190611a3d565b90505f3460015461019f9190611a3d565b5f8390556001819055604080513481526020810185905290810182905290915033907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2005b5f80fd5b3480156101ff575f80fd5b5061021f61020e366004611a64565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b348015610260575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161024c565b3480156102a1575f80fd5b506102b56102b0366004611afb565b610671565b005b3480156102c2575f80fd5b5061028860025481565b3480156102d7575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b34801561030a575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b34801561033d575f80fd5b5061028861034c366004611afb565b61092e565b34801561035c575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b34801561038f575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b3480156103c2575f80fd5b506102886103d1366004611afb565b61094d565b3480156103e1575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b348015610414575f80fd5b5061028860015481565b348015610429575f80fd5b506102b5610438366004611afb565b610aee565b348015610448575f80fd5b5061048c610457366004611afb565b600460208190525f918252604090912080546001820154600383015492909301546001600160a01b0391821693909116919084565b604080516001600160a01b03958616815294909316602085015291830152606082015260800161024c565b3480156104c2575f80fd5b506102885f5481565b3480156104d6575f80fd5b506104df61107f565b60405161024c96959493929190611b4b565b3480156104fc575f80fd5b506105247f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161024c565b348015610547575f80fd5b5061056c610556366004611afb565b5f90815260046020526040902060030154151590565b604051901515815260200161024c565b348015610587575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ba575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ed575f80fd5b506102887f000000000000000000000000000000000000000000000000000000000000000081565b348015610620575f80fd5b5061028861062f366004611afb565b611367565b34801561063f575f80fd5b50610664604051806040016040528060058152602001640302e312e360dc1b81525081565b60405161024c9190611c21565b5f81815260046020526040902060018101546001600160a01b031633146106c757600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b5f6106d061107f565b505050505090505f5b815181101561071357838282815181106106f5576106f5611c6c565b602002602001015103156107135761070c81611c80565b90506106d9565b6004830154600284018054604080516020808402820181019092528281525f939092909183018282801561076457602002820191905f5260205f20905b815481526020019060010190808311610750575b505050600388015488545f8b8152600460205260408120805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018054909116905595965091946001600160a01b03909116935091506107c460028301826119ae565b505f60038201819055600490910155600580546107e390600190611c98565b815481106107f3576107f3611c6c565b905f5260205f2001546005868154811061080f5761080f611c6c565b5f91825260209091200155600580548061082b5761082b611cab565b5f8281526020812082015f1990810191909155019055604051632142170760e11b8152306004820152336024820152604481018990526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e906064015f604051808303815f87803b1580156108ac575f80fd5b505af11580156108be573d5f803e3d5ffd5b505050505f8411156108d4576108d48185611376565b806001600160a01b0316336001600160a01b0316897f246ee6115bfd84e00097b16569c2ff2f822026bb9595a82cd2c1e69d4b6ea50c86888760405161091c93929190611cbf565b60405180910390a45050505050505050565b6003818154811061093d575f80fd5b5f91825260209091200154905081565b5f818152600460209081526040808320815160a08101835281546001600160a01b03908116825260018301541681850152600282018054845181870281018701865281815287969395860193909291908301828280156109ca57602002820191905f5260205f20905b8154815260200190600101908083116109b6575b505050505081526020016003820154815260200160048201548152505090508060800151915080606001515f03610a175760405163e0606b6360e01b8152600481018490526024016106be565b5f805f805f610a2461141d565b5050945094509450945094505f841115610ae3575f5b8251811015610ae15788838281518110610a5657610a56611c6c565b602002602001015103610ad15785841115610aac578386838381518110610a7f57610a7f611c6c565b6020026020010151610a919190611ce3565b610a9b9190611cfa565b610aa59089611a3d565b9750610ae1565b818181518110610abe57610abe611c6c565b602002602001015188610aa59190611a3d565b610ada81611c80565b9050610a3a565b505b505050505050919050565b6001545f03610b105760405163afb0be3360e01b815260040160405180910390fd5b6005547f00000000000000000000000000000000000000000000000000000000000000008103610b755760405163fd20861560e01b81527f000000000000000000000000000000000000000000000000000000000000000060048201526024016106be565b60405163ef0e239b60e01b8152600481018390525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b906024015f60405180830381865afa158015610bd9573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610c009190810190611e37565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610c4f57604051637ad404bf60e11b8152600481018490526024016106be565b7f000000000000000000000000000000000000000000000000000000000000000015801590610ca2575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b15610cc357604051637ad404bf60e11b8152600481018490526024016106be565b5f7f0000000000000000000000000000000000000000000000000000000000000000118015610d1c5750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b15610d3d57604051637ad404bf60e11b8152600481018490526024016106be565b60048160c001516005811115610d5557610d55611f10565b14610d94578060c001516005811115610d7057610d70611f10565b604051633c053f9d60e21b81526004810191909152602481018490526044016106be565b5f81602001516001600160a01b0316803b806020016040519081016040528181525f908060200190933c805190602001209050807f000000000000000000000000000000000000000000000000000000000000000014610e1757602082015160405162a2307960e51b81526001600160a01b0390911660048201526024016106be565b6003548015610ee35760e083015151818114610e4957604051637ad404bf60e11b8152600481018790526024016106be565b5f5b81811015610ee0578460e001518181518110610e6957610e69611c6c565b602002602001015163ffffffff1660038281548110610e8a57610e8a611c6c565b905f5260205f20015414610ed05760038181548110610eab57610eab611c6c565b905f5260205f200154604051632ab10b0b60e21b81526004016106be91815260200190565b610ed981611c80565b9050610e4b565b50505b610efe85845f01516bffffffffffffffffffffffff166117a6565b5f85815260046020908152604082209085015181546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff1991821617835560018301805490911633179055909190610f5290611814565b8051909150610f6a90600284019060208401906119cc565b50426003830155600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e906064015f604051808303815f87803b158015611010575f80fd5b505af1158015611022573d5f803e3d5ffd5b5050505084602001516001600160a01b0316336001600160a01b0316887f5d43ac9b1b213902df90d405b0006308578486b6c62182c5df202ed572c844e48460405161106e9190611f24565b60405180910390a450505050505050565b6060805f6060805f805f805f805f8061109661141d565b96509650965096509650965096505f86111561128c575f878611156111ff575f8060015b8981101561115557888b8883815181106110d6576110d6611c6c565b60200260200101516110e89190611ce3565b6110f29190611cfa565b92506110fe8383611a3d565b915087818151811061111257611112611c6c565b602002602001015193508260045f8681526020019081526020015f206004015f82825461113f9190611a3d565b9091555061114e905081611c80565b90506110ba565b50878a875f8151811061116a5761116a611c6c565b602002602001015161117c9190611ce3565b6111869190611cfa565b91506111928282611a3d565b9050865f815181106111a6576111a6611c6c565b60200260200101519250808a11156111cf576111c2818b611c98565b6111cc9083611a3d565b91505b5f83815260046020819052604082200180548492906111ef908490611a3d565b909155505f9a5061128592505050565b5f5b878110156112775785818151811061121b5761121b611c6c565b6020026020010151915084818151811061123757611237611c6c565b602002602001015160045f8481526020019081526020015f206004015f8282546112619190611a3d565b90915550611270905081611c80565b9050611201565b506112828689611c98565b97505b5060018790555b805115611352575f5b825181101561130f575f8382815181106112b1576112b1611c6c565b602002602001015190508282815181106112cd576112cd611c6c565b602002602001015160045f8381526020019081526020015f2060020190805190602001906112fc9291906119cc565b50508061130890611c80565b9050611295565b50426002556040805188815260208101889052600199507f21d81d5d656869e8ce3ba8d65526a2f0dbbcd3d36f5f9999eb7c84360e45eced910160405180910390a15b909c909b509399509097509550929350915050565b6005818154811061093d575f80fd5b805f808282546113869190611c98565b90915550506040515f906001600160a01b0384169083908381818185875af1925050503d805f81146113d3576040519150601f19603f3d011682016040523d82523d5f602084013e6113d8565b606091505b50509050806114185760405163cd3f165960e01b81525f60048201523060248201526001600160a01b0384166044820152606481018390526084016106be565b505050565b5f805f6060806060805f60058054905090508067ffffffffffffffff81111561144857611448611d19565b604051908082528060200260200182016040528015611471578160200160208202803683370190505b5092505f5b818110156114c7576005818154811061149157611491611c6c565b905f5260205f2001548482815181106114ac576114ac611c6c565b60209081029190910101526114c081611c80565b9050611476565b506002547f00000000000000000000000000000000000000000000000000000000000000006114f68242611c98565b1061179b576001549850881561179b578167ffffffffffffffff81111561151f5761151f611d19565b604051908082528060200260200182016040528015611548578160200160208202803683370190505b5095508167ffffffffffffffff81111561156457611564611d19565b60405190808252806020026020018201604052801561158d578160200160208202803683370190505b5094508167ffffffffffffffff8111156115a9576115a9611d19565b6040519080825280602002602001820160405280156115dc57816020015b60608152602001906001900390816115c75790505b5092505f5b82811015611799575f60045f8784815181106115ff576115ff611c6c565b60209081029190910181015182528101919091526040015f20805490915061162f906001600160a01b0316611814565b85838151811061164157611641611c6c565b6020908102919091010152600381015483908181111561165f578091505b6116698242611c98565b90505f6116e088868151811061168157611681611c6c565b6020026020010151856002018054806020026020016040519081016040528092919081815260200182805480156116d557602002820191905f5260205f20905b8154815260200190600101908083116116c1575b505050505084611825565b90508015611784575f611713837f0000000000000000000000000000000000000000000000000000000000000000611ce3565b905061171f818e611a3d565b9c50808b8f8151811061173457611734611c6c565b60200260200101818152505089868151811061175257611752611c6c565b60200260200101518c8f8151811061176c5761176c611c6c565b60209081029190910101526117808e611c80565b9d50505b505050508061179290611c80565b90506115e1565b505b505090919293949596565b7f00000000000000000000000000000000000000000000000000000000000000008110156118105760405163491a2bb160e01b8152600481018290527f000000000000000000000000000000000000000000000000000000000000000060248201526044016106be565b5050565b606061181f82611839565b92915050565b5f6118318484846118de565b949350505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015611897573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118bb9190611f36565b815f815181106118cd576118cd611c6c565b602002602001018181525050919050565b5f808211801561191f5750825f815181106118fb576118fb611c6c565b6020026020010151845f8151811061191557611915611c6c565b6020026020010151115b156119a7575f82845f8151811061193857611938611c6c565b6020026020010151865f8151811061195257611952611c6c565b60200260200101516119649190611c98565b61197690670de0b6b3a7640000611ce3565b6119809190611cfa565b7f000000000000000000000000000000000000000000000000000000000000000011159150505b9392505050565b5080545f8255905f5260205f20908101906119c99190611a15565b50565b828054828255905f5260205f20908101928215611a05579160200282015b82811115611a055782518255916020019190600101906119ea565b50611a11929150611a15565b5090565b5b80821115611a11575f8155600101611a16565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561181f5761181f611a29565b6001600160a01b03811681146119c9575f80fd5b5f805f805f60808688031215611a78575f80fd5b8535611a8381611a50565b94506020860135611a9381611a50565b935060408601359250606086013567ffffffffffffffff80821115611ab6575f80fd5b818801915088601f830112611ac9575f80fd5b813581811115611ad7575f80fd5b896020828501011115611ae8575f80fd5b9699959850939650602001949392505050565b5f60208284031215611b0b575f80fd5b5035919050565b5f8151808452602080850194508084015f5b83811015611b4057815187529582019590820190600101611b24565b509495945050505050565b60c081525f611b5d60c0830189611b12565b6020838203818501528189518084528284019150828160051b850101838c015f805b84811015611bd257878403601f19018652825180518086529088019088860190845b81811015611bbd5783518352928a0192918a0191600101611ba1565b50509688019694505091860191600101611b7f565b5050508a60408801528681036060880152611bed818b611b12565b9450505050508281036080840152611c058186611b12565b915050611c1660a083018415159052565b979650505050505050565b5f6020808352835180828501525f5b81811015611c4c57858101830151858201604001528201611c30565b505f604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b5f52603260045260245ffd5b5f60018201611c9157611c91611a29565b5060010190565b8181038181111561181f5761181f611a29565b634e487b7160e01b5f52603160045260245ffd5b606081525f611cd16060830186611b12565b60208301949094525060400152919050565b808202811582820484141761181f5761181f611a29565b5f82611d1457634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52604160045260245ffd5b604051610100810167ffffffffffffffff81118282101715611d5157611d51611d19565b60405290565b80516bffffffffffffffffffffffff81168114611d72575f80fd5b919050565b8051611d7281611a50565b805163ffffffff81168114611d72575f80fd5b805160068110611d72575f80fd5b5f82601f830112611db2575f80fd5b8151602067ffffffffffffffff80831115611dcf57611dcf611d19565b8260051b604051601f19603f83011681018181108482111715611df457611df4611d19565b604052938452858101830193838101925087851115611e11575f80fd5b83870191505b84821015611c1657611e2882611d82565b83529183019190830190611e17565b5f60208284031215611e47575f80fd5b815167ffffffffffffffff80821115611e5e575f80fd5b908301906101008286031215611e72575f80fd5b611e7a611d2d565b611e8383611d57565b8152611e9160208401611d77565b602082015260408301516040820152611eac60608401611d82565b6060820152611ebd60808401611d82565b6080820152611ece60a08401611d82565b60a0820152611edf60c08401611d95565b60c082015260e083015182811115611ef5575f80fd5b611f0187828601611da3565b60e08301525095945050505050565b634e487b7160e01b5f52602160045260245ffd5b602081525f6119a76020830184611b12565b5f60208284031215611f46575f80fd5b505191905056fea2646970667358221220fce902e52cfe37cc6f4eb03125b4f2a3a0e3897a370dbfb7587fecc7067a04a064736f6c63430008150033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/abis/0.8.21/ServiceStakingToken.json b/abis/0.8.21/ServiceStakingToken.json new file mode 100644 index 00000000..b71e627f --- /dev/null +++ b/abis/0.8.21/ServiceStakingToken.json @@ -0,0 +1,1108 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ServiceStakingToken", + "sourceName": "contracts/staking/ServiceStakingToken.sol", + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "maxNumServices", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardsPerSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minStakingDeposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "livenessPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "livenessRatio", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numAgentInstances", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "agentIds", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "configHash", + "type": "bytes32" + } + ], + "internalType": "struct ServiceStakingBase.StakingParams", + "name": "_stakingParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_serviceRegistry", + "type": "address" + }, + { + "internalType": "address", + "name": "_serviceRegistryTokenUtility", + "type": "address" + }, + { + "internalType": "address", + "name": "_stakingToken", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_proxyHash", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "AgentInstanceRegistered", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "AgentInstancesSlotsFilled", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "agentId", + "type": "uint256" + } + ], + "name": "AgentNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "agentId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "AgentNotInService", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "componentId", + "type": "uint256" + } + ], + "name": "ComponentNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "HashExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "IncorrectAgentBondingValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "IncorrectRegistrationDepositValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "LowerThan", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "manager", + "type": "address" + } + ], + "name": "ManagerOnly", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxNumServices", + "type": "uint256" + } + ], + "name": "MaxNumServicesReached", + "type": "error" + }, + { + "inputs": [], + "name": "NoRewardsAvailable", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "provided", + "type": "address" + }, + { + "internalType": "address", + "name": "expected", + "type": "address" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "OnlyOwnServiceMultisig", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "OperatorHasNoInstances", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "Overflow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnerOnly", + "type": "error" + }, + { + "inputs": [], + "name": "Paused", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuard", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "ServiceMustBeInactive", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "ServiceNotStaked", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TokenTransferFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "multisig", + "type": "address" + } + ], + "name": "UnauthorizedMultisig", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "ValueLowerThan", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "agentId", + "type": "uint256" + } + ], + "name": "WrongAgentId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numValues1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numValues2", + "type": "uint256" + } + ], + "name": "WrongArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "WrongOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "WrongServiceConfiguration", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "state", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "WrongServiceState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expected", + "type": "address" + }, + { + "internalType": "address", + "name": "provided", + "type": "address" + } + ], + "name": "WrongStakingToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxThreshold", + "type": "uint256" + } + ], + "name": "WrongThreshold", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroValue", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "availableRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "numServices", + "type": "uint256" + } + ], + "name": "Checkpoint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "availableRewards", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "multisig", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "nonces", + "type": "uint256[]" + } + ], + "name": "ServiceStaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "multisig", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "nonces", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "reward", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tsStart", + "type": "uint256" + } + ], + "name": "ServiceUnstaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "agentIds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "availableRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "calculateServiceStakingReward", + "outputs": [ + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "checkpoint", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[][]", + "name": "", + "type": "uint256[][]" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "configHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "isServiceStaked", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "livenessPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "livenessRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "mapServiceInfo", + "outputs": [ + { + "internalType": "address", + "name": "multisig", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tsStart", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxNumServices", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minStakingDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "numAgentInstances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proxyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardsPerSecond", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "serviceRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "serviceRegistryTokenUtility", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "setServiceIds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stakingToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "threshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tsCheckpoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "unstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x61020060405234801562000011575f80fd5b5060405162002766380380620027668339810160408190526200003491620003b1565b848482825f01515f14806200004b57506020830151155b806200005957506060830151155b806200006757506080830151155b8062000075575060a0830151155b156200009457604051637c946ed760e01b815260040160405180910390fd5b600283604001511015620000d057604080840151905163491a2bb160e01b81526004810191909152600260248201526044015b60405180910390fd5b6001600160a01b038216620000f85760405163d92e233d60e01b815260040160405180910390fd5b82516080908152602084015160a0908152604085015160c052606085015160e09081529185015161010090815290850151610120526001600160a01b038416610180529084015161014052830151610160525f805b8460c00151518110156200022e57818560c001518281518110620001755762000175620004b4565b602002602001015111620001c1578460c0015181815181106200019c576200019c620004b4565b6020026020010151604051632ab10b0b60e21b8152600401620000c791815260200190565b8460c001518181518110620001da57620001da620004b4565b6020908102919091010151600380546001810182555f919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0181905591506200022681620004c8565b90506200014d565b50816200024e57604051637c946ed760e01b815260040160405180910390fd5b506101a0525050426002556001600160a01b03821615806200027757506001600160a01b038316155b15620002965760405163d92e233d60e01b815260040160405180910390fd5b506001600160a01b039081166101e052166101c05250620004ed9050565b634e487b7160e01b5f52604160045260245ffd5b60405161012081016001600160401b0381118282101715620002ee57620002ee620002b4565b60405290565b5f82601f83011262000304575f80fd5b815160206001600160401b0380831115620003235762000323620002b4565b8260051b604051601f19603f830116810181811084821117156200034b576200034b620002b4565b60405293845285810183019383810192508785111562000369575f80fd5b83870191505b848210156200038a578151835291830191908301906200036f565b979650505050505050565b80516001600160a01b0381168114620003ac575f80fd5b919050565b5f805f805f60a08688031215620003c6575f80fd5b85516001600160401b0380821115620003dd575f80fd5b90870190610120828a031215620003f2575f80fd5b620003fc620002c8565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c08301518281111562000444575f80fd5b620004528b828601620002f4565b60c08301525060e083810151908201526101009283015192810192909252509450620004816020870162000395565b9350620004916040870162000395565b9250620004a16060870162000395565b9150608086015190509295509295909350565b634e487b7160e01b5f52603260045260245ffd5b5f60018201620004e657634e487b7160e01b5f52601160045260245ffd5b5060010190565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e051612162620006045f395f818161034401528181610fb001528181611331015281816117c1015261180501525f8181610238015261174901525f818161037e0152610ccc01525f81816104640152818161076d01528181610a8f0152610ec901525f81816104bf01528181610b530152610b8201525f818161029501528181610bc80152610bfc01525f81816102f60152610b1101525f818161031d0152611b2e01525f81816102bc015261144e01525f81816104e60152818161183c015261189301525f818161050d015261167001525f818161020301528181610a170152610a4b01526121625ff3fe608060405234801561000f575f80fd5b50600436106101a5575f3560e01c8063879d9090116100e8578063cbcf252a11610093578063e77cdcc91161006e578063e77cdcc9146104e1578063eacdaabc14610508578063eb338c961461052f578063ffa1ad7414610542575f80fd5b8063cbcf252a1461045f578063cd25fe3814610486578063e1f1176d146104ba575f80fd5b8063b69ef8a8116100c3578063b69ef8a81461042a578063b6b55f2514610432578063c2c4c5c114610445575f80fd5b8063879d9090146103a0578063a694fc3a146103a9578063a74466ad146103bc575f80fd5b806352c824f511610153578063592cf3fb1161012e578063592cf3fb1461031857806372f702f31461033f57806378e0613614610366578063809cee2f14610379575f80fd5b806352c824f5146102b757806356e76058146102de5780635829c5ec146102f1575f80fd5b80632e17de78116101835780632e17de78146102725780633e7329971461028757806342cde4e814610290575f80fd5b8063150b7a02146101a957806316a75172146101fe5780632871405114610233575b5f80fd5b6101c86101b7366004611be9565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b6102257f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101f5565b61025a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101f5565b610285610280366004611c80565b610573565b005b61022560025481565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b6102256102ec366004611c80565b610830565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b61025a7f000000000000000000000000000000000000000000000000000000000000000081565b610225610374366004611c80565b61084f565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b61022560015481565b6102856103b7366004611c80565b6109f0565b6103ff6103ca366004611c80565b600460208190525f918252604090912080546001820154600383015492909301546001600160a01b0391821693909116919084565b604080516001600160a01b0395861681529490931660208501529183015260608201526080016101f5565b6102255f5481565b610285610440366004611c80565b610f81565b61044d61101f565b6040516101f596959493929190611cd0565b61025a7f000000000000000000000000000000000000000000000000000000000000000081565b6104aa610494366004611c80565b5f90815260046020526040902060030154151590565b60405190151581526020016101f5565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b61022561053d366004611c80565b611307565b610566604051806040016040528060058152602001640302e312e360dc1b81525081565b6040516101f59190611da6565b5f81815260046020526040902060018101546001600160a01b031633146105c957600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b5f6105d261101f565b505050505090505f5b815181101561061557838282815181106105f7576105f7611df1565b602002602001015103156106155761060e81611e19565b90506105db565b6004830154600284018054604080516020808402820181019092528281525f939092909183018282801561066657602002820191905f5260205f20905b815481526020019060010190808311610652575b505050600388015488545f8b8152600460205260408120805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018054909116905595965091946001600160a01b03909116935091506106c66002830182611b5a565b505f60038201819055600490910155600580546106e590600190611e31565b815481106106f5576106f5611df1565b905f5260205f2001546005868154811061071157610711611df1565b5f91825260209091200155600580548061072d5761072d611e44565b5f8281526020812082015f1990810191909155019055604051632142170760e11b8152306004820152336024820152604481018990526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e906064015f604051808303815f87803b1580156107ae575f80fd5b505af11580156107c0573d5f803e3d5ffd5b505050505f8411156107d6576107d68185611316565b806001600160a01b0316336001600160a01b0316897f246ee6115bfd84e00097b16569c2ff2f822026bb9595a82cd2c1e69d4b6ea50c86888760405161081e93929190611e58565b60405180910390a45050505050505050565b6003818154811061083f575f80fd5b5f91825260209091200154905081565b5f818152600460209081526040808320815160a08101835281546001600160a01b03908116825260018301541681850152600282018054845181870281018701865281815287969395860193909291908301828280156108cc57602002820191905f5260205f20905b8154815260200190600101908083116108b8575b505050505081526020016003820154815260200160048201548152505090508060800151915080606001515f036109195760405163e0606b6360e01b8152600481018490526024016105c0565b5f805f805f61092661139e565b5050945094509450945094505f8411156109e5575f5b82518110156109e3578883828151811061095857610958611df1565b6020026020010151036109d357858411156109ae57838683838151811061098157610981611df1565b60200260200101516109939190611e7c565b61099d9190611e93565b6109a79089611eb2565b97506109e3565b8181815181106109c0576109c0611df1565b6020026020010151886109a79190611eb2565b6109dc81611e19565b905061093c565b505b505050505050919050565b6001545f03610a125760405163afb0be3360e01b815260040160405180910390fd5b6005547f00000000000000000000000000000000000000000000000000000000000000008103610a775760405163fd20861560e01b81527f000000000000000000000000000000000000000000000000000000000000000060048201526024016105c0565b60405163ef0e239b60e01b8152600481018390525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b906024015f60405180830381865afa158015610adb573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610b029190810190611fe3565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610b5157604051637ad404bf60e11b8152600481018490526024016105c0565b7f000000000000000000000000000000000000000000000000000000000000000015801590610ba4575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b15610bc557604051637ad404bf60e11b8152600481018490526024016105c0565b5f7f0000000000000000000000000000000000000000000000000000000000000000118015610c1e5750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b15610c3f57604051637ad404bf60e11b8152600481018490526024016105c0565b60048160c001516005811115610c5757610c576120bc565b14610c96578060c001516005811115610c7257610c726120bc565b604051633c053f9d60e21b81526004810191909152602481018490526044016105c0565b5f81602001516001600160a01b0316803b806020016040519081016040528181525f908060200190933c805190602001209050807f000000000000000000000000000000000000000000000000000000000000000014610d1957602082015160405162a2307960e51b81526001600160a01b0390911660048201526024016105c0565b6003548015610de55760e083015151818114610d4b57604051637ad404bf60e11b8152600481018790526024016105c0565b5f5b81811015610de2578460e001518181518110610d6b57610d6b611df1565b602002602001015163ffffffff1660038281548110610d8c57610d8c611df1565b905f5260205f20015414610dd25760038181548110610dad57610dad611df1565b905f5260205f200154604051632ab10b0b60e21b81526004016105c091815260200190565b610ddb81611e19565b9050610d4d565b50505b610e0085845f01516bffffffffffffffffffffffff16611727565b5f85815260046020908152604082209085015181546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff1991821617835560018301805490911633179055909190610e54906118c5565b8051909150610e6c9060028401906020840190611b78565b50426003830155600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e906064015f604051808303815f87803b158015610f12575f80fd5b505af1158015610f24573d5f803e3d5ffd5b5050505084602001516001600160a01b0316336001600160a01b0316887f5d43ac9b1b213902df90d405b0006308578486b6c62182c5df202ed572c844e484604051610f7091906120d0565b60405180910390a450505050505050565b5f815f54610f8f9190611eb2565b90505f82600154610fa09190611eb2565b5f83905560018190559050610fd77f00000000000000000000000000000000000000000000000000000000000000003330866118d6565b604080518481526020810184905290810182905233907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2505050565b6060805f6060805f805f805f805f8061103661139e565b96509650965096509650965096505f86111561122c575f8786111561119f575f8060015b898110156110f557888b88838151811061107657611076611df1565b60200260200101516110889190611e7c565b6110929190611e93565b925061109e8383611eb2565b91508781815181106110b2576110b2611df1565b602002602001015193508260045f8681526020019081526020015f206004015f8282546110df9190611eb2565b909155506110ee905081611e19565b905061105a565b50878a875f8151811061110a5761110a611df1565b602002602001015161111c9190611e7c565b6111269190611e93565b91506111328282611eb2565b9050865f8151811061114657611146611df1565b60200260200101519250808a111561116f57611162818b611e31565b61116c9083611eb2565b91505b5f838152600460208190526040822001805484929061118f908490611eb2565b909155505f9a5061122592505050565b5f5b87811015611217578581815181106111bb576111bb611df1565b602002602001015191508481815181106111d7576111d7611df1565b602002602001015160045f8481526020019081526020015f206004015f8282546112019190611eb2565b90915550611210905081611e19565b90506111a1565b506112228689611e31565b97505b5060018790555b8051156112f2575f5b82518110156112af575f83828151811061125157611251611df1565b6020026020010151905082828151811061126d5761126d611df1565b602002602001015160045f8381526020019081526020015f20600201908051906020019061129c929190611b78565b5050806112a890611e19565b9050611235565b50426002556040805188815260208101889052600199507f21d81d5d656869e8ce3ba8d65526a2f0dbbcd3d36f5f9999eb7c84360e45eced910160405180910390a15b909c909b509399509097509550929350915050565b6005818154811061083f575f80fd5b805f808282546113269190611e31565b9091555061135790507f0000000000000000000000000000000000000000000000000000000000000000838361195a565b816001600160a01b03167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243648260405161139291815260200190565b60405180910390a25050565b5f805f6060806060805f60058054905090508067ffffffffffffffff8111156113c9576113c9611ec5565b6040519080825280602002602001820160405280156113f2578160200160208202803683370190505b5092505f5b81811015611448576005818154811061141257611412611df1565b905f5260205f20015484828151811061142d5761142d611df1565b602090810291909101015261144181611e19565b90506113f7565b506002547f00000000000000000000000000000000000000000000000000000000000000006114778242611e31565b1061171c576001549850881561171c578167ffffffffffffffff8111156114a0576114a0611ec5565b6040519080825280602002602001820160405280156114c9578160200160208202803683370190505b5095508167ffffffffffffffff8111156114e5576114e5611ec5565b60405190808252806020026020018201604052801561150e578160200160208202803683370190505b5094508167ffffffffffffffff81111561152a5761152a611ec5565b60405190808252806020026020018201604052801561155d57816020015b60608152602001906001900390816115485790505b5092505f5b8281101561171a575f60045f87848151811061158057611580611df1565b60209081029190910181015182528101919091526040015f2080549091506115b0906001600160a01b03166118c5565b8583815181106115c2576115c2611df1565b602090810291909101015260038101548390818111156115e0578091505b6115ea8242611e31565b90505f61166188868151811061160257611602611df1565b60200260200101518560020180548060200260200160405190810160405280929190818152602001828054801561165657602002820191905f5260205f20905b815481526020019060010190808311611642575b5050505050846119d1565b90508015611705575f611694837f0000000000000000000000000000000000000000000000000000000000000000611e7c565b90506116a0818e611eb2565b9c50808b8f815181106116b5576116b5611df1565b6020026020010181815250508986815181106116d3576116d3611df1565b60200260200101518c8f815181106116ed576116ed611df1565b60209081029190910101526117018e611e19565b9d50505b505050508061171390611e19565b9050611562565b505b505090919293949596565b604051633cebfa4f60e01b8152600481018390525f9081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633cebfa4f906024016040805180830381865afa15801561178d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117b191906120e2565b91509150816001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461183a57604051630b80380d60e31b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152831660248201526044016105c0565b7f0000000000000000000000000000000000000000000000000000000000000000816bffffffffffffffffffffffff1610156118bf57604051632b30b24760e21b81526bffffffffffffffffffffffff821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016105c0565b50505050565b60606118d0826119e5565b92915050565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f6060528060405250806119535760405163abae3d6d60e01b81526001600160a01b038087166004830152808616602483015284166044820152606481018390526084016105c0565b5050505050565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806118bf5760405163abae3d6d60e01b81526001600160a01b03808616600483015230602483015284166044820152606481018390526084016105c0565b5f6119dd848484611a8a565b949350505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a43573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a679190612115565b815f81518110611a7957611a79611df1565b602002602001018181525050919050565b5f8082118015611acb5750825f81518110611aa757611aa7611df1565b6020026020010151845f81518110611ac157611ac1611df1565b6020026020010151115b15611b53575f82845f81518110611ae457611ae4611df1565b6020026020010151865f81518110611afe57611afe611df1565b6020026020010151611b109190611e31565b611b2290670de0b6b3a7640000611e7c565b611b2c9190611e93565b7f000000000000000000000000000000000000000000000000000000000000000011159150505b9392505050565b5080545f8255905f5260205f2090810190611b759190611bc1565b50565b828054828255905f5260205f20908101928215611bb1579160200282015b82811115611bb1578251825591602001919060010190611b96565b50611bbd929150611bc1565b5090565b5b80821115611bbd575f8155600101611bc2565b6001600160a01b0381168114611b75575f80fd5b5f805f805f60808688031215611bfd575f80fd5b8535611c0881611bd5565b94506020860135611c1881611bd5565b935060408601359250606086013567ffffffffffffffff80821115611c3b575f80fd5b818801915088601f830112611c4e575f80fd5b813581811115611c5c575f80fd5b896020828501011115611c6d575f80fd5b9699959850939650602001949392505050565b5f60208284031215611c90575f80fd5b5035919050565b5f8151808452602080850194508084015f5b83811015611cc557815187529582019590820190600101611ca9565b509495945050505050565b60c081525f611ce260c0830189611c97565b6020838203818501528189518084528284019150828160051b850101838c015f805b84811015611d5757878403601f19018652825180518086529088019088860190845b81811015611d425783518352928a0192918a0191600101611d26565b50509688019694505091860191600101611d04565b5050508a60408801528681036060880152611d72818b611c97565b9450505050508281036080840152611d8a8186611c97565b915050611d9b60a083018415159052565b979650505050505050565b5f6020808352835180828501525f5b81811015611dd157858101830151858201604001528201611db5565b505f604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201611e2a57611e2a611e05565b5060010190565b818103818111156118d0576118d0611e05565b634e487b7160e01b5f52603160045260245ffd5b606081525f611e6a6060830186611c97565b60208301949094525060400152919050565b80820281158282048414176118d0576118d0611e05565b5f82611ead57634e487b7160e01b5f52601260045260245ffd5b500490565b808201808211156118d0576118d0611e05565b634e487b7160e01b5f52604160045260245ffd5b604051610100810167ffffffffffffffff81118282101715611efd57611efd611ec5565b60405290565b80516bffffffffffffffffffffffff81168114611f1e575f80fd5b919050565b8051611f1e81611bd5565b805163ffffffff81168114611f1e575f80fd5b805160068110611f1e575f80fd5b5f82601f830112611f5e575f80fd5b8151602067ffffffffffffffff80831115611f7b57611f7b611ec5565b8260051b604051601f19603f83011681018181108482111715611fa057611fa0611ec5565b604052938452858101830193838101925087851115611fbd575f80fd5b83870191505b84821015611d9b57611fd482611f2e565b83529183019190830190611fc3565b5f60208284031215611ff3575f80fd5b815167ffffffffffffffff8082111561200a575f80fd5b90830190610100828603121561201e575f80fd5b612026611ed9565b61202f83611f03565b815261203d60208401611f23565b60208201526040830151604082015261205860608401611f2e565b606082015261206960808401611f2e565b608082015261207a60a08401611f2e565b60a082015261208b60c08401611f41565b60c082015260e0830151828111156120a1575f80fd5b6120ad87828601611f4f565b60e08301525095945050505050565b634e487b7160e01b5f52602160045260245ffd5b602081525f611b536020830184611c97565b5f80604083850312156120f3575f80fd5b82516120fe81611bd5565b915061210c60208401611f03565b90509250929050565b5f60208284031215612125575f80fd5b505191905056fea264697066735822122053e5fd75b91c87b722d799bba5b6c6ab7083d49abea6b5ce94908bb569ebb90e64736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106101a5575f3560e01c8063879d9090116100e8578063cbcf252a11610093578063e77cdcc91161006e578063e77cdcc9146104e1578063eacdaabc14610508578063eb338c961461052f578063ffa1ad7414610542575f80fd5b8063cbcf252a1461045f578063cd25fe3814610486578063e1f1176d146104ba575f80fd5b8063b69ef8a8116100c3578063b69ef8a81461042a578063b6b55f2514610432578063c2c4c5c114610445575f80fd5b8063879d9090146103a0578063a694fc3a146103a9578063a74466ad146103bc575f80fd5b806352c824f511610153578063592cf3fb1161012e578063592cf3fb1461031857806372f702f31461033f57806378e0613614610366578063809cee2f14610379575f80fd5b806352c824f5146102b757806356e76058146102de5780635829c5ec146102f1575f80fd5b80632e17de78116101835780632e17de78146102725780633e7329971461028757806342cde4e814610290575f80fd5b8063150b7a02146101a957806316a75172146101fe5780632871405114610233575b5f80fd5b6101c86101b7366004611be9565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b6102257f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101f5565b61025a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101f5565b610285610280366004611c80565b610573565b005b61022560025481565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b6102256102ec366004611c80565b610830565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b61025a7f000000000000000000000000000000000000000000000000000000000000000081565b610225610374366004611c80565b61084f565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b61022560015481565b6102856103b7366004611c80565b6109f0565b6103ff6103ca366004611c80565b600460208190525f918252604090912080546001820154600383015492909301546001600160a01b0391821693909116919084565b604080516001600160a01b0395861681529490931660208501529183015260608201526080016101f5565b6102255f5481565b610285610440366004611c80565b610f81565b61044d61101f565b6040516101f596959493929190611cd0565b61025a7f000000000000000000000000000000000000000000000000000000000000000081565b6104aa610494366004611c80565b5f90815260046020526040902060030154151590565b60405190151581526020016101f5565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b6102257f000000000000000000000000000000000000000000000000000000000000000081565b61022561053d366004611c80565b611307565b610566604051806040016040528060058152602001640302e312e360dc1b81525081565b6040516101f59190611da6565b5f81815260046020526040902060018101546001600160a01b031633146105c957600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b5f6105d261101f565b505050505090505f5b815181101561061557838282815181106105f7576105f7611df1565b602002602001015103156106155761060e81611e19565b90506105db565b6004830154600284018054604080516020808402820181019092528281525f939092909183018282801561066657602002820191905f5260205f20905b815481526020019060010190808311610652575b505050600388015488545f8b8152600460205260408120805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018054909116905595965091946001600160a01b03909116935091506106c66002830182611b5a565b505f60038201819055600490910155600580546106e590600190611e31565b815481106106f5576106f5611df1565b905f5260205f2001546005868154811061071157610711611df1565b5f91825260209091200155600580548061072d5761072d611e44565b5f8281526020812082015f1990810191909155019055604051632142170760e11b8152306004820152336024820152604481018990526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e906064015f604051808303815f87803b1580156107ae575f80fd5b505af11580156107c0573d5f803e3d5ffd5b505050505f8411156107d6576107d68185611316565b806001600160a01b0316336001600160a01b0316897f246ee6115bfd84e00097b16569c2ff2f822026bb9595a82cd2c1e69d4b6ea50c86888760405161081e93929190611e58565b60405180910390a45050505050505050565b6003818154811061083f575f80fd5b5f91825260209091200154905081565b5f818152600460209081526040808320815160a08101835281546001600160a01b03908116825260018301541681850152600282018054845181870281018701865281815287969395860193909291908301828280156108cc57602002820191905f5260205f20905b8154815260200190600101908083116108b8575b505050505081526020016003820154815260200160048201548152505090508060800151915080606001515f036109195760405163e0606b6360e01b8152600481018490526024016105c0565b5f805f805f61092661139e565b5050945094509450945094505f8411156109e5575f5b82518110156109e3578883828151811061095857610958611df1565b6020026020010151036109d357858411156109ae57838683838151811061098157610981611df1565b60200260200101516109939190611e7c565b61099d9190611e93565b6109a79089611eb2565b97506109e3565b8181815181106109c0576109c0611df1565b6020026020010151886109a79190611eb2565b6109dc81611e19565b905061093c565b505b505050505050919050565b6001545f03610a125760405163afb0be3360e01b815260040160405180910390fd5b6005547f00000000000000000000000000000000000000000000000000000000000000008103610a775760405163fd20861560e01b81527f000000000000000000000000000000000000000000000000000000000000000060048201526024016105c0565b60405163ef0e239b60e01b8152600481018390525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b906024015f60405180830381865afa158015610adb573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610b029190810190611fe3565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610b5157604051637ad404bf60e11b8152600481018490526024016105c0565b7f000000000000000000000000000000000000000000000000000000000000000015801590610ba4575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b15610bc557604051637ad404bf60e11b8152600481018490526024016105c0565b5f7f0000000000000000000000000000000000000000000000000000000000000000118015610c1e5750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b15610c3f57604051637ad404bf60e11b8152600481018490526024016105c0565b60048160c001516005811115610c5757610c576120bc565b14610c96578060c001516005811115610c7257610c726120bc565b604051633c053f9d60e21b81526004810191909152602481018490526044016105c0565b5f81602001516001600160a01b0316803b806020016040519081016040528181525f908060200190933c805190602001209050807f000000000000000000000000000000000000000000000000000000000000000014610d1957602082015160405162a2307960e51b81526001600160a01b0390911660048201526024016105c0565b6003548015610de55760e083015151818114610d4b57604051637ad404bf60e11b8152600481018790526024016105c0565b5f5b81811015610de2578460e001518181518110610d6b57610d6b611df1565b602002602001015163ffffffff1660038281548110610d8c57610d8c611df1565b905f5260205f20015414610dd25760038181548110610dad57610dad611df1565b905f5260205f200154604051632ab10b0b60e21b81526004016105c091815260200190565b610ddb81611e19565b9050610d4d565b50505b610e0085845f01516bffffffffffffffffffffffff16611727565b5f85815260046020908152604082209085015181546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff1991821617835560018301805490911633179055909190610e54906118c5565b8051909150610e6c9060028401906020840190611b78565b50426003830155600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e906064015f604051808303815f87803b158015610f12575f80fd5b505af1158015610f24573d5f803e3d5ffd5b5050505084602001516001600160a01b0316336001600160a01b0316887f5d43ac9b1b213902df90d405b0006308578486b6c62182c5df202ed572c844e484604051610f7091906120d0565b60405180910390a450505050505050565b5f815f54610f8f9190611eb2565b90505f82600154610fa09190611eb2565b5f83905560018190559050610fd77f00000000000000000000000000000000000000000000000000000000000000003330866118d6565b604080518481526020810184905290810182905233907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2505050565b6060805f6060805f805f805f805f8061103661139e565b96509650965096509650965096505f86111561122c575f8786111561119f575f8060015b898110156110f557888b88838151811061107657611076611df1565b60200260200101516110889190611e7c565b6110929190611e93565b925061109e8383611eb2565b91508781815181106110b2576110b2611df1565b602002602001015193508260045f8681526020019081526020015f206004015f8282546110df9190611eb2565b909155506110ee905081611e19565b905061105a565b50878a875f8151811061110a5761110a611df1565b602002602001015161111c9190611e7c565b6111269190611e93565b91506111328282611eb2565b9050865f8151811061114657611146611df1565b60200260200101519250808a111561116f57611162818b611e31565b61116c9083611eb2565b91505b5f838152600460208190526040822001805484929061118f908490611eb2565b909155505f9a5061122592505050565b5f5b87811015611217578581815181106111bb576111bb611df1565b602002602001015191508481815181106111d7576111d7611df1565b602002602001015160045f8481526020019081526020015f206004015f8282546112019190611eb2565b90915550611210905081611e19565b90506111a1565b506112228689611e31565b97505b5060018790555b8051156112f2575f5b82518110156112af575f83828151811061125157611251611df1565b6020026020010151905082828151811061126d5761126d611df1565b602002602001015160045f8381526020019081526020015f20600201908051906020019061129c929190611b78565b5050806112a890611e19565b9050611235565b50426002556040805188815260208101889052600199507f21d81d5d656869e8ce3ba8d65526a2f0dbbcd3d36f5f9999eb7c84360e45eced910160405180910390a15b909c909b509399509097509550929350915050565b6005818154811061083f575f80fd5b805f808282546113269190611e31565b9091555061135790507f0000000000000000000000000000000000000000000000000000000000000000838361195a565b816001600160a01b03167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243648260405161139291815260200190565b60405180910390a25050565b5f805f6060806060805f60058054905090508067ffffffffffffffff8111156113c9576113c9611ec5565b6040519080825280602002602001820160405280156113f2578160200160208202803683370190505b5092505f5b81811015611448576005818154811061141257611412611df1565b905f5260205f20015484828151811061142d5761142d611df1565b602090810291909101015261144181611e19565b90506113f7565b506002547f00000000000000000000000000000000000000000000000000000000000000006114778242611e31565b1061171c576001549850881561171c578167ffffffffffffffff8111156114a0576114a0611ec5565b6040519080825280602002602001820160405280156114c9578160200160208202803683370190505b5095508167ffffffffffffffff8111156114e5576114e5611ec5565b60405190808252806020026020018201604052801561150e578160200160208202803683370190505b5094508167ffffffffffffffff81111561152a5761152a611ec5565b60405190808252806020026020018201604052801561155d57816020015b60608152602001906001900390816115485790505b5092505f5b8281101561171a575f60045f87848151811061158057611580611df1565b60209081029190910181015182528101919091526040015f2080549091506115b0906001600160a01b03166118c5565b8583815181106115c2576115c2611df1565b602090810291909101015260038101548390818111156115e0578091505b6115ea8242611e31565b90505f61166188868151811061160257611602611df1565b60200260200101518560020180548060200260200160405190810160405280929190818152602001828054801561165657602002820191905f5260205f20905b815481526020019060010190808311611642575b5050505050846119d1565b90508015611705575f611694837f0000000000000000000000000000000000000000000000000000000000000000611e7c565b90506116a0818e611eb2565b9c50808b8f815181106116b5576116b5611df1565b6020026020010181815250508986815181106116d3576116d3611df1565b60200260200101518c8f815181106116ed576116ed611df1565b60209081029190910101526117018e611e19565b9d50505b505050508061171390611e19565b9050611562565b505b505090919293949596565b604051633cebfa4f60e01b8152600481018390525f9081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633cebfa4f906024016040805180830381865afa15801561178d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117b191906120e2565b91509150816001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461183a57604051630b80380d60e31b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152831660248201526044016105c0565b7f0000000000000000000000000000000000000000000000000000000000000000816bffffffffffffffffffffffff1610156118bf57604051632b30b24760e21b81526bffffffffffffffffffffffff821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016105c0565b50505050565b60606118d0826119e5565b92915050565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f6060528060405250806119535760405163abae3d6d60e01b81526001600160a01b038087166004830152808616602483015284166044820152606481018390526084016105c0565b5050505050565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806118bf5760405163abae3d6d60e01b81526001600160a01b03808616600483015230602483015284166044820152606481018390526084016105c0565b5f6119dd848484611a8a565b949350505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a43573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a679190612115565b815f81518110611a7957611a79611df1565b602002602001018181525050919050565b5f8082118015611acb5750825f81518110611aa757611aa7611df1565b6020026020010151845f81518110611ac157611ac1611df1565b6020026020010151115b15611b53575f82845f81518110611ae457611ae4611df1565b6020026020010151865f81518110611afe57611afe611df1565b6020026020010151611b109190611e31565b611b2290670de0b6b3a7640000611e7c565b611b2c9190611e93565b7f000000000000000000000000000000000000000000000000000000000000000011159150505b9392505050565b5080545f8255905f5260205f2090810190611b759190611bc1565b50565b828054828255905f5260205f20908101928215611bb1579160200282015b82811115611bb1578251825591602001919060010190611b96565b50611bbd929150611bc1565b5090565b5b80821115611bbd575f8155600101611bc2565b6001600160a01b0381168114611b75575f80fd5b5f805f805f60808688031215611bfd575f80fd5b8535611c0881611bd5565b94506020860135611c1881611bd5565b935060408601359250606086013567ffffffffffffffff80821115611c3b575f80fd5b818801915088601f830112611c4e575f80fd5b813581811115611c5c575f80fd5b896020828501011115611c6d575f80fd5b9699959850939650602001949392505050565b5f60208284031215611c90575f80fd5b5035919050565b5f8151808452602080850194508084015f5b83811015611cc557815187529582019590820190600101611ca9565b509495945050505050565b60c081525f611ce260c0830189611c97565b6020838203818501528189518084528284019150828160051b850101838c015f805b84811015611d5757878403601f19018652825180518086529088019088860190845b81811015611d425783518352928a0192918a0191600101611d26565b50509688019694505091860191600101611d04565b5050508a60408801528681036060880152611d72818b611c97565b9450505050508281036080840152611d8a8186611c97565b915050611d9b60a083018415159052565b979650505050505050565b5f6020808352835180828501525f5b81811015611dd157858101830151858201604001528201611db5565b505f604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201611e2a57611e2a611e05565b5060010190565b818103818111156118d0576118d0611e05565b634e487b7160e01b5f52603160045260245ffd5b606081525f611e6a6060830186611c97565b60208301949094525060400152919050565b80820281158282048414176118d0576118d0611e05565b5f82611ead57634e487b7160e01b5f52601260045260245ffd5b500490565b808201808211156118d0576118d0611e05565b634e487b7160e01b5f52604160045260245ffd5b604051610100810167ffffffffffffffff81118282101715611efd57611efd611ec5565b60405290565b80516bffffffffffffffffffffffff81168114611f1e575f80fd5b919050565b8051611f1e81611bd5565b805163ffffffff81168114611f1e575f80fd5b805160068110611f1e575f80fd5b5f82601f830112611f5e575f80fd5b8151602067ffffffffffffffff80831115611f7b57611f7b611ec5565b8260051b604051601f19603f83011681018181108482111715611fa057611fa0611ec5565b604052938452858101830193838101925087851115611fbd575f80fd5b83870191505b84821015611d9b57611fd482611f2e565b83529183019190830190611fc3565b5f60208284031215611ff3575f80fd5b815167ffffffffffffffff8082111561200a575f80fd5b90830190610100828603121561201e575f80fd5b612026611ed9565b61202f83611f03565b815261203d60208401611f23565b60208201526040830151604082015261205860608401611f2e565b606082015261206960808401611f2e565b608082015261207a60a08401611f2e565b60a082015261208b60c08401611f41565b60c082015260e0830151828111156120a1575f80fd5b6120ad87828601611f4f565b60e08301525095945050505050565b634e487b7160e01b5f52602160045260245ffd5b602081525f611b536020830184611c97565b5f80604083850312156120f3575f80fd5b82516120fe81611bd5565b915061210c60208401611f03565b90509250929050565b5f60208284031215612125575f80fd5b505191905056fea264697066735822122053e5fd75b91c87b722d799bba5b6c6ab7083d49abea6b5ce94908bb569ebb90e64736f6c63430008150033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/abis/0.8.21/ServiceStakingTokenMechUsage.json b/abis/0.8.21/ServiceStakingTokenMechUsage.json new file mode 100644 index 00000000..52a38292 --- /dev/null +++ b/abis/0.8.21/ServiceStakingTokenMechUsage.json @@ -0,0 +1,1131 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "ServiceStakingTokenMechUsage", + "sourceName": "contracts/staking/ServiceStakingTokenMechUsage.sol", + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "maxNumServices", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardsPerSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minStakingDeposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "livenessPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "livenessRatio", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numAgentInstances", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "agentIds", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "threshold", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "configHash", + "type": "bytes32" + } + ], + "internalType": "struct ServiceStakingBase.StakingParams", + "name": "_stakingParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_serviceRegistry", + "type": "address" + }, + { + "internalType": "address", + "name": "_serviceRegistryTokenUtility", + "type": "address" + }, + { + "internalType": "address", + "name": "_stakingToken", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_proxyHash", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_agentMech", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "AgentInstanceRegistered", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "AgentInstancesSlotsFilled", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "agentId", + "type": "uint256" + } + ], + "name": "AgentNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "agentId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "AgentNotInService", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "componentId", + "type": "uint256" + } + ], + "name": "ComponentNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "HashExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "IncorrectAgentBondingValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "IncorrectRegistrationDepositValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "LowerThan", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "manager", + "type": "address" + } + ], + "name": "ManagerOnly", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxNumServices", + "type": "uint256" + } + ], + "name": "MaxNumServicesReached", + "type": "error" + }, + { + "inputs": [], + "name": "NoRewardsAvailable", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "provided", + "type": "address" + }, + { + "internalType": "address", + "name": "expected", + "type": "address" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "OnlyOwnServiceMultisig", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "OperatorHasNoInstances", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "Overflow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnerOnly", + "type": "error" + }, + { + "inputs": [], + "name": "Paused", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuard", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "ServiceMustBeInactive", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "ServiceNotStaked", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TokenTransferFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "multisig", + "type": "address" + } + ], + "name": "UnauthorizedMultisig", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "provided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expected", + "type": "uint256" + } + ], + "name": "ValueLowerThan", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "agentId", + "type": "uint256" + } + ], + "name": "WrongAgentId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numValues1", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numValues2", + "type": "uint256" + } + ], + "name": "WrongArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "WrongOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "WrongServiceConfiguration", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "state", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "WrongServiceState", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expected", + "type": "address" + }, + { + "internalType": "address", + "name": "provided", + "type": "address" + } + ], + "name": "WrongStakingToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxThreshold", + "type": "uint256" + } + ], + "name": "WrongThreshold", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroMechAgentAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroValue", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "availableRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "numServices", + "type": "uint256" + } + ], + "name": "Checkpoint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "availableRewards", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "multisig", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "nonces", + "type": "uint256[]" + } + ], + "name": "ServiceStaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "multisig", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "nonces", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "reward", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tsStart", + "type": "uint256" + } + ], + "name": "ServiceUnstaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "agentIds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "agentMech", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "availableRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "calculateServiceStakingReward", + "outputs": [ + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "checkpoint", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[][]", + "name": "", + "type": "uint256[][]" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "configHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "isServiceStaked", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "livenessPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "livenessRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "mapServiceInfo", + "outputs": [ + { + "internalType": "address", + "name": "multisig", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tsStart", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxNumServices", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minStakingDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "numAgentInstances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proxyHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardsPerSecond", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "serviceRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "serviceRegistryTokenUtility", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "setServiceIds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stakingToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "threshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tsCheckpoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "unstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x61022060405234801562000011575f80fd5b5060405162002929380380620029298339810160408190526200003491620003ed565b808686868686848482825f01515f14806200005157506020830151155b806200005f57506060830151155b806200006d57506080830151155b806200007b575060a0830151155b156200009a57604051637c946ed760e01b815260040160405180910390fd5b600283604001511015620000d657604080840151905163491a2bb160e01b81526004810191909152600260248201526044015b60405180910390fd5b6001600160a01b038216620000fe5760405163d92e233d60e01b815260040160405180910390fd5b82516080908152602084015160a0908152604085015160c052606085015160e09081529185015161010090815290850151610120526001600160a01b038416610180529084015161014052830151610160525f805b8460c00151518110156200023457818560c0015182815181106200017b576200017b62000501565b602002602001015111620001c7578460c001518181518110620001a257620001a262000501565b6020026020010151604051632ab10b0b60e21b8152600401620000cd91815260200190565b8460c001518181518110620001e057620001e062000501565b6020908102919091010151600380546001810182555f919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0181905591506200022c8162000515565b905062000153565b50816200025457604051637c946ed760e01b815260040160405180910390fd5b506101a0525050426002556001600160a01b03821615806200027d57506001600160a01b038316155b156200029c5760405163d92e233d60e01b815260040160405180910390fd5b506001600160a01b039081166101e0529081166101c05283169150620002d690505760405162ca95f960e81b815260040160405180910390fd5b6001600160a01b031661020052506200053a945050505050565b634e487b7160e01b5f52604160045260245ffd5b60405161012081016001600160401b03811182821017156200032a576200032a620002f0565b60405290565b5f82601f83011262000340575f80fd5b815160206001600160401b03808311156200035f576200035f620002f0565b8260051b604051601f19603f83011681018181108482111715620003875762000387620002f0565b604052938452858101830193838101925087851115620003a5575f80fd5b83870191505b84821015620003c657815183529183019190830190620003ab565b979650505050505050565b80516001600160a01b0381168114620003e8575f80fd5b919050565b5f805f805f8060c0878903121562000403575f80fd5b86516001600160401b03808211156200041a575f80fd5b90880190610120828b0312156200042f575f80fd5b6200043962000304565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c08301518281111562000481575f80fd5b6200048f8c82860162000330565b60c08301525060e083810151908201526101009283015192810192909252509550620004be60208801620003d1565b9450620004ce60408801620003d1565b9350620004de60608801620003d1565b925060808701519150620004f560a08801620003d1565b90509295509295509295565b634e487b7160e01b5f52603260045260245ffd5b5f600182016200053357634e487b7160e01b5f52601160045260245ffd5b5060010190565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e051610200516122c7620006625f395f81816103760152611ad301525f818161034f01528181610fe201528181611363015281816117f3015261183701525f8181610243015261177b01525f81816103b00152610cfe01525f81816104960152818161079f01528181610ac10152610efb01525f81816104f101528181610b850152610bb401525f81816102a001528181610bfa0152610c2e01525f81816103010152610b4301525f81816103280152611c9001525f81816102c7015261148001525f81816105180152818161186e01526118c501525f818161053f01526116a201525f818161020e01528181610a490152610a7d01526122c75ff3fe608060405234801561000f575f80fd5b50600436106101b0575f3560e01c8063809cee2f116100f3578063cbcf252a11610093578063e77cdcc91161006e578063e77cdcc914610513578063eacdaabc1461053a578063eb338c9614610561578063ffa1ad7414610574575f80fd5b8063cbcf252a14610491578063cd25fe38146104b8578063e1f1176d146104ec575f80fd5b8063a74466ad116100ce578063a74466ad146103ee578063b69ef8a81461045c578063b6b55f2514610464578063c2c4c5c114610477575f80fd5b8063809cee2f146103ab578063879d9090146103d2578063a694fc3a146103db575f80fd5b806352c824f51161015e578063592cf3fb11610139578063592cf3fb1461032357806372f702f31461034a57806375af4b6d1461037157806378e0613614610398575f80fd5b806352c824f5146102c257806356e76058146102e95780635829c5ec146102fc575f80fd5b80632e17de781161018e5780632e17de781461027d5780633e7329971461029257806342cde4e81461029b575f80fd5b8063150b7a02146101b457806316a7517214610209578063287140511461023e575b5f80fd5b6101d36101c2366004611d4e565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b6102307f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610200565b6102657f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610200565b61029061028b366004611de5565b6105a5565b005b61023060025481565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6102306102f7366004611de5565b610862565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6102657f000000000000000000000000000000000000000000000000000000000000000081565b6102657f000000000000000000000000000000000000000000000000000000000000000081565b6102306103a6366004611de5565b610881565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b61023060015481565b6102906103e9366004611de5565b610a22565b6104316103fc366004611de5565b600460208190525f918252604090912080546001820154600383015492909301546001600160a01b0391821693909116919084565b604080516001600160a01b039586168152949093166020850152918301526060820152608001610200565b6102305f5481565b610290610472366004611de5565b610fb3565b61047f611051565b60405161020096959493929190611e35565b6102657f000000000000000000000000000000000000000000000000000000000000000081565b6104dc6104c6366004611de5565b5f90815260046020526040902060030154151590565b6040519015158152602001610200565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b61023061056f366004611de5565b611339565b610598604051806040016040528060058152602001640302e312e360dc1b81525081565b6040516102009190611f0b565b5f81815260046020526040902060018101546001600160a01b031633146105fb57600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b5f610604611051565b505050505090505f5b8151811015610647578382828151811061062957610629611f56565b602002602001015103156106475761064081611f7e565b905061060d565b6004830154600284018054604080516020808402820181019092528281525f939092909183018282801561069857602002820191905f5260205f20905b815481526020019060010190808311610684575b505050600388015488545f8b8152600460205260408120805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018054909116905595965091946001600160a01b03909116935091506106f86002830182611cbf565b505f600382018190556004909101556005805461071790600190611f96565b8154811061072757610727611f56565b905f5260205f2001546005868154811061074357610743611f56565b5f91825260209091200155600580548061075f5761075f611fa9565b5f8281526020812082015f1990810191909155019055604051632142170760e11b8152306004820152336024820152604481018990526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e906064015f604051808303815f87803b1580156107e0575f80fd5b505af11580156107f2573d5f803e3d5ffd5b505050505f841115610808576108088185611348565b806001600160a01b0316336001600160a01b0316897f246ee6115bfd84e00097b16569c2ff2f822026bb9595a82cd2c1e69d4b6ea50c86888760405161085093929190611fbd565b60405180910390a45050505050505050565b60038181548110610871575f80fd5b5f91825260209091200154905081565b5f818152600460209081526040808320815160a08101835281546001600160a01b03908116825260018301541681850152600282018054845181870281018701865281815287969395860193909291908301828280156108fe57602002820191905f5260205f20905b8154815260200190600101908083116108ea575b505050505081526020016003820154815260200160048201548152505090508060800151915080606001515f0361094b5760405163e0606b6360e01b8152600481018490526024016105f2565b5f805f805f6109586113d0565b5050945094509450945094505f841115610a17575f5b8251811015610a15578883828151811061098a5761098a611f56565b602002602001015103610a0557858411156109e05783868383815181106109b3576109b3611f56565b60200260200101516109c59190611fe1565b6109cf9190611ff8565b6109d99089612017565b9750610a15565b8181815181106109f2576109f2611f56565b6020026020010151886109d99190612017565b610a0e81611f7e565b905061096e565b505b505050505050919050565b6001545f03610a445760405163afb0be3360e01b815260040160405180910390fd5b6005547f00000000000000000000000000000000000000000000000000000000000000008103610aa95760405163fd20861560e01b81527f000000000000000000000000000000000000000000000000000000000000000060048201526024016105f2565b60405163ef0e239b60e01b8152600481018390525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b906024015f60405180830381865afa158015610b0d573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610b349190810190612148565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610b8357604051637ad404bf60e11b8152600481018490526024016105f2565b7f000000000000000000000000000000000000000000000000000000000000000015801590610bd6575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b15610bf757604051637ad404bf60e11b8152600481018490526024016105f2565b5f7f0000000000000000000000000000000000000000000000000000000000000000118015610c505750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b15610c7157604051637ad404bf60e11b8152600481018490526024016105f2565b60048160c001516005811115610c8957610c89612221565b14610cc8578060c001516005811115610ca457610ca4612221565b604051633c053f9d60e21b81526004810191909152602481018490526044016105f2565b5f81602001516001600160a01b0316803b806020016040519081016040528181525f908060200190933c805190602001209050807f000000000000000000000000000000000000000000000000000000000000000014610d4b57602082015160405162a2307960e51b81526001600160a01b0390911660048201526024016105f2565b6003548015610e175760e083015151818114610d7d57604051637ad404bf60e11b8152600481018790526024016105f2565b5f5b81811015610e14578460e001518181518110610d9d57610d9d611f56565b602002602001015163ffffffff1660038281548110610dbe57610dbe611f56565b905f5260205f20015414610e045760038181548110610ddf57610ddf611f56565b905f5260205f200154604051632ab10b0b60e21b81526004016105f291815260200190565b610e0d81611f7e565b9050610d7f565b50505b610e3285845f01516bffffffffffffffffffffffff16611759565b5f85815260046020908152604082209085015181546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff1991821617835560018301805490911633179055909190610e86906118f7565b8051909150610e9e9060028401906020840190611cdd565b50426003830155600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e906064015f604051808303815f87803b158015610f44575f80fd5b505af1158015610f56573d5f803e3d5ffd5b5050505084602001516001600160a01b0316336001600160a01b0316887f5d43ac9b1b213902df90d405b0006308578486b6c62182c5df202ed572c844e484604051610fa29190612235565b60405180910390a450505050505050565b5f815f54610fc19190612017565b90505f82600154610fd29190612017565b5f839055600181905590506110097f0000000000000000000000000000000000000000000000000000000000000000333086611908565b604080518481526020810184905290810182905233907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2505050565b6060805f6060805f805f805f805f806110686113d0565b96509650965096509650965096505f86111561125e575f878611156111d1575f8060015b8981101561112757888b8883815181106110a8576110a8611f56565b60200260200101516110ba9190611fe1565b6110c49190611ff8565b92506110d08383612017565b91508781815181106110e4576110e4611f56565b602002602001015193508260045f8681526020019081526020015f206004015f8282546111119190612017565b90915550611120905081611f7e565b905061108c565b50878a875f8151811061113c5761113c611f56565b602002602001015161114e9190611fe1565b6111589190611ff8565b91506111648282612017565b9050865f8151811061117857611178611f56565b60200260200101519250808a11156111a157611194818b611f96565b61119e9083612017565b91505b5f83815260046020819052604082200180548492906111c1908490612017565b909155505f9a5061125792505050565b5f5b87811015611249578581815181106111ed576111ed611f56565b6020026020010151915084818151811061120957611209611f56565b602002602001015160045f8481526020019081526020015f206004015f8282546112339190612017565b90915550611242905081611f7e565b90506111d3565b506112548689611f96565b97505b5060018790555b805115611324575f5b82518110156112e1575f83828151811061128357611283611f56565b6020026020010151905082828151811061129f5761129f611f56565b602002602001015160045f8381526020019081526020015f2060020190805190602001906112ce929190611cdd565b5050806112da90611f7e565b9050611267565b50426002556040805188815260208101889052600199507f21d81d5d656869e8ce3ba8d65526a2f0dbbcd3d36f5f9999eb7c84360e45eced910160405180910390a15b909c909b509399509097509550929350915050565b60058181548110610871575f80fd5b805f808282546113589190611f96565b9091555061138990507f0000000000000000000000000000000000000000000000000000000000000000838361198c565b816001600160a01b03167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364826040516113c491815260200190565b60405180910390a25050565b5f805f6060806060805f60058054905090508067ffffffffffffffff8111156113fb576113fb61202a565b604051908082528060200260200182016040528015611424578160200160208202803683370190505b5092505f5b8181101561147a576005818154811061144457611444611f56565b905f5260205f20015484828151811061145f5761145f611f56565b602090810291909101015261147381611f7e565b9050611429565b506002547f00000000000000000000000000000000000000000000000000000000000000006114a98242611f96565b1061174e576001549850881561174e578167ffffffffffffffff8111156114d2576114d261202a565b6040519080825280602002602001820160405280156114fb578160200160208202803683370190505b5095508167ffffffffffffffff8111156115175761151761202a565b604051908082528060200260200182016040528015611540578160200160208202803683370190505b5094508167ffffffffffffffff81111561155c5761155c61202a565b60405190808252806020026020018201604052801561158f57816020015b606081526020019060019003908161157a5790505b5092505f5b8281101561174c575f60045f8784815181106115b2576115b2611f56565b60209081029190910181015182528101919091526040015f2080549091506115e2906001600160a01b03166118f7565b8583815181106115f4576115f4611f56565b60209081029190910101526003810154839081811115611612578091505b61161c8242611f96565b90505f61169388868151811061163457611634611f56565b60200260200101518560020180548060200260200160405190810160405280929190818152602001828054801561168857602002820191905f5260205f20905b815481526020019060010190808311611674575b505050505084611a03565b90508015611737575f6116c6837f0000000000000000000000000000000000000000000000000000000000000000611fe1565b90506116d2818e612017565b9c50808b8f815181106116e7576116e7611f56565b60200260200101818152505089868151811061170557611705611f56565b60200260200101518c8f8151811061171f5761171f611f56565b60209081029190910101526117338e611f7e565b9d50505b505050508061174590611f7e565b9050611594565b505b505090919293949596565b604051633cebfa4f60e01b8152600481018390525f9081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633cebfa4f906024016040805180830381865afa1580156117bf573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117e39190612247565b91509150816001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461186c57604051630b80380d60e31b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152831660248201526044016105f2565b7f0000000000000000000000000000000000000000000000000000000000000000816bffffffffffffffffffffffff1610156118f157604051632b30b24760e21b81526bffffffffffffffffffffffff821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016105f2565b50505050565b606061190282611a17565b92915050565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f6060528060405250806119855760405163abae3d6d60e01b81526001600160a01b038087166004830152808616602483015284166044820152606481018390526084016105f2565b5050505050565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806118f15760405163abae3d6d60e01b81526001600160a01b03808616600483015230602483015284166044820152606481018390526084016105f2565b5f611a0f848484611b60565b949350505050565b6040805160028082526060808301845292602083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a73573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a97919061227a565b815f81518110611aa957611aa9611f56565b6020908102919091010152604051637af7347360e01b81526001600160a01b0383811660048301527f00000000000000000000000000000000000000000000000000000000000000001690637af7347390602401602060405180830381865afa158015611b18573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b3c919061227a565b81600181518110611b4f57611b4f611f56565b602002602001018181525050919050565b5f8082118015611ba15750825f81518110611b7d57611b7d611f56565b6020026020010151845f81518110611b9757611b97611f56565b6020026020010151115b8015611be0575082600181518110611bbb57611bbb611f56565b602002602001015184600181518110611bd657611bd6611f56565b6020026020010151115b15611cb8575f835f81518110611bf857611bf8611f56565b6020026020010151855f81518110611c1257611c12611f56565b6020026020010151611c249190611f96565b90505f84600181518110611c3a57611c3a611f56565b602002602001015186600181518110611c5557611c55611f56565b6020026020010151611c679190611f96565b9050818111611cb5575f84611c8483670de0b6b3a7640000611fe1565b611c8e9190611ff8565b7f000000000000000000000000000000000000000000000000000000000000000011159350505b50505b9392505050565b5080545f8255905f5260205f2090810190611cda9190611d26565b50565b828054828255905f5260205f20908101928215611d16579160200282015b82811115611d16578251825591602001919060010190611cfb565b50611d22929150611d26565b5090565b5b80821115611d22575f8155600101611d27565b6001600160a01b0381168114611cda575f80fd5b5f805f805f60808688031215611d62575f80fd5b8535611d6d81611d3a565b94506020860135611d7d81611d3a565b935060408601359250606086013567ffffffffffffffff80821115611da0575f80fd5b818801915088601f830112611db3575f80fd5b813581811115611dc1575f80fd5b896020828501011115611dd2575f80fd5b9699959850939650602001949392505050565b5f60208284031215611df5575f80fd5b5035919050565b5f8151808452602080850194508084015f5b83811015611e2a57815187529582019590820190600101611e0e565b509495945050505050565b60c081525f611e4760c0830189611dfc565b6020838203818501528189518084528284019150828160051b850101838c015f805b84811015611ebc57878403601f19018652825180518086529088019088860190845b81811015611ea75783518352928a0192918a0191600101611e8b565b50509688019694505091860191600101611e69565b5050508a60408801528681036060880152611ed7818b611dfc565b9450505050508281036080840152611eef8186611dfc565b915050611f0060a083018415159052565b979650505050505050565b5f6020808352835180828501525f5b81811015611f3657858101830151858201604001528201611f1a565b505f604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201611f8f57611f8f611f6a565b5060010190565b8181038181111561190257611902611f6a565b634e487b7160e01b5f52603160045260245ffd5b606081525f611fcf6060830186611dfc565b60208301949094525060400152919050565b808202811582820484141761190257611902611f6a565b5f8261201257634e487b7160e01b5f52601260045260245ffd5b500490565b8082018082111561190257611902611f6a565b634e487b7160e01b5f52604160045260245ffd5b604051610100810167ffffffffffffffff811182821017156120625761206261202a565b60405290565b80516bffffffffffffffffffffffff81168114612083575f80fd5b919050565b805161208381611d3a565b805163ffffffff81168114612083575f80fd5b805160068110612083575f80fd5b5f82601f8301126120c3575f80fd5b8151602067ffffffffffffffff808311156120e0576120e061202a565b8260051b604051601f19603f830116810181811084821117156121055761210561202a565b604052938452858101830193838101925087851115612122575f80fd5b83870191505b84821015611f005761213982612093565b83529183019190830190612128565b5f60208284031215612158575f80fd5b815167ffffffffffffffff8082111561216f575f80fd5b908301906101008286031215612183575f80fd5b61218b61203e565b61219483612068565b81526121a260208401612088565b6020820152604083015160408201526121bd60608401612093565b60608201526121ce60808401612093565b60808201526121df60a08401612093565b60a08201526121f060c084016120a6565b60c082015260e083015182811115612206575f80fd5b612212878286016120b4565b60e08301525095945050505050565b634e487b7160e01b5f52602160045260245ffd5b602081525f611cb86020830184611dfc565b5f8060408385031215612258575f80fd5b825161226381611d3a565b915061227160208401612068565b90509250929050565b5f6020828403121561228a575f80fd5b505191905056fea2646970667358221220f70b859332fad87ee5856300e4104d6b01c2b28a1bc92142a2f75217203bc6b764736f6c63430008150033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106101b0575f3560e01c8063809cee2f116100f3578063cbcf252a11610093578063e77cdcc91161006e578063e77cdcc914610513578063eacdaabc1461053a578063eb338c9614610561578063ffa1ad7414610574575f80fd5b8063cbcf252a14610491578063cd25fe38146104b8578063e1f1176d146104ec575f80fd5b8063a74466ad116100ce578063a74466ad146103ee578063b69ef8a81461045c578063b6b55f2514610464578063c2c4c5c114610477575f80fd5b8063809cee2f146103ab578063879d9090146103d2578063a694fc3a146103db575f80fd5b806352c824f51161015e578063592cf3fb11610139578063592cf3fb1461032357806372f702f31461034a57806375af4b6d1461037157806378e0613614610398575f80fd5b806352c824f5146102c257806356e76058146102e95780635829c5ec146102fc575f80fd5b80632e17de781161018e5780632e17de781461027d5780633e7329971461029257806342cde4e81461029b575f80fd5b8063150b7a02146101b457806316a7517214610209578063287140511461023e575b5f80fd5b6101d36101c2366004611d4e565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b6102307f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610200565b6102657f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610200565b61029061028b366004611de5565b6105a5565b005b61023060025481565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6102306102f7366004611de5565b610862565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6102657f000000000000000000000000000000000000000000000000000000000000000081565b6102657f000000000000000000000000000000000000000000000000000000000000000081565b6102306103a6366004611de5565b610881565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b61023060015481565b6102906103e9366004611de5565b610a22565b6104316103fc366004611de5565b600460208190525f918252604090912080546001820154600383015492909301546001600160a01b0391821693909116919084565b604080516001600160a01b039586168152949093166020850152918301526060820152608001610200565b6102305f5481565b610290610472366004611de5565b610fb3565b61047f611051565b60405161020096959493929190611e35565b6102657f000000000000000000000000000000000000000000000000000000000000000081565b6104dc6104c6366004611de5565b5f90815260046020526040902060030154151590565b6040519015158152602001610200565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b6102307f000000000000000000000000000000000000000000000000000000000000000081565b61023061056f366004611de5565b611339565b610598604051806040016040528060058152602001640302e312e360dc1b81525081565b6040516102009190611f0b565b5f81815260046020526040902060018101546001600160a01b031633146105fb57600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b5f610604611051565b505050505090505f5b8151811015610647578382828151811061062957610629611f56565b602002602001015103156106475761064081611f7e565b905061060d565b6004830154600284018054604080516020808402820181019092528281525f939092909183018282801561069857602002820191905f5260205f20905b815481526020019060010190808311610684575b505050600388015488545f8b8152600460205260408120805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018054909116905595965091946001600160a01b03909116935091506106f86002830182611cbf565b505f600382018190556004909101556005805461071790600190611f96565b8154811061072757610727611f56565b905f5260205f2001546005868154811061074357610743611f56565b5f91825260209091200155600580548061075f5761075f611fa9565b5f8281526020812082015f1990810191909155019055604051632142170760e11b8152306004820152336024820152604481018990526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e906064015f604051808303815f87803b1580156107e0575f80fd5b505af11580156107f2573d5f803e3d5ffd5b505050505f841115610808576108088185611348565b806001600160a01b0316336001600160a01b0316897f246ee6115bfd84e00097b16569c2ff2f822026bb9595a82cd2c1e69d4b6ea50c86888760405161085093929190611fbd565b60405180910390a45050505050505050565b60038181548110610871575f80fd5b5f91825260209091200154905081565b5f818152600460209081526040808320815160a08101835281546001600160a01b03908116825260018301541681850152600282018054845181870281018701865281815287969395860193909291908301828280156108fe57602002820191905f5260205f20905b8154815260200190600101908083116108ea575b505050505081526020016003820154815260200160048201548152505090508060800151915080606001515f0361094b5760405163e0606b6360e01b8152600481018490526024016105f2565b5f805f805f6109586113d0565b5050945094509450945094505f841115610a17575f5b8251811015610a15578883828151811061098a5761098a611f56565b602002602001015103610a0557858411156109e05783868383815181106109b3576109b3611f56565b60200260200101516109c59190611fe1565b6109cf9190611ff8565b6109d99089612017565b9750610a15565b8181815181106109f2576109f2611f56565b6020026020010151886109d99190612017565b610a0e81611f7e565b905061096e565b505b505050505050919050565b6001545f03610a445760405163afb0be3360e01b815260040160405180910390fd5b6005547f00000000000000000000000000000000000000000000000000000000000000008103610aa95760405163fd20861560e01b81527f000000000000000000000000000000000000000000000000000000000000000060048201526024016105f2565b60405163ef0e239b60e01b8152600481018390525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b906024015f60405180830381865afa158015610b0d573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610b349190810190612148565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610b8357604051637ad404bf60e11b8152600481018490526024016105f2565b7f000000000000000000000000000000000000000000000000000000000000000015801590610bd6575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b15610bf757604051637ad404bf60e11b8152600481018490526024016105f2565b5f7f0000000000000000000000000000000000000000000000000000000000000000118015610c505750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b15610c7157604051637ad404bf60e11b8152600481018490526024016105f2565b60048160c001516005811115610c8957610c89612221565b14610cc8578060c001516005811115610ca457610ca4612221565b604051633c053f9d60e21b81526004810191909152602481018490526044016105f2565b5f81602001516001600160a01b0316803b806020016040519081016040528181525f908060200190933c805190602001209050807f000000000000000000000000000000000000000000000000000000000000000014610d4b57602082015160405162a2307960e51b81526001600160a01b0390911660048201526024016105f2565b6003548015610e175760e083015151818114610d7d57604051637ad404bf60e11b8152600481018790526024016105f2565b5f5b81811015610e14578460e001518181518110610d9d57610d9d611f56565b602002602001015163ffffffff1660038281548110610dbe57610dbe611f56565b905f5260205f20015414610e045760038181548110610ddf57610ddf611f56565b905f5260205f200154604051632ab10b0b60e21b81526004016105f291815260200190565b610e0d81611f7e565b9050610d7f565b50505b610e3285845f01516bffffffffffffffffffffffff16611759565b5f85815260046020908152604082209085015181546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff1991821617835560018301805490911633179055909190610e86906118f7565b8051909150610e9e9060028401906020840190611cdd565b50426003830155600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e906064015f604051808303815f87803b158015610f44575f80fd5b505af1158015610f56573d5f803e3d5ffd5b5050505084602001516001600160a01b0316336001600160a01b0316887f5d43ac9b1b213902df90d405b0006308578486b6c62182c5df202ed572c844e484604051610fa29190612235565b60405180910390a450505050505050565b5f815f54610fc19190612017565b90505f82600154610fd29190612017565b5f839055600181905590506110097f0000000000000000000000000000000000000000000000000000000000000000333086611908565b604080518481526020810184905290810182905233907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2505050565b6060805f6060805f805f805f805f806110686113d0565b96509650965096509650965096505f86111561125e575f878611156111d1575f8060015b8981101561112757888b8883815181106110a8576110a8611f56565b60200260200101516110ba9190611fe1565b6110c49190611ff8565b92506110d08383612017565b91508781815181106110e4576110e4611f56565b602002602001015193508260045f8681526020019081526020015f206004015f8282546111119190612017565b90915550611120905081611f7e565b905061108c565b50878a875f8151811061113c5761113c611f56565b602002602001015161114e9190611fe1565b6111589190611ff8565b91506111648282612017565b9050865f8151811061117857611178611f56565b60200260200101519250808a11156111a157611194818b611f96565b61119e9083612017565b91505b5f83815260046020819052604082200180548492906111c1908490612017565b909155505f9a5061125792505050565b5f5b87811015611249578581815181106111ed576111ed611f56565b6020026020010151915084818151811061120957611209611f56565b602002602001015160045f8481526020019081526020015f206004015f8282546112339190612017565b90915550611242905081611f7e565b90506111d3565b506112548689611f96565b97505b5060018790555b805115611324575f5b82518110156112e1575f83828151811061128357611283611f56565b6020026020010151905082828151811061129f5761129f611f56565b602002602001015160045f8381526020019081526020015f2060020190805190602001906112ce929190611cdd565b5050806112da90611f7e565b9050611267565b50426002556040805188815260208101889052600199507f21d81d5d656869e8ce3ba8d65526a2f0dbbcd3d36f5f9999eb7c84360e45eced910160405180910390a15b909c909b509399509097509550929350915050565b60058181548110610871575f80fd5b805f808282546113589190611f96565b9091555061138990507f0000000000000000000000000000000000000000000000000000000000000000838361198c565b816001600160a01b03167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364826040516113c491815260200190565b60405180910390a25050565b5f805f6060806060805f60058054905090508067ffffffffffffffff8111156113fb576113fb61202a565b604051908082528060200260200182016040528015611424578160200160208202803683370190505b5092505f5b8181101561147a576005818154811061144457611444611f56565b905f5260205f20015484828151811061145f5761145f611f56565b602090810291909101015261147381611f7e565b9050611429565b506002547f00000000000000000000000000000000000000000000000000000000000000006114a98242611f96565b1061174e576001549850881561174e578167ffffffffffffffff8111156114d2576114d261202a565b6040519080825280602002602001820160405280156114fb578160200160208202803683370190505b5095508167ffffffffffffffff8111156115175761151761202a565b604051908082528060200260200182016040528015611540578160200160208202803683370190505b5094508167ffffffffffffffff81111561155c5761155c61202a565b60405190808252806020026020018201604052801561158f57816020015b606081526020019060019003908161157a5790505b5092505f5b8281101561174c575f60045f8784815181106115b2576115b2611f56565b60209081029190910181015182528101919091526040015f2080549091506115e2906001600160a01b03166118f7565b8583815181106115f4576115f4611f56565b60209081029190910101526003810154839081811115611612578091505b61161c8242611f96565b90505f61169388868151811061163457611634611f56565b60200260200101518560020180548060200260200160405190810160405280929190818152602001828054801561168857602002820191905f5260205f20905b815481526020019060010190808311611674575b505050505084611a03565b90508015611737575f6116c6837f0000000000000000000000000000000000000000000000000000000000000000611fe1565b90506116d2818e612017565b9c50808b8f815181106116e7576116e7611f56565b60200260200101818152505089868151811061170557611705611f56565b60200260200101518c8f8151811061171f5761171f611f56565b60209081029190910101526117338e611f7e565b9d50505b505050508061174590611f7e565b9050611594565b505b505090919293949596565b604051633cebfa4f60e01b8152600481018390525f9081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633cebfa4f906024016040805180830381865afa1580156117bf573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117e39190612247565b91509150816001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461186c57604051630b80380d60e31b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152831660248201526044016105f2565b7f0000000000000000000000000000000000000000000000000000000000000000816bffffffffffffffffffffffff1610156118f157604051632b30b24760e21b81526bffffffffffffffffffffffff821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016105f2565b50505050565b606061190282611a17565b92915050565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f6060528060405250806119855760405163abae3d6d60e01b81526001600160a01b038087166004830152808616602483015284166044820152606481018390526084016105f2565b5050505050565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806118f15760405163abae3d6d60e01b81526001600160a01b03808616600483015230602483015284166044820152606481018390526084016105f2565b5f611a0f848484611b60565b949350505050565b6040805160028082526060808301845292602083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a73573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a97919061227a565b815f81518110611aa957611aa9611f56565b6020908102919091010152604051637af7347360e01b81526001600160a01b0383811660048301527f00000000000000000000000000000000000000000000000000000000000000001690637af7347390602401602060405180830381865afa158015611b18573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b3c919061227a565b81600181518110611b4f57611b4f611f56565b602002602001018181525050919050565b5f8082118015611ba15750825f81518110611b7d57611b7d611f56565b6020026020010151845f81518110611b9757611b97611f56565b6020026020010151115b8015611be0575082600181518110611bbb57611bbb611f56565b602002602001015184600181518110611bd657611bd6611f56565b6020026020010151115b15611cb8575f835f81518110611bf857611bf8611f56565b6020026020010151855f81518110611c1257611c12611f56565b6020026020010151611c249190611f96565b90505f84600181518110611c3a57611c3a611f56565b602002602001015186600181518110611c5557611c55611f56565b6020026020010151611c679190611f96565b9050818111611cb5575f84611c8483670de0b6b3a7640000611fe1565b611c8e9190611ff8565b7f000000000000000000000000000000000000000000000000000000000000000011159350505b50505b9392505050565b5080545f8255905f5260205f2090810190611cda9190611d26565b50565b828054828255905f5260205f20908101928215611d16579160200282015b82811115611d16578251825591602001919060010190611cfb565b50611d22929150611d26565b5090565b5b80821115611d22575f8155600101611d27565b6001600160a01b0381168114611cda575f80fd5b5f805f805f60808688031215611d62575f80fd5b8535611d6d81611d3a565b94506020860135611d7d81611d3a565b935060408601359250606086013567ffffffffffffffff80821115611da0575f80fd5b818801915088601f830112611db3575f80fd5b813581811115611dc1575f80fd5b896020828501011115611dd2575f80fd5b9699959850939650602001949392505050565b5f60208284031215611df5575f80fd5b5035919050565b5f8151808452602080850194508084015f5b83811015611e2a57815187529582019590820190600101611e0e565b509495945050505050565b60c081525f611e4760c0830189611dfc565b6020838203818501528189518084528284019150828160051b850101838c015f805b84811015611ebc57878403601f19018652825180518086529088019088860190845b81811015611ea75783518352928a0192918a0191600101611e8b565b50509688019694505091860191600101611e69565b5050508a60408801528681036060880152611ed7818b611dfc565b9450505050508281036080840152611eef8186611dfc565b915050611f0060a083018415159052565b979650505050505050565b5f6020808352835180828501525f5b81811015611f3657858101830151858201604001528201611f1a565b505f604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201611f8f57611f8f611f6a565b5060010190565b8181038181111561190257611902611f6a565b634e487b7160e01b5f52603160045260245ffd5b606081525f611fcf6060830186611dfc565b60208301949094525060400152919050565b808202811582820484141761190257611902611f6a565b5f8261201257634e487b7160e01b5f52601260045260245ffd5b500490565b8082018082111561190257611902611f6a565b634e487b7160e01b5f52604160045260245ffd5b604051610100810167ffffffffffffffff811182821017156120625761206261202a565b60405290565b80516bffffffffffffffffffffffff81168114612083575f80fd5b919050565b805161208381611d3a565b805163ffffffff81168114612083575f80fd5b805160068110612083575f80fd5b5f82601f8301126120c3575f80fd5b8151602067ffffffffffffffff808311156120e0576120e061202a565b8260051b604051601f19603f830116810181811084821117156121055761210561202a565b604052938452858101830193838101925087851115612122575f80fd5b83870191505b84821015611f005761213982612093565b83529183019190830190612128565b5f60208284031215612158575f80fd5b815167ffffffffffffffff8082111561216f575f80fd5b908301906101008286031215612183575f80fd5b61218b61203e565b61219483612068565b81526121a260208401612088565b6020820152604083015160408201526121bd60608401612093565b60608201526121ce60808401612093565b60808201526121df60a08401612093565b60a08201526121f060c084016120a6565b60c082015260e083015182811115612206575f80fd5b612212878286016120b4565b60e08301525095945050505050565b634e487b7160e01b5f52602160045260245ffd5b602081525f611cb86020830184611dfc565b5f8060408385031215612258575f80fd5b825161226381611d3a565b915061227160208401612068565b90509250929050565b5f6020828403121561228a575f80fd5b505191905056fea2646970667358221220f70b859332fad87ee5856300e4104d6b01c2b28a1bc92142a2f75217203bc6b764736f6c63430008150033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/scripts/deployment/l2/deploy_16_service_staking_token_mech_usage.js b/scripts/deployment/l2/deploy_16_service_staking_token_mech_usage.js new file mode 100644 index 00000000..29d30fb9 --- /dev/null +++ b/scripts/deployment/l2/deploy_16_service_staking_token_mech_usage.js @@ -0,0 +1,92 @@ +/*global process*/ + +const { ethers } = require("hardhat"); +const { LedgerSigner } = require("@anders-t/ethers-ledger"); + +async function main() { + const fs = require("fs"); + const globalsFile = "globals.json"; + const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); + let parsedData = JSON.parse(dataFromJSON); + const useLedger = parsedData.useLedger; + const derivationPath = parsedData.derivationPath; + const providerName = parsedData.providerName; + const gasPriceInGwei = parsedData.gasPriceInGwei; + const serviceStakingParams = parsedData.serviceStakingParams; + const serviceRegistryAddress = parsedData.serviceRegistryAddress; + const serviceRegistryTokenUtilityAddress = parsedData.serviceRegistryTokenUtilityAddress; + const olasAddress = parsedData.olasAddress; + const multisigProxyHash130 = parsedData.multisigProxyHash130; + const agentMechAddress = parsedData.agentMechAddress; + let EOA; + + let networkURL; + if (providerName === "polygon") { + if (!process.env.ALCHEMY_API_KEY_MATIC) { + console.log("set ALCHEMY_API_KEY_MATIC env variable"); + } + networkURL = "https://polygon-mainnet.g.alchemy.com/v2/" + process.env.ALCHEMY_API_KEY_MATIC; + } else if (providerName === "polygonMumbai") { + if (!process.env.ALCHEMY_API_KEY_MUMBAI) { + console.log("set ALCHEMY_API_KEY_MUMBAI env variable"); + return; + } + networkURL = "https://polygon-mumbai.g.alchemy.com/v2/" + process.env.ALCHEMY_API_KEY_MUMBAI; + } else if (providerName === "gnosis") { + if (!process.env.GNOSISSCAN_API_KEY) { + console.log("set GNOSISSCAN_API_KEY env variable"); + return; + } + networkURL = "https://rpc.gnosischain.com"; + } else if (providerName === "chiado") { + networkURL = "https://rpc.chiadochain.net"; + } else { + console.log("Unknown network provider", providerName); + return; + } + + const provider = new ethers.providers.JsonRpcProvider(networkURL); + const signers = await ethers.getSigners(); + + if (useLedger) { + EOA = new LedgerSigner(provider, derivationPath); + } else { + EOA = signers[0]; + } + // EOA address + const deployer = await EOA.getAddress(); + console.log("EOA is:", deployer); + + // Transaction signing and execution + console.log("16. EOA to deploy ServiceStakingTokenMechUsage"); + const gasPrice = ethers.utils.parseUnits(gasPriceInGwei, "gwei"); + const ServiceStakingTokenMechUsage = await ethers.getContractFactory("ServiceStakingTokenMechUsage"); + console.log("You are signing the following transaction: ServiceStakingTokenMechUsage.connect(EOA).deploy()"); + const serviceStakingTokenMechUsage = await ServiceStakingTokenMechUsage.connect(EOA).deploy(serviceStakingParams, + serviceRegistryAddress, serviceRegistryTokenUtilityAddress, olasAddress, multisigProxyHash130, agentMechAddress, { gasPrice }); + const result = await serviceStakingTokenMechUsage.deployed(); + + // Transaction details + console.log("Contract deployment: ServiceStakingTokenMechUsage"); + console.log("Contract address:", serviceStakingTokenMechUsage.address); + console.log("Transaction:", result.deployTransaction.hash); + // Wait half a minute for the transaction completion + await new Promise(r => setTimeout(r, 30000)); + + // Writing updated parameters back to the JSON file + parsedData.serviceStakingTokenMechUsageAddress = serviceStakingTokenMechUsage.address; + fs.writeFileSync(globalsFile, JSON.stringify(parsedData)); + + // Contract verification + if (parsedData.contractVerification) { + const execSync = require("child_process").execSync; + execSync("npx hardhat verify --constructor-args scripts/deployment/l2/verify_16_service_staking_token_mech_usage.js --network " + providerName + " " + serviceStakingTokenMechUsage.address, { encoding: "utf-8" }); + } +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/scripts/deployment/l2/deploy_17_service_staking_mech_usage.js b/scripts/deployment/l2/deploy_17_service_staking_mech_usage.js new file mode 100644 index 00000000..56da0708 --- /dev/null +++ b/scripts/deployment/l2/deploy_17_service_staking_mech_usage.js @@ -0,0 +1,90 @@ +/*global process*/ + +const { ethers } = require("hardhat"); +const { LedgerSigner } = require("@anders-t/ethers-ledger"); + +async function main() { + const fs = require("fs"); + const globalsFile = "globals.json"; + const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); + let parsedData = JSON.parse(dataFromJSON); + const useLedger = parsedData.useLedger; + const derivationPath = parsedData.derivationPath; + const providerName = parsedData.providerName; + const gasPriceInGwei = parsedData.gasPriceInGwei; + const serviceStakingParams = parsedData.serviceStakingParams; + const serviceRegistryAddress = parsedData.serviceRegistryAddress; + const multisigProxyHash130 = parsedData.multisigProxyHash130; + const agentMechAddress = parsedData.agentMechAddress; + let EOA; + + let networkURL; + if (providerName === "polygon") { + if (!process.env.ALCHEMY_API_KEY_MATIC) { + console.log("set ALCHEMY_API_KEY_MATIC env variable"); + } + networkURL = "https://polygon-mainnet.g.alchemy.com/v2/" + process.env.ALCHEMY_API_KEY_MATIC; + } else if (providerName === "polygonMumbai") { + if (!process.env.ALCHEMY_API_KEY_MUMBAI) { + console.log("set ALCHEMY_API_KEY_MUMBAI env variable"); + return; + } + networkURL = "https://polygon-mumbai.g.alchemy.com/v2/" + process.env.ALCHEMY_API_KEY_MUMBAI; + } else if (providerName === "gnosis") { + if (!process.env.GNOSISSCAN_API_KEY) { + console.log("set GNOSISSCAN_API_KEY env variable"); + return; + } + networkURL = "https://rpc.gnosischain.com"; + } else if (providerName === "chiado") { + networkURL = "https://rpc.chiadochain.net"; + } else { + console.log("Unknown network provider", providerName); + return; + } + + const provider = new ethers.providers.JsonRpcProvider(networkURL); + const signers = await ethers.getSigners(); + + if (useLedger) { + EOA = new LedgerSigner(provider, derivationPath); + } else { + EOA = signers[0]; + } + // EOA address + const deployer = await EOA.getAddress(); + console.log("EOA is:", deployer); + + // Transaction signing and execution + console.log("17. EOA to deploy ServiceStakingMechUsage"); + const gasPrice = ethers.utils.parseUnits(gasPriceInGwei, "gwei"); + const ServiceStakingMechUsage = await ethers.getContractFactory("ServiceStakingMechUsage"); + console.log("You are signing the following transaction: ServiceStakingMechUsage.connect(EOA).deploy()"); + const serviceStakingMechUsage = await ServiceStakingMechUsage.connect(EOA).deploy(serviceStakingParams, + serviceRegistryAddress, multisigProxyHash130, agentMechAddress, { gasPrice }); + const result = await serviceStakingMechUsage.deployed(); + + // Transaction details + console.log("Contract deployment: ServiceStakingMechUsage"); + console.log("Contract address:", serviceStakingMechUsage.address); + console.log("Transaction:", result.deployTransaction.hash); + // Wait half a minute for the transaction completion + await new Promise(r => setTimeout(r, 30000)); + + // Writing updated parameters back to the JSON file + parsedData.serviceStakingMechUsageAddress = serviceStakingMechUsage.address; + fs.writeFileSync(globalsFile, JSON.stringify(parsedData)); + + // Contract verification + if (parsedData.contractVerification) { + const execSync = require("child_process").execSync; + execSync("npx hardhat verify --constructor-args scripts/deployment/l2/verify_17_service_staking_mech_usage.js --network " + providerName + " " + serviceStakingMechUsage.address, { encoding: "utf-8" }); + } +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/scripts/deployment/l2/deploy_18_service_staking_token.js b/scripts/deployment/l2/deploy_18_service_staking_token.js new file mode 100644 index 00000000..9c4fe440 --- /dev/null +++ b/scripts/deployment/l2/deploy_18_service_staking_token.js @@ -0,0 +1,91 @@ +/*global process*/ + +const { ethers } = require("hardhat"); +const { LedgerSigner } = require("@anders-t/ethers-ledger"); + +async function main() { + const fs = require("fs"); + const globalsFile = "globals.json"; + const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); + let parsedData = JSON.parse(dataFromJSON); + const useLedger = parsedData.useLedger; + const derivationPath = parsedData.derivationPath; + const providerName = parsedData.providerName; + const gasPriceInGwei = parsedData.gasPriceInGwei; + const serviceStakingParams = parsedData.serviceStakingParams; + const serviceRegistryAddress = parsedData.serviceRegistryAddress; + const serviceRegistryTokenUtilityAddress = parsedData.serviceRegistryTokenUtilityAddress; + const olasAddress = parsedData.olasAddress; + const multisigProxyHash130 = parsedData.multisigProxyHash130; + let EOA; + + let networkURL; + if (providerName === "polygon") { + if (!process.env.ALCHEMY_API_KEY_MATIC) { + console.log("set ALCHEMY_API_KEY_MATIC env variable"); + } + networkURL = "https://polygon-mainnet.g.alchemy.com/v2/" + process.env.ALCHEMY_API_KEY_MATIC; + } else if (providerName === "polygonMumbai") { + if (!process.env.ALCHEMY_API_KEY_MUMBAI) { + console.log("set ALCHEMY_API_KEY_MUMBAI env variable"); + return; + } + networkURL = "https://polygon-mumbai.g.alchemy.com/v2/" + process.env.ALCHEMY_API_KEY_MUMBAI; + } else if (providerName === "gnosis") { + if (!process.env.GNOSISSCAN_API_KEY) { + console.log("set GNOSISSCAN_API_KEY env variable"); + return; + } + networkURL = "https://rpc.gnosischain.com"; + } else if (providerName === "chiado") { + networkURL = "https://rpc.chiadochain.net"; + } else { + console.log("Unknown network provider", providerName); + return; + } + + const provider = new ethers.providers.JsonRpcProvider(networkURL); + const signers = await ethers.getSigners(); + + if (useLedger) { + EOA = new LedgerSigner(provider, derivationPath); + } else { + EOA = signers[0]; + } + // EOA address + const deployer = await EOA.getAddress(); + console.log("EOA is:", deployer); + + // Transaction signing and execution + console.log("18. EOA to deploy ServiceStakingToken"); + const gasPrice = ethers.utils.parseUnits(gasPriceInGwei, "gwei"); + const ServiceStakingToken = await ethers.getContractFactory("ServiceStakingToken"); + console.log("You are signing the following transaction: ServiceStakingToken.connect(EOA).deploy()"); + const serviceStakingToken = await ServiceStakingToken.connect(EOA).deploy(serviceStakingParams, + serviceRegistryAddress, serviceRegistryTokenUtilityAddress, olasAddress, multisigProxyHash130, { gasPrice }); + const result = await serviceStakingToken.deployed(); + + // Transaction details + console.log("Contract deployment: ServiceStakingToken"); + console.log("Contract address:", serviceStakingToken.address); + console.log("Transaction:", result.deployTransaction.hash); + // Wait half a minute for the transaction completion + await new Promise(r => setTimeout(r, 30000)); + + // Writing updated parameters back to the JSON file + parsedData.serviceStakingTokenAddress = serviceStakingToken.address; + fs.writeFileSync(globalsFile, JSON.stringify(parsedData)); + + // Contract verification + if (parsedData.contractVerification) { + const execSync = require("child_process").execSync; + execSync("npx hardhat verify --constructor-args scripts/deployment/l2/verify_18_service_staking_token.js --network " + providerName + " " + serviceStakingToken.address, { encoding: "utf-8" }); + } +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/scripts/deployment/l2/deploy_19_service_staking_native_token.js b/scripts/deployment/l2/deploy_19_service_staking_native_token.js new file mode 100644 index 00000000..12b95795 --- /dev/null +++ b/scripts/deployment/l2/deploy_19_service_staking_native_token.js @@ -0,0 +1,89 @@ +/*global process*/ + +const { ethers } = require("hardhat"); +const { LedgerSigner } = require("@anders-t/ethers-ledger"); + +async function main() { + const fs = require("fs"); + const globalsFile = "globals.json"; + const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); + let parsedData = JSON.parse(dataFromJSON); + const useLedger = parsedData.useLedger; + const derivationPath = parsedData.derivationPath; + const providerName = parsedData.providerName; + const gasPriceInGwei = parsedData.gasPriceInGwei; + const serviceStakingParams = parsedData.serviceStakingParams; + const serviceRegistryAddress = parsedData.serviceRegistryAddress; + const multisigProxyHash130 = parsedData.multisigProxyHash130; + let EOA; + + let networkURL; + if (providerName === "polygon") { + if (!process.env.ALCHEMY_API_KEY_MATIC) { + console.log("set ALCHEMY_API_KEY_MATIC env variable"); + } + networkURL = "https://polygon-mainnet.g.alchemy.com/v2/" + process.env.ALCHEMY_API_KEY_MATIC; + } else if (providerName === "polygonMumbai") { + if (!process.env.ALCHEMY_API_KEY_MUMBAI) { + console.log("set ALCHEMY_API_KEY_MUMBAI env variable"); + return; + } + networkURL = "https://polygon-mumbai.g.alchemy.com/v2/" + process.env.ALCHEMY_API_KEY_MUMBAI; + } else if (providerName === "gnosis") { + if (!process.env.GNOSISSCAN_API_KEY) { + console.log("set GNOSISSCAN_API_KEY env variable"); + return; + } + networkURL = "https://rpc.gnosischain.com"; + } else if (providerName === "chiado") { + networkURL = "https://rpc.chiadochain.net"; + } else { + console.log("Unknown network provider", providerName); + return; + } + + const provider = new ethers.providers.JsonRpcProvider(networkURL); + const signers = await ethers.getSigners(); + + if (useLedger) { + EOA = new LedgerSigner(provider, derivationPath); + } else { + EOA = signers[0]; + } + // EOA address + const deployer = await EOA.getAddress(); + console.log("EOA is:", deployer); + + // Transaction signing and execution + console.log("19. EOA to deploy ServiceStakingNativeToken"); + const gasPrice = ethers.utils.parseUnits(gasPriceInGwei, "gwei"); + const ServiceStakingNativeToken = await ethers.getContractFactory("ServiceStakingNativeToken"); + console.log("You are signing the following transaction: ServiceStakingNativeToken.connect(EOA).deploy()"); + const serviceStakingNativeToken = await ServiceStakingNativeToken.connect(EOA).deploy(serviceStakingParams, + serviceRegistryAddress, multisigProxyHash130, { gasPrice }); + const result = await serviceStakingNativeToken.deployed(); + + // Transaction details + console.log("Contract deployment: ServiceStakingNativeToken"); + console.log("Contract address:", serviceStakingNativeToken.address); + console.log("Transaction:", result.deployTransaction.hash); + // Wait half a minute for the transaction completion + await new Promise(r => setTimeout(r, 30000)); + + // Writing updated parameters back to the JSON file + parsedData.serviceStakingNativeTokenAddress = serviceStakingNativeToken.address; + fs.writeFileSync(globalsFile, JSON.stringify(parsedData)); + + // Contract verification + if (parsedData.contractVerification) { + const execSync = require("child_process").execSync; + execSync("npx hardhat verify --constructor-args scripts/deployment/l2/verify_19_service_staking_native_token.js --network " + providerName + " " + serviceStakingNativeToken.address, { encoding: "utf-8" }); + } +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/scripts/deployment/l2/globals_gnosis_chiado.json b/scripts/deployment/l2/globals_gnosis_chiado.json index 24b5a5db..f42bf2da 100644 --- a/scripts/deployment/l2/globals_gnosis_chiado.json +++ b/scripts/deployment/l2/globals_gnosis_chiado.json @@ -1 +1 @@ -{"contractVerification":true,"useLedger":false,"derivationPath":"m/44'/60'/2'/0/0","providerName":"chiado","gasPriceInGwei":"3","gnosisSafeAddress":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","gnosisSafeProxyFactoryAddress":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry","serviceRegistrySymbol":"AUTONOLAS-SERVICE-V1","AMBContractProxyForeignAddress":"0x87A19d769D875964E9Cd41dDBfc397B2543764E6","bridgeMediatorAddress":"0x670Ac235EE13C0B2a5065282bBB0c61cfB354592","bridgeMediatorMockTimelockAddress":"0x0a50009D55Ed5700ac8FF713709d5Ad5fa843896","serviceRegistryAddress":"0x31D3202d8744B16A120117A053459DDFAE93c855","serviceManagerAddress":"0x29086141ecdc310058fc23273F8ef7881d20C2f7","gnosisSafeMultisigImplementationAddress":"0xeB49bE5DF00F74bd240DE4535DDe6Bc89CEfb994","gnosisSafeSameAddressMultisigImplementationAddress":"0xE16adc7777B7C2a0d35033bd3504C028AB28EE8b","operatorWhitelistAddress":"0x6f7661F52fE1919996d0A4F68D09B344093a349d","serviceRegistryTokenUtilityAddress":"0xc2c7E40674f1C7Bb99eFe5680Efd79842502bED4","serviceManagerTokenAddress":"0xc965a32185590Eb5a5fffDba29E96126b7650eDe","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000"} \ No newline at end of file +{"contractVerification":true,"useLedger":false,"derivationPath":"m/44'/60'/2'/0/0","providerName":"chiado","gasPriceInGwei":"3","gnosisSafeAddress":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","gnosisSafeProxyFactoryAddress":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry","serviceRegistrySymbol":"AUTONOLAS-SERVICE-V1","AMBContractProxyForeignAddress":"0x87A19d769D875964E9Cd41dDBfc397B2543764E6","bridgeMediatorAddress":"0x670Ac235EE13C0B2a5065282bBB0c61cfB354592","bridgeMediatorMockTimelockAddress":"0x0a50009D55Ed5700ac8FF713709d5Ad5fa843896","serviceRegistryAddress":"0x31D3202d8744B16A120117A053459DDFAE93c855","serviceManagerAddress":"0x29086141ecdc310058fc23273F8ef7881d20C2f7","gnosisSafeMultisigImplementationAddress":"0xeB49bE5DF00F74bd240DE4535DDe6Bc89CEfb994","gnosisSafeSameAddressMultisigImplementationAddress":"0xE16adc7777B7C2a0d35033bd3504C028AB28EE8b","operatorWhitelistAddress":"0x6f7661F52fE1919996d0A4F68D09B344093a349d","serviceRegistryTokenUtilityAddress":"0xc2c7E40674f1C7Bb99eFe5680Efd79842502bED4","serviceManagerTokenAddress":"0xc965a32185590Eb5a5fffDba29E96126b7650eDe","olasAddress":"0xE40AE73aa0Ed3Ec35fdAF56e01FCd0D1Ff1d9AB6","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceStakingParams":{"maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","livenessPeriod":"86400","livenessRatio":"700000000000000","numAgentInstances":"1","agentIds":["12"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000"},"agentMechAddress":"0x0a3cfc6bee9658eda040e6bb366fe963ddce82c9","serviceStakingTokenMechUsageAddress":"0x4cEB52802ef86edF8796632546d89e55c87a0901","serviceStakingMechUsageAddress":"0xaC26774616bbeD41b0CB69EA2ae7de366F430b23","serviceStakingTokenAddress":"0x0338893fB1A1D9Df03F72CC53D8f786487d3D03E","serviceStakingNativeTokenAddress":"0x6d9b08701Af43D68D991c074A27E4d90Af7f2276"} \ No newline at end of file diff --git a/scripts/deployment/l2/globals_gnosis_mainnet.json b/scripts/deployment/l2/globals_gnosis_mainnet.json index 936d055c..df867473 100644 --- a/scripts/deployment/l2/globals_gnosis_mainnet.json +++ b/scripts/deployment/l2/globals_gnosis_mainnet.json @@ -1 +1,36 @@ -{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"gnosis","gasPriceInGwei":"5","timelockAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","gnosisSafeAddress":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","gnosisSafeProxyFactoryAddress":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","AMBContractProxyForeignAddress":"0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e","bridgeMediatorAddress":"0x15bd56669F57192a97dF41A2aa8f4403e9491776","serviceRegistryAddress":"0x9338b5153AE39BB89f50468E608eD9d764B755fD","serviceManagerAddress":"0xE3607b00E75f6405248323A9417ff6b39B244b50","gnosisSafeMultisigImplementationAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","gnosisSafeSameAddressMultisigImplementationAddress":"0x3d77596beb0f130a4415df3D2D8232B3d3D31e44","operatorWhitelistAddress":"0x526E064cB694E8f5B7DB299158e17F33055B3943","serviceRegistryTokenUtilityAddress":"0xa45E64d13A30a51b91ae0eb182e88a40e9b18eD8","serviceManagerTokenAddress":"0x04b0007b2aFb398015B76e5f22993a1fddF83644","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000"} \ No newline at end of file +{ + "contractVerification": true, + "useLedger": true, + "derivationPath": "m/44'/60'/2'/0/0", + "providerName": "gnosis", + "gasPriceInGwei": "5", + "timelockAddress": "0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE", + "gnosisSafeAddress": "0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552", + "gnosisSafeProxyFactoryAddress": "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2", + "baseURI": "https://gateway.autonolas.tech/ipfs/", + "serviceRegistryName": "Service Registry L2", + "serviceRegistrySymbol": "AUTONOLAS-SERVICE-L2-V1", + "AMBContractProxyForeignAddress": "0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e", + "bridgeMediatorAddress": "0x15bd56669F57192a97dF41A2aa8f4403e9491776", + "serviceRegistryAddress": "0x9338b5153AE39BB89f50468E608eD9d764B755fD", + "serviceManagerAddress": "0xE3607b00E75f6405248323A9417ff6b39B244b50", + "gnosisSafeMultisigImplementationAddress": "0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE", + "gnosisSafeSameAddressMultisigImplementationAddress": "0x3d77596beb0f130a4415df3D2D8232B3d3D31e44", + "operatorWhitelistAddress": "0x526E064cB694E8f5B7DB299158e17F33055B3943", + "serviceRegistryTokenUtilityAddress": "0xa45E64d13A30a51b91ae0eb182e88a40e9b18eD8", + "serviceManagerTokenAddress": "0x04b0007b2aFb398015B76e5f22993a1fddF83644", + "olasAddress": "0xcE11e14225575945b8E6Dc0D4F2dD4C570f79d9f", + "multisigProxyHash130": "0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000", + "serviceStakingParams":{ + "maxNumServices": "100", + "rewardsPerSecond": "385802469136", + "minStakingDeposit": "50000000000000000000", + "livenessPeriod": "86400", + "livenessRatio": "520833333333333", + "numAgentInstances": "1", + "agentIds": ["12"], + "threshold": "0", + "configHash": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + "agentMechAddress": "0xFf82123dFB52ab75C417195c5fDB87630145ae81" +} \ No newline at end of file diff --git a/scripts/deployment/l2/verify_04_gnosis_safe_same_address_multisig.js b/scripts/deployment/l2/verify_04_gnosis_safe_same_address_multisig.js index 441d3660..5226eced 100644 --- a/scripts/deployment/l2/verify_04_gnosis_safe_same_address_multisig.js +++ b/scripts/deployment/l2/verify_04_gnosis_safe_same_address_multisig.js @@ -2,7 +2,6 @@ const fs = require("fs"); const globalsFile = "globals.json"; const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); const parsedData = JSON.parse(dataFromJSON); -const gnosisSafeAddress = parsedData.gnosisSafeAddress; const multisigProxyHash130 = parsedData.multisigProxyHash130; module.exports = [ diff --git a/scripts/deployment/l2/verify_16_service_staking_token_mech_usage.js b/scripts/deployment/l2/verify_16_service_staking_token_mech_usage.js new file mode 100644 index 00000000..7a48036f --- /dev/null +++ b/scripts/deployment/l2/verify_16_service_staking_token_mech_usage.js @@ -0,0 +1,19 @@ +const fs = require("fs"); +const globalsFile = "globals.json"; +const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); +const parsedData = JSON.parse(dataFromJSON); +const serviceStakingParams = parsedData.serviceStakingParams; +const serviceRegistryAddress = parsedData.serviceRegistryAddress; +const serviceRegistryTokenUtilityAddress = parsedData.serviceRegistryTokenUtilityAddress; +const olasAddress = parsedData.olasAddress; +const multisigProxyHash130 = parsedData.multisigProxyHash130; +const agentMechAddress = parsedData.agentMechAddress; + +module.exports = [ + serviceStakingParams, + serviceRegistryAddress, + serviceRegistryTokenUtilityAddress, + olasAddress, + multisigProxyHash130, + agentMechAddress +]; \ No newline at end of file diff --git a/scripts/deployment/l2/verify_17_service_staking_mech_usage.js b/scripts/deployment/l2/verify_17_service_staking_mech_usage.js new file mode 100644 index 00000000..ec6d7edc --- /dev/null +++ b/scripts/deployment/l2/verify_17_service_staking_mech_usage.js @@ -0,0 +1,15 @@ +const fs = require("fs"); +const globalsFile = "globals.json"; +const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); +const parsedData = JSON.parse(dataFromJSON); +const serviceStakingParams = parsedData.serviceStakingParams; +const serviceRegistryAddress = parsedData.serviceRegistryAddress; +const multisigProxyHash130 = parsedData.multisigProxyHash130; +const agentMechAddress = parsedData.agentMechAddress; + +module.exports = [ + serviceStakingParams, + serviceRegistryAddress, + multisigProxyHash130, + agentMechAddress +]; \ No newline at end of file diff --git a/scripts/deployment/l2/verify_18_service_staking_token.js b/scripts/deployment/l2/verify_18_service_staking_token.js new file mode 100644 index 00000000..4799f9cb --- /dev/null +++ b/scripts/deployment/l2/verify_18_service_staking_token.js @@ -0,0 +1,17 @@ +const fs = require("fs"); +const globalsFile = "globals.json"; +const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); +const parsedData = JSON.parse(dataFromJSON); +const serviceStakingParams = parsedData.serviceStakingParams; +const serviceRegistryAddress = parsedData.serviceRegistryAddress; +const serviceRegistryTokenUtilityAddress = parsedData.serviceRegistryTokenUtilityAddress; +const olasAddress = parsedData.olasAddress; +const multisigProxyHash130 = parsedData.multisigProxyHash130; + +module.exports = [ + serviceStakingParams, + serviceRegistryAddress, + serviceRegistryTokenUtilityAddress, + olasAddress, + multisigProxyHash130 +]; \ No newline at end of file diff --git a/scripts/deployment/l2/verify_19_service_staking_native_token.js b/scripts/deployment/l2/verify_19_service_staking_native_token.js new file mode 100644 index 00000000..c255e2d6 --- /dev/null +++ b/scripts/deployment/l2/verify_19_service_staking_native_token.js @@ -0,0 +1,13 @@ +const fs = require("fs"); +const globalsFile = "globals.json"; +const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); +const parsedData = JSON.parse(dataFromJSON); +const serviceStakingParams = parsedData.serviceStakingParams; +const serviceRegistryAddress = parsedData.serviceRegistryAddress; +const multisigProxyHash130 = parsedData.multisigProxyHash130; + +module.exports = [ + serviceStakingParams, + serviceRegistryAddress, + multisigProxyHash130 +]; \ No newline at end of file diff --git a/scripts/proposals/proposal_03_service_registry_change_drainer_goerli.js b/scripts/proposals/proposal_03_service_registry_change_drainer_goerli.js index 86c73577..6965e572 100644 --- a/scripts/proposals/proposal_03_service_registry_change_drainer_goerli.js +++ b/scripts/proposals/proposal_03_service_registry_change_drainer_goerli.js @@ -7,9 +7,7 @@ async function main() { const globalsFile = "globals.json"; const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); let parsedData = JSON.parse(dataFromJSON); - const providerName = parsedData.providerName; - const provider = await ethers.providers.getDefaultProvider(providerName); const signers = await ethers.getSigners(); // EOA address diff --git a/scripts/proposals/proposal_07_service_registry_change_multisig_permission_goerli_mainnet.js b/scripts/proposals/proposal_07_service_registry_change_multisig_permission_goerli_mainnet.js index 9c9ab19a..07a46479 100644 --- a/scripts/proposals/proposal_07_service_registry_change_multisig_permission_goerli_mainnet.js +++ b/scripts/proposals/proposal_07_service_registry_change_multisig_permission_goerli_mainnet.js @@ -9,7 +9,6 @@ async function main() { let parsedData = JSON.parse(dataFromJSON); const providerName = parsedData.providerName; - const provider = await ethers.providers.getDefaultProvider(providerName); const signers = await ethers.getSigners(); // EOA address @@ -30,7 +29,7 @@ async function main() { if (providerName === "mainnet") { oldMultisig = "0x26Ea2dC7ce1b41d0AD0E0521535655d7a94b684c"; } else if (providerName === "goerli") { - oldMultisig = "0x06467Cb835da623384a22aa902647784C1c9f5Ae"; + oldMultisig = "0x92499E80f50f06C4078794C179986907e7822Ea1"; } else { console.log("Unknown network provider", providerName); return;