diff --git a/abis/0.8.21/ServiceStakingNativeToken.json b/abis/0.8.21/ServiceStakingNativeToken.json deleted file mode 100644 index da3e3556..00000000 --- a/abis/0.8.21/ServiceStakingNativeToken.json +++ /dev/null @@ -1,1031 +0,0 @@ -{ - "_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": [], - "name": "getNextRewardCheckpointTimestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "tsNext", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getServiceIds", - "outputs": [ - { - "internalType": "uint256[]", - "name": "serviceIds", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "serviceId", - "type": "uint256" - } - ], - "name": "isServiceStaked", - "outputs": [ - { - "internalType": "bool", - "name": "isStaked", - "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": "0x6101c060405234801562000011575f80fd5b50604051620025f6380380620025f6833981016040819052620000349162000360565b828282825f01515f14806200004b57506020830151155b806200005957506060830151155b806200006757506080830151155b8062000075575060a0830151155b156200009457604051637c946ed760e01b815260040160405180910390fd5b600283604001511015620000d057604080840151905163491a2bb160e01b81526004810191909152600260248201526044015b60405180910390fd5b6001600160a01b038216620000f85760405163d92e233d60e01b815260040160405180910390fd5b82516080908152602084015160a0908152604085015160c052606085015160e09081529185015161010090815290850151610120526001600160a01b038416610180529084015161014052830151610160525f805b8460c00151518110156200022e57818560c0015182815181106200017557620001756200043e565b602002602001015111620001c1578460c0015181815181106200019c576200019c6200043e565b6020026020010151604051632ab10b0b60e21b8152600401620000c791815260200190565b8460c001518181518110620001da57620001da6200043e565b6020908102919091010151600380546001810182555f919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b018190559150620002268162000452565b90506200014d565b50816200024e57604051637c946ed760e01b815260040160405180910390fd5b506101a0525050426002555062000477915050565b634e487b7160e01b5f52604160045260245ffd5b60405161012081016001600160401b03811182821017156200029d576200029d62000263565b60405290565b5f82601f830112620002b3575f80fd5b815160206001600160401b0380831115620002d257620002d262000263565b8260051b604051601f19603f83011681018181108482111715620002fa57620002fa62000263565b60405293845285810183019383810192508785111562000318575f80fd5b83870191505b8482101562000339578151835291830191908301906200031e565b979650505050505050565b80516001600160a01b03811681146200035b575f80fd5b919050565b5f805f6060848603121562000373575f80fd5b83516001600160401b03808211156200038a575f80fd5b9085019061012082880312156200039f575f80fd5b620003a962000277565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015182811115620003f1575f80fd5b620003ff89828601620002a3565b60c08301525060e0838101519082015261010092830151928101929092525092506200042e6020850162000344565b9150604084015190509250925092565b634e487b7160e01b5f52603260045260245ffd5b5f600182016200047057634e487b7160e01b5f52601160045260245ffd5b5060010190565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516120986200055e5f395f81816103fd0152610e1e01525f8181610518015281816108c801528181610be1015261101b01525f81816105a301528181610ca50152610cd401525f81816102f301528181610d1a0152610d4e01525f81816103780152610c6301525f81816103ab0152611a9701525f818161032601528181611470015261155e01525f81816105d6015281816118bd01526118f901525f8181610609015261180401525f818161027c01528181610b690152610b9d01526120985ff3fe608060405260043610610191575f3560e01c8063a694fc3a116100dc578063e1f1176d11610087578063eb338c9611610062578063eb338c961461062b578063f189e85a1461064a578063f4dce7141461066b578063ffa1ad741461067f575f80fd5b8063e1f1176d14610592578063e77cdcc9146105c5578063eacdaabc146105f8575f80fd5b8063c2c4c5c1116100b7578063c2c4c5c1146104e1578063cbcf252a14610507578063cd25fe3814610552575f80fd5b8063a694fc3a14610434578063a74466ad14610453578063b69ef8a8146104cd575f80fd5b806356e760581161013c57806378e061361161011757806378e06136146103cd578063809cee2f146103ec578063879d90901461041f575f80fd5b806356e76058146103485780635829c5ec14610367578063592cf3fb1461039a575f80fd5b80633e7329971161016c5780633e732997146102cd57806342cde4e8146102e257806352c824f514610315575f80fd5b8063150b7a021461020a57806316a751721461026b5780632e17de78146102ac575f80fd5b36610206575f345f546101a49190611b52565b90505f346001546101b59190611b52565b5f8390556001819055604080513481526020810185905290810182905290915033907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2005b5f80fd5b348015610215575f80fd5b50610235610224366004611b79565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b348015610276575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610262565b3480156102b7575f80fd5b506102cb6102c6366004611c10565b6106bc565b005b3480156102d8575f80fd5b5061029e60025481565b3480156102ed575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b348015610320575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b348015610353575f80fd5b5061029e610362366004611c10565b61098c565b348015610372575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103a5575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d8575f80fd5b5061029e6103e7366004611c10565b6109ab565b3480156103f7575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561042a575f80fd5b5061029e60015481565b34801561043f575f80fd5b506102cb61044e366004611c10565b610b42565b34801561045e575f80fd5b506104a261046d366004611c10565b600460208190525f918252604090912080546001820154600383015492909301546001600160a01b0391821693909116919084565b604080516001600160a01b039586168152949093166020850152918301526060820152608001610262565b3480156104d8575f80fd5b5061029e5f5481565b3480156104ec575f80fd5b506104f56110d3565b60405161026296959493929190611c60565b348015610512575f80fd5b5061053a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610262565b34801561055d575f80fd5b5061058261056c366004611c10565b5f90815260046020526040902060030154151590565b6040519015158152602001610262565b34801561059d575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d0575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b348015610603575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b348015610636575f80fd5b5061029e610645366004611c10565b6113bb565b348015610655575f80fd5b5061065e6113ca565b6040516102629190611d36565b348015610676575f80fd5b5061029e61146d565b34801561068a575f80fd5b506106af604051806040016040528060058152602001640302e312e360dc1b81525081565b6040516102629190611d48565b5f81815260046020526040902060018101546001600160a01b0316331461071257600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b5f8061071c6110d3565b955050505050915080610734576107316113ca565b91505b5f5b8251811015610770578483828151811061075257610752611d93565b602002602001015103156107705761076981611da7565b9050610736565b6004840154600285018054604080516020808402820181019092528281525f93909290918301828280156107c157602002820191905f5260205f20905b8154815260200190600101908083116107ad575b505050600389015489545f8c8152600460205260408120805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018054909116905595965091946001600160a01b03909116935091506108216002830182611ac3565b505f600382018190556004909101556005805461084090600190611dbf565b8154811061085057610850611d93565b905f5260205f2001546005868154811061086c5761086c611d93565b5f91825260209091200155600580548061088857610888611dd2565b5f8281526020812082015f1990810191909155019055604051632142170760e11b8152306004820152336024820152604481018a90526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e906064015f604051808303815f87803b158015610909575f80fd5b505af115801561091b573d5f803e3d5ffd5b505050505f8411156109315761093181856114a1565b806001600160a01b0316336001600160a01b03168a7f246ee6115bfd84e00097b16569c2ff2f822026bb9595a82cd2c1e69d4b6ea50c86888760405161097993929190611de6565b60405180910390a4505050505050505050565b6003818154811061099b575f80fd5b5f91825260209091200154905081565b5f818152600460209081526040808320815160a08101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181528796939586019390929190830182828015610a2857602002820191905f5260205f20905b815481526020019060010190808311610a14575b505050505081526020016003820154815260200160048201548152505090508060800151915080606001515f03610a755760405163e0606b6360e01b815260048101849052602401610709565b5f805f805f610a82611548565b5050945094509450945094505f5b84811015610b365788838281518110610aab57610aab611d93565b602002602001015103610b265785841115610b01578386838381518110610ad457610ad4611d93565b6020026020010151610ae69190611e0a565b610af09190611e21565b610afa9089611b52565b9750610b36565b818181518110610b1357610b13611d93565b602002602001015188610afa9190611b52565b610b2f81611da7565b9050610a90565b50505050505050919050565b6001545f03610b645760405163afb0be3360e01b815260040160405180910390fd5b6005547f00000000000000000000000000000000000000000000000000000000000000008103610bc95760405163fd20861560e01b81527f00000000000000000000000000000000000000000000000000000000000000006004820152602401610709565b60405163ef0e239b60e01b8152600481018390525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b906024015f60405180830381865afa158015610c2d573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610c549190810190611f5e565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610ca357604051637ad404bf60e11b815260048101849052602401610709565b7f000000000000000000000000000000000000000000000000000000000000000015801590610cf6575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b15610d1757604051637ad404bf60e11b815260048101849052602401610709565b5f7f0000000000000000000000000000000000000000000000000000000000000000118015610d705750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b15610d9157604051637ad404bf60e11b815260048101849052602401610709565b60048160c001516005811115610da957610da9612037565b14610de8578060c001516005811115610dc457610dc4612037565b604051633c053f9d60e21b8152600481019190915260248101849052604401610709565b5f81602001516001600160a01b0316803b806020016040519081016040528181525f908060200190933c805190602001209050807f000000000000000000000000000000000000000000000000000000000000000014610e6b57602082015160405162a2307960e51b81526001600160a01b039091166004820152602401610709565b6003548015610f375760e083015151818114610e9d57604051637ad404bf60e11b815260048101879052602401610709565b5f5b81811015610f34578460e001518181518110610ebd57610ebd611d93565b602002602001015163ffffffff1660038281548110610ede57610ede611d93565b905f5260205f20015414610f245760038181548110610eff57610eff611d93565b905f5260205f200154604051632ab10b0b60e21b815260040161070991815260200190565b610f2d81611da7565b9050610e9f565b50505b610f5285845f01516bffffffffffffffffffffffff166118bb565b5f85815260046020908152604082209085015181546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff1991821617835560018301805490911633179055909190610fa690611929565b8051909150610fbe9060028401906020840190611ae1565b50426003830155600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e906064015f604051808303815f87803b158015611064575f80fd5b505af1158015611076573d5f803e3d5ffd5b5050505084602001516001600160a01b0316336001600160a01b0316887f5d43ac9b1b213902df90d405b0006308578486b6c62182c5df202ed572c844e4846040516110c29190611d36565b60405180910390a450505050505050565b6060805f6060805f805f805f805f806110ea611548565b96509650965096509650965096505f8611156112e0575f87861115611253575f8060015b898110156111a957888b88838151811061112a5761112a611d93565b602002602001015161113c9190611e0a565b6111469190611e21565b92506111528383611b52565b915087818151811061116657611166611d93565b602002602001015193508260045f8681526020019081526020015f206004015f8282546111939190611b52565b909155506111a2905081611da7565b905061110e565b50878a875f815181106111be576111be611d93565b60200260200101516111d09190611e0a565b6111da9190611e21565b91506111e68282611b52565b9050865f815181106111fa576111fa611d93565b60200260200101519250808a111561122357611216818b611dbf565b6112209083611b52565b91505b5f8381526004602081905260408220018054849290611243908490611b52565b909155505f9a506112d992505050565b5f5b878110156112cb5785818151811061126f5761126f611d93565b6020026020010151915084818151811061128b5761128b611d93565b602002602001015160045f8481526020019081526020015f206004015f8282546112b59190611b52565b909155506112c4905081611da7565b9050611255565b506112d68689611dbf565b97505b5060018790555b8051156113a6575f5b8251811015611363575f83828151811061130557611305611d93565b6020026020010151905082828151811061132157611321611d93565b602002602001015160045f8381526020019081526020015f206002019080519060200190611350929190611ae1565b50508061135c90611da7565b90506112e9565b50426002556040805188815260208101889052600199507f21d81d5d656869e8ce3ba8d65526a2f0dbbcd3d36f5f9999eb7c84360e45eced910160405180910390a15b909c909b509399509097509550929350915050565b6005818154811061099b575f80fd5b6005546060908067ffffffffffffffff8111156113e9576113e9611e40565b604051908082528060200260200182016040528015611412578160200160208202803683370190505b5091505f5b81811015611468576005818154811061143257611432611d93565b905f5260205f20015483828151811061144d5761144d611d93565b602090810291909101015261146181611da7565b9050611417565b505090565b5f7f000000000000000000000000000000000000000000000000000000000000000060025461149c9190611b52565b905090565b805f808282546114b19190611dbf565b90915550506040515f906001600160a01b0384169083908381818185875af1925050503d805f81146114fe576040519150601f19603f3d011682016040523d82523d5f602084013e611503565b606091505b50509050806115435760405163cd3f165960e01b81525f60048201523060248201526001600160a01b038416604482015260648101839052608401610709565b505050565b600254600154905f9081906060908190819081907f00000000000000000000000000000000000000000000000000000000000000006115878242611dbf565b1015801561159457505f88115b156118b1576005548067ffffffffffffffff8111156115b5576115b5611e40565b6040519080825280602002602001820160405280156115de578160200160208202803683370190505b5093508067ffffffffffffffff8111156115fa576115fa611e40565b604051908082528060200260200182016040528015611623578160200160208202803683370190505b5095508067ffffffffffffffff81111561163f5761163f611e40565b604051908082528060200260200182016040528015611668578160200160208202803683370190505b5094508067ffffffffffffffff81111561168457611684611e40565b6040519080825280602002602001820160405280156116b757816020015b60608152602001906001900390816116a25790505b5092505f5b818110156118ae57600581815481106116d7576116d7611d93565b905f5260205f2001548582815181106116f2576116f2611d93565b6020026020010181815250505f60045f87848151811061171457611714611d93565b60209081029190910181015182528101919091526040015f208054909150611744906001600160a01b0316611929565b85838151811061175657611756611d93565b60209081029190910101526003810154849081811115611774578091505b61177e8242611dbf565b90505f6117f588868151811061179657611796611d93565b6020026020010151856002018054806020026020016040519081016040528092919081815260200182805480156117ea57602002820191905f5260205f20905b8154815260200190600101908083116117d6575b50505050508461193a565b90508015611899575f611828837f0000000000000000000000000000000000000000000000000000000000000000611e0a565b9050611834818e611b52565b9c50808b8f8151811061184957611849611d93565b60200260200101818152505089868151811061186757611867611d93565b60200260200101518c8f8151811061188157611881611d93565b60209081029190910101526118958e611da7565b9d50505b50505050806118a790611da7565b90506116bc565b50505b5090919293949596565b7f00000000000000000000000000000000000000000000000000000000000000008110156119255760405163491a2bb160e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006024820152604401610709565b5050565b60606119348261194e565b92915050565b5f6119468484846119f3565b949350505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119ac573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119d0919061204b565b815f815181106119e2576119e2611d93565b602002602001018181525050919050565b5f8082118015611a345750825f81518110611a1057611a10611d93565b6020026020010151845f81518110611a2a57611a2a611d93565b6020026020010151115b15611abc575f82845f81518110611a4d57611a4d611d93565b6020026020010151865f81518110611a6757611a67611d93565b6020026020010151611a799190611dbf565b611a8b90670de0b6b3a7640000611e0a565b611a959190611e21565b7f000000000000000000000000000000000000000000000000000000000000000011159150505b9392505050565b5080545f8255905f5260205f2090810190611ade9190611b2a565b50565b828054828255905f5260205f20908101928215611b1a579160200282015b82811115611b1a578251825591602001919060010190611aff565b50611b26929150611b2a565b5090565b5b80821115611b26575f8155600101611b2b565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561193457611934611b3e565b6001600160a01b0381168114611ade575f80fd5b5f805f805f60808688031215611b8d575f80fd5b8535611b9881611b65565b94506020860135611ba881611b65565b935060408601359250606086013567ffffffffffffffff80821115611bcb575f80fd5b818801915088601f830112611bde575f80fd5b813581811115611bec575f80fd5b896020828501011115611bfd575f80fd5b9699959850939650602001949392505050565b5f60208284031215611c20575f80fd5b5035919050565b5f8151808452602080850194508084015f5b83811015611c5557815187529582019590820190600101611c39565b509495945050505050565b60c081525f611c7260c0830189611c27565b6020838203818501528189518084528284019150828160051b850101838c015f805b84811015611ce757878403601f19018652825180518086529088019088860190845b81811015611cd25783518352928a0192918a0191600101611cb6565b50509688019694505091860191600101611c94565b5050508a60408801528681036060880152611d02818b611c27565b9450505050508281036080840152611d1a8186611c27565b915050611d2b60a083018415159052565b979650505050505050565b602081525f611abc6020830184611c27565b5f6020808352835180828501525f5b81811015611d7357858101830151858201604001528201611d57565b505f604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b5f52603260045260245ffd5b5f60018201611db857611db8611b3e565b5060010190565b8181038181111561193457611934611b3e565b634e487b7160e01b5f52603160045260245ffd5b606081525f611df86060830186611c27565b60208301949094525060400152919050565b808202811582820484141761193457611934611b3e565b5f82611e3b57634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52604160045260245ffd5b604051610100810167ffffffffffffffff81118282101715611e7857611e78611e40565b60405290565b80516bffffffffffffffffffffffff81168114611e99575f80fd5b919050565b8051611e9981611b65565b805163ffffffff81168114611e99575f80fd5b805160068110611e99575f80fd5b5f82601f830112611ed9575f80fd5b8151602067ffffffffffffffff80831115611ef657611ef6611e40565b8260051b604051601f19603f83011681018181108482111715611f1b57611f1b611e40565b604052938452858101830193838101925087851115611f38575f80fd5b83870191505b84821015611d2b57611f4f82611ea9565b83529183019190830190611f3e565b5f60208284031215611f6e575f80fd5b815167ffffffffffffffff80821115611f85575f80fd5b908301906101008286031215611f99575f80fd5b611fa1611e54565b611faa83611e7e565b8152611fb860208401611e9e565b602082015260408301516040820152611fd360608401611ea9565b6060820152611fe460808401611ea9565b6080820152611ff560a08401611ea9565b60a082015261200660c08401611ebc565b60c082015260e08301518281111561201c575f80fd5b61202887828601611eca565b60e08301525095945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f6020828403121561205b575f80fd5b505191905056fea2646970667358221220369db9315caf7f21ab4dbc689015c5ce7e2b9bf805806c46a8ad7c6b40304d6a64736f6c63430008150033", - "deployedBytecode": "0x608060405260043610610191575f3560e01c8063a694fc3a116100dc578063e1f1176d11610087578063eb338c9611610062578063eb338c961461062b578063f189e85a1461064a578063f4dce7141461066b578063ffa1ad741461067f575f80fd5b8063e1f1176d14610592578063e77cdcc9146105c5578063eacdaabc146105f8575f80fd5b8063c2c4c5c1116100b7578063c2c4c5c1146104e1578063cbcf252a14610507578063cd25fe3814610552575f80fd5b8063a694fc3a14610434578063a74466ad14610453578063b69ef8a8146104cd575f80fd5b806356e760581161013c57806378e061361161011757806378e06136146103cd578063809cee2f146103ec578063879d90901461041f575f80fd5b806356e76058146103485780635829c5ec14610367578063592cf3fb1461039a575f80fd5b80633e7329971161016c5780633e732997146102cd57806342cde4e8146102e257806352c824f514610315575f80fd5b8063150b7a021461020a57806316a751721461026b5780632e17de78146102ac575f80fd5b36610206575f345f546101a49190611b52565b90505f346001546101b59190611b52565b5f8390556001819055604080513481526020810185905290810182905290915033907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2005b5f80fd5b348015610215575f80fd5b50610235610224366004611b79565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b348015610276575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610262565b3480156102b7575f80fd5b506102cb6102c6366004611c10565b6106bc565b005b3480156102d8575f80fd5b5061029e60025481565b3480156102ed575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b348015610320575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b348015610353575f80fd5b5061029e610362366004611c10565b61098c565b348015610372575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103a5575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d8575f80fd5b5061029e6103e7366004611c10565b6109ab565b3480156103f7575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561042a575f80fd5b5061029e60015481565b34801561043f575f80fd5b506102cb61044e366004611c10565b610b42565b34801561045e575f80fd5b506104a261046d366004611c10565b600460208190525f918252604090912080546001820154600383015492909301546001600160a01b0391821693909116919084565b604080516001600160a01b039586168152949093166020850152918301526060820152608001610262565b3480156104d8575f80fd5b5061029e5f5481565b3480156104ec575f80fd5b506104f56110d3565b60405161026296959493929190611c60565b348015610512575f80fd5b5061053a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610262565b34801561055d575f80fd5b5061058261056c366004611c10565b5f90815260046020526040902060030154151590565b6040519015158152602001610262565b34801561059d575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d0575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b348015610603575f80fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b348015610636575f80fd5b5061029e610645366004611c10565b6113bb565b348015610655575f80fd5b5061065e6113ca565b6040516102629190611d36565b348015610676575f80fd5b5061029e61146d565b34801561068a575f80fd5b506106af604051806040016040528060058152602001640302e312e360dc1b81525081565b6040516102629190611d48565b5f81815260046020526040902060018101546001600160a01b0316331461071257600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b5f8061071c6110d3565b955050505050915080610734576107316113ca565b91505b5f5b8251811015610770578483828151811061075257610752611d93565b602002602001015103156107705761076981611da7565b9050610736565b6004840154600285018054604080516020808402820181019092528281525f93909290918301828280156107c157602002820191905f5260205f20905b8154815260200190600101908083116107ad575b505050600389015489545f8c8152600460205260408120805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018054909116905595965091946001600160a01b03909116935091506108216002830182611ac3565b505f600382018190556004909101556005805461084090600190611dbf565b8154811061085057610850611d93565b905f5260205f2001546005868154811061086c5761086c611d93565b5f91825260209091200155600580548061088857610888611dd2565b5f8281526020812082015f1990810191909155019055604051632142170760e11b8152306004820152336024820152604481018a90526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e906064015f604051808303815f87803b158015610909575f80fd5b505af115801561091b573d5f803e3d5ffd5b505050505f8411156109315761093181856114a1565b806001600160a01b0316336001600160a01b03168a7f246ee6115bfd84e00097b16569c2ff2f822026bb9595a82cd2c1e69d4b6ea50c86888760405161097993929190611de6565b60405180910390a4505050505050505050565b6003818154811061099b575f80fd5b5f91825260209091200154905081565b5f818152600460209081526040808320815160a08101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181528796939586019390929190830182828015610a2857602002820191905f5260205f20905b815481526020019060010190808311610a14575b505050505081526020016003820154815260200160048201548152505090508060800151915080606001515f03610a755760405163e0606b6360e01b815260048101849052602401610709565b5f805f805f610a82611548565b5050945094509450945094505f5b84811015610b365788838281518110610aab57610aab611d93565b602002602001015103610b265785841115610b01578386838381518110610ad457610ad4611d93565b6020026020010151610ae69190611e0a565b610af09190611e21565b610afa9089611b52565b9750610b36565b818181518110610b1357610b13611d93565b602002602001015188610afa9190611b52565b610b2f81611da7565b9050610a90565b50505050505050919050565b6001545f03610b645760405163afb0be3360e01b815260040160405180910390fd5b6005547f00000000000000000000000000000000000000000000000000000000000000008103610bc95760405163fd20861560e01b81527f00000000000000000000000000000000000000000000000000000000000000006004820152602401610709565b60405163ef0e239b60e01b8152600481018390525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b906024015f60405180830381865afa158015610c2d573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610c549190810190611f5e565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610ca357604051637ad404bf60e11b815260048101849052602401610709565b7f000000000000000000000000000000000000000000000000000000000000000015801590610cf6575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b15610d1757604051637ad404bf60e11b815260048101849052602401610709565b5f7f0000000000000000000000000000000000000000000000000000000000000000118015610d705750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b15610d9157604051637ad404bf60e11b815260048101849052602401610709565b60048160c001516005811115610da957610da9612037565b14610de8578060c001516005811115610dc457610dc4612037565b604051633c053f9d60e21b8152600481019190915260248101849052604401610709565b5f81602001516001600160a01b0316803b806020016040519081016040528181525f908060200190933c805190602001209050807f000000000000000000000000000000000000000000000000000000000000000014610e6b57602082015160405162a2307960e51b81526001600160a01b039091166004820152602401610709565b6003548015610f375760e083015151818114610e9d57604051637ad404bf60e11b815260048101879052602401610709565b5f5b81811015610f34578460e001518181518110610ebd57610ebd611d93565b602002602001015163ffffffff1660038281548110610ede57610ede611d93565b905f5260205f20015414610f245760038181548110610eff57610eff611d93565b905f5260205f200154604051632ab10b0b60e21b815260040161070991815260200190565b610f2d81611da7565b9050610e9f565b50505b610f5285845f01516bffffffffffffffffffffffff166118bb565b5f85815260046020908152604082209085015181546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff1991821617835560018301805490911633179055909190610fa690611929565b8051909150610fbe9060028401906020840190611ae1565b50426003830155600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e906064015f604051808303815f87803b158015611064575f80fd5b505af1158015611076573d5f803e3d5ffd5b5050505084602001516001600160a01b0316336001600160a01b0316887f5d43ac9b1b213902df90d405b0006308578486b6c62182c5df202ed572c844e4846040516110c29190611d36565b60405180910390a450505050505050565b6060805f6060805f805f805f805f806110ea611548565b96509650965096509650965096505f8611156112e0575f87861115611253575f8060015b898110156111a957888b88838151811061112a5761112a611d93565b602002602001015161113c9190611e0a565b6111469190611e21565b92506111528383611b52565b915087818151811061116657611166611d93565b602002602001015193508260045f8681526020019081526020015f206004015f8282546111939190611b52565b909155506111a2905081611da7565b905061110e565b50878a875f815181106111be576111be611d93565b60200260200101516111d09190611e0a565b6111da9190611e21565b91506111e68282611b52565b9050865f815181106111fa576111fa611d93565b60200260200101519250808a111561122357611216818b611dbf565b6112209083611b52565b91505b5f8381526004602081905260408220018054849290611243908490611b52565b909155505f9a506112d992505050565b5f5b878110156112cb5785818151811061126f5761126f611d93565b6020026020010151915084818151811061128b5761128b611d93565b602002602001015160045f8481526020019081526020015f206004015f8282546112b59190611b52565b909155506112c4905081611da7565b9050611255565b506112d68689611dbf565b97505b5060018790555b8051156113a6575f5b8251811015611363575f83828151811061130557611305611d93565b6020026020010151905082828151811061132157611321611d93565b602002602001015160045f8381526020019081526020015f206002019080519060200190611350929190611ae1565b50508061135c90611da7565b90506112e9565b50426002556040805188815260208101889052600199507f21d81d5d656869e8ce3ba8d65526a2f0dbbcd3d36f5f9999eb7c84360e45eced910160405180910390a15b909c909b509399509097509550929350915050565b6005818154811061099b575f80fd5b6005546060908067ffffffffffffffff8111156113e9576113e9611e40565b604051908082528060200260200182016040528015611412578160200160208202803683370190505b5091505f5b81811015611468576005818154811061143257611432611d93565b905f5260205f20015483828151811061144d5761144d611d93565b602090810291909101015261146181611da7565b9050611417565b505090565b5f7f000000000000000000000000000000000000000000000000000000000000000060025461149c9190611b52565b905090565b805f808282546114b19190611dbf565b90915550506040515f906001600160a01b0384169083908381818185875af1925050503d805f81146114fe576040519150601f19603f3d011682016040523d82523d5f602084013e611503565b606091505b50509050806115435760405163cd3f165960e01b81525f60048201523060248201526001600160a01b038416604482015260648101839052608401610709565b505050565b600254600154905f9081906060908190819081907f00000000000000000000000000000000000000000000000000000000000000006115878242611dbf565b1015801561159457505f88115b156118b1576005548067ffffffffffffffff8111156115b5576115b5611e40565b6040519080825280602002602001820160405280156115de578160200160208202803683370190505b5093508067ffffffffffffffff8111156115fa576115fa611e40565b604051908082528060200260200182016040528015611623578160200160208202803683370190505b5095508067ffffffffffffffff81111561163f5761163f611e40565b604051908082528060200260200182016040528015611668578160200160208202803683370190505b5094508067ffffffffffffffff81111561168457611684611e40565b6040519080825280602002602001820160405280156116b757816020015b60608152602001906001900390816116a25790505b5092505f5b818110156118ae57600581815481106116d7576116d7611d93565b905f5260205f2001548582815181106116f2576116f2611d93565b6020026020010181815250505f60045f87848151811061171457611714611d93565b60209081029190910181015182528101919091526040015f208054909150611744906001600160a01b0316611929565b85838151811061175657611756611d93565b60209081029190910101526003810154849081811115611774578091505b61177e8242611dbf565b90505f6117f588868151811061179657611796611d93565b6020026020010151856002018054806020026020016040519081016040528092919081815260200182805480156117ea57602002820191905f5260205f20905b8154815260200190600101908083116117d6575b50505050508461193a565b90508015611899575f611828837f0000000000000000000000000000000000000000000000000000000000000000611e0a565b9050611834818e611b52565b9c50808b8f8151811061184957611849611d93565b60200260200101818152505089868151811061186757611867611d93565b60200260200101518c8f8151811061188157611881611d93565b60209081029190910101526118958e611da7565b9d50505b50505050806118a790611da7565b90506116bc565b50505b5090919293949596565b7f00000000000000000000000000000000000000000000000000000000000000008110156119255760405163491a2bb160e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006024820152604401610709565b5050565b60606119348261194e565b92915050565b5f6119468484846119f3565b949350505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119ac573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119d0919061204b565b815f815181106119e2576119e2611d93565b602002602001018181525050919050565b5f8082118015611a345750825f81518110611a1057611a10611d93565b6020026020010151845f81518110611a2a57611a2a611d93565b6020026020010151115b15611abc575f82845f81518110611a4d57611a4d611d93565b6020026020010151865f81518110611a6757611a67611d93565b6020026020010151611a799190611dbf565b611a8b90670de0b6b3a7640000611e0a565b611a959190611e21565b7f000000000000000000000000000000000000000000000000000000000000000011159150505b9392505050565b5080545f8255905f5260205f2090810190611ade9190611b2a565b50565b828054828255905f5260205f20908101928215611b1a579160200282015b82811115611b1a578251825591602001919060010190611aff565b50611b26929150611b2a565b5090565b5b80821115611b26575f8155600101611b2b565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561193457611934611b3e565b6001600160a01b0381168114611ade575f80fd5b5f805f805f60808688031215611b8d575f80fd5b8535611b9881611b65565b94506020860135611ba881611b65565b935060408601359250606086013567ffffffffffffffff80821115611bcb575f80fd5b818801915088601f830112611bde575f80fd5b813581811115611bec575f80fd5b896020828501011115611bfd575f80fd5b9699959850939650602001949392505050565b5f60208284031215611c20575f80fd5b5035919050565b5f8151808452602080850194508084015f5b83811015611c5557815187529582019590820190600101611c39565b509495945050505050565b60c081525f611c7260c0830189611c27565b6020838203818501528189518084528284019150828160051b850101838c015f805b84811015611ce757878403601f19018652825180518086529088019088860190845b81811015611cd25783518352928a0192918a0191600101611cb6565b50509688019694505091860191600101611c94565b5050508a60408801528681036060880152611d02818b611c27565b9450505050508281036080840152611d1a8186611c27565b915050611d2b60a083018415159052565b979650505050505050565b602081525f611abc6020830184611c27565b5f6020808352835180828501525f5b81811015611d7357858101830151858201604001528201611d57565b505f604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b5f52603260045260245ffd5b5f60018201611db857611db8611b3e565b5060010190565b8181038181111561193457611934611b3e565b634e487b7160e01b5f52603160045260245ffd5b606081525f611df86060830186611c27565b60208301949094525060400152919050565b808202811582820484141761193457611934611b3e565b5f82611e3b57634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52604160045260245ffd5b604051610100810167ffffffffffffffff81118282101715611e7857611e78611e40565b60405290565b80516bffffffffffffffffffffffff81168114611e99575f80fd5b919050565b8051611e9981611b65565b805163ffffffff81168114611e99575f80fd5b805160068110611e99575f80fd5b5f82601f830112611ed9575f80fd5b8151602067ffffffffffffffff80831115611ef657611ef6611e40565b8260051b604051601f19603f83011681018181108482111715611f1b57611f1b611e40565b604052938452858101830193838101925087851115611f38575f80fd5b83870191505b84821015611d2b57611f4f82611ea9565b83529183019190830190611f3e565b5f60208284031215611f6e575f80fd5b815167ffffffffffffffff80821115611f85575f80fd5b908301906101008286031215611f99575f80fd5b611fa1611e54565b611faa83611e7e565b8152611fb860208401611e9e565b602082015260408301516040820152611fd360608401611ea9565b6060820152611fe460808401611ea9565b6080820152611ff560a08401611ea9565b60a082015261200660c08401611ebc565b60c082015260e08301518281111561201c575f80fd5b61202887828601611eca565b60e08301525095945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f6020828403121561205b575f80fd5b505191905056fea2646970667358221220369db9315caf7f21ab4dbc689015c5ce7e2b9bf805806c46a8ad7c6b40304d6a64736f6c63430008150033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/abis/0.8.21/ServiceStakingToken.json b/abis/0.8.21/ServiceStakingToken.json deleted file mode 100644 index bd34491e..00000000 --- a/abis/0.8.21/ServiceStakingToken.json +++ /dev/null @@ -1,1134 +0,0 @@ -{ - "_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": [], - "name": "getNextRewardCheckpointTimestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "tsNext", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getServiceIds", - "outputs": [ - { - "internalType": "uint256[]", - "name": "serviceIds", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "serviceId", - "type": "uint256" - } - ], - "name": "isServiceStaked", - "outputs": [ - { - "internalType": "bool", - "name": "isStaked", - "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": "0x61020060405234801562000011575f80fd5b506040516200286a3803806200286a8339810160408190526200003491620003b1565b848482825f01515f14806200004b57506020830151155b806200005957506060830151155b806200006757506080830151155b8062000075575060a0830151155b156200009457604051637c946ed760e01b815260040160405180910390fd5b600283604001511015620000d057604080840151905163491a2bb160e01b81526004810191909152600260248201526044015b60405180910390fd5b6001600160a01b038216620000f85760405163d92e233d60e01b815260040160405180910390fd5b82516080908152602084015160a0908152604085015160c052606085015160e09081529185015161010090815290850151610120526001600160a01b038416610180529084015161014052830151610160525f805b8460c00151518110156200022e57818560c001518281518110620001755762000175620004b4565b602002602001015111620001c1578460c0015181815181106200019c576200019c620004b4565b6020026020010151604051632ab10b0b60e21b8152600401620000c791815260200190565b8460c001518181518110620001da57620001da620004b4565b6020908102919091010151600380546001810182555f919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0181905591506200022681620004c8565b90506200014d565b50816200024e57604051637c946ed760e01b815260040160405180910390fd5b506101a0525050426002556001600160a01b03821615806200027757506001600160a01b038316155b15620002965760405163d92e233d60e01b815260040160405180910390fd5b506001600160a01b039081166101e052166101c05250620004ed9050565b634e487b7160e01b5f52604160045260245ffd5b60405161012081016001600160401b0381118282101715620002ee57620002ee620002b4565b60405290565b5f82601f83011262000304575f80fd5b815160206001600160401b0380831115620003235762000323620002b4565b8260051b604051601f19603f830116810181811084821117156200034b576200034b620002b4565b60405293845285810183019383810192508785111562000369575f80fd5b83870191505b848210156200038a578151835291830191908301906200036f565b979650505050505050565b80516001600160a01b0381168114620003ac575f80fd5b919050565b5f805f805f60a08688031215620003c6575f80fd5b85516001600160401b0380821115620003dd575f80fd5b90870190610120828a031215620003f2575f80fd5b620003fc620002c8565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c08301518281111562000444575f80fd5b620004528b828601620002f4565b60c08301525060e083810151908201526101009283015192810192909252509450620004816020870162000395565b9350620004916040870162000395565b9250620004a16060870162000395565b9150608086015190509295509295909350565b634e487b7160e01b5f52603260045260245ffd5b5f60018201620004e657634e487b7160e01b5f52601160045260245ffd5b5060010190565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e05161225f6200060b5f395f818161035a01528181610fec01528181611444015281816118be015261190201525f818161024e015261184601525f81816103940152610d0801525f818161047a015281816107b201528181610acb0152610f0501525f81816104d501528181610b8f0152610bbe01525f81816102ab01528181610c040152610c3801525f818161030c0152610b4d01525f81816103330152611c2b01525f81816102d2015281816113f801526114c701525f81816104fc01528181611939015261199001525f8181610523015261176d01525f818161021901528181610a530152610a87015261225f5ff3fe608060405234801561000f575f80fd5b50600436106101bb575f3560e01c8063a694fc3a116100f3578063e1f1176d11610093578063eb338c961161006e578063eb338c9614610545578063f189e85a14610558578063f4dce7141461056d578063ffa1ad7414610575575f80fd5b8063e1f1176d146104d0578063e77cdcc9146104f7578063eacdaabc1461051e575f80fd5b8063b6b55f25116100ce578063b6b55f2514610448578063c2c4c5c11461045b578063cbcf252a14610475578063cd25fe381461049c575f80fd5b8063a694fc3a146103bf578063a74466ad146103d2578063b69ef8a814610440575f80fd5b806356e760581161015e57806372f702f31161013957806372f702f31461035557806378e061361461037c578063809cee2f1461038f578063879d9090146103b6575f80fd5b806356e76058146102f45780635829c5ec14610307578063592cf3fb1461032e575f80fd5b80632e17de78116101995780632e17de78146102885780633e7329971461029d57806342cde4e8146102a657806352c824f5146102cd575f80fd5b8063150b7a02146101bf57806316a75172146102145780632871405114610249575b5f80fd5b6101de6101cd366004611ce6565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161020b565b6102707f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161020b565b61029b610296366004611d7d565b6105a6565b005b61023b60025481565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b61023b610302366004611d7d565b610876565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b6102707f000000000000000000000000000000000000000000000000000000000000000081565b61023b61038a366004611d7d565b610895565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b61023b60015481565b61029b6103cd366004611d7d565b610a2c565b6104156103e0366004611d7d565b600460208190525f918252604090912080546001820154600383015492909301546001600160a01b0391821693909116919084565b604080516001600160a01b03958616815294909316602085015291830152606082015260800161020b565b61023b5f5481565b61029b610456366004611d7d565b610fbd565b61046361105b565b60405161020b96959493929190611dcd565b6102707f000000000000000000000000000000000000000000000000000000000000000081565b6104c06104aa366004611d7d565b5f90815260046020526040902060030154151590565b604051901515815260200161020b565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b61023b610553366004611d7d565b611343565b610560611352565b60405161020b9190611ea3565b61023b6113f5565b610599604051806040016040528060058152602001640302e312e360dc1b81525081565b60405161020b9190611eb5565b5f81815260046020526040902060018101546001600160a01b031633146105fc57600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b5f8061060661105b565b95505050505091508061061e5761061b611352565b91505b5f5b825181101561065a578483828151811061063c5761063c611f00565b6020026020010151031561065a5761065381611f28565b9050610620565b6004840154600285018054604080516020808402820181019092528281525f93909290918301828280156106ab57602002820191905f5260205f20905b815481526020019060010190808311610697575b505050600389015489545f8c8152600460205260408120805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018054909116905595965091946001600160a01b039091169350915061070b6002830182611c57565b505f600382018190556004909101556005805461072a90600190611f40565b8154811061073a5761073a611f00565b905f5260205f2001546005868154811061075657610756611f00565b5f91825260209091200155600580548061077257610772611f53565b5f8281526020812082015f1990810191909155019055604051632142170760e11b8152306004820152336024820152604481018a90526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e906064015f604051808303815f87803b1580156107f3575f80fd5b505af1158015610805573d5f803e3d5ffd5b505050505f84111561081b5761081b8185611429565b806001600160a01b0316336001600160a01b03168a7f246ee6115bfd84e00097b16569c2ff2f822026bb9595a82cd2c1e69d4b6ea50c86888760405161086393929190611f67565b60405180910390a4505050505050505050565b60038181548110610885575f80fd5b5f91825260209091200154905081565b5f818152600460209081526040808320815160a08101835281546001600160a01b039081168252600183015416818501526002820180548451818702810187018652818152879693958601939092919083018282801561091257602002820191905f5260205f20905b8154815260200190600101908083116108fe575b505050505081526020016003820154815260200160048201548152505090508060800151915080606001515f0361095f5760405163e0606b6360e01b8152600481018490526024016105f3565b5f805f805f61096c6114b1565b5050945094509450945094505f5b84811015610a20578883828151811061099557610995611f00565b602002602001015103610a1057858411156109eb5783868383815181106109be576109be611f00565b60200260200101516109d09190611f8b565b6109da9190611fa2565b6109e49089611fc1565b9750610a20565b8181815181106109fd576109fd611f00565b6020026020010151886109e49190611fc1565b610a1981611f28565b905061097a565b50505050505050919050565b6001545f03610a4e5760405163afb0be3360e01b815260040160405180910390fd5b6005547f00000000000000000000000000000000000000000000000000000000000000008103610ab35760405163fd20861560e01b81527f000000000000000000000000000000000000000000000000000000000000000060048201526024016105f3565b60405163ef0e239b60e01b8152600481018390525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b906024015f60405180830381865afa158015610b17573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610b3e91908101906120f2565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610b8d57604051637ad404bf60e11b8152600481018490526024016105f3565b7f000000000000000000000000000000000000000000000000000000000000000015801590610be0575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b15610c0157604051637ad404bf60e11b8152600481018490526024016105f3565b5f7f0000000000000000000000000000000000000000000000000000000000000000118015610c5a5750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b15610c7b57604051637ad404bf60e11b8152600481018490526024016105f3565b60048160c001516005811115610c9357610c936121cb565b14610cd2578060c001516005811115610cae57610cae6121cb565b604051633c053f9d60e21b81526004810191909152602481018490526044016105f3565b5f81602001516001600160a01b0316803b806020016040519081016040528181525f908060200190933c805190602001209050807f000000000000000000000000000000000000000000000000000000000000000014610d5557602082015160405162a2307960e51b81526001600160a01b0390911660048201526024016105f3565b6003548015610e215760e083015151818114610d8757604051637ad404bf60e11b8152600481018790526024016105f3565b5f5b81811015610e1e578460e001518181518110610da757610da7611f00565b602002602001015163ffffffff1660038281548110610dc857610dc8611f00565b905f5260205f20015414610e0e5760038181548110610de957610de9611f00565b905f5260205f200154604051632ab10b0b60e21b81526004016105f391815260200190565b610e1781611f28565b9050610d89565b50505b610e3c85845f01516bffffffffffffffffffffffff16611824565b5f85815260046020908152604082209085015181546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff1991821617835560018301805490911633179055909190610e90906119c2565b8051909150610ea89060028401906020840190611c75565b50426003830155600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e906064015f604051808303815f87803b158015610f4e575f80fd5b505af1158015610f60573d5f803e3d5ffd5b5050505084602001516001600160a01b0316336001600160a01b0316887f5d43ac9b1b213902df90d405b0006308578486b6c62182c5df202ed572c844e484604051610fac9190611ea3565b60405180910390a450505050505050565b5f815f54610fcb9190611fc1565b90505f82600154610fdc9190611fc1565b5f839055600181905590506110137f00000000000000000000000000000000000000000000000000000000000000003330866119d3565b604080518481526020810184905290810182905233907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2505050565b6060805f6060805f805f805f805f806110726114b1565b96509650965096509650965096505f861115611268575f878611156111db575f8060015b8981101561113157888b8883815181106110b2576110b2611f00565b60200260200101516110c49190611f8b565b6110ce9190611fa2565b92506110da8383611fc1565b91508781815181106110ee576110ee611f00565b602002602001015193508260045f8681526020019081526020015f206004015f82825461111b9190611fc1565b9091555061112a905081611f28565b9050611096565b50878a875f8151811061114657611146611f00565b60200260200101516111589190611f8b565b6111629190611fa2565b915061116e8282611fc1565b9050865f8151811061118257611182611f00565b60200260200101519250808a11156111ab5761119e818b611f40565b6111a89083611fc1565b91505b5f83815260046020819052604082200180548492906111cb908490611fc1565b909155505f9a5061126192505050565b5f5b87811015611253578581815181106111f7576111f7611f00565b6020026020010151915084818151811061121357611213611f00565b602002602001015160045f8481526020019081526020015f206004015f82825461123d9190611fc1565b9091555061124c905081611f28565b90506111dd565b5061125e8689611f40565b97505b5060018790555b80511561132e575f5b82518110156112eb575f83828151811061128d5761128d611f00565b602002602001015190508282815181106112a9576112a9611f00565b602002602001015160045f8381526020019081526020015f2060020190805190602001906112d8929190611c75565b5050806112e490611f28565b9050611271565b50426002556040805188815260208101889052600199507f21d81d5d656869e8ce3ba8d65526a2f0dbbcd3d36f5f9999eb7c84360e45eced910160405180910390a15b909c909b509399509097509550929350915050565b60058181548110610885575f80fd5b6005546060908067ffffffffffffffff81111561137157611371611fd4565b60405190808252806020026020018201604052801561139a578160200160208202803683370190505b5091505f5b818110156113f057600581815481106113ba576113ba611f00565b905f5260205f2001548382815181106113d5576113d5611f00565b60209081029190910101526113e981611f28565b905061139f565b505090565b5f7f00000000000000000000000000000000000000000000000000000000000000006002546114249190611fc1565b905090565b805f808282546114399190611f40565b9091555061146a90507f00000000000000000000000000000000000000000000000000000000000000008383611a57565b816001600160a01b03167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364826040516114a591815260200190565b60405180910390a25050565b600254600154905f9081906060908190819081907f00000000000000000000000000000000000000000000000000000000000000006114f08242611f40565b101580156114fd57505f88115b1561181a576005548067ffffffffffffffff81111561151e5761151e611fd4565b604051908082528060200260200182016040528015611547578160200160208202803683370190505b5093508067ffffffffffffffff81111561156357611563611fd4565b60405190808252806020026020018201604052801561158c578160200160208202803683370190505b5095508067ffffffffffffffff8111156115a8576115a8611fd4565b6040519080825280602002602001820160405280156115d1578160200160208202803683370190505b5094508067ffffffffffffffff8111156115ed576115ed611fd4565b60405190808252806020026020018201604052801561162057816020015b606081526020019060019003908161160b5790505b5092505f5b81811015611817576005818154811061164057611640611f00565b905f5260205f20015485828151811061165b5761165b611f00565b6020026020010181815250505f60045f87848151811061167d5761167d611f00565b60209081029190910181015182528101919091526040015f2080549091506116ad906001600160a01b03166119c2565b8583815181106116bf576116bf611f00565b602090810291909101015260038101548490818111156116dd578091505b6116e78242611f40565b90505f61175e8886815181106116ff576116ff611f00565b60200260200101518560020180548060200260200160405190810160405280929190818152602001828054801561175357602002820191905f5260205f20905b81548152602001906001019080831161173f575b505050505084611ace565b90508015611802575f611791837f0000000000000000000000000000000000000000000000000000000000000000611f8b565b905061179d818e611fc1565b9c50808b8f815181106117b2576117b2611f00565b6020026020010181815250508986815181106117d0576117d0611f00565b60200260200101518c8f815181106117ea576117ea611f00565b60209081029190910101526117fe8e611f28565b9d50505b505050508061181090611f28565b9050611625565b50505b5090919293949596565b604051633cebfa4f60e01b8152600481018390525f9081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633cebfa4f906024016040805180830381865afa15801561188a573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118ae91906121df565b91509150816001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461193757604051630b80380d60e31b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152831660248201526044016105f3565b7f0000000000000000000000000000000000000000000000000000000000000000816bffffffffffffffffffffffff1610156119bc57604051632b30b24760e21b81526bffffffffffffffffffffffff821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016105f3565b50505050565b60606119cd82611ae2565b92915050565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080611a505760405163abae3d6d60e01b81526001600160a01b038087166004830152808616602483015284166044820152606481018390526084016105f3565b5050505050565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806119bc5760405163abae3d6d60e01b81526001600160a01b03808616600483015230602483015284166044820152606481018390526084016105f3565b5f611ada848484611b87565b949350505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b40573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b649190612212565b815f81518110611b7657611b76611f00565b602002602001018181525050919050565b5f8082118015611bc85750825f81518110611ba457611ba4611f00565b6020026020010151845f81518110611bbe57611bbe611f00565b6020026020010151115b15611c50575f82845f81518110611be157611be1611f00565b6020026020010151865f81518110611bfb57611bfb611f00565b6020026020010151611c0d9190611f40565b611c1f90670de0b6b3a7640000611f8b565b611c299190611fa2565b7f000000000000000000000000000000000000000000000000000000000000000011159150505b9392505050565b5080545f8255905f5260205f2090810190611c729190611cbe565b50565b828054828255905f5260205f20908101928215611cae579160200282015b82811115611cae578251825591602001919060010190611c93565b50611cba929150611cbe565b5090565b5b80821115611cba575f8155600101611cbf565b6001600160a01b0381168114611c72575f80fd5b5f805f805f60808688031215611cfa575f80fd5b8535611d0581611cd2565b94506020860135611d1581611cd2565b935060408601359250606086013567ffffffffffffffff80821115611d38575f80fd5b818801915088601f830112611d4b575f80fd5b813581811115611d59575f80fd5b896020828501011115611d6a575f80fd5b9699959850939650602001949392505050565b5f60208284031215611d8d575f80fd5b5035919050565b5f8151808452602080850194508084015f5b83811015611dc257815187529582019590820190600101611da6565b509495945050505050565b60c081525f611ddf60c0830189611d94565b6020838203818501528189518084528284019150828160051b850101838c015f805b84811015611e5457878403601f19018652825180518086529088019088860190845b81811015611e3f5783518352928a0192918a0191600101611e23565b50509688019694505091860191600101611e01565b5050508a60408801528681036060880152611e6f818b611d94565b9450505050508281036080840152611e878186611d94565b915050611e9860a083018415159052565b979650505050505050565b602081525f611c506020830184611d94565b5f6020808352835180828501525f5b81811015611ee057858101830151858201604001528201611ec4565b505f604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201611f3957611f39611f14565b5060010190565b818103818111156119cd576119cd611f14565b634e487b7160e01b5f52603160045260245ffd5b606081525f611f796060830186611d94565b60208301949094525060400152919050565b80820281158282048414176119cd576119cd611f14565b5f82611fbc57634e487b7160e01b5f52601260045260245ffd5b500490565b808201808211156119cd576119cd611f14565b634e487b7160e01b5f52604160045260245ffd5b604051610100810167ffffffffffffffff8111828210171561200c5761200c611fd4565b60405290565b80516bffffffffffffffffffffffff8116811461202d575f80fd5b919050565b805161202d81611cd2565b805163ffffffff8116811461202d575f80fd5b80516006811061202d575f80fd5b5f82601f83011261206d575f80fd5b8151602067ffffffffffffffff8083111561208a5761208a611fd4565b8260051b604051601f19603f830116810181811084821117156120af576120af611fd4565b6040529384528581018301938381019250878511156120cc575f80fd5b83870191505b84821015611e98576120e38261203d565b835291830191908301906120d2565b5f60208284031215612102575f80fd5b815167ffffffffffffffff80821115612119575f80fd5b90830190610100828603121561212d575f80fd5b612135611fe8565b61213e83612012565b815261214c60208401612032565b6020820152604083015160408201526121676060840161203d565b60608201526121786080840161203d565b608082015261218960a0840161203d565b60a082015261219a60c08401612050565b60c082015260e0830151828111156121b0575f80fd5b6121bc8782860161205e565b60e08301525095945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f80604083850312156121f0575f80fd5b82516121fb81611cd2565b915061220960208401612012565b90509250929050565b5f60208284031215612222575f80fd5b505191905056fea264697066735822122043c4706472a127ff5d3b2ef526f3b42aa32803e250ca3218ed6fb887f998489a64736f6c63430008150033", - "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106101bb575f3560e01c8063a694fc3a116100f3578063e1f1176d11610093578063eb338c961161006e578063eb338c9614610545578063f189e85a14610558578063f4dce7141461056d578063ffa1ad7414610575575f80fd5b8063e1f1176d146104d0578063e77cdcc9146104f7578063eacdaabc1461051e575f80fd5b8063b6b55f25116100ce578063b6b55f2514610448578063c2c4c5c11461045b578063cbcf252a14610475578063cd25fe381461049c575f80fd5b8063a694fc3a146103bf578063a74466ad146103d2578063b69ef8a814610440575f80fd5b806356e760581161015e57806372f702f31161013957806372f702f31461035557806378e061361461037c578063809cee2f1461038f578063879d9090146103b6575f80fd5b806356e76058146102f45780635829c5ec14610307578063592cf3fb1461032e575f80fd5b80632e17de78116101995780632e17de78146102885780633e7329971461029d57806342cde4e8146102a657806352c824f5146102cd575f80fd5b8063150b7a02146101bf57806316a75172146102145780632871405114610249575b5f80fd5b6101de6101cd366004611ce6565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161020b565b6102707f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161020b565b61029b610296366004611d7d565b6105a6565b005b61023b60025481565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b61023b610302366004611d7d565b610876565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b6102707f000000000000000000000000000000000000000000000000000000000000000081565b61023b61038a366004611d7d565b610895565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b61023b60015481565b61029b6103cd366004611d7d565b610a2c565b6104156103e0366004611d7d565b600460208190525f918252604090912080546001820154600383015492909301546001600160a01b0391821693909116919084565b604080516001600160a01b03958616815294909316602085015291830152606082015260800161020b565b61023b5f5481565b61029b610456366004611d7d565b610fbd565b61046361105b565b60405161020b96959493929190611dcd565b6102707f000000000000000000000000000000000000000000000000000000000000000081565b6104c06104aa366004611d7d565b5f90815260046020526040902060030154151590565b604051901515815260200161020b565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b61023b7f000000000000000000000000000000000000000000000000000000000000000081565b61023b610553366004611d7d565b611343565b610560611352565b60405161020b9190611ea3565b61023b6113f5565b610599604051806040016040528060058152602001640302e312e360dc1b81525081565b60405161020b9190611eb5565b5f81815260046020526040902060018101546001600160a01b031633146105fc57600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b5f8061060661105b565b95505050505091508061061e5761061b611352565b91505b5f5b825181101561065a578483828151811061063c5761063c611f00565b6020026020010151031561065a5761065381611f28565b9050610620565b6004840154600285018054604080516020808402820181019092528281525f93909290918301828280156106ab57602002820191905f5260205f20905b815481526020019060010190808311610697575b505050600389015489545f8c8152600460205260408120805473ffffffffffffffffffffffffffffffffffffffff199081168255600182018054909116905595965091946001600160a01b039091169350915061070b6002830182611c57565b505f600382018190556004909101556005805461072a90600190611f40565b8154811061073a5761073a611f00565b905f5260205f2001546005868154811061075657610756611f00565b5f91825260209091200155600580548061077257610772611f53565b5f8281526020812082015f1990810191909155019055604051632142170760e11b8152306004820152336024820152604481018a90526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e906064015f604051808303815f87803b1580156107f3575f80fd5b505af1158015610805573d5f803e3d5ffd5b505050505f84111561081b5761081b8185611429565b806001600160a01b0316336001600160a01b03168a7f246ee6115bfd84e00097b16569c2ff2f822026bb9595a82cd2c1e69d4b6ea50c86888760405161086393929190611f67565b60405180910390a4505050505050505050565b60038181548110610885575f80fd5b5f91825260209091200154905081565b5f818152600460209081526040808320815160a08101835281546001600160a01b039081168252600183015416818501526002820180548451818702810187018652818152879693958601939092919083018282801561091257602002820191905f5260205f20905b8154815260200190600101908083116108fe575b505050505081526020016003820154815260200160048201548152505090508060800151915080606001515f0361095f5760405163e0606b6360e01b8152600481018490526024016105f3565b5f805f805f61096c6114b1565b5050945094509450945094505f5b84811015610a20578883828151811061099557610995611f00565b602002602001015103610a1057858411156109eb5783868383815181106109be576109be611f00565b60200260200101516109d09190611f8b565b6109da9190611fa2565b6109e49089611fc1565b9750610a20565b8181815181106109fd576109fd611f00565b6020026020010151886109e49190611fc1565b610a1981611f28565b905061097a565b50505050505050919050565b6001545f03610a4e5760405163afb0be3360e01b815260040160405180910390fd5b6005547f00000000000000000000000000000000000000000000000000000000000000008103610ab35760405163fd20861560e01b81527f000000000000000000000000000000000000000000000000000000000000000060048201526024016105f3565b60405163ef0e239b60e01b8152600481018390525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b906024015f60405180830381865afa158015610b17573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610b3e91908101906120f2565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610b8d57604051637ad404bf60e11b8152600481018490526024016105f3565b7f000000000000000000000000000000000000000000000000000000000000000015801590610be0575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b15610c0157604051637ad404bf60e11b8152600481018490526024016105f3565b5f7f0000000000000000000000000000000000000000000000000000000000000000118015610c5a5750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b15610c7b57604051637ad404bf60e11b8152600481018490526024016105f3565b60048160c001516005811115610c9357610c936121cb565b14610cd2578060c001516005811115610cae57610cae6121cb565b604051633c053f9d60e21b81526004810191909152602481018490526044016105f3565b5f81602001516001600160a01b0316803b806020016040519081016040528181525f908060200190933c805190602001209050807f000000000000000000000000000000000000000000000000000000000000000014610d5557602082015160405162a2307960e51b81526001600160a01b0390911660048201526024016105f3565b6003548015610e215760e083015151818114610d8757604051637ad404bf60e11b8152600481018790526024016105f3565b5f5b81811015610e1e578460e001518181518110610da757610da7611f00565b602002602001015163ffffffff1660038281548110610dc857610dc8611f00565b905f5260205f20015414610e0e5760038181548110610de957610de9611f00565b905f5260205f200154604051632ab10b0b60e21b81526004016105f391815260200190565b610e1781611f28565b9050610d89565b50505b610e3c85845f01516bffffffffffffffffffffffff16611824565b5f85815260046020908152604082209085015181546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff1991821617835560018301805490911633179055909190610e90906119c2565b8051909150610ea89060028401906020840190611c75565b50426003830155600580546001810182555f919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e906064015f604051808303815f87803b158015610f4e575f80fd5b505af1158015610f60573d5f803e3d5ffd5b5050505084602001516001600160a01b0316336001600160a01b0316887f5d43ac9b1b213902df90d405b0006308578486b6c62182c5df202ed572c844e484604051610fac9190611ea3565b60405180910390a450505050505050565b5f815f54610fcb9190611fc1565b90505f82600154610fdc9190611fc1565b5f839055600181905590506110137f00000000000000000000000000000000000000000000000000000000000000003330866119d3565b604080518481526020810184905290810182905233907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2505050565b6060805f6060805f805f805f805f806110726114b1565b96509650965096509650965096505f861115611268575f878611156111db575f8060015b8981101561113157888b8883815181106110b2576110b2611f00565b60200260200101516110c49190611f8b565b6110ce9190611fa2565b92506110da8383611fc1565b91508781815181106110ee576110ee611f00565b602002602001015193508260045f8681526020019081526020015f206004015f82825461111b9190611fc1565b9091555061112a905081611f28565b9050611096565b50878a875f8151811061114657611146611f00565b60200260200101516111589190611f8b565b6111629190611fa2565b915061116e8282611fc1565b9050865f8151811061118257611182611f00565b60200260200101519250808a11156111ab5761119e818b611f40565b6111a89083611fc1565b91505b5f83815260046020819052604082200180548492906111cb908490611fc1565b909155505f9a5061126192505050565b5f5b87811015611253578581815181106111f7576111f7611f00565b6020026020010151915084818151811061121357611213611f00565b602002602001015160045f8481526020019081526020015f206004015f82825461123d9190611fc1565b9091555061124c905081611f28565b90506111dd565b5061125e8689611f40565b97505b5060018790555b80511561132e575f5b82518110156112eb575f83828151811061128d5761128d611f00565b602002602001015190508282815181106112a9576112a9611f00565b602002602001015160045f8381526020019081526020015f2060020190805190602001906112d8929190611c75565b5050806112e490611f28565b9050611271565b50426002556040805188815260208101889052600199507f21d81d5d656869e8ce3ba8d65526a2f0dbbcd3d36f5f9999eb7c84360e45eced910160405180910390a15b909c909b509399509097509550929350915050565b60058181548110610885575f80fd5b6005546060908067ffffffffffffffff81111561137157611371611fd4565b60405190808252806020026020018201604052801561139a578160200160208202803683370190505b5091505f5b818110156113f057600581815481106113ba576113ba611f00565b905f5260205f2001548382815181106113d5576113d5611f00565b60209081029190910101526113e981611f28565b905061139f565b505090565b5f7f00000000000000000000000000000000000000000000000000000000000000006002546114249190611fc1565b905090565b805f808282546114399190611f40565b9091555061146a90507f00000000000000000000000000000000000000000000000000000000000000008383611a57565b816001600160a01b03167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364826040516114a591815260200190565b60405180910390a25050565b600254600154905f9081906060908190819081907f00000000000000000000000000000000000000000000000000000000000000006114f08242611f40565b101580156114fd57505f88115b1561181a576005548067ffffffffffffffff81111561151e5761151e611fd4565b604051908082528060200260200182016040528015611547578160200160208202803683370190505b5093508067ffffffffffffffff81111561156357611563611fd4565b60405190808252806020026020018201604052801561158c578160200160208202803683370190505b5095508067ffffffffffffffff8111156115a8576115a8611fd4565b6040519080825280602002602001820160405280156115d1578160200160208202803683370190505b5094508067ffffffffffffffff8111156115ed576115ed611fd4565b60405190808252806020026020018201604052801561162057816020015b606081526020019060019003908161160b5790505b5092505f5b81811015611817576005818154811061164057611640611f00565b905f5260205f20015485828151811061165b5761165b611f00565b6020026020010181815250505f60045f87848151811061167d5761167d611f00565b60209081029190910181015182528101919091526040015f2080549091506116ad906001600160a01b03166119c2565b8583815181106116bf576116bf611f00565b602090810291909101015260038101548490818111156116dd578091505b6116e78242611f40565b90505f61175e8886815181106116ff576116ff611f00565b60200260200101518560020180548060200260200160405190810160405280929190818152602001828054801561175357602002820191905f5260205f20905b81548152602001906001019080831161173f575b505050505084611ace565b90508015611802575f611791837f0000000000000000000000000000000000000000000000000000000000000000611f8b565b905061179d818e611fc1565b9c50808b8f815181106117b2576117b2611f00565b6020026020010181815250508986815181106117d0576117d0611f00565b60200260200101518c8f815181106117ea576117ea611f00565b60209081029190910101526117fe8e611f28565b9d50505b505050508061181090611f28565b9050611625565b50505b5090919293949596565b604051633cebfa4f60e01b8152600481018390525f9081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633cebfa4f906024016040805180830381865afa15801561188a573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118ae91906121df565b91509150816001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161461193757604051630b80380d60e31b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152831660248201526044016105f3565b7f0000000000000000000000000000000000000000000000000000000000000000816bffffffffffffffffffffffff1610156119bc57604051632b30b24760e21b81526bffffffffffffffffffffffff821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016105f3565b50505050565b60606119cd82611ae2565b92915050565b5f6040516323b872dd60e01b5f5284600452836024528260445260205f60645f808a5af13d15601f3d1160015f511416171691505f606052806040525080611a505760405163abae3d6d60e01b81526001600160a01b038087166004830152808616602483015284166044820152606481018390526084016105f3565b5050505050565b5f60405163a9059cbb60e01b5f52836004528260245260205f60445f80895af13d15601f3d1160015f511416171691505f6060528060405250806119bc5760405163abae3d6d60e01b81526001600160a01b03808616600483015230602483015284166044820152606481018390526084016105f3565b5f611ada848484611b87565b949350505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b40573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b649190612212565b815f81518110611b7657611b76611f00565b602002602001018181525050919050565b5f8082118015611bc85750825f81518110611ba457611ba4611f00565b6020026020010151845f81518110611bbe57611bbe611f00565b6020026020010151115b15611c50575f82845f81518110611be157611be1611f00565b6020026020010151865f81518110611bfb57611bfb611f00565b6020026020010151611c0d9190611f40565b611c1f90670de0b6b3a7640000611f8b565b611c299190611fa2565b7f000000000000000000000000000000000000000000000000000000000000000011159150505b9392505050565b5080545f8255905f5260205f2090810190611c729190611cbe565b50565b828054828255905f5260205f20908101928215611cae579160200282015b82811115611cae578251825591602001919060010190611c93565b50611cba929150611cbe565b5090565b5b80821115611cba575f8155600101611cbf565b6001600160a01b0381168114611c72575f80fd5b5f805f805f60808688031215611cfa575f80fd5b8535611d0581611cd2565b94506020860135611d1581611cd2565b935060408601359250606086013567ffffffffffffffff80821115611d38575f80fd5b818801915088601f830112611d4b575f80fd5b813581811115611d59575f80fd5b896020828501011115611d6a575f80fd5b9699959850939650602001949392505050565b5f60208284031215611d8d575f80fd5b5035919050565b5f8151808452602080850194508084015f5b83811015611dc257815187529582019590820190600101611da6565b509495945050505050565b60c081525f611ddf60c0830189611d94565b6020838203818501528189518084528284019150828160051b850101838c015f805b84811015611e5457878403601f19018652825180518086529088019088860190845b81811015611e3f5783518352928a0192918a0191600101611e23565b50509688019694505091860191600101611e01565b5050508a60408801528681036060880152611e6f818b611d94565b9450505050508281036080840152611e878186611d94565b915050611e9860a083018415159052565b979650505050505050565b602081525f611c506020830184611d94565b5f6020808352835180828501525f5b81811015611ee057858101830151858201604001528201611ec4565b505f604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201611f3957611f39611f14565b5060010190565b818103818111156119cd576119cd611f14565b634e487b7160e01b5f52603160045260245ffd5b606081525f611f796060830186611d94565b60208301949094525060400152919050565b80820281158282048414176119cd576119cd611f14565b5f82611fbc57634e487b7160e01b5f52601260045260245ffd5b500490565b808201808211156119cd576119cd611f14565b634e487b7160e01b5f52604160045260245ffd5b604051610100810167ffffffffffffffff8111828210171561200c5761200c611fd4565b60405290565b80516bffffffffffffffffffffffff8116811461202d575f80fd5b919050565b805161202d81611cd2565b805163ffffffff8116811461202d575f80fd5b80516006811061202d575f80fd5b5f82601f83011261206d575f80fd5b8151602067ffffffffffffffff8083111561208a5761208a611fd4565b8260051b604051601f19603f830116810181811084821117156120af576120af611fd4565b6040529384528581018301938381019250878511156120cc575f80fd5b83870191505b84821015611e98576120e38261203d565b835291830191908301906120d2565b5f60208284031215612102575f80fd5b815167ffffffffffffffff80821115612119575f80fd5b90830190610100828603121561212d575f80fd5b612135611fe8565b61213e83612012565b815261214c60208401612032565b6020820152604083015160408201526121676060840161203d565b60608201526121786080840161203d565b608082015261218960a0840161203d565b60a082015261219a60c08401612050565b60c082015260e0830151828111156121b0575f80fd5b6121bc8782860161205e565b60e08301525095945050505050565b634e487b7160e01b5f52602160045260245ffd5b5f80604083850312156121f0575f80fd5b82516121fb81611cd2565b915061220960208401612012565b90509250929050565b5f60208284031215612222575f80fd5b505191905056fea264697066735822122043c4706472a127ff5d3b2ef526f3b42aa32803e250ca3218ed6fb887f998489a64736f6c63430008150033", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/abis/0.8.23/ServiceStakingNativeToken.json b/abis/0.8.23/ServiceStakingNativeToken.json new file mode 100644 index 00000000..f9a16718 --- /dev/null +++ b/abis/0.8.23/ServiceStakingNativeToken.json @@ -0,0 +1,1252 @@ +{ + "_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": "minNumStakingPeriods", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxNumInactivityPeriods", + "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": "uint256", + "name": "serviceId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tsProvided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tsExpected", + "type": "uint256" + } + ], + "name": "NotEnoughTimeStaked", + "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": "ServiceNotUnstaked", + "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": true, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "availableRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "serviceIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "rewards", + "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": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "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": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "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" + } + ], + "name": "ServiceUnstaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "serviceIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "owners", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "multisigs", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "serviceInactivity", + "type": "uint256[]" + } + ], + "name": "ServicesEvicted", + "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": "calculateServiceStakingLastReward", + "outputs": [ + { + "internalType": "uint256", + "name": "reward", + "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": "evictServiceIds", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "configHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochCounter", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAgentIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextRewardCheckpointTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "tsNext", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getServiceIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "getServiceInfo", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "multisig", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "nonces", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "tsStart", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inactivity", + "type": "uint256" + } + ], + "internalType": "struct ServiceInfo", + "name": "sInfo", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "getServiceStakingState", + "outputs": [ + { + "internalType": "enum ServiceStakingBase.ServiceStakingState", + "name": "stakingState", + "type": "uint8" + } + ], + "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" + }, + { + "internalType": "uint256", + "name": "inactivity", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxInactivityDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxNumInactivityPeriods", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "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": "minStakingDuration", + "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": "0x6102206040523480156200001257600080fd5b506040516200374d3803806200374d833981016040819052620000359162000402565b8282828260000151600014806200004e57506020830151155b806200005c575060a0830151155b806200006a575060c0830151155b8062000078575060e0830151155b806200008657506060830151155b806200009457506080830151155b15620000b357604051637c946ed760e01b815260040160405180910390fd5b826080015183606001511015620000f5576060830151608084015160405163491a2bb160e01b8152600481019290925260248201526044015b60405180910390fd5b6002836040015110156200012d57604080840151905163491a2bb160e01b8152600481019190915260026024820152604401620000ec565b6001600160a01b038216620001555760405163d92e233d60e01b815260040160405180910390fd5b82516080908152602084015160a0908152604085015160c09081529185015160e0908152908501516101005290840151610120908152908401516101409081526001600160a01b0384166101a0529084015161016052830151610180526000805b846101000151518110156200029257818561010001518281518110620001e057620001e0620004ff565b6020026020010151116200022d578461010001518181518110620002085762000208620004ff565b6020026020010151604051632ab10b0b60e21b8152600401620000ec91815260200190565b8461010001518181518110620002475762000247620004ff565b602090810291909101015160048054600181810183556000929092527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0182905590925001620001b6565b5081620002b257604051637c946ed760e01b815260040160405180910390fd5b6101c0829052610100516060850151620002cd919062000515565b6101e052610100516080850151620002e6919062000515565b6102005250504260035550620005419350505050565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b0381118282101715620003385762000338620002fc565b60405290565b600082601f8301126200035057600080fd5b815160206001600160401b03808311156200036f576200036f620002fc565b8260051b604051601f19603f83011681018181108482111715620003975762000397620002fc565b6040529384526020818701810194908101925087851115620003b857600080fd5b6020870191505b84821015620003da57815183529183019190830190620003bf565b979650505050505050565b80516001600160a01b0381168114620003fd57600080fd5b919050565b6000806000606084860312156200041857600080fd5b83516001600160401b03808211156200043057600080fd5b9085019061016082880312156200044657600080fd5b6200045062000312565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e08201526101008084015183811115620004af57600080fd5b620004bd8a8287016200033e565b918301919091525061012083810151908201526101409283015192810192909252509250620004ef60208501620003e5565b9150604084015190509250925092565b634e487b7160e01b600052603260045260246000fd5b80820281158282048414176200053b57634e487b7160e01b600052601160045260246000fd5b92915050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e051610200516130dc62000671600039600081816107df015281816119610152611bd0015260008181610277015281816108ab01526108fd0152600081816104ad01526111280152600081816106ad01528181610b5f01528181610ee40152818161131b0152611dcf0152600081816106f901528181610fac0152610fdb01526000818161039d0152818161102201526110560152600081816104250152610f6a015260008181610459015261281f0152600081816103d101528181611c820152611f100152600061052401526000818161072d0152611d62015260008181610761015261220601526000818161033101528181610e6b0152610e9f01526130dc6000f3fe6080604052600436106101e75760003560e01c8063a694fc3a11610102578063e1f1176d11610095578063f189e85a11610064578063f189e85a146107a3578063f4dce714146107b8578063f86ad2b6146107cd578063ffa1ad741461080157600080fd5b8063e1f1176d146106e7578063e77cdcc91461071b578063eacdaabc1461074f578063eb338c961461078357600080fd5b8063c2c4c5c1116100d1578063c2c4c5c114610628578063c889921d1461064e578063cae2a5f01461066e578063cbcf252a1461069b57600080fd5b8063a694fc3a14610546578063a74466ad14610566578063b1508760146105f0578063b69ef8a81461061257600080fd5b806356e760581161017a578063809cee2f11610149578063809cee2f1461049b57806382a8ea58146104cf578063879d9090146104fc578063a0ed60e01461051257600080fd5b806356e76058146103f35780635829c5ec14610413578063592cf3fb1461044757806378e061361461047b57600080fd5b80632e17de78116101b65780632e17de78146103535780633e7329971461037557806342cde4e81461038b57806352c824f5146103bf57600080fd5b806308ae7e541461026557806314b19c5a146102ac578063150b7a02146102c257806316a751721461031f57600080fd5b36610260576000346001546101fc91906128e0565b905060003460025461020e91906128e0565b60018390556002819055604080513481526020810185905290810182905290915033907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2005b600080fd5b34801561027157600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b3480156102b857600080fd5b5061029960005481565b3480156102ce57600080fd5b506102ee6102dd366004612908565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016102a3565b34801561032b57600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561035f57600080fd5b5061037361036e3660046129a7565b61083f565b005b34801561038157600080fd5b5061029960035481565b34801561039757600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b3480156103cb57600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ff57600080fd5b5061029961040e3660046129a7565b610c2d565b34801561041f57600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561045357600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561048757600080fd5b506102996104963660046129a7565b610c4e565b3480156104a757600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b3480156104db57600080fd5b506104ef6104ea3660046129a7565b610d18565b6040516102a391906129fc565b34801561050857600080fd5b5061029960025481565b34801561051e57600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561055257600080fd5b506103736105613660046129a7565b610e0f565b34801561057257600080fd5b506105bd6105813660046129a7565b6005602081905260009182526040909120805460018201546003830154600484015493909401546001600160a01b039283169492909116929085565b604080516001600160a01b039687168152959094166020860152928401919091526060830152608082015260a0016102a3565b3480156105fc57600080fd5b506106056113dc565b6040516102a39190612a63565b34801561061e57600080fd5b5061029960015481565b34801561063457600080fd5b5061063d611434565b6040516102a3959493929190612a76565b34801561065a57600080fd5b506102996106693660046129a7565b611a69565b34801561067a57600080fd5b5061068e6106893660046129a7565b611b25565b6040516102a39190612b3b565b3480156106a757600080fd5b506106cf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102a3565b3480156106f357600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561072757600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561075b57600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561078f57600080fd5b5061029961079e3660046129a7565b611c18565b3480156107af57600080fd5b50610605611c28565b3480156107c457600080fd5b50610299611c7e565b3480156107d957600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561080d57600080fd5b50610832604051806040016040528060058152602001640302e312e360dc1b81525081565b6040516102a39190612b63565b600081815260056020526040902060018101546001600160a01b0316331461089657600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b600381015460006108a78242612bb2565b90507f000000000000000000000000000000000000000000000000000000000000000081111580156108db57506000600254115b156109295760405163ba2bbc6b60e01b815260048101859052602481018290527f0000000000000000000000000000000000000000000000000000000000000000604482015260640161088d565b600080610934611434565b9450505050915081516000036109955761094c611c28565b9150815167ffffffffffffffff81111561096857610968612bc5565b604051908082528060200260200182016040528015610991578160200160208202803683370190505b5090505b6000805b83518210156109f657878383815181106109b5576109b5612bdb565b602002602001015103156109f657878483815181106109d6576109d6612bdb565b6020026020010151036109eb575060016109f6565b816001019150610999565b60048701546002880180546040805160208084028201810190925282815260009390929091830182828015610a4a57602002820191906000526020600020905b815481526020019060010190808311610a36575b50508c5460008f8152600560205260408120805473ffffffffffffffffffffffffffffffffffffffff19908116825560018201805490911690559596506001600160a01b039091169493509150610aa690506002830182612849565b50600060038201819055600482018190556005909101558315610b355760068054610ad390600190612bb2565b81548110610ae357610ae3612bdb565b906000526020600020015460068681548110610b0157610b01612bdb565b6000918252602090912001556006805480610b1e57610b1e612bf1565b600190038181906000526020600020016000905590555b604051632142170760e11b8152306004820152336024820152604481018c90526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e90606401600060405180830381600087803b158015610ba357600080fd5b505af1158015610bb7573d6000803e3d6000fd5b505050506000831115610bce57610bce8184611cb3565b806001600160a01b0316336001600160a01b03168c7f950733f4c0bf951b8e770f3cc619a4288e7b59b1236d59aeaf2c238488e8ae816000548688604051610c1893929190612c07565b60405180910390a45050505050505050505050565b60048181548110610c3d57600080fd5b600091825260209091200154905081565b6000818152600560209081526040808320815160c08101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181528796939586019390929190830182828015610cce57602002820191906000526020600020905b815481526020019060010190808311610cba575b505050505081526020016003820154815260200160048201548152602001600582015481525050905080608001519150610d0783611a69565b610d1190836128e0565b9392505050565b610d636040518060c0016040528060006001600160a01b0316815260200160006001600160a01b03168152602001606081526020016000815260200160008152602001600081525090565b600082815260056020908152604091829020825160c08101845281546001600160a01b0390811682526001830154168184015260028201805485518186028101860187528181529295939493860193830182828015610de157602002820191906000526020600020905b815481526020019060010190808311610dcd575b5050505050815260200160038201548152602001600482015481526020016005820154815250509050919050565b600254600003610e325760405163afb0be3360e01b815260040160405180910390fd5b6000818152600560205260409020600381015415610e665760405163b4817ce760e01b81526004810183905260240161088d565b6006547f00000000000000000000000000000000000000000000000000000000000000008103610ecb5760405163fd20861560e01b81527f0000000000000000000000000000000000000000000000000000000000000000600482015260240161088d565b60405163ef0e239b60e01b8152600481018490526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b90602401600060405180830381865afa158015610f33573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f5b9190810190612d97565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610faa57604051637ad404bf60e11b81526004810185905260240161088d565b7f000000000000000000000000000000000000000000000000000000000000000015801590610ffd575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b1561101e57604051637ad404bf60e11b81526004810185905260240161088d565b60007f00000000000000000000000000000000000000000000000000000000000000001180156110785750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b1561109957604051637ad404bf60e11b81526004810185905260240161088d565b60048160c0015160058111156110b1576110b1612b25565b146110f0578060c0015160058111156110cc576110cc612b25565b604051633c053f9d60e21b815260048101919091526024810185905260440161088d565b600081602001516001600160a01b0316803b806020016040519081016040528181526000908060200190933c805190602001209050807f00000000000000000000000000000000000000000000000000000000000000001461117557602082015160405162a2307960e51b81526001600160a01b03909116600482015260240161088d565b600454801561123e5760e0830151518181146111a757604051637ad404bf60e11b81526004810188905260240161088d565b60005b8181101561123b578460e0015181815181106111c8576111c8612bdb565b602002602001015163ffffffff16600482815481106111e9576111e9612bdb565b906000526020600020015414611233576004818154811061120c5761120c612bdb565b9060005260206000200154604051632ab10b0b60e21b815260040161088d91815260200190565b6001016111aa565b50505b61125f8684600001516bffffffffffffffffffffffff168560e00151611d60565b602083015185546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff19918216178755600187018054909116331790556000906112a590611ee4565b80519091506112bd906002880190602084019061286a565b50426003870155600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e90606401600060405180830381600087803b15801561136757600080fd5b505af115801561137b573d6000803e3d6000fd5b5050505083602001516001600160a01b0316336001600160a01b0316887faa6b005b4958114a0c90492461c24af6525ae0178db7fbf44125ae9217c69ccb600054856040516113cb929190612e75565b60405180910390a450505050505050565b6060600480548060200260200160405190810160405280929190818152602001828054801561142a57602002820191906000526020600020905b815481526020019060010190808311611416575b5050505050905090565b6060806060806060600080600080600080600080611450611ef5565b97509750975097509750975097509750606080845167ffffffffffffffff81111561147d5761147d612bc5565b6040519080825280602002602001820160405280156114a6578160200160208202803683370190505b509a5060008915611839578967ffffffffffffffff8111156114ca576114ca612bc5565b6040519080825280602002602001820160405280156114f3578160200160208202803683370190505b5092508967ffffffffffffffff81111561150f5761150f612bc5565b604051908082528060200260200182016040528015611538578160200160208202803683370190505b5091508a8911156117425760008060015b8c811015611635578b8e8b838151811061156557611565612bdb565b60200260200101516115779190612e8e565b6115819190612ea5565b925061158d83836128e0565b91508a81815181106115a1576115a1612bdb565b602002602001015193508a81815181106115bd576115bd612bdb565b60200260200101518682815181106115d7576115d7612bdb565b602002602001018181525050828582815181106115f6576115f6612bdb565b6020026020010181815250508260056000868152602001908152602001600020600401600082825461162891906128e0565b9091555050600101611549565b508a8d8a60008151811061164b5761164b612bdb565b602002602001015161165d9190612e8e565b6116679190612ea5565b915061167382826128e0565b90508960008151811061168857611688612bdb565b60200260200101519250896000815181106116a5576116a5612bdb565b6020026020010151856000815181106116c0576116c0612bdb565b602002602001018181525050808d11156116eb576116de818e612bb2565b6116e890836128e0565b91505b81846000815181106116ff576116ff612bdb565b6020026020010181815250508160056000858152602001908152602001600020600401600082825461173191906128e0565b9091555060009d5061183392505050565b60005b8a8110156118255788818151811061175f5761175f612bdb565b6020026020010151915088818151811061177b5761177b612bdb565b602002602001015184828151811061179557611795612bdb565b6020026020010181815250508781815181106117b3576117b3612bdb565b60200260200101518382815181106117cd576117cd612bdb565b6020026020010181815250508781815181106117eb576117eb612bdb565b602002602001015160056000848152602001908152602001600020600401600082825461181891906128e0565b9091555050600101611745565b50611830898c612bb2565b9a505b60028b90555b855115611a53576000995060005b86518110156119ec5786818151811061186257611862612bdb565b6020026020010151915085818151811061187e5761187e612bdb565b60200260200101516005600084815260200190815260200160002060020190805190602001906118af92919061286a565b5060008582815181106118c4576118c4612bdb565b602002602001015111156119d1578481815181106118e4576118e4612bdb565b6020026020010151600560008481526020019081526020016000206005015461190d91906128e0565b85828151811061191f5761191f612bdb565b60200260200101818152505084818151811061193d5761193d612bdb565b602002602001015160056000848152602001908152602001600020600501819055507f000000000000000000000000000000000000000000000000000000000000000085828151811061199257611992612bdb565b602002602001015111156119cc57818d82815181106119b3576119b3612bdb565b60209081029190910101528a6119c881612ec7565b9b50505b6119e4565b6000828152600560208190526040822001555b600101611847565b5089156119fe576119fe8c858c6122f3565b42600355600054611a108160016128e0565b60005560405181907f06a98bdd4732811ab3214800ed1ada2dce66a2bce301d250c3ca7d6b461ee66690611a49908f9088908890612ee0565b60405180910390a2505b50939e929d509b50919950969750505050505050565b600080600080600080611a7a611ef5565b5050509450945094509450945060005b84811015611b1a5787838281518110611aa557611aa5612bdb565b602002602001015103611b125785841115611af1578386838381518110611ace57611ace612bdb565b6020026020010151611ae09190612e8e565b611aea9190612ea5565b9650611b1a565b818181518110611b0357611b03612bdb565b60200260200101519650611b1a565b600101611a8a565b505050505050919050565b6000818152600560209081526040808320815160c08101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181528796939586019390929190830182828015611ba557602002820191906000526020600020905b815481526020019060010190808311611b91575b50505050508152602001600382015481526020016004820154815260200160058201548152505090507f00000000000000000000000000000000000000000000000000000000000000008160a001511115611c035760029150611c12565b606081015115611c1257600191505b50919050565b60068181548110610c3d57600080fd5b6060600680548060200260200160405190810160405280929190818152602001828054801561142a5760200282019190600052602060002090815481526020019060010190808311611416575050505050905090565b60007f0000000000000000000000000000000000000000000000000000000000000000600354611cae91906128e0565b905090565b8060016000828254611cc59190612bb2565b90915550506040516000906001600160a01b0384169083908381818185875af1925050503d8060008114611d15576040519150601f19603f3d011682016040523d82523d6000602084013e611d1a565b606091505b5050905080611d5b5760405163cd3f165960e01b8152600060048201523060248201526001600160a01b03841660448201526064810183905260840161088d565b505050565b7f000000000000000000000000000000000000000000000000000000000000000080831015611dac5760405163491a2bb160e01b8152600481018490526024810182905260440161088d565b604051630ef1435d60e11b81526004810185905260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631de286ba90602401600060405180830381865afa158015611e16573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611e3e9190810190612f15565b9150915060005b82811015611edb5783828281518110611e6057611e60612bdb565b6020026020010151602001516bffffffffffffffffffffffff161015611ed357818181518110611e9257611e92612bdb565b6020026020010151602001518460405163491a2bb160e01b815260040161088d9291906bffffffffffffffffffffffff929092168252602082015260400190565b600101611e45565b50505050505050565b6060611eef826126b8565b92915050565b600080600060608060608060606000600354905060025498507f00000000000000000000000000000000000000000000000000000000000000008142611f3b9190612bb2565b10158015611f495750600089115b156122e8576006548067ffffffffffffffff811115611f6a57611f6a612bc5565b604051908082528060200260200182016040528015611f93578160200160208202803683370190505b5094508067ffffffffffffffff811115611faf57611faf612bc5565b604051908082528060200260200182016040528015611fd8578160200160208202803683370190505b5096508067ffffffffffffffff811115611ff457611ff4612bc5565b60405190808252806020026020018201604052801561201d578160200160208202803683370190505b5095508067ffffffffffffffff81111561203957612039612bc5565b60405190808252806020026020018201604052801561206c57816020015b60608152602001906001900390816120575790505b5093508067ffffffffffffffff81111561208857612088612bc5565b6040519080825280602002602001820160405280156120b1578160200160208202803683370190505b50925060005b818110156122e557600681815481106120d2576120d2612bdb565b90600052602060002001548682815181106120ef576120ef612bdb565b60200260200101818152505060006005600088848151811061211357612113612bdb565b60209081029190910181015182528101919091526040016000208054909150612144906001600160a01b0316611ee4565b86838151811061215657612156612bdb565b60209081029190910101526003810154849081811115612174578091505b61217e8242612bb2565b905060006121f889868151811061219757612197612bdb565b6020026020010151856002018054806020026020016040519081016040528092919081815260200182805480156121ed57602002820191906000526020600020905b8154815260200190600101908083116121d9575b505050505084612760565b905080156122b65761222a827f0000000000000000000000000000000000000000000000000000000000000000612e8e565b8b8f8151811061223c5761223c612bdb565b6020026020010181815250508a8e8151811061225a5761225a612bdb565b60200260200101518d61226d91906128e0565b9c5089858151811061228157612281612bdb565b60200260200101518c8f8151811061229b5761229b612bdb565b60209081029190910101526122af8e612ec7565b9d506122d6565b818886815181106122c9576122c9612bdb565b6020026020010181815250505b505050508060010190506120b7565b50505b509091929394959697565b825160008267ffffffffffffffff81111561231057612310612bc5565b604051908082528060200260200182016040528015612339578160200160208202803683370190505b50905060008367ffffffffffffffff81111561235757612357612bc5565b604051908082528060200260200182016040528015612380578160200160208202803683370190505b50905060008467ffffffffffffffff81111561239e5761239e612bc5565b6040519080825280602002602001820160405280156123c7578160200160208202803683370190505b50905060008567ffffffffffffffff8111156123e5576123e5612bc5565b60405190808252806020026020018201604052801561240e578160200160208202803683370190505b50905060008667ffffffffffffffff81111561242c5761242c612bc5565b604051908082528060200260200182016040528015612455578160200160208202803683370190505b50905060008060005b888110156125b55760008c828151811061247a5761247a612bdb565b602002602001015111156125ad578b818151811061249a5761249a612bdb565b60200260200101519150818884815181106124b7576124b7612bdb565b6020908102919091018101919091526000838152600590915260409020600181015488516001600160a01b03909116908990869081106124f9576124f9612bdb565b6001600160a01b0392831660209182029290920101528154885191169088908690811061252857612528612bdb565b60200260200101906001600160a01b031690816001600160a01b0316815250508b828151811061255a5761255a612bdb565b602002602001015186858151811061257457612574612bdb565b6020026020010181815250508185858151811061259357612593612bdb565b6020908102919091010152836125a881612ec7565b945050505b60010161245e565b50885b801561266a57886125c881612fe4565b995060009050846125da600184612bb2565b815181106125ea576125ea612bdb565b6020026020010151905060068a8154811061260757612607612bdb565b90600052602060002001546006828154811061262557612625612bdb565b600091825260209091200155600680548061264257612642612bf1565b60019003818190600052602060002001600090559055508061266390612fe4565b90506125b8565b506000547fd19a3d42ed383465e4058c322d9411aeac76ddb8454d22e139fc99808bd56952888888886040516126a39493929190613035565b60405180910390a25050505050505050505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015612718573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061273c919061308d565b8160008151811061274f5761274f612bdb565b602002602001018181525050919050565b600061276d848484612775565b949350505050565b600080821180156127b957508260008151811061279457612794612bdb565b6020026020010151846000815181106127af576127af612bdb565b6020026020010151115b15610d1157600082846000815181106127d4576127d4612bdb565b6020026020010151866000815181106127ef576127ef612bdb565b60200260200101516128019190612bb2565b61281390670de0b6b3a7640000612e8e565b61281d9190612ea5565b7f0000000000000000000000000000000000000000000000000000000000000000111595945050505050565b508054600082559060005260206000209081019061286791906128b5565b50565b8280548282559060005260206000209081019282156128a5579160200282015b828111156128a557825182559160200191906001019061288a565b506128b19291506128b5565b5090565b5b808211156128b157600081556001016128b6565b634e487b7160e01b600052601160045260246000fd5b80820180821115611eef57611eef6128ca565b6001600160a01b038116811461286757600080fd5b60008060008060006080868803121561292057600080fd5b853561292b816128f3565b9450602086013561293b816128f3565b935060408601359250606086013567ffffffffffffffff8082111561295f57600080fd5b818801915088601f83011261297357600080fd5b81358181111561298257600080fd5b89602082850101111561299457600080fd5b9699959850939650602001949392505050565b6000602082840312156129b957600080fd5b5035919050565b60008151808452602080850194506020840160005b838110156129f1578151875295820195908201906001016129d5565b509495945050505050565b6020815260006001600160a01b0380845116602084015280602085015116604084015250604083015160c06060840152612a3960e08401826129c0565b905060608401516080840152608084015160a084015260a084015160c08401528091505092915050565b602081526000610d1160208301846129c0565b60a081526000612a8960a08301886129c0565b6020838203818501528188518084528284019150828160051b850101838b0160005b83811015612ad957601f19878403018552612ac78383516129c0565b94860194925090850190600101612aab565b50508681036040880152612aed818b6129c0565b9450505050508281036060840152612b0581866129c0565b90508281036080840152612b1981856129c0565b98975050505050505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310612b5d57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020808352835180602085015260005b81811015612b9157858101830151858201604001528201612b75565b506000604082860101526040601f19601f8301168501019250505092915050565b81810381811115611eef57611eef6128ca565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b838152606060208201526000612c2060608301856129c0565b9050826040830152949350505050565b604051610100810167ffffffffffffffff81118282101715612c5457612c54612bc5565b60405290565b6040805190810167ffffffffffffffff81118282101715612c5457612c54612bc5565b604051601f8201601f1916810167ffffffffffffffff81118282101715612ca657612ca6612bc5565b604052919050565b80516bffffffffffffffffffffffff81168114612cca57600080fd5b919050565b8051612cca816128f3565b805163ffffffff81168114612cca57600080fd5b805160068110612cca57600080fd5b600067ffffffffffffffff821115612d1757612d17612bc5565b5060051b60200190565b600082601f830112612d3257600080fd5b81516020612d47612d4283612cfd565b612c7d565b8083825260208201915060208460051b870101935086841115612d6957600080fd5b602086015b84811015612d8c57612d7f81612cda565b8352918301918301612d6e565b509695505050505050565b600060208284031215612da957600080fd5b815167ffffffffffffffff80821115612dc157600080fd5b908301906101008286031215612dd657600080fd5b612dde612c30565b612de783612cae565b8152612df560208401612ccf565b602082015260408301516040820152612e1060608401612cda565b6060820152612e2160808401612cda565b6080820152612e3260a08401612cda565b60a0820152612e4360c08401612cee565b60c082015260e083015182811115612e5a57600080fd5b612e6687828601612d21565b60e08301525095945050505050565b82815260406020820152600061276d60408301846129c0565b8082028115828204841417611eef57611eef6128ca565b600082612ec257634e487b7160e01b600052601260045260246000fd5b500490565b600060018201612ed957612ed96128ca565b5060010190565b838152606060208201526000612ef960608301856129c0565b8281036040840152612f0b81856129c0565b9695505050505050565b6000806040808486031215612f2957600080fd5b8351925060208085015167ffffffffffffffff811115612f4857600080fd5b8501601f81018713612f5957600080fd5b8051612f67612d4282612cfd565b81815260069190911b82018301908381019089831115612f8657600080fd5b928401925b82841015612fd45785848b031215612fa35760008081fd5b612fab612c5a565b612fb485612cda565b8152612fc1868601612cae565b8187015282529285019290840190612f8b565b8096505050505050509250929050565b600081612ff357612ff36128ca565b506000190190565b60008151808452602080850194506020840160005b838110156129f15781516001600160a01b031687529582019590820190600101613010565b60808152600061304860808301876129c0565b828103602084015261305a8187612ffb565b9050828103604084015261306e8186612ffb565b9050828103606084015261308281856129c0565b979650505050505050565b60006020828403121561309f57600080fd5b505191905056fea2646970667358221220a6f07913805368e3dcb5daf229af5a2168b5eec0839a5fd004a25ee366d25b9e64736f6c63430008170033", + "deployedBytecode": "0x6080604052600436106101e75760003560e01c8063a694fc3a11610102578063e1f1176d11610095578063f189e85a11610064578063f189e85a146107a3578063f4dce714146107b8578063f86ad2b6146107cd578063ffa1ad741461080157600080fd5b8063e1f1176d146106e7578063e77cdcc91461071b578063eacdaabc1461074f578063eb338c961461078357600080fd5b8063c2c4c5c1116100d1578063c2c4c5c114610628578063c889921d1461064e578063cae2a5f01461066e578063cbcf252a1461069b57600080fd5b8063a694fc3a14610546578063a74466ad14610566578063b1508760146105f0578063b69ef8a81461061257600080fd5b806356e760581161017a578063809cee2f11610149578063809cee2f1461049b57806382a8ea58146104cf578063879d9090146104fc578063a0ed60e01461051257600080fd5b806356e76058146103f35780635829c5ec14610413578063592cf3fb1461044757806378e061361461047b57600080fd5b80632e17de78116101b65780632e17de78146103535780633e7329971461037557806342cde4e81461038b57806352c824f5146103bf57600080fd5b806308ae7e541461026557806314b19c5a146102ac578063150b7a02146102c257806316a751721461031f57600080fd5b36610260576000346001546101fc91906128e0565b905060003460025461020e91906128e0565b60018390556002819055604080513481526020810185905290810182905290915033907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2005b600080fd5b34801561027157600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b3480156102b857600080fd5b5061029960005481565b3480156102ce57600080fd5b506102ee6102dd366004612908565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016102a3565b34801561032b57600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561035f57600080fd5b5061037361036e3660046129a7565b61083f565b005b34801561038157600080fd5b5061029960035481565b34801561039757600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b3480156103cb57600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ff57600080fd5b5061029961040e3660046129a7565b610c2d565b34801561041f57600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561045357600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561048757600080fd5b506102996104963660046129a7565b610c4e565b3480156104a757600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b3480156104db57600080fd5b506104ef6104ea3660046129a7565b610d18565b6040516102a391906129fc565b34801561050857600080fd5b5061029960025481565b34801561051e57600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561055257600080fd5b506103736105613660046129a7565b610e0f565b34801561057257600080fd5b506105bd6105813660046129a7565b6005602081905260009182526040909120805460018201546003830154600484015493909401546001600160a01b039283169492909116929085565b604080516001600160a01b039687168152959094166020860152928401919091526060830152608082015260a0016102a3565b3480156105fc57600080fd5b506106056113dc565b6040516102a39190612a63565b34801561061e57600080fd5b5061029960015481565b34801561063457600080fd5b5061063d611434565b6040516102a3959493929190612a76565b34801561065a57600080fd5b506102996106693660046129a7565b611a69565b34801561067a57600080fd5b5061068e6106893660046129a7565b611b25565b6040516102a39190612b3b565b3480156106a757600080fd5b506106cf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102a3565b3480156106f357600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561072757600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561075b57600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561078f57600080fd5b5061029961079e3660046129a7565b611c18565b3480156107af57600080fd5b50610605611c28565b3480156107c457600080fd5b50610299611c7e565b3480156107d957600080fd5b506102997f000000000000000000000000000000000000000000000000000000000000000081565b34801561080d57600080fd5b50610832604051806040016040528060058152602001640302e312e360dc1b81525081565b6040516102a39190612b63565b600081815260056020526040902060018101546001600160a01b0316331461089657600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b600381015460006108a78242612bb2565b90507f000000000000000000000000000000000000000000000000000000000000000081111580156108db57506000600254115b156109295760405163ba2bbc6b60e01b815260048101859052602481018290527f0000000000000000000000000000000000000000000000000000000000000000604482015260640161088d565b600080610934611434565b9450505050915081516000036109955761094c611c28565b9150815167ffffffffffffffff81111561096857610968612bc5565b604051908082528060200260200182016040528015610991578160200160208202803683370190505b5090505b6000805b83518210156109f657878383815181106109b5576109b5612bdb565b602002602001015103156109f657878483815181106109d6576109d6612bdb565b6020026020010151036109eb575060016109f6565b816001019150610999565b60048701546002880180546040805160208084028201810190925282815260009390929091830182828015610a4a57602002820191906000526020600020905b815481526020019060010190808311610a36575b50508c5460008f8152600560205260408120805473ffffffffffffffffffffffffffffffffffffffff19908116825560018201805490911690559596506001600160a01b039091169493509150610aa690506002830182612849565b50600060038201819055600482018190556005909101558315610b355760068054610ad390600190612bb2565b81548110610ae357610ae3612bdb565b906000526020600020015460068681548110610b0157610b01612bdb565b6000918252602090912001556006805480610b1e57610b1e612bf1565b600190038181906000526020600020016000905590555b604051632142170760e11b8152306004820152336024820152604481018c90526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e90606401600060405180830381600087803b158015610ba357600080fd5b505af1158015610bb7573d6000803e3d6000fd5b505050506000831115610bce57610bce8184611cb3565b806001600160a01b0316336001600160a01b03168c7f950733f4c0bf951b8e770f3cc619a4288e7b59b1236d59aeaf2c238488e8ae816000548688604051610c1893929190612c07565b60405180910390a45050505050505050505050565b60048181548110610c3d57600080fd5b600091825260209091200154905081565b6000818152600560209081526040808320815160c08101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181528796939586019390929190830182828015610cce57602002820191906000526020600020905b815481526020019060010190808311610cba575b505050505081526020016003820154815260200160048201548152602001600582015481525050905080608001519150610d0783611a69565b610d1190836128e0565b9392505050565b610d636040518060c0016040528060006001600160a01b0316815260200160006001600160a01b03168152602001606081526020016000815260200160008152602001600081525090565b600082815260056020908152604091829020825160c08101845281546001600160a01b0390811682526001830154168184015260028201805485518186028101860187528181529295939493860193830182828015610de157602002820191906000526020600020905b815481526020019060010190808311610dcd575b5050505050815260200160038201548152602001600482015481526020016005820154815250509050919050565b600254600003610e325760405163afb0be3360e01b815260040160405180910390fd5b6000818152600560205260409020600381015415610e665760405163b4817ce760e01b81526004810183905260240161088d565b6006547f00000000000000000000000000000000000000000000000000000000000000008103610ecb5760405163fd20861560e01b81527f0000000000000000000000000000000000000000000000000000000000000000600482015260240161088d565b60405163ef0e239b60e01b8152600481018490526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b90602401600060405180830381865afa158015610f33573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f5b9190810190612d97565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610faa57604051637ad404bf60e11b81526004810185905260240161088d565b7f000000000000000000000000000000000000000000000000000000000000000015801590610ffd575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b1561101e57604051637ad404bf60e11b81526004810185905260240161088d565b60007f00000000000000000000000000000000000000000000000000000000000000001180156110785750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b1561109957604051637ad404bf60e11b81526004810185905260240161088d565b60048160c0015160058111156110b1576110b1612b25565b146110f0578060c0015160058111156110cc576110cc612b25565b604051633c053f9d60e21b815260048101919091526024810185905260440161088d565b600081602001516001600160a01b0316803b806020016040519081016040528181526000908060200190933c805190602001209050807f00000000000000000000000000000000000000000000000000000000000000001461117557602082015160405162a2307960e51b81526001600160a01b03909116600482015260240161088d565b600454801561123e5760e0830151518181146111a757604051637ad404bf60e11b81526004810188905260240161088d565b60005b8181101561123b578460e0015181815181106111c8576111c8612bdb565b602002602001015163ffffffff16600482815481106111e9576111e9612bdb565b906000526020600020015414611233576004818154811061120c5761120c612bdb565b9060005260206000200154604051632ab10b0b60e21b815260040161088d91815260200190565b6001016111aa565b50505b61125f8684600001516bffffffffffffffffffffffff168560e00151611d60565b602083015185546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff19918216178755600187018054909116331790556000906112a590611ee4565b80519091506112bd906002880190602084019061286a565b50426003870155600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e90606401600060405180830381600087803b15801561136757600080fd5b505af115801561137b573d6000803e3d6000fd5b5050505083602001516001600160a01b0316336001600160a01b0316887faa6b005b4958114a0c90492461c24af6525ae0178db7fbf44125ae9217c69ccb600054856040516113cb929190612e75565b60405180910390a450505050505050565b6060600480548060200260200160405190810160405280929190818152602001828054801561142a57602002820191906000526020600020905b815481526020019060010190808311611416575b5050505050905090565b6060806060806060600080600080600080600080611450611ef5565b97509750975097509750975097509750606080845167ffffffffffffffff81111561147d5761147d612bc5565b6040519080825280602002602001820160405280156114a6578160200160208202803683370190505b509a5060008915611839578967ffffffffffffffff8111156114ca576114ca612bc5565b6040519080825280602002602001820160405280156114f3578160200160208202803683370190505b5092508967ffffffffffffffff81111561150f5761150f612bc5565b604051908082528060200260200182016040528015611538578160200160208202803683370190505b5091508a8911156117425760008060015b8c811015611635578b8e8b838151811061156557611565612bdb565b60200260200101516115779190612e8e565b6115819190612ea5565b925061158d83836128e0565b91508a81815181106115a1576115a1612bdb565b602002602001015193508a81815181106115bd576115bd612bdb565b60200260200101518682815181106115d7576115d7612bdb565b602002602001018181525050828582815181106115f6576115f6612bdb565b6020026020010181815250508260056000868152602001908152602001600020600401600082825461162891906128e0565b9091555050600101611549565b508a8d8a60008151811061164b5761164b612bdb565b602002602001015161165d9190612e8e565b6116679190612ea5565b915061167382826128e0565b90508960008151811061168857611688612bdb565b60200260200101519250896000815181106116a5576116a5612bdb565b6020026020010151856000815181106116c0576116c0612bdb565b602002602001018181525050808d11156116eb576116de818e612bb2565b6116e890836128e0565b91505b81846000815181106116ff576116ff612bdb565b6020026020010181815250508160056000858152602001908152602001600020600401600082825461173191906128e0565b9091555060009d5061183392505050565b60005b8a8110156118255788818151811061175f5761175f612bdb565b6020026020010151915088818151811061177b5761177b612bdb565b602002602001015184828151811061179557611795612bdb565b6020026020010181815250508781815181106117b3576117b3612bdb565b60200260200101518382815181106117cd576117cd612bdb565b6020026020010181815250508781815181106117eb576117eb612bdb565b602002602001015160056000848152602001908152602001600020600401600082825461181891906128e0565b9091555050600101611745565b50611830898c612bb2565b9a505b60028b90555b855115611a53576000995060005b86518110156119ec5786818151811061186257611862612bdb565b6020026020010151915085818151811061187e5761187e612bdb565b60200260200101516005600084815260200190815260200160002060020190805190602001906118af92919061286a565b5060008582815181106118c4576118c4612bdb565b602002602001015111156119d1578481815181106118e4576118e4612bdb565b6020026020010151600560008481526020019081526020016000206005015461190d91906128e0565b85828151811061191f5761191f612bdb565b60200260200101818152505084818151811061193d5761193d612bdb565b602002602001015160056000848152602001908152602001600020600501819055507f000000000000000000000000000000000000000000000000000000000000000085828151811061199257611992612bdb565b602002602001015111156119cc57818d82815181106119b3576119b3612bdb565b60209081029190910101528a6119c881612ec7565b9b50505b6119e4565b6000828152600560208190526040822001555b600101611847565b5089156119fe576119fe8c858c6122f3565b42600355600054611a108160016128e0565b60005560405181907f06a98bdd4732811ab3214800ed1ada2dce66a2bce301d250c3ca7d6b461ee66690611a49908f9088908890612ee0565b60405180910390a2505b50939e929d509b50919950969750505050505050565b600080600080600080611a7a611ef5565b5050509450945094509450945060005b84811015611b1a5787838281518110611aa557611aa5612bdb565b602002602001015103611b125785841115611af1578386838381518110611ace57611ace612bdb565b6020026020010151611ae09190612e8e565b611aea9190612ea5565b9650611b1a565b818181518110611b0357611b03612bdb565b60200260200101519650611b1a565b600101611a8a565b505050505050919050565b6000818152600560209081526040808320815160c08101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181528796939586019390929190830182828015611ba557602002820191906000526020600020905b815481526020019060010190808311611b91575b50505050508152602001600382015481526020016004820154815260200160058201548152505090507f00000000000000000000000000000000000000000000000000000000000000008160a001511115611c035760029150611c12565b606081015115611c1257600191505b50919050565b60068181548110610c3d57600080fd5b6060600680548060200260200160405190810160405280929190818152602001828054801561142a5760200282019190600052602060002090815481526020019060010190808311611416575050505050905090565b60007f0000000000000000000000000000000000000000000000000000000000000000600354611cae91906128e0565b905090565b8060016000828254611cc59190612bb2565b90915550506040516000906001600160a01b0384169083908381818185875af1925050503d8060008114611d15576040519150601f19603f3d011682016040523d82523d6000602084013e611d1a565b606091505b5050905080611d5b5760405163cd3f165960e01b8152600060048201523060248201526001600160a01b03841660448201526064810183905260840161088d565b505050565b7f000000000000000000000000000000000000000000000000000000000000000080831015611dac5760405163491a2bb160e01b8152600481018490526024810182905260440161088d565b604051630ef1435d60e11b81526004810185905260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631de286ba90602401600060405180830381865afa158015611e16573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611e3e9190810190612f15565b9150915060005b82811015611edb5783828281518110611e6057611e60612bdb565b6020026020010151602001516bffffffffffffffffffffffff161015611ed357818181518110611e9257611e92612bdb565b6020026020010151602001518460405163491a2bb160e01b815260040161088d9291906bffffffffffffffffffffffff929092168252602082015260400190565b600101611e45565b50505050505050565b6060611eef826126b8565b92915050565b600080600060608060608060606000600354905060025498507f00000000000000000000000000000000000000000000000000000000000000008142611f3b9190612bb2565b10158015611f495750600089115b156122e8576006548067ffffffffffffffff811115611f6a57611f6a612bc5565b604051908082528060200260200182016040528015611f93578160200160208202803683370190505b5094508067ffffffffffffffff811115611faf57611faf612bc5565b604051908082528060200260200182016040528015611fd8578160200160208202803683370190505b5096508067ffffffffffffffff811115611ff457611ff4612bc5565b60405190808252806020026020018201604052801561201d578160200160208202803683370190505b5095508067ffffffffffffffff81111561203957612039612bc5565b60405190808252806020026020018201604052801561206c57816020015b60608152602001906001900390816120575790505b5093508067ffffffffffffffff81111561208857612088612bc5565b6040519080825280602002602001820160405280156120b1578160200160208202803683370190505b50925060005b818110156122e557600681815481106120d2576120d2612bdb565b90600052602060002001548682815181106120ef576120ef612bdb565b60200260200101818152505060006005600088848151811061211357612113612bdb565b60209081029190910181015182528101919091526040016000208054909150612144906001600160a01b0316611ee4565b86838151811061215657612156612bdb565b60209081029190910101526003810154849081811115612174578091505b61217e8242612bb2565b905060006121f889868151811061219757612197612bdb565b6020026020010151856002018054806020026020016040519081016040528092919081815260200182805480156121ed57602002820191906000526020600020905b8154815260200190600101908083116121d9575b505050505084612760565b905080156122b65761222a827f0000000000000000000000000000000000000000000000000000000000000000612e8e565b8b8f8151811061223c5761223c612bdb565b6020026020010181815250508a8e8151811061225a5761225a612bdb565b60200260200101518d61226d91906128e0565b9c5089858151811061228157612281612bdb565b60200260200101518c8f8151811061229b5761229b612bdb565b60209081029190910101526122af8e612ec7565b9d506122d6565b818886815181106122c9576122c9612bdb565b6020026020010181815250505b505050508060010190506120b7565b50505b509091929394959697565b825160008267ffffffffffffffff81111561231057612310612bc5565b604051908082528060200260200182016040528015612339578160200160208202803683370190505b50905060008367ffffffffffffffff81111561235757612357612bc5565b604051908082528060200260200182016040528015612380578160200160208202803683370190505b50905060008467ffffffffffffffff81111561239e5761239e612bc5565b6040519080825280602002602001820160405280156123c7578160200160208202803683370190505b50905060008567ffffffffffffffff8111156123e5576123e5612bc5565b60405190808252806020026020018201604052801561240e578160200160208202803683370190505b50905060008667ffffffffffffffff81111561242c5761242c612bc5565b604051908082528060200260200182016040528015612455578160200160208202803683370190505b50905060008060005b888110156125b55760008c828151811061247a5761247a612bdb565b602002602001015111156125ad578b818151811061249a5761249a612bdb565b60200260200101519150818884815181106124b7576124b7612bdb565b6020908102919091018101919091526000838152600590915260409020600181015488516001600160a01b03909116908990869081106124f9576124f9612bdb565b6001600160a01b0392831660209182029290920101528154885191169088908690811061252857612528612bdb565b60200260200101906001600160a01b031690816001600160a01b0316815250508b828151811061255a5761255a612bdb565b602002602001015186858151811061257457612574612bdb565b6020026020010181815250508185858151811061259357612593612bdb565b6020908102919091010152836125a881612ec7565b945050505b60010161245e565b50885b801561266a57886125c881612fe4565b995060009050846125da600184612bb2565b815181106125ea576125ea612bdb565b6020026020010151905060068a8154811061260757612607612bdb565b90600052602060002001546006828154811061262557612625612bdb565b600091825260209091200155600680548061264257612642612bf1565b60019003818190600052602060002001600090559055508061266390612fe4565b90506125b8565b506000547fd19a3d42ed383465e4058c322d9411aeac76ddb8454d22e139fc99808bd56952888888886040516126a39493929190613035565b60405180910390a25050505050505050505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015612718573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061273c919061308d565b8160008151811061274f5761274f612bdb565b602002602001018181525050919050565b600061276d848484612775565b949350505050565b600080821180156127b957508260008151811061279457612794612bdb565b6020026020010151846000815181106127af576127af612bdb565b6020026020010151115b15610d1157600082846000815181106127d4576127d4612bdb565b6020026020010151866000815181106127ef576127ef612bdb565b60200260200101516128019190612bb2565b61281390670de0b6b3a7640000612e8e565b61281d9190612ea5565b7f0000000000000000000000000000000000000000000000000000000000000000111595945050505050565b508054600082559060005260206000209081019061286791906128b5565b50565b8280548282559060005260206000209081019282156128a5579160200282015b828111156128a557825182559160200191906001019061288a565b506128b19291506128b5565b5090565b5b808211156128b157600081556001016128b6565b634e487b7160e01b600052601160045260246000fd5b80820180821115611eef57611eef6128ca565b6001600160a01b038116811461286757600080fd5b60008060008060006080868803121561292057600080fd5b853561292b816128f3565b9450602086013561293b816128f3565b935060408601359250606086013567ffffffffffffffff8082111561295f57600080fd5b818801915088601f83011261297357600080fd5b81358181111561298257600080fd5b89602082850101111561299457600080fd5b9699959850939650602001949392505050565b6000602082840312156129b957600080fd5b5035919050565b60008151808452602080850194506020840160005b838110156129f1578151875295820195908201906001016129d5565b509495945050505050565b6020815260006001600160a01b0380845116602084015280602085015116604084015250604083015160c06060840152612a3960e08401826129c0565b905060608401516080840152608084015160a084015260a084015160c08401528091505092915050565b602081526000610d1160208301846129c0565b60a081526000612a8960a08301886129c0565b6020838203818501528188518084528284019150828160051b850101838b0160005b83811015612ad957601f19878403018552612ac78383516129c0565b94860194925090850190600101612aab565b50508681036040880152612aed818b6129c0565b9450505050508281036060840152612b0581866129c0565b90508281036080840152612b1981856129c0565b98975050505050505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310612b5d57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020808352835180602085015260005b81811015612b9157858101830151858201604001528201612b75565b506000604082860101526040601f19601f8301168501019250505092915050565b81810381811115611eef57611eef6128ca565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b838152606060208201526000612c2060608301856129c0565b9050826040830152949350505050565b604051610100810167ffffffffffffffff81118282101715612c5457612c54612bc5565b60405290565b6040805190810167ffffffffffffffff81118282101715612c5457612c54612bc5565b604051601f8201601f1916810167ffffffffffffffff81118282101715612ca657612ca6612bc5565b604052919050565b80516bffffffffffffffffffffffff81168114612cca57600080fd5b919050565b8051612cca816128f3565b805163ffffffff81168114612cca57600080fd5b805160068110612cca57600080fd5b600067ffffffffffffffff821115612d1757612d17612bc5565b5060051b60200190565b600082601f830112612d3257600080fd5b81516020612d47612d4283612cfd565b612c7d565b8083825260208201915060208460051b870101935086841115612d6957600080fd5b602086015b84811015612d8c57612d7f81612cda565b8352918301918301612d6e565b509695505050505050565b600060208284031215612da957600080fd5b815167ffffffffffffffff80821115612dc157600080fd5b908301906101008286031215612dd657600080fd5b612dde612c30565b612de783612cae565b8152612df560208401612ccf565b602082015260408301516040820152612e1060608401612cda565b6060820152612e2160808401612cda565b6080820152612e3260a08401612cda565b60a0820152612e4360c08401612cee565b60c082015260e083015182811115612e5a57600080fd5b612e6687828601612d21565b60e08301525095945050505050565b82815260406020820152600061276d60408301846129c0565b8082028115828204841417611eef57611eef6128ca565b600082612ec257634e487b7160e01b600052601260045260246000fd5b500490565b600060018201612ed957612ed96128ca565b5060010190565b838152606060208201526000612ef960608301856129c0565b8281036040840152612f0b81856129c0565b9695505050505050565b6000806040808486031215612f2957600080fd5b8351925060208085015167ffffffffffffffff811115612f4857600080fd5b8501601f81018713612f5957600080fd5b8051612f67612d4282612cfd565b81815260069190911b82018301908381019089831115612f8657600080fd5b928401925b82841015612fd45785848b031215612fa35760008081fd5b612fab612c5a565b612fb485612cda565b8152612fc1868601612cae565b8187015282529285019290840190612f8b565b8096505050505050509250929050565b600081612ff357612ff36128ca565b506000190190565b60008151808452602080850194506020840160005b838110156129f15781516001600160a01b031687529582019590820190600101613010565b60808152600061304860808301876129c0565b828103602084015261305a8187612ffb565b9050828103604084015261306e8186612ffb565b9050828103606084015261308281856129c0565b979650505050505050565b60006020828403121561309f57600080fd5b505191905056fea2646970667358221220a6f07913805368e3dcb5daf229af5a2168b5eec0839a5fd004a25ee366d25b9e64736f6c63430008170033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/abis/0.8.23/ServiceStakingToken.json b/abis/0.8.23/ServiceStakingToken.json new file mode 100644 index 00000000..e1405c0b --- /dev/null +++ b/abis/0.8.23/ServiceStakingToken.json @@ -0,0 +1,1355 @@ +{ + "_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": "minNumStakingPeriods", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxNumInactivityPeriods", + "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": "uint256", + "name": "serviceId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tsProvided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tsExpected", + "type": "uint256" + } + ], + "name": "NotEnoughTimeStaked", + "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": "ServiceNotUnstaked", + "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": true, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "availableRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "serviceIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "rewards", + "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": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "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": false, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "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" + } + ], + "name": "ServiceUnstaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "serviceIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "owners", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "multisigs", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "serviceInactivity", + "type": "uint256[]" + } + ], + "name": "ServicesEvicted", + "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": "calculateServiceStakingLastReward", + "outputs": [ + { + "internalType": "uint256", + "name": "reward", + "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": "evictServiceIds", + "type": "uint256[]" + } + ], + "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": [], + "name": "epochCounter", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAgentIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNextRewardCheckpointTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "tsNext", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getServiceIds", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "getServiceInfo", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "multisig", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "nonces", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "tsStart", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reward", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inactivity", + "type": "uint256" + } + ], + "internalType": "struct ServiceInfo", + "name": "sInfo", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "serviceId", + "type": "uint256" + } + ], + "name": "getServiceStakingState", + "outputs": [ + { + "internalType": "enum ServiceStakingBase.ServiceStakingState", + "name": "stakingState", + "type": "uint8" + } + ], + "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" + }, + { + "internalType": "uint256", + "name": "inactivity", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxInactivityDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxNumInactivityPeriods", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "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": "minStakingDuration", + "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": "0x6102606040523480156200001257600080fd5b506040516200383a3803806200383a833981016040819052620000359162000453565b8484828260000151600014806200004e57506020830151155b806200005c575060a0830151155b806200006a575060c0830151155b8062000078575060e0830151155b806200008657506060830151155b806200009457506080830151155b15620000b357604051637c946ed760e01b815260040160405180910390fd5b826080015183606001511015620000f5576060830151608084015160405163491a2bb160e01b8152600481019290925260248201526044015b60405180910390fd5b6002836040015110156200012d57604080840151905163491a2bb160e01b8152600481019190915260026024820152604401620000ec565b6001600160a01b038216620001555760405163d92e233d60e01b815260040160405180910390fd5b82516080908152602084015160a0908152604085015160c09081529185015160e0908152908501516101005290840151610120908152908401516101409081526001600160a01b0384166101a0529084015161016052830151610180526000805b846101000151518110156200029257818561010001518281518110620001e057620001e062000576565b6020026020010151116200022d57846101000151818151811062000208576200020862000576565b6020026020010151604051632ab10b0b60e21b8152600401620000ec91815260200190565b846101000151818151811062000247576200024762000576565b602090810291909101015160048054600181810183556000929092527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0182905590925001620001b6565b5081620002b257604051637c946ed760e01b815260040160405180910390fd5b6101c0829052610100516060850151620002cd91906200058c565b6101e052610100516080850151620002e691906200058c565b6102005250504260035550506001600160a01b03821615806200031057506001600160a01b038316155b156200032f5760405163d92e233d60e01b815260040160405180910390fd5b506001600160a01b0390811661024052166102205250620005b89050565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b03811182821017156200038957620003896200034d565b60405290565b600082601f830112620003a157600080fd5b815160206001600160401b0380831115620003c057620003c06200034d565b8260051b604051601f19603f83011681018181108482111715620003e857620003e86200034d565b60405293845260208187018101949081019250878511156200040957600080fd5b6020870191505b848210156200042b5781518352918301919083019062000410565b979650505050505050565b80516001600160a01b03811681146200044e57600080fd5b919050565b600080600080600060a086880312156200046c57600080fd5b85516001600160401b03808211156200048457600080fd5b90870190610160828a0312156200049a57600080fd5b620004a462000363565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e082015261010080840151838111156200050357600080fd5b620005118c8287016200038f565b918301919091525061012083810151908201526101409283015192810192909252509450620005436020870162000436565b9350620005536040870162000436565b9250620005636060870162000436565b9150608086015190509295509295909350565b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417620005b257634e487b7160e01b600052601160045260246000fd5b92915050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e05161020051610220516102405161311962000721600039600081816104110152818161130901528181611c1401528181611d1e0152611d6201526000818161030501528181611ca40152611e0e01526000818161068e015281816118a50152611b1401526000818161024b0152818161074d015261079f01526000818161044b0152610fca0152600081816105cf01528181610a0101528181610d8601526111bd0152600081816105f601528181610e4e0152610e7d01526000818161036201528181610ec40152610ef80152600081816103c30152610e0c0152600081816103ea015261294a01526000818161038901528181611bc60152611fb80152600061049b01526000818161061d0152611d9901526000818161064401526122ae0152600081816102de01528181610d0d0152610d4101526131196000f3fe608060405234801561001057600080fd5b50600436106102415760003560e01c8063a0ed60e011610145578063cbcf252a116100bd578063eb338c961161008c578063f4dce71411610071578063f4dce71414610681578063f86ad2b614610689578063ffa1ad74146106b057600080fd5b8063eb338c9614610666578063f189e85a1461067957600080fd5b8063cbcf252a146105ca578063e1f1176d146105f1578063e77cdcc914610618578063eacdaabc1461063f57600080fd5b8063b69ef8a811610114578063c2c4c5c1116100f9578063c2c4c5c11461057e578063c889921d14610597578063cae2a5f0146105aa57600080fd5b8063b69ef8a814610562578063b6b55f251461056b57600080fd5b8063a0ed60e014610496578063a694fc3a146104bd578063a74466ad146104d0578063b15087601461054d57600080fd5b806352c824f5116101d857806372f702f3116101a7578063809cee2f1161018c578063809cee2f1461044657806382a8ea581461046d578063879d90901461048d57600080fd5b806372f702f31461040c57806378e061361461043357600080fd5b806352c824f51461038457806356e76058146103ab5780635829c5ec146103be578063592cf3fb146103e557600080fd5b8063287140511161021457806328714051146103005780632e17de781461033f5780633e7329971461035457806342cde4e81461035d57600080fd5b806308ae7e541461024657806314b19c5a14610280578063150b7a021461028957806316a75172146102d9575b600080fd5b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61026d60005481565b6102a8610297366004612a0a565b630a85bd0160e11b95945050505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610277565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b6103277f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610277565b61035261034d366004612aa9565b6106e1565b005b61026d60035481565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b61026d6103b9366004612aa9565b610acf565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b6103277f000000000000000000000000000000000000000000000000000000000000000081565b61026d610441366004612aa9565b610af0565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b61048061047b366004612aa9565b610bba565b6040516102779190612afe565b61026d60025481565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b6103526104cb366004612aa9565b610cb1565b61051a6104de366004612aa9565b6005602081905260009182526040909120805460018201546003830154600484015493909401546001600160a01b039283169492909116929085565b604080516001600160a01b039687168152959094166020860152928401919091526060830152608082015260a001610277565b61055561127e565b6040516102779190612b65565b61026d60015481565b610352610579366004612aa9565b6112d6565b610586611378565b604051610277959493929190612b78565b61026d6105a5366004612aa9565b6119ad565b6105bd6105b8366004612aa9565b611a69565b6040516102779190612c3d565b6103277f000000000000000000000000000000000000000000000000000000000000000081565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b61026d610674366004612aa9565b611b5c565b610555611b6c565b61026d611bc2565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b6106d4604051806040016040528060058152602001640302e312e360dc1b81525081565b6040516102779190612c65565b600081815260056020526040902060018101546001600160a01b0316331461073857600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b600381015460006107498242612cca565b90507f0000000000000000000000000000000000000000000000000000000000000000811115801561077d57506000600254115b156107cb5760405163ba2bbc6b60e01b815260048101859052602481018290527f0000000000000000000000000000000000000000000000000000000000000000604482015260640161072f565b6000806107d6611378565b945050505091508151600003610837576107ee611b6c565b9150815167ffffffffffffffff81111561080a5761080a612cdd565b604051908082528060200260200182016040528015610833578160200160208202803683370190505b5090505b6000805b8351821015610898578783838151811061085757610857612cf3565b60200260200101510315610898578784838151811061087857610878612cf3565b60200260200101510361088d57506001610898565b81600101915061083b565b600487015460028801805460408051602080840282018101909252828152600093909290918301828280156108ec57602002820191906000526020600020905b8154815260200190600101908083116108d8575b50508c5460008f8152600560205260408120805473ffffffffffffffffffffffffffffffffffffffff19908116825560018201805490911690559596506001600160a01b03909116949350915061094890506002830182612974565b506000600382018190556004820181905560059091015583156109d7576006805461097590600190612cca565b8154811061098557610985612cf3565b9060005260206000200154600686815481106109a3576109a3612cf3565b60009182526020909120015560068054806109c0576109c0612d09565b600190038181906000526020600020016000905590555b604051632142170760e11b8152306004820152336024820152604481018c90526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e90606401600060405180830381600087803b158015610a4557600080fd5b505af1158015610a59573d6000803e3d6000fd5b505050506000831115610a7057610a708184611bf7565b806001600160a01b0316336001600160a01b03168c7f950733f4c0bf951b8e770f3cc619a4288e7b59b1236d59aeaf2c238488e8ae816000548688604051610aba93929190612d1f565b60405180910390a45050505050505050505050565b60048181548110610adf57600080fd5b600091825260209091200154905081565b6000818152600560209081526040808320815160c08101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181528796939586019390929190830182828015610b7057602002820191906000526020600020905b815481526020019060010190808311610b5c575b505050505081526020016003820154815260200160048201548152602001600582015481525050905080608001519150610ba9836119ad565b610bb39083612d48565b9392505050565b610c056040518060c0016040528060006001600160a01b0316815260200160006001600160a01b03168152602001606081526020016000815260200160008152602001600081525090565b600082815260056020908152604091829020825160c08101845281546001600160a01b0390811682526001830154168184015260028201805485518186028101860187528181529295939493860193830182828015610c8357602002820191906000526020600020905b815481526020019060010190808311610c6f575b5050505050815260200160038201548152602001600482015481526020016005820154815250509050919050565b600254600003610cd45760405163afb0be3360e01b815260040160405180910390fd5b6000818152600560205260409020600381015415610d085760405163b4817ce760e01b81526004810183905260240161072f565b6006547f00000000000000000000000000000000000000000000000000000000000000008103610d6d5760405163fd20861560e01b81527f0000000000000000000000000000000000000000000000000000000000000000600482015260240161072f565b60405163ef0e239b60e01b8152600481018490526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b90602401600060405180830381865afa158015610dd5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610dfd9190810190612e79565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610e4c57604051637ad404bf60e11b81526004810185905260240161072f565b7f000000000000000000000000000000000000000000000000000000000000000015801590610e9f575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b15610ec057604051637ad404bf60e11b81526004810185905260240161072f565b60007f0000000000000000000000000000000000000000000000000000000000000000118015610f1a5750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b15610f3b57604051637ad404bf60e11b81526004810185905260240161072f565b60048160c001516005811115610f5357610f53612c27565b14610f92578060c001516005811115610f6e57610f6e612c27565b604051633c053f9d60e21b815260048101919091526024810185905260440161072f565b600081602001516001600160a01b0316803b806020016040519081016040528181526000908060200190933c805190602001209050807f00000000000000000000000000000000000000000000000000000000000000001461101757602082015160405162a2307960e51b81526001600160a01b03909116600482015260240161072f565b60045480156110e05760e08301515181811461104957604051637ad404bf60e11b81526004810188905260240161072f565b60005b818110156110dd578460e00151818151811061106a5761106a612cf3565b602002602001015163ffffffff166004828154811061108b5761108b612cf3565b9060005260206000200154146110d557600481815481106110ae576110ae612cf3565b9060005260206000200154604051632ab10b0b60e21b815260040161072f91815260200190565b60010161104c565b50505b6111018684600001516bffffffffffffffffffffffff168560e00151611c81565b602083015185546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff199182161787556001870180549091163317905560009061114790611f02565b805190915061115f9060028801906020840190612995565b50426003870155600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e90606401600060405180830381600087803b15801561120957600080fd5b505af115801561121d573d6000803e3d6000fd5b5050505083602001516001600160a01b0316336001600160a01b0316887faa6b005b4958114a0c90492461c24af6525ae0178db7fbf44125ae9217c69ccb6000548560405161126d929190612f57565b60405180910390a450505050505050565b606060048054806020026020016040519081016040528092919081815260200182805480156112cc57602002820191906000526020600020905b8154815260200190600101908083116112b8575b5050505050905090565b6000816001546112e69190612d48565b90506000826002546112f89190612d48565b6001839055600281905590506113307f0000000000000000000000000000000000000000000000000000000000000000333086611f13565b604080518481526020810184905290810182905233907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2505050565b6060806060806060600080600080600080600080611394611f9d565b97509750975097509750975097509750606080845167ffffffffffffffff8111156113c1576113c1612cdd565b6040519080825280602002602001820160405280156113ea578160200160208202803683370190505b509a506000891561177d578967ffffffffffffffff81111561140e5761140e612cdd565b604051908082528060200260200182016040528015611437578160200160208202803683370190505b5092508967ffffffffffffffff81111561145357611453612cdd565b60405190808252806020026020018201604052801561147c578160200160208202803683370190505b5091508a8911156116865760008060015b8c811015611579578b8e8b83815181106114a9576114a9612cf3565b60200260200101516114bb9190612f70565b6114c59190612f87565b92506114d18383612d48565b91508a81815181106114e5576114e5612cf3565b602002602001015193508a818151811061150157611501612cf3565b602002602001015186828151811061151b5761151b612cf3565b6020026020010181815250508285828151811061153a5761153a612cf3565b6020026020010181815250508260056000868152602001908152602001600020600401600082825461156c9190612d48565b909155505060010161148d565b508a8d8a60008151811061158f5761158f612cf3565b60200260200101516115a19190612f70565b6115ab9190612f87565b91506115b78282612d48565b9050896000815181106115cc576115cc612cf3565b60200260200101519250896000815181106115e9576115e9612cf3565b60200260200101518560008151811061160457611604612cf3565b602002602001018181525050808d111561162f57611622818e612cca565b61162c9083612d48565b91505b818460008151811061164357611643612cf3565b602002602001018181525050816005600085815260200190815260200160002060040160008282546116759190612d48565b9091555060009d5061177792505050565b60005b8a811015611769578881815181106116a3576116a3612cf3565b602002602001015191508881815181106116bf576116bf612cf3565b60200260200101518482815181106116d9576116d9612cf3565b6020026020010181815250508781815181106116f7576116f7612cf3565b602002602001015183828151811061171157611711612cf3565b60200260200101818152505087818151811061172f5761172f612cf3565b602002602001015160056000848152602001908152602001600020600401600082825461175c9190612d48565b9091555050600101611689565b50611774898c612cca565b9a505b60028b90555b855115611997576000995060005b8651811015611930578681815181106117a6576117a6612cf3565b602002602001015191508581815181106117c2576117c2612cf3565b60200260200101516005600084815260200190815260200160002060020190805190602001906117f3929190612995565b50600085828151811061180857611808612cf3565b602002602001015111156119155784818151811061182857611828612cf3565b602002602001015160056000848152602001908152602001600020600501546118519190612d48565b85828151811061186357611863612cf3565b60200260200101818152505084818151811061188157611881612cf3565b602002602001015160056000848152602001908152602001600020600501819055507f00000000000000000000000000000000000000000000000000000000000000008582815181106118d6576118d6612cf3565b6020026020010151111561191057818d82815181106118f7576118f7612cf3565b60209081029190910101528a61190c81612fa9565b9b50505b611928565b6000828152600560208190526040822001555b60010161178b565b508915611942576119428c858c61239b565b42600355600054611954816001612d48565b60005560405181907f06a98bdd4732811ab3214800ed1ada2dce66a2bce301d250c3ca7d6b461ee6669061198d908f9088908890612fc2565b60405180910390a2505b50939e929d509b50919950969750505050505050565b6000806000806000806119be611f9d565b5050509450945094509450945060005b84811015611a5e57878382815181106119e9576119e9612cf3565b602002602001015103611a565785841115611a35578386838381518110611a1257611a12612cf3565b6020026020010151611a249190612f70565b611a2e9190612f87565b9650611a5e565b818181518110611a4757611a47612cf3565b60200260200101519650611a5e565b6001016119ce565b505050505050919050565b6000818152600560209081526040808320815160c08101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181528796939586019390929190830182828015611ae957602002820191906000526020600020905b815481526020019060010190808311611ad5575b50505050508152602001600382015481526020016004820154815260200160058201548152505090507f00000000000000000000000000000000000000000000000000000000000000008160a001511115611b475760029150611b56565b606081015115611b5657600191505b50919050565b60068181548110610adf57600080fd5b606060068054806020026020016040519081016040528092919081815260200182805480156112cc57602002820191906000526020600020908154815260200190600101908083116112b8575050505050905090565b60007f0000000000000000000000000000000000000000000000000000000000000000600354611bf29190612d48565b905090565b8060016000828254611c099190612cca565b90915550611c3a90507f00000000000000000000000000000000000000000000000000000000000000008383612760565b816001600160a01b03167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436482604051611c7591815260200190565b60405180910390a25050565b604051633cebfa4f60e01b81526004810184905260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633cebfa4f906024016040805180830381865afa158015611cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0e9190612ff7565b91509150816001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614611d9757604051630b80380d60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301528316602482015260440161072f565b7f00000000000000000000000000000000000000000000000000000000000000006bffffffffffffffffffffffff8216811115611dfe57604051632b30b24760e21b81526bffffffffffffffffffffffff831660048201526024810182905260440161072f565b60005b8451811015611ef95760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166375c1f93489888581518110611e4e57611e4e612cf3565b60200260200101516040518363ffffffff1660e01b8152600401611e8292919091825263ffffffff16602082015260400190565b602060405180830381865afa158015611e9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec3919061302c565b905082811015611ef057604051632b30b24760e21b8152600481018290526024810184905260440161072f565b50600101611e01565b50505050505050565b6060611f0d826127e3565b92915050565b60006040516323b872dd60e01b6000528460045283602452826044526020600060646000808a5af13d15601f3d1160016000511416171691506000606052806040525080611f965760405163abae3d6d60e01b81526001600160a01b0380871660048301528086166024830152841660448201526064810183905260840161072f565b5050505050565b600080600060608060608060606000600354905060025498507f00000000000000000000000000000000000000000000000000000000000000008142611fe39190612cca565b10158015611ff15750600089115b15612390576006548067ffffffffffffffff81111561201257612012612cdd565b60405190808252806020026020018201604052801561203b578160200160208202803683370190505b5094508067ffffffffffffffff81111561205757612057612cdd565b604051908082528060200260200182016040528015612080578160200160208202803683370190505b5096508067ffffffffffffffff81111561209c5761209c612cdd565b6040519080825280602002602001820160405280156120c5578160200160208202803683370190505b5095508067ffffffffffffffff8111156120e1576120e1612cdd565b60405190808252806020026020018201604052801561211457816020015b60608152602001906001900390816120ff5790505b5093508067ffffffffffffffff81111561213057612130612cdd565b604051908082528060200260200182016040528015612159578160200160208202803683370190505b50925060005b8181101561238d576006818154811061217a5761217a612cf3565b906000526020600020015486828151811061219757612197612cf3565b6020026020010181815250506000600560008884815181106121bb576121bb612cf3565b602090810291909101810151825281019190915260400160002080549091506121ec906001600160a01b0316611f02565b8683815181106121fe576121fe612cf3565b6020908102919091010152600381015484908181111561221c578091505b6122268242612cca565b905060006122a089868151811061223f5761223f612cf3565b60200260200101518560020180548060200260200160405190810160405280929190818152602001828054801561229557602002820191906000526020600020905b815481526020019060010190808311612281575b50505050508461288b565b9050801561235e576122d2827f0000000000000000000000000000000000000000000000000000000000000000612f70565b8b8f815181106122e4576122e4612cf3565b6020026020010181815250508a8e8151811061230257612302612cf3565b60200260200101518d6123159190612d48565b9c5089858151811061232957612329612cf3565b60200260200101518c8f8151811061234357612343612cf3565b60209081029190910101526123578e612fa9565b9d5061237e565b8188868151811061237157612371612cf3565b6020026020010181815250505b5050505080600101905061215f565b50505b509091929394959697565b825160008267ffffffffffffffff8111156123b8576123b8612cdd565b6040519080825280602002602001820160405280156123e1578160200160208202803683370190505b50905060008367ffffffffffffffff8111156123ff576123ff612cdd565b604051908082528060200260200182016040528015612428578160200160208202803683370190505b50905060008467ffffffffffffffff81111561244657612446612cdd565b60405190808252806020026020018201604052801561246f578160200160208202803683370190505b50905060008567ffffffffffffffff81111561248d5761248d612cdd565b6040519080825280602002602001820160405280156124b6578160200160208202803683370190505b50905060008667ffffffffffffffff8111156124d4576124d4612cdd565b6040519080825280602002602001820160405280156124fd578160200160208202803683370190505b50905060008060005b8881101561265d5760008c828151811061252257612522612cf3565b60200260200101511115612655578b818151811061254257612542612cf3565b602002602001015191508188848151811061255f5761255f612cf3565b6020908102919091018101919091526000838152600590915260409020600181015488516001600160a01b03909116908990869081106125a1576125a1612cf3565b6001600160a01b039283166020918202929092010152815488519116908890869081106125d0576125d0612cf3565b60200260200101906001600160a01b031690816001600160a01b0316815250508b828151811061260257612602612cf3565b602002602001015186858151811061261c5761261c612cf3565b6020026020010181815250508185858151811061263b5761263b612cf3565b60209081029190910101528361265081612fa9565b945050505b600101612506565b50885b8015612712578861267081613045565b99506000905084612682600184612cca565b8151811061269257612692612cf3565b6020026020010151905060068a815481106126af576126af612cf3565b9060005260206000200154600682815481106126cd576126cd612cf3565b60009182526020909120015560068054806126ea576126ea612d09565b60019003818190600052602060002001600090559055508061270b90613045565b9050612660565b506000547fd19a3d42ed383465e4058c322d9411aeac76ddb8454d22e139fc99808bd569528888888860405161274b9493929190613096565b60405180910390a25050505050505050505050565b600060405163a9059cbb60e01b6000528360045282602452602060006044600080895af13d15601f3d11600160005114161716915060006060528060405250806127dd5760405163abae3d6d60e01b81526001600160a01b038086166004830152306024830152841660448201526064810183905260840161072f565b50505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015612843573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612867919061302c565b8160008151811061287a5761287a612cf3565b602002602001018181525050919050565b60006128988484846128a0565b949350505050565b600080821180156128e45750826000815181106128bf576128bf612cf3565b6020026020010151846000815181106128da576128da612cf3565b6020026020010151115b15610bb357600082846000815181106128ff576128ff612cf3565b60200260200101518660008151811061291a5761291a612cf3565b602002602001015161292c9190612cca565b61293e90670de0b6b3a7640000612f70565b6129489190612f87565b7f0000000000000000000000000000000000000000000000000000000000000000111595945050505050565b508054600082559060005260206000209081019061299291906129e0565b50565b8280548282559060005260206000209081019282156129d0579160200282015b828111156129d05782518255916020019190600101906129b5565b506129dc9291506129e0565b5090565b5b808211156129dc57600081556001016129e1565b6001600160a01b038116811461299257600080fd5b600080600080600060808688031215612a2257600080fd5b8535612a2d816129f5565b94506020860135612a3d816129f5565b935060408601359250606086013567ffffffffffffffff80821115612a6157600080fd5b818801915088601f830112612a7557600080fd5b813581811115612a8457600080fd5b896020828501011115612a9657600080fd5b9699959850939650602001949392505050565b600060208284031215612abb57600080fd5b5035919050565b60008151808452602080850194506020840160005b83811015612af357815187529582019590820190600101612ad7565b509495945050505050565b6020815260006001600160a01b0380845116602084015280602085015116604084015250604083015160c06060840152612b3b60e0840182612ac2565b905060608401516080840152608084015160a084015260a084015160c08401528091505092915050565b602081526000610bb36020830184612ac2565b60a081526000612b8b60a0830188612ac2565b6020838203818501528188518084528284019150828160051b850101838b0160005b83811015612bdb57601f19878403018552612bc9838351612ac2565b94860194925090850190600101612bad565b50508681036040880152612bef818b612ac2565b9450505050508281036060840152612c078186612ac2565b90508281036080840152612c1b8185612ac2565b98975050505050505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310612c5f57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020808352835180602085015260005b81811015612c9357858101830151858201604001528201612c77565b506000604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b600052601160045260246000fd5b81810381811115611f0d57611f0d612cb4565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b838152606060208201526000612d386060830185612ac2565b9050826040830152949350505050565b80820180821115611f0d57611f0d612cb4565b604051610100810167ffffffffffffffff81118282101715612d7f57612d7f612cdd565b60405290565b80516bffffffffffffffffffffffff81168114612da157600080fd5b919050565b8051612da1816129f5565b805163ffffffff81168114612da157600080fd5b805160068110612da157600080fd5b600082601f830112612de557600080fd5b8151602067ffffffffffffffff80831115612e0257612e02612cdd565b8260051b604051601f19603f83011681018181108482111715612e2757612e27612cdd565b6040529384526020818701810194908101925087851115612e4757600080fd5b6020870191505b84821015612e6e57612e5f82612db1565b83529183019190830190612e4e565b979650505050505050565b600060208284031215612e8b57600080fd5b815167ffffffffffffffff80821115612ea357600080fd5b908301906101008286031215612eb857600080fd5b612ec0612d5b565b612ec983612d85565b8152612ed760208401612da6565b602082015260408301516040820152612ef260608401612db1565b6060820152612f0360808401612db1565b6080820152612f1460a08401612db1565b60a0820152612f2560c08401612dc5565b60c082015260e083015182811115612f3c57600080fd5b612f4887828601612dd4565b60e08301525095945050505050565b8281526040602082015260006128986040830184612ac2565b8082028115828204841417611f0d57611f0d612cb4565b600082612fa457634e487b7160e01b600052601260045260246000fd5b500490565b600060018201612fbb57612fbb612cb4565b5060010190565b838152606060208201526000612fdb6060830185612ac2565b8281036040840152612fed8185612ac2565b9695505050505050565b6000806040838503121561300a57600080fd5b8251613015816129f5565b915061302360208401612d85565b90509250929050565b60006020828403121561303e57600080fd5b5051919050565b60008161305457613054612cb4565b506000190190565b60008151808452602080850194506020840160005b83811015612af35781516001600160a01b031687529582019590820190600101613071565b6080815260006130a96080830187612ac2565b82810360208401526130bb818761305c565b905082810360408401526130cf818661305c565b90508281036060840152612e6e8185612ac256fea26469706673582212201cbb3243bdf2246a74a754c4b24385dc52b256b192f67778a3b3a76648374a5864736f6c63430008170033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102415760003560e01c8063a0ed60e011610145578063cbcf252a116100bd578063eb338c961161008c578063f4dce71411610071578063f4dce71414610681578063f86ad2b614610689578063ffa1ad74146106b057600080fd5b8063eb338c9614610666578063f189e85a1461067957600080fd5b8063cbcf252a146105ca578063e1f1176d146105f1578063e77cdcc914610618578063eacdaabc1461063f57600080fd5b8063b69ef8a811610114578063c2c4c5c1116100f9578063c2c4c5c11461057e578063c889921d14610597578063cae2a5f0146105aa57600080fd5b8063b69ef8a814610562578063b6b55f251461056b57600080fd5b8063a0ed60e014610496578063a694fc3a146104bd578063a74466ad146104d0578063b15087601461054d57600080fd5b806352c824f5116101d857806372f702f3116101a7578063809cee2f1161018c578063809cee2f1461044657806382a8ea581461046d578063879d90901461048d57600080fd5b806372f702f31461040c57806378e061361461043357600080fd5b806352c824f51461038457806356e76058146103ab5780635829c5ec146103be578063592cf3fb146103e557600080fd5b8063287140511161021457806328714051146103005780632e17de781461033f5780633e7329971461035457806342cde4e81461035d57600080fd5b806308ae7e541461024657806314b19c5a14610280578063150b7a021461028957806316a75172146102d9575b600080fd5b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61026d60005481565b6102a8610297366004612a0a565b630a85bd0160e11b95945050505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610277565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b6103277f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610277565b61035261034d366004612aa9565b6106e1565b005b61026d60035481565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b61026d6103b9366004612aa9565b610acf565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b6103277f000000000000000000000000000000000000000000000000000000000000000081565b61026d610441366004612aa9565b610af0565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b61048061047b366004612aa9565b610bba565b6040516102779190612afe565b61026d60025481565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b6103526104cb366004612aa9565b610cb1565b61051a6104de366004612aa9565b6005602081905260009182526040909120805460018201546003830154600484015493909401546001600160a01b039283169492909116929085565b604080516001600160a01b039687168152959094166020860152928401919091526060830152608082015260a001610277565b61055561127e565b6040516102779190612b65565b61026d60015481565b610352610579366004612aa9565b6112d6565b610586611378565b604051610277959493929190612b78565b61026d6105a5366004612aa9565b6119ad565b6105bd6105b8366004612aa9565b611a69565b6040516102779190612c3d565b6103277f000000000000000000000000000000000000000000000000000000000000000081565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b61026d610674366004612aa9565b611b5c565b610555611b6c565b61026d611bc2565b61026d7f000000000000000000000000000000000000000000000000000000000000000081565b6106d4604051806040016040528060058152602001640302e312e360dc1b81525081565b6040516102779190612c65565b600081815260056020526040902060018101546001600160a01b0316331461073857600181015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b600381015460006107498242612cca565b90507f0000000000000000000000000000000000000000000000000000000000000000811115801561077d57506000600254115b156107cb5760405163ba2bbc6b60e01b815260048101859052602481018290527f0000000000000000000000000000000000000000000000000000000000000000604482015260640161072f565b6000806107d6611378565b945050505091508151600003610837576107ee611b6c565b9150815167ffffffffffffffff81111561080a5761080a612cdd565b604051908082528060200260200182016040528015610833578160200160208202803683370190505b5090505b6000805b8351821015610898578783838151811061085757610857612cf3565b60200260200101510315610898578784838151811061087857610878612cf3565b60200260200101510361088d57506001610898565b81600101915061083b565b600487015460028801805460408051602080840282018101909252828152600093909290918301828280156108ec57602002820191906000526020600020905b8154815260200190600101908083116108d8575b50508c5460008f8152600560205260408120805473ffffffffffffffffffffffffffffffffffffffff19908116825560018201805490911690559596506001600160a01b03909116949350915061094890506002830182612974565b506000600382018190556004820181905560059091015583156109d7576006805461097590600190612cca565b8154811061098557610985612cf3565b9060005260206000200154600686815481106109a3576109a3612cf3565b60009182526020909120015560068054806109c0576109c0612d09565b600190038181906000526020600020016000905590555b604051632142170760e11b8152306004820152336024820152604481018c90526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342842e0e90606401600060405180830381600087803b158015610a4557600080fd5b505af1158015610a59573d6000803e3d6000fd5b505050506000831115610a7057610a708184611bf7565b806001600160a01b0316336001600160a01b03168c7f950733f4c0bf951b8e770f3cc619a4288e7b59b1236d59aeaf2c238488e8ae816000548688604051610aba93929190612d1f565b60405180910390a45050505050505050505050565b60048181548110610adf57600080fd5b600091825260209091200154905081565b6000818152600560209081526040808320815160c08101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181528796939586019390929190830182828015610b7057602002820191906000526020600020905b815481526020019060010190808311610b5c575b505050505081526020016003820154815260200160048201548152602001600582015481525050905080608001519150610ba9836119ad565b610bb39083612d48565b9392505050565b610c056040518060c0016040528060006001600160a01b0316815260200160006001600160a01b03168152602001606081526020016000815260200160008152602001600081525090565b600082815260056020908152604091829020825160c08101845281546001600160a01b0390811682526001830154168184015260028201805485518186028101860187528181529295939493860193830182828015610c8357602002820191906000526020600020905b815481526020019060010190808311610c6f575b5050505050815260200160038201548152602001600482015481526020016005820154815250509050919050565b600254600003610cd45760405163afb0be3360e01b815260040160405180910390fd5b6000818152600560205260409020600381015415610d085760405163b4817ce760e01b81526004810183905260240161072f565b6006547f00000000000000000000000000000000000000000000000000000000000000008103610d6d5760405163fd20861560e01b81527f0000000000000000000000000000000000000000000000000000000000000000600482015260240161072f565b60405163ef0e239b60e01b8152600481018490526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ef0e239b90602401600060405180830381865afa158015610dd5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610dfd9190810190612e79565b9050806080015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014610e4c57604051637ad404bf60e11b81526004810185905260240161072f565b7f000000000000000000000000000000000000000000000000000000000000000015801590610e9f575080604001517f000000000000000000000000000000000000000000000000000000000000000014155b15610ec057604051637ad404bf60e11b81526004810185905260240161072f565b60007f0000000000000000000000000000000000000000000000000000000000000000118015610f1a5750806060015163ffffffff167f000000000000000000000000000000000000000000000000000000000000000014155b15610f3b57604051637ad404bf60e11b81526004810185905260240161072f565b60048160c001516005811115610f5357610f53612c27565b14610f92578060c001516005811115610f6e57610f6e612c27565b604051633c053f9d60e21b815260048101919091526024810185905260440161072f565b600081602001516001600160a01b0316803b806020016040519081016040528181526000908060200190933c805190602001209050807f00000000000000000000000000000000000000000000000000000000000000001461101757602082015160405162a2307960e51b81526001600160a01b03909116600482015260240161072f565b60045480156110e05760e08301515181811461104957604051637ad404bf60e11b81526004810188905260240161072f565b60005b818110156110dd578460e00151818151811061106a5761106a612cf3565b602002602001015163ffffffff166004828154811061108b5761108b612cf3565b9060005260206000200154146110d557600481815481106110ae576110ae612cf3565b9060005260206000200154604051632ab10b0b60e21b815260040161072f91815260200190565b60010161104c565b50505b6111018684600001516bffffffffffffffffffffffff168560e00151611c81565b602083015185546001600160a01b03821673ffffffffffffffffffffffffffffffffffffffff199182161787556001870180549091163317905560009061114790611f02565b805190915061115f9060028801906020840190612995565b50426003870155600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f01879055604051632142170760e11b8152336004820152306024820152604481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e90606401600060405180830381600087803b15801561120957600080fd5b505af115801561121d573d6000803e3d6000fd5b5050505083602001516001600160a01b0316336001600160a01b0316887faa6b005b4958114a0c90492461c24af6525ae0178db7fbf44125ae9217c69ccb6000548560405161126d929190612f57565b60405180910390a450505050505050565b606060048054806020026020016040519081016040528092919081815260200182805480156112cc57602002820191906000526020600020905b8154815260200190600101908083116112b8575b5050505050905090565b6000816001546112e69190612d48565b90506000826002546112f89190612d48565b6001839055600281905590506113307f0000000000000000000000000000000000000000000000000000000000000000333086611f13565b604080518481526020810184905290810182905233907f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e9060600160405180910390a2505050565b6060806060806060600080600080600080600080611394611f9d565b97509750975097509750975097509750606080845167ffffffffffffffff8111156113c1576113c1612cdd565b6040519080825280602002602001820160405280156113ea578160200160208202803683370190505b509a506000891561177d578967ffffffffffffffff81111561140e5761140e612cdd565b604051908082528060200260200182016040528015611437578160200160208202803683370190505b5092508967ffffffffffffffff81111561145357611453612cdd565b60405190808252806020026020018201604052801561147c578160200160208202803683370190505b5091508a8911156116865760008060015b8c811015611579578b8e8b83815181106114a9576114a9612cf3565b60200260200101516114bb9190612f70565b6114c59190612f87565b92506114d18383612d48565b91508a81815181106114e5576114e5612cf3565b602002602001015193508a818151811061150157611501612cf3565b602002602001015186828151811061151b5761151b612cf3565b6020026020010181815250508285828151811061153a5761153a612cf3565b6020026020010181815250508260056000868152602001908152602001600020600401600082825461156c9190612d48565b909155505060010161148d565b508a8d8a60008151811061158f5761158f612cf3565b60200260200101516115a19190612f70565b6115ab9190612f87565b91506115b78282612d48565b9050896000815181106115cc576115cc612cf3565b60200260200101519250896000815181106115e9576115e9612cf3565b60200260200101518560008151811061160457611604612cf3565b602002602001018181525050808d111561162f57611622818e612cca565b61162c9083612d48565b91505b818460008151811061164357611643612cf3565b602002602001018181525050816005600085815260200190815260200160002060040160008282546116759190612d48565b9091555060009d5061177792505050565b60005b8a811015611769578881815181106116a3576116a3612cf3565b602002602001015191508881815181106116bf576116bf612cf3565b60200260200101518482815181106116d9576116d9612cf3565b6020026020010181815250508781815181106116f7576116f7612cf3565b602002602001015183828151811061171157611711612cf3565b60200260200101818152505087818151811061172f5761172f612cf3565b602002602001015160056000848152602001908152602001600020600401600082825461175c9190612d48565b9091555050600101611689565b50611774898c612cca565b9a505b60028b90555b855115611997576000995060005b8651811015611930578681815181106117a6576117a6612cf3565b602002602001015191508581815181106117c2576117c2612cf3565b60200260200101516005600084815260200190815260200160002060020190805190602001906117f3929190612995565b50600085828151811061180857611808612cf3565b602002602001015111156119155784818151811061182857611828612cf3565b602002602001015160056000848152602001908152602001600020600501546118519190612d48565b85828151811061186357611863612cf3565b60200260200101818152505084818151811061188157611881612cf3565b602002602001015160056000848152602001908152602001600020600501819055507f00000000000000000000000000000000000000000000000000000000000000008582815181106118d6576118d6612cf3565b6020026020010151111561191057818d82815181106118f7576118f7612cf3565b60209081029190910101528a61190c81612fa9565b9b50505b611928565b6000828152600560208190526040822001555b60010161178b565b508915611942576119428c858c61239b565b42600355600054611954816001612d48565b60005560405181907f06a98bdd4732811ab3214800ed1ada2dce66a2bce301d250c3ca7d6b461ee6669061198d908f9088908890612fc2565b60405180910390a2505b50939e929d509b50919950969750505050505050565b6000806000806000806119be611f9d565b5050509450945094509450945060005b84811015611a5e57878382815181106119e9576119e9612cf3565b602002602001015103611a565785841115611a35578386838381518110611a1257611a12612cf3565b6020026020010151611a249190612f70565b611a2e9190612f87565b9650611a5e565b818181518110611a4757611a47612cf3565b60200260200101519650611a5e565b6001016119ce565b505050505050919050565b6000818152600560209081526040808320815160c08101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181528796939586019390929190830182828015611ae957602002820191906000526020600020905b815481526020019060010190808311611ad5575b50505050508152602001600382015481526020016004820154815260200160058201548152505090507f00000000000000000000000000000000000000000000000000000000000000008160a001511115611b475760029150611b56565b606081015115611b5657600191505b50919050565b60068181548110610adf57600080fd5b606060068054806020026020016040519081016040528092919081815260200182805480156112cc57602002820191906000526020600020908154815260200190600101908083116112b8575050505050905090565b60007f0000000000000000000000000000000000000000000000000000000000000000600354611bf29190612d48565b905090565b8060016000828254611c099190612cca565b90915550611c3a90507f00000000000000000000000000000000000000000000000000000000000000008383612760565b816001600160a01b03167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436482604051611c7591815260200190565b60405180910390a25050565b604051633cebfa4f60e01b81526004810184905260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633cebfa4f906024016040805180830381865afa158015611cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0e9190612ff7565b91509150816001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614611d9757604051630b80380d60e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301528316602482015260440161072f565b7f00000000000000000000000000000000000000000000000000000000000000006bffffffffffffffffffffffff8216811115611dfe57604051632b30b24760e21b81526bffffffffffffffffffffffff831660048201526024810182905260440161072f565b60005b8451811015611ef95760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166375c1f93489888581518110611e4e57611e4e612cf3565b60200260200101516040518363ffffffff1660e01b8152600401611e8292919091825263ffffffff16602082015260400190565b602060405180830381865afa158015611e9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec3919061302c565b905082811015611ef057604051632b30b24760e21b8152600481018290526024810184905260440161072f565b50600101611e01565b50505050505050565b6060611f0d826127e3565b92915050565b60006040516323b872dd60e01b6000528460045283602452826044526020600060646000808a5af13d15601f3d1160016000511416171691506000606052806040525080611f965760405163abae3d6d60e01b81526001600160a01b0380871660048301528086166024830152841660448201526064810183905260840161072f565b5050505050565b600080600060608060608060606000600354905060025498507f00000000000000000000000000000000000000000000000000000000000000008142611fe39190612cca565b10158015611ff15750600089115b15612390576006548067ffffffffffffffff81111561201257612012612cdd565b60405190808252806020026020018201604052801561203b578160200160208202803683370190505b5094508067ffffffffffffffff81111561205757612057612cdd565b604051908082528060200260200182016040528015612080578160200160208202803683370190505b5096508067ffffffffffffffff81111561209c5761209c612cdd565b6040519080825280602002602001820160405280156120c5578160200160208202803683370190505b5095508067ffffffffffffffff8111156120e1576120e1612cdd565b60405190808252806020026020018201604052801561211457816020015b60608152602001906001900390816120ff5790505b5093508067ffffffffffffffff81111561213057612130612cdd565b604051908082528060200260200182016040528015612159578160200160208202803683370190505b50925060005b8181101561238d576006818154811061217a5761217a612cf3565b906000526020600020015486828151811061219757612197612cf3565b6020026020010181815250506000600560008884815181106121bb576121bb612cf3565b602090810291909101810151825281019190915260400160002080549091506121ec906001600160a01b0316611f02565b8683815181106121fe576121fe612cf3565b6020908102919091010152600381015484908181111561221c578091505b6122268242612cca565b905060006122a089868151811061223f5761223f612cf3565b60200260200101518560020180548060200260200160405190810160405280929190818152602001828054801561229557602002820191906000526020600020905b815481526020019060010190808311612281575b50505050508461288b565b9050801561235e576122d2827f0000000000000000000000000000000000000000000000000000000000000000612f70565b8b8f815181106122e4576122e4612cf3565b6020026020010181815250508a8e8151811061230257612302612cf3565b60200260200101518d6123159190612d48565b9c5089858151811061232957612329612cf3565b60200260200101518c8f8151811061234357612343612cf3565b60209081029190910101526123578e612fa9565b9d5061237e565b8188868151811061237157612371612cf3565b6020026020010181815250505b5050505080600101905061215f565b50505b509091929394959697565b825160008267ffffffffffffffff8111156123b8576123b8612cdd565b6040519080825280602002602001820160405280156123e1578160200160208202803683370190505b50905060008367ffffffffffffffff8111156123ff576123ff612cdd565b604051908082528060200260200182016040528015612428578160200160208202803683370190505b50905060008467ffffffffffffffff81111561244657612446612cdd565b60405190808252806020026020018201604052801561246f578160200160208202803683370190505b50905060008567ffffffffffffffff81111561248d5761248d612cdd565b6040519080825280602002602001820160405280156124b6578160200160208202803683370190505b50905060008667ffffffffffffffff8111156124d4576124d4612cdd565b6040519080825280602002602001820160405280156124fd578160200160208202803683370190505b50905060008060005b8881101561265d5760008c828151811061252257612522612cf3565b60200260200101511115612655578b818151811061254257612542612cf3565b602002602001015191508188848151811061255f5761255f612cf3565b6020908102919091018101919091526000838152600590915260409020600181015488516001600160a01b03909116908990869081106125a1576125a1612cf3565b6001600160a01b039283166020918202929092010152815488519116908890869081106125d0576125d0612cf3565b60200260200101906001600160a01b031690816001600160a01b0316815250508b828151811061260257612602612cf3565b602002602001015186858151811061261c5761261c612cf3565b6020026020010181815250508185858151811061263b5761263b612cf3565b60209081029190910101528361265081612fa9565b945050505b600101612506565b50885b8015612712578861267081613045565b99506000905084612682600184612cca565b8151811061269257612692612cf3565b6020026020010151905060068a815481106126af576126af612cf3565b9060005260206000200154600682815481106126cd576126cd612cf3565b60009182526020909120015560068054806126ea576126ea612d09565b60019003818190600052602060002001600090559055508061270b90613045565b9050612660565b506000547fd19a3d42ed383465e4058c322d9411aeac76ddb8454d22e139fc99808bd569528888888860405161274b9493929190613096565b60405180910390a25050505050505050505050565b600060405163a9059cbb60e01b6000528360045282602452602060006044600080895af13d15601f3d11600160005114161716915060006060528060405250806127dd5760405163abae3d6d60e01b81526001600160a01b038086166004830152306024830152841660448201526064810183905260840161072f565b50505050565b60408051600180825281830190925260609160208083019080368337019050509050816001600160a01b031663affed0e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015612843573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612867919061302c565b8160008151811061287a5761287a612cf3565b602002602001018181525050919050565b60006128988484846128a0565b949350505050565b600080821180156128e45750826000815181106128bf576128bf612cf3565b6020026020010151846000815181106128da576128da612cf3565b6020026020010151115b15610bb357600082846000815181106128ff576128ff612cf3565b60200260200101518660008151811061291a5761291a612cf3565b602002602001015161292c9190612cca565b61293e90670de0b6b3a7640000612f70565b6129489190612f87565b7f0000000000000000000000000000000000000000000000000000000000000000111595945050505050565b508054600082559060005260206000209081019061299291906129e0565b50565b8280548282559060005260206000209081019282156129d0579160200282015b828111156129d05782518255916020019190600101906129b5565b506129dc9291506129e0565b5090565b5b808211156129dc57600081556001016129e1565b6001600160a01b038116811461299257600080fd5b600080600080600060808688031215612a2257600080fd5b8535612a2d816129f5565b94506020860135612a3d816129f5565b935060408601359250606086013567ffffffffffffffff80821115612a6157600080fd5b818801915088601f830112612a7557600080fd5b813581811115612a8457600080fd5b896020828501011115612a9657600080fd5b9699959850939650602001949392505050565b600060208284031215612abb57600080fd5b5035919050565b60008151808452602080850194506020840160005b83811015612af357815187529582019590820190600101612ad7565b509495945050505050565b6020815260006001600160a01b0380845116602084015280602085015116604084015250604083015160c06060840152612b3b60e0840182612ac2565b905060608401516080840152608084015160a084015260a084015160c08401528091505092915050565b602081526000610bb36020830184612ac2565b60a081526000612b8b60a0830188612ac2565b6020838203818501528188518084528284019150828160051b850101838b0160005b83811015612bdb57601f19878403018552612bc9838351612ac2565b94860194925090850190600101612bad565b50508681036040880152612bef818b612ac2565b9450505050508281036060840152612c078186612ac2565b90508281036080840152612c1b8185612ac2565b98975050505050505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310612c5f57634e487b7160e01b600052602160045260246000fd5b91905290565b60006020808352835180602085015260005b81811015612c9357858101830151858201604001528201612c77565b506000604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b600052601160045260246000fd5b81810381811115611f0d57611f0d612cb4565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b838152606060208201526000612d386060830185612ac2565b9050826040830152949350505050565b80820180821115611f0d57611f0d612cb4565b604051610100810167ffffffffffffffff81118282101715612d7f57612d7f612cdd565b60405290565b80516bffffffffffffffffffffffff81168114612da157600080fd5b919050565b8051612da1816129f5565b805163ffffffff81168114612da157600080fd5b805160068110612da157600080fd5b600082601f830112612de557600080fd5b8151602067ffffffffffffffff80831115612e0257612e02612cdd565b8260051b604051601f19603f83011681018181108482111715612e2757612e27612cdd565b6040529384526020818701810194908101925087851115612e4757600080fd5b6020870191505b84821015612e6e57612e5f82612db1565b83529183019190830190612e4e565b979650505050505050565b600060208284031215612e8b57600080fd5b815167ffffffffffffffff80821115612ea357600080fd5b908301906101008286031215612eb857600080fd5b612ec0612d5b565b612ec983612d85565b8152612ed760208401612da6565b602082015260408301516040820152612ef260608401612db1565b6060820152612f0360808401612db1565b6080820152612f1460a08401612db1565b60a0820152612f2560c08401612dc5565b60c082015260e083015182811115612f3c57600080fd5b612f4887828601612dd4565b60e08301525095945050505050565b8281526040602082015260006128986040830184612ac2565b8082028115828204841417611f0d57611f0d612cb4565b600082612fa457634e487b7160e01b600052601260045260246000fd5b500490565b600060018201612fbb57612fbb612cb4565b5060010190565b838152606060208201526000612fdb6060830185612ac2565b8281036040840152612fed8185612ac2565b9695505050505050565b6000806040838503121561300a57600080fd5b8251613015816129f5565b915061302360208401612d85565b90509250929050565b60006020828403121561303e57600080fd5b5051919050565b60008161305457613054612cb4565b506000190190565b60008151808452602080850194506020840160005b83811015612af35781516001600160a01b031687529582019590820190600101613071565b6080815260006130a96080830187612ac2565b82810360208401526130bb818761305c565b905082810360408401526130cf818661305c565b90508281036060840152612e6e8185612ac256fea26469706673582212201cbb3243bdf2246a74a754c4b24385dc52b256b192f67778a3b3a76648374a5864736f6c63430008170033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/contracts/staking/ServiceStakingBase.sol b/contracts/staking/ServiceStakingBase.sol index 07600c20..597fea0f 100644 --- a/contracts/staking/ServiceStakingBase.sol +++ b/contracts/staking/ServiceStakingBase.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.21; +pragma solidity ^0.8.23; import {ERC721TokenReceiver} from "../../lib/solmate/src/tokens/ERC721.sol"; import "../interfaces/IErrorsRegistries.sol"; @@ -22,6 +22,14 @@ interface IService { TerminatedBonded } + // Service agent params struct + struct AgentParams { + // Number of agent instances + uint32 slots; + // Bond per agent instance + uint96 bond; + } + // Service parameters struct Service { // Registration activation deposit @@ -52,6 +60,13 @@ interface IService { /// @param serviceId Service Id. /// @return service Corresponding Service struct. function getService(uint256 serviceId) external view returns (Service memory service); + + /// @dev Gets service agent parameters: number of agent instances (slots) and a bond amount. + /// @param serviceId Service Id. + /// @return numAgentIds Number of canonical agent Ids in the service. + /// @return agentParams Set of agent parameters for each canonical agent Id. + function getAgentParams(uint256 serviceId) external view + returns (uint256 numAgentIds, AgentParams[] memory agentParams); } /// @dev No rewards are available in the contract. @@ -119,6 +134,8 @@ abstract contract ServiceStakingBase is ERC721TokenReceiver, IErrorsRegistries { uint256 rewardsPerSecond; // Minimum service staking deposit value required for staking uint256 minStakingDeposit; + // Min number of staking periods before the service can be unstaked + uint256 minNumStakingPeriods; // Max number of accumulated inactivity periods after which the service is evicted uint256 maxNumInactivityPeriods; // Liveness period @@ -170,8 +187,10 @@ abstract contract ServiceStakingBase is ERC721TokenReceiver, IErrorsRegistries { address public immutable serviceRegistry; // Approved multisig proxy hash bytes32 public immutable proxyHash; - // Max allowed inactivity - uint256 public immutable maxAllowedInactivity; + // Min staking duration + uint256 public immutable minStakingDuration; + // Max allowed inactivity period + uint256 public immutable maxInactivityDuration; // Epoch counter uint256 public epochCounter; @@ -196,9 +215,19 @@ abstract contract ServiceStakingBase is ERC721TokenReceiver, IErrorsRegistries { // Initial checks if (_stakingParams.maxNumServices == 0 || _stakingParams.rewardsPerSecond == 0 || _stakingParams.livenessPeriod == 0 || _stakingParams.livenessRatio == 0 || - _stakingParams.numAgentInstances == 0 || _stakingParams.maxNumInactivityPeriods == 0) { + _stakingParams.numAgentInstances == 0 || _stakingParams.minNumStakingPeriods == 0 || + _stakingParams.maxNumInactivityPeriods == 0) { revert ZeroValue(); } + + // Check that the min number of staking periods is not smaller than the max number of inactivity periods + // This check is necessary to avoid an attack scenario when the service is going to stake and unstake without + // any meaningful activity and just occupy the staking slot + if (_stakingParams.minNumStakingPeriods < _stakingParams.maxNumInactivityPeriods) { + revert LowerThan(_stakingParams.minNumStakingPeriods, _stakingParams.maxNumInactivityPeriods); + } + + // Check the rest of parameters if (_stakingParams.minStakingDeposit < 2) { revert LowerThan(_stakingParams.minStakingDeposit, 2); } @@ -239,19 +268,37 @@ abstract contract ServiceStakingBase is ERC721TokenReceiver, IErrorsRegistries { // Record provided multisig proxy bytecode hash proxyHash = _proxyHash; - // Calculate max allowed inactivity - maxAllowedInactivity = _stakingParams.maxNumInactivityPeriods * livenessPeriod; + // Calculate min staking duration + minStakingDuration = _stakingParams.minNumStakingPeriods * livenessPeriod; + + // Calculate max allowed inactivity duration + maxInactivityDuration = _stakingParams.maxNumInactivityPeriods * livenessPeriod; // Set the checkpoint timestamp to be the deployment one tsCheckpoint = block.timestamp; } /// @dev Checks token / ETH staking deposit. + /// @param serviceId Service Id. /// @param stakingDeposit Staking deposit. - function _checkTokenStakingDeposit(uint256, uint256 stakingDeposit) internal view virtual { + function _checkTokenStakingDeposit( + uint256 serviceId, + uint256 stakingDeposit, + uint32[] memory + ) internal view virtual { + uint256 minDeposit = minStakingDeposit; + // The staking deposit derived from a security deposit value must be greater or equal to the minimum defined one - if (stakingDeposit < minStakingDeposit) { - revert LowerThan(stakingDeposit, minStakingDeposit); + if (stakingDeposit < minDeposit) { + revert LowerThan(stakingDeposit, minDeposit); + } + + // Check agent Id bonds to be not smaller than the minimum required deposit + (uint256 numAgentIds, IService.AgentParams[] memory agentParams) = IService(serviceRegistry).getAgentParams(serviceId); + for (uint256 i = 0; i < numAgentIds; ++i) { + if (agentParams[i].bond < minDeposit) { + revert LowerThan(agentParams[i].bond, minDeposit); + } } } @@ -261,8 +308,8 @@ abstract contract ServiceStakingBase is ERC721TokenReceiver, IErrorsRegistries { function _withdraw(address to, uint256 amount) internal virtual; /// @dev Stakes the service. - /// @notice Each service must be staked for a minimum of maxAllowedInactivity time, or until the funds are not zero. - /// maxAllowedInactivity = maxNumInactivityPeriods * livenessPeriod + /// @notice Each service must be staked for a minimum of maxInactivityDuration time, or until the funds are not zero. + /// maxInactivityDuration = maxNumInactivityPeriods * livenessPeriod /// @param serviceId Service Id. function stake(uint256 serviceId) external { // Check if there available rewards @@ -319,6 +366,7 @@ abstract contract ServiceStakingBase is ERC721TokenReceiver, IErrorsRegistries { revert WrongServiceConfiguration(serviceId); } for (uint256 i = 0; i < numAgents; ++i) { + // Check that the agent Ids if (agentIds[i] != service.agentIds[i]) { revert WrongAgentId(agentIds[i]); } @@ -326,7 +374,7 @@ abstract contract ServiceStakingBase is ERC721TokenReceiver, IErrorsRegistries { } // Check service staking deposit and token, if applicable - _checkTokenStakingDeposit(serviceId, service.securityDeposit); + _checkTokenStakingDeposit(serviceId, service.securityDeposit, service.agentIds); // ServiceInfo struct will be an empty one since otherwise the safeTransferFrom above would fail sInfo.multisig = service.multisig; @@ -596,7 +644,7 @@ abstract contract ServiceStakingBase is ERC721TokenReceiver, IErrorsRegistries { serviceInactivity[i] = mapServiceInfo[curServiceId].inactivity + serviceInactivity[i]; mapServiceInfo[curServiceId].inactivity = serviceInactivity[i]; // Check for the maximum allowed inactivity time - if (serviceInactivity[i] > maxAllowedInactivity) { + if (serviceInactivity[i] > maxInactivityDuration) { // Evict a service if it has been inactive for more than a maximum allowed inactivity time evictServiceIds[i] = curServiceId; // Increase number of evicted services @@ -641,8 +689,8 @@ abstract contract ServiceStakingBase is ERC721TokenReceiver, IErrorsRegistries { // Check that the service has staked long enough, or if there are no rewards left uint256 ts = block.timestamp - tsStart; - if (ts <= maxAllowedInactivity && availableRewards > 0) { - revert NotEnoughTimeStaked(serviceId, ts, maxAllowedInactivity); + if (ts <= minStakingDuration && availableRewards > 0) { + revert NotEnoughTimeStaked(serviceId, ts, minStakingDuration); } // Call the checkpoint @@ -736,7 +784,7 @@ abstract contract ServiceStakingBase is ERC721TokenReceiver, IErrorsRegistries { /// @return stakingState Staking state of the service. function getServiceStakingState(uint256 serviceId) external view returns (ServiceStakingState stakingState) { ServiceInfo memory sInfo = mapServiceInfo[serviceId]; - if (sInfo.inactivity > maxAllowedInactivity) { + if (sInfo.inactivity > maxInactivityDuration) { stakingState = ServiceStakingState.Evicted; } else if (sInfo.tsStart > 0) { stakingState = ServiceStakingState.Staked; diff --git a/contracts/staking/ServiceStakingNativeToken.sol b/contracts/staking/ServiceStakingNativeToken.sol index c834bb50..0725d538 100644 --- a/contracts/staking/ServiceStakingNativeToken.sol +++ b/contracts/staking/ServiceStakingNativeToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.21; +pragma solidity ^0.8.23; import {ServiceStakingBase} from "./ServiceStakingBase.sol"; diff --git a/contracts/staking/ServiceStakingToken.sol b/contracts/staking/ServiceStakingToken.sol index 88c7a289..b7f019c7 100644 --- a/contracts/staking/ServiceStakingToken.sol +++ b/contracts/staking/ServiceStakingToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.21; +pragma solidity ^0.8.23; import {ServiceStakingBase} from "./ServiceStakingBase.sol"; import {SafeTransferLib} from "../utils/SafeTransferLib.sol"; @@ -12,6 +12,12 @@ interface IServiceTokenUtility { /// @return Token address. /// @return Token security deposit. function mapServiceIdTokenDeposit(uint256 serviceId) external view returns (address, uint96); + + /// @dev Gets the agent Id bond in a specified service. + /// @param serviceId Service Id. + /// @param serviceId Agent Id. + /// @return bond Agent Id bond in a specified service Id. + function getAgentBond(uint256 serviceId, uint256 agentId) external view returns (uint256 bond); } /// @dev The token does not have enough decimals. @@ -65,7 +71,8 @@ contract ServiceStakingToken is ServiceStakingBase { /// @dev Checks token staking deposit. /// @param serviceId Service Id. - function _checkTokenStakingDeposit(uint256 serviceId, uint256) internal view override { + /// @param agentIds Service agent Ids. + function _checkTokenStakingDeposit(uint256 serviceId, uint256, uint32[] memory agentIds) internal view override { // Get the service staking token and deposit (address token, uint96 stakingDeposit) = IServiceTokenUtility(serviceRegistryTokenUtility).mapServiceIdTokenDeposit(serviceId); @@ -75,9 +82,19 @@ contract ServiceStakingToken is ServiceStakingBase { revert WrongStakingToken(stakingToken, token); } + uint256 minDeposit = minStakingDeposit; + // The staking deposit must be greater or equal to the minimum defined one - if (stakingDeposit < minStakingDeposit) { - revert ValueLowerThan(stakingDeposit, minStakingDeposit); + if (stakingDeposit < minDeposit) { + revert ValueLowerThan(stakingDeposit, minDeposit); + } + + // Check agent Id bonds to be not smaller than the minimum required deposit + for (uint256 i = 0; i < agentIds.length; ++i) { + uint256 bond = IServiceTokenUtility(serviceRegistryTokenUtility).getAgentBond(serviceId, agentIds[i]); + if (bond < minDeposit) { + revert ValueLowerThan(bond, minDeposit); + } } } diff --git a/hardhat.config.js b/hardhat.config.js index 747b711d..a48c8be8 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -102,7 +102,7 @@ module.exports = { solidity: { compilers: [ { - version: "0.8.21", + version: "0.8.23", settings: { optimizer: { enabled: true, diff --git a/test/ServiceStaking.js b/test/ServiceStaking.js index 5a7a5b3e..5f311597 100644 --- a/test/ServiceStaking.js +++ b/test/ServiceStaking.js @@ -40,6 +40,7 @@ describe("ServiceStaking", function () { maxNumServices: 3, rewardsPerSecond: "1" + "0".repeat(15), minStakingDeposit: 10, + minNumStakingPeriods: 3, maxNumInactivityPeriods: 3, livenessPeriod: livenessPeriod, // Ten seconds livenessRatio: "1" + "0".repeat(16), // 0.01 transaction per second (TPS) @@ -164,6 +165,7 @@ describe("ServiceStaking", function () { maxNumServices: 0, rewardsPerSecond: 0, minStakingDeposit: 0, + minNumStakingPeriods: 0, maxNumInactivityPeriods: 0, livenessPeriod: 0, livenessRatio: 0, @@ -183,9 +185,6 @@ describe("ServiceStaking", function () { testServiceParams.rewardsPerSecond = 1; await expect(ServiceStakingNativeToken.deploy(testServiceParams, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingNativeToken, "ZeroValue"); - testServiceParams.maxNumInactivityPeriods = 1; - await expect(ServiceStakingNativeToken.deploy(testServiceParams, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingNativeToken, "ZeroValue"); - testServiceParams.livenessPeriod = 1; await expect(ServiceStakingNativeToken.deploy(testServiceParams, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingNativeToken, "ZeroValue"); @@ -193,6 +192,15 @@ describe("ServiceStaking", function () { await expect(ServiceStakingNativeToken.deploy(testServiceParams, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingNativeToken, "ZeroValue"); testServiceParams.numAgentInstances = 1; + await expect(ServiceStakingNativeToken.deploy(testServiceParams, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingNativeToken, "ZeroValue"); + + testServiceParams.minNumStakingPeriods = 1; + await expect(ServiceStakingNativeToken.deploy(testServiceParams, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingNativeToken, "ZeroValue"); + + testServiceParams.maxNumInactivityPeriods = 2; + await expect(ServiceStakingNativeToken.deploy(testServiceParams, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingNativeToken, "LowerThan"); + + testServiceParams.maxNumInactivityPeriods = 1; await expect(ServiceStakingNativeToken.deploy(testServiceParams, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingNativeToken, "LowerThan"); testServiceParams.minStakingDeposit = 2; @@ -223,9 +231,6 @@ describe("ServiceStaking", function () { testServiceParams.rewardsPerSecond = 1; await expect(ServiceStakingToken.deploy(testServiceParams, AddressZero, AddressZero, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingToken, "ZeroValue"); - testServiceParams.maxNumInactivityPeriods = 1; - await expect(ServiceStakingToken.deploy(testServiceParams, AddressZero, AddressZero, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingToken, "ZeroValue"); - testServiceParams.livenessPeriod = 1; await expect(ServiceStakingToken.deploy(testServiceParams, AddressZero, AddressZero, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingToken, "ZeroValue"); @@ -233,6 +238,15 @@ describe("ServiceStaking", function () { await expect(ServiceStakingToken.deploy(testServiceParams, AddressZero, AddressZero, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingToken, "ZeroValue"); testServiceParams.numAgentInstances = 1; + await expect(ServiceStakingToken.deploy(testServiceParams, AddressZero, AddressZero, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingToken, "ZeroValue"); + + testServiceParams.minNumStakingPeriods = 1; + await expect(ServiceStakingToken.deploy(testServiceParams, AddressZero, AddressZero, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingToken, "ZeroValue"); + + testServiceParams.maxNumInactivityPeriods = 2; + await expect(ServiceStakingToken.deploy(testServiceParams, AddressZero, AddressZero, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingToken, "LowerThan"); + + testServiceParams.maxNumInactivityPeriods = 1; await expect(ServiceStakingToken.deploy(testServiceParams, AddressZero, AddressZero, AddressZero, bytes32Zero)).to.be.revertedWithCustomError(ServiceStakingToken, "LowerThan"); testServiceParams.minStakingDeposit = 2; diff --git a/test/ServiceStaking.t.sol b/test/ServiceStaking.t.sol index 6ff039fd..1805f758 100644 --- a/test/ServiceStaking.t.sol +++ b/test/ServiceStaking.t.sol @@ -1,4 +1,4 @@ -pragma solidity =0.8.21; +pragma solidity =0.8.23; import {IService} from "../contracts/interfaces/IService.sol"; import "@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol"; @@ -56,6 +56,8 @@ contract BaseSetup is Test { uint256 internal rewardsPerSecond = 0.0001 ether; // Minimum service staking deposit value required for staking uint256 internal minStakingDeposit = regDeposit; + // Min number of staking periods before the service can be unstaked + uint256 internal minNumStakingPeriods = 3; // Max number of accumulated inactivity periods after which the service is evicted uint256 internal maxNumInactivityPeriods = 3; // Liveness period @@ -106,8 +108,8 @@ contract BaseSetup is Test { // Deploy service staking native token and arbitrary ERC20 token ServiceStakingBase.StakingParams memory stakingParams = ServiceStakingBase.StakingParams(maxNumServices, - rewardsPerSecond, minStakingDeposit, maxNumInactivityPeriods, livenessPeriod, livenessRatio, - numAgentInstances, emptyArray, 0, bytes32(0)); + rewardsPerSecond, minStakingDeposit, minNumStakingPeriods, maxNumInactivityPeriods, livenessPeriod, + livenessRatio, numAgentInstances, emptyArray, 0, bytes32(0)); serviceStakingNativeToken = new ServiceStakingNativeToken(stakingParams, address(serviceRegistry), multisigProxyHash); serviceStakingToken = new ServiceStakingToken(stakingParams, address(serviceRegistry), address(serviceRegistryTokenUtility),