From de9845fcce64a4585c2a142fceabd1afffe15e46 Mon Sep 17 00:00:00 2001 From: cam-schultz Date: Thu, 5 Sep 2024 16:05:43 -0500 Subject: [PATCH 1/3] expand delegation comments --- .../ERC20TokenStakingManager.go | 2 +- .../NativeTokenStakingManager.go | 2 +- contracts/staking/PoSValidatorManager.sol | 39 +++++++++++++++---- .../interfaces/IPoSValidatorManager.sol | 14 +++++-- 4 files changed, 45 insertions(+), 12 deletions(-) diff --git a/abi-bindings/go/staking/ERC20TokenStakingManager/ERC20TokenStakingManager.go b/abi-bindings/go/staking/ERC20TokenStakingManager/ERC20TokenStakingManager.go index d57c7ca9f..5fac034af 100644 --- a/abi-bindings/go/staking/ERC20TokenStakingManager/ERC20TokenStakingManager.go +++ b/abi-bindings/go/staking/ERC20TokenStakingManager/ERC20TokenStakingManager.go @@ -48,7 +48,7 @@ type ValidatorManagerSettings struct { // ERC20TokenStakingManagerMetaData contains all meta data concerning the ERC20TokenStakingManager contract. var ERC20TokenStakingManagerMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"init\",\"type\":\"uint8\",\"internalType\":\"enumICMInitializable\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"WARP_MESSENGER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIWarpMessenger\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"activeValidators\",\"inputs\":[{\"name\":\"nodeID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"completeDelegatorRegistration\",\"inputs\":[{\"name\":\"messageIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"delegationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"completeEndDelegation\",\"inputs\":[{\"name\":\"messageIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"delegationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"completeEndValidation\",\"inputs\":[{\"name\":\"messageIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"completeValidatorRegistration\",\"inputs\":[{\"name\":\"messageIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getWeight\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"settings\",\"type\":\"tuple\",\"internalType\":\"structPoSValidatorManagerSettings\",\"components\":[{\"name\":\"baseSettings\",\"type\":\"tuple\",\"internalType\":\"structValidatorManagerSettings\",\"components\":[{\"name\":\"pChainBlockchainID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"subnetID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"maximumHourlyChurn\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"name\":\"minimumStakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"maximumStakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minimumStakeDuration\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"rewardCalculator\",\"type\":\"address\",\"internalType\":\"contractIRewardCalculator\"}]},{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"contractIERC20\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initializeDelegatorRegistration\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"delegationAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initializeEndDelegation\",\"inputs\":[{\"name\":\"delegationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"includeUptimeProof\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"messageIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initializeEndValidation\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"includeUptimeProof\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"messageIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initializeValidatorRegistration\",\"inputs\":[{\"name\":\"stakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"nodeID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"registrationExpiry\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"blsPublicKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resendDelegatorRegistration\",\"inputs\":[{\"name\":\"delegationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resendEndDelegation\",\"inputs\":[{\"name\":\"delegationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resendEndValidatorMessage\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resendRegisterValidatorMessage\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"valueToWeight\",\"inputs\":[{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"weightToValue\",\"inputs\":[{\"name\":\"weight\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"pure\"},{\"type\":\"event\",\"name\":\"DelegationEnded\",\"inputs\":[{\"name\":\"delegationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"nonce\",\"type\":\"uint64\",\"indexed\":true,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegatorAdded\",\"inputs\":[{\"name\":\"delegationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"delegatorAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"validatorWeight\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"delegatorWeight\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"setWeightMessageID\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegatorRegistered\",\"inputs\":[{\"name\":\"delegationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"nonce\",\"type\":\"uint64\",\"indexed\":true,\"internalType\":\"uint64\"},{\"name\":\"startTime\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegatorRemovalInitialized\",\"inputs\":[{\"name\":\"delegationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"nonce\",\"type\":\"uint64\",\"indexed\":true,\"internalType\":\"uint64\"},{\"name\":\"validatorWeight\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"endTime\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"setWeightMessageID\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidationPeriodCreated\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"nodeID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"registerValidationMessageID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"weight\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"registrationExpiry\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidationPeriodEnded\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"status\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enumValidatorStatus\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidationPeriodRegistered\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"weight\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidatorRemovalInitialized\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"setWeightMessageID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"weight\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"endTime\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"AddressInsufficientBalance\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReentrancyGuardReentrantCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SafeERC20FailedOperation\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]}]", - Bin: "0x608060405234801561000f575f80fd5b5060405161478938038061478983398101604081905261002e91610107565b60018160018111156100425761004261012c565b0361004f5761004f610055565b50610140565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a55760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101045780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610117575f80fd5b815160028110610125575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b61463c8061014d5f395ff3fe608060405234801561000f575f80fd5b5060043610610111575f3560e01c806366435abf1161009e57806398f3e2b41161006e57806398f3e2b4146102645780639e1bc4ef14610277578063a3a65e481461028a578063b771b3bc1461029d578063bee0a03f146102c3575f80fd5b806366435abf146102185780636d0e43fa1461022b57806376f786211461023e578063872fda6414610251575f80fd5b806327f39ca8116100e457806327f39ca8146101a15780632e2194d8146101b4578063467ef06f146101df5780635297fae6146101f25780636206585614610205575f80fd5b80630118acc4146101155780630322ed981461012a5780630cdd09851461013d578063162f1f611461018e575b5f80fd5b610128610123366004613ca8565b6102d6565b005b610128610138366004613ce3565b61076a565b61017b61014b366004613ce3565b5f9081527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb08602052604090205490565b6040519081526020015b60405180910390f35b61012861019c366004613ce3565b6108c6565b6101286101af366004613d0e565b610933565b6101c76101c2366004613ce3565b610a17565b6040516001600160401b039091168152602001610185565b6101286101ed366004613d4b565b610a2d565b610128610200366004613d64565b610db0565b61017b610213366004613da2565b610fa1565b6101c7610226366004613ce3565b610fba565b610128610239366004613ce3565b610fce565b61012861024c366004613ca8565b61103b565b61017b61025f366004613e4d565b611056565b610128610272366004613d64565b61107b565b61017b610285366004613ee9565b61121b565b610128610298366004613d4b565b61122e565b6102ab6005600160991b0181565b6040516001600160a01b039091168152602001610185565b6101286102d1366004613ce3565b6113eb565b5f8381527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d0360205260408120600101545f805160206145908339815191529184156103285761032582856114ba565b90505b5f868152600384016020526040808220815161010081019092528054829060ff16600481111561035a5761035a613f09565b600481111561036b5761036b613f09565b8152815461010090046001600160a01b031660208201526001820154604082015260028201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b909104811660c083015260039092015490911660e0909101529050336001600160a01b031681602001516001600160a01b0316146104505760405162461bcd60e51b815260206004820152603360248201525f805160206145b08339815191526044820152723737ba1037bbb732b210313c9039b2b73232b960691b60648201526084015b60405180910390fd5b60028151600481111561046557610465613f09565b146104b25760405162461bcd60e51b815260206004820152602a60248201525f805160206145b08339815191526044820152696e6f742061637469766560b01b6064820152608401610447565b5f6104bc84611756565b60038084526001600160401b0342811660a0860152821660e08501525f8a815290870160205260409020835181549293508492829060ff1916600183600481111561050957610509613f09565b021790555060208201518154610100600160a81b0319166101006001600160a01b0390921691909102178155604082015160018201556060820151600282018054608085015160a086015160c08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560e0909201516003909101805467ffffffffffffffff1916919092161790555f6105db856117ca565b905082606001516001600160401b03168160a001516001600160401b0316116106525760405162461bcd60e51b815260206004820152602360248201527f506f5356616c696461746f724d616e616765723a20496e76616c69642077656960448201526219da1d60ea1b6064820152608401610447565b5f83606001518260a001516106679190613f31565b905061067386826118db565b5f61067f878584611923565b5f8c815260058a016020526040902090915061069b8282613fdb565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb906106c89085906004016140bc565b6020604051808303815f875af11580156106e4573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061070891906140ee565b604080516001600160401b03868116825242602083015291810183905291925086169089908e907f5318ab4d7cdf77056db2db5b539a08fe7d1a63d6885ecee8236a0dbda2843b4e9060600160405180910390a4505050505050505050505050565b5f8181527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb066020526040812080545f805160206145d08339815191529291906107b290613f58565b90501180156107e4575060035f83815260078301602052604090205460ff1660058111156107e2576107e2613f09565b145b6108485760405162461bcd60e51b815260206004820152602f60248201527f56616c696461746f724d616e616765723a2056616c696461746f72206e6f742060448201526e1c195b991a5b99c81c995b5bdd985b608a1b6064820152608401610447565b5f82815260068201602052604090819020905163ee5b48eb60e01b81526005600160991b019163ee5b48eb916108819190600401614105565b6020604051808303815f875af115801561089d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108c191906140ee565b505050565b6108cf81611b40565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d05602052604090819020905163ee5b48eb60e01b81525f80516020614590833981519152916005600160991b019163ee5b48eb9161088191600401614105565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460029190600160401b900460ff168061097c575080546001600160401b03808416911610155b1561099a5760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556109c58484611c13565b805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b5f610a2764e8d4a51000836141a3565b92915050565b5f805160206145d08339815191525f610a4583611c2d565b90505f80610a568360400151611e0e565b915091508015610abb5760405162461bcd60e51b815260206004820152602a60248201527f56616c696461746f724d616e616765723a20726567697374726174696f6e20736044820152691d1a5b1b081d985b1a5960b21b6064820152608401610447565b5f828152600785016020526040808220815161010081019092528054829060ff166005811115610aed57610aed613f09565b6005811115610afe57610afe613f09565b81526001820154602082015260028201546001600160a01b03811660408301526001600160401b03600160a01b909104811660608301526003928301548082166080840152600160401b8104821660a0840152600160801b8104821660c0840152600160c01b90041660e0909101529091505f9082516005811115610b8557610b85613f09565b1480610ba35750600182516005811115610ba157610ba1613f09565b145b610c025760405162461bcd60e51b815260206004820152602a60248201527f56616c696461746f724d616e616765723a20696e76616c69642076616c696461604482015269746f722073746174757360b01b6064820152608401610447565b600382516005811115610c1757610c17613f09565b03610c3e57505f8381526006860160205260408120600491610c399190613c39565b610c42565b5060055b6020808301515f90815260088801909152604081205581816005811115610c6b57610c6b613f09565b90816005811115610c7e57610c7e613f09565b9052505f84815260078701602052604090208251815484929190829060ff19166001836005811115610cb257610cb2613f09565b021790555060208201516001820155604082015160028201805460608501516001600160401b03908116600160a01b026001600160e01b03199092166001600160a01b039094169390931717905560808301516003909201805460a085015160c086015160e0909601518416600160c01b026001600160c01b03968516600160801b02969096166001600160801b03918516600160401b026001600160801b0319909316959094169490941717929092161791909117905581516005811115610d7d57610d7d613f09565b60405185907f1c08e59656f1a18dc2da76826cdc52805c43e897a17c50faefb8ab3c1526cc16905f90a350505050505050565b5f805160206145908339815191525f610dc884611c2d565b90505f80610dd98360400151611faf565b5091509150610de7856121ea565b5f8581526004850160205260408120610dff91613c39565b5f610e09836117ca565b9050816001600160401b031681608001516001600160401b03161015610e415760405162461bcd60e51b8152600401610447906141b6565b5f8681526003860160205260409020600201546001600160401b03808416600160c01b909204161115610e865760405162461bcd60e51b8152600401610447906141f8565b60015f87815260038701602052604090205460ff166004811115610eac57610eac613f09565b14610f155760405162461bcd60e51b815260206004820152603360248201527f506f5356616c696461746f724d616e616765723a2064656c65676174696f6e4960448201527211081b9bdd081c195b991a5b99c81859191959606a1b6064820152608401610447565b5f868152600386016020908152604091829020805460ff1916600290811782550180546001600160401b0342818116600160401b0267ffffffffffffffff60401b19909316929092179092559251928352841691859189917f245fc69b36e168426e0306fc8d8300661b9af297c7958820dbf804f9f63e7064910160405180910390a450505050505050565b5f610a276001600160401b03831664e8d4a51000614241565b5f610fc4826117ca565b60a0015192915050565b610fd7816121ea565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d04602052604090819020905163ee5b48eb60e01b81525f80516020614590833981519152916005600160991b019163ee5b48eb9161088191600401614105565b811561104d5761104b83826114ba565b505b6108c1836122c3565b5f806110618661267b565b905061106f85828686612728565b9150505b949350505050565b5f805160206145908339815191525f61109384611c2d565b90505f806110a48360400151611faf565b50915091506110b285611b40565b5f85815260058501602052604081206110ca91613c39565b5f6110d4836117ca565b9050816001600160401b031681608001516001600160401b0316101561110c5760405162461bcd60e51b8152600401610447906141b6565b5f8681526003808701602052604090912001546001600160401b038084169116111561114a5760405162461bcd60e51b8152600401610447906141f8565b60035f87815260038701602052604090205460ff16600481111561117057611170613f09565b146111c45760405162461bcd60e51b815260206004820152603160248201525f805160206145b08339815191526044820152701b9bdd081c195b991a5b99c81859191959607a1b6064820152608401610447565b5f868152600386016020526040808220805460ff19166004179055516001600160401b03841691859189917f52e9b1eaef84d46cda83ccb9d427267bc4d04f756b4a32c8302722b79e5c65ab91a450505050505050565b5f611227833384612b7d565b9392505050565b5f805160206145d08339815191525f61124683611c2d565b90505f806112578360400151611e0e565b91509150806112b95760405162461bcd60e51b815260206004820152602860248201527f56616c696461746f724d616e616765723a20526567697374726174696f6e206e6044820152671bdd081d985b1a5960c21b6064820152608401610447565b5f828152600585016020526040812080546112d390613f58565b9050118015611305575060015f83815260078601602052604090205460ff16600581111561130357611303613f09565b145b6113215760405162461bcd60e51b815260040161044790614258565b5f828152600585016020526040812061133991613c39565b5f8281526007850160208181526040808420805460ff191660021781556003810180546001600160401b0342818116600160801b0267ffffffffffffffff60801b19909316929092178355600190930154875260088b0185528387208990559588905293835292548151600160401b90910490931683529082019290925283917ff8fd1c90fb9cfa2ca2358fdf5806b086ad43315d92b221c929efc7f105ce7568910160405180910390a25050505050565b5f8181527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb056020526040812080545f805160206145d083398151915292919061143390613f58565b9050118015611465575060015f83815260078301602052604090205460ff16600581111561146357611463613f09565b145b6114815760405162461bcd60e51b815260040161044790614258565b5f82815260058201602052604090819020905163ee5b48eb60e01b81526005600160991b019163ee5b48eb916108819190600401614105565b6040516306f8253560e41b815263ffffffff821660048201525f90819081906005600160991b0190636f825350906024015f60405180830381865afa158015611505573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261152c91908101906142aa565b915091508061158f5760405162461bcd60e51b815260206004820152602960248201527f506f5356616c696461746f724d616e616765723a20696e76616c69642077617260448201526870206d65737361676560b81b6064820152608401610447565b6005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115d2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115f691906140ee565b82511461165a5760405162461bcd60e51b815260206004820152602c60248201527f506f5356616c696461746f724d616e616765723a20696e76616c696420736f7560448201526b1c98d94818da185a5b88125160a21b6064820152608401610447565b60208201516001600160a01b0316156116d05760405162461bcd60e51b815260206004820152603260248201527f506f5356616c696461746f724d616e616765723a20696e76616c6964206f726960448201527167696e2073656e646572206164647265737360701b6064820152608401610447565b5f806116df8460400151612f38565b9150915081871461174c5760405162461bcd60e51b815260206004820152603160248201527f506f5356616c696461746f724d616e616765723a20696e76616c6964207570746044820152701a5b59481d985b1a59185d1a5bdb881251607a1b6064820152608401610447565b9695505050505050565b5f8181525f805160206146108339815191526020526040812060030180545f805160206145d0833981519152916001600160401b039091169081908461179b8361437c565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550508092505050919050565b6040805161010080820183525f8083526020808401829052838501829052606084018290526080840182905260a0840182905260c0840182905260e084018290528582525f8051602061461083398151915290528390208351918201909352825491925f805160206145d083398151915292829060ff16600581111561185257611852613f09565b600581111561186357611863613f09565b81526001820154602082015260028201546001600160a01b03811660408301526001600160401b03600160a01b909104811660608301526003909201548083166080830152600160401b8104831660a0830152600160801b8104831660c0830152600160c01b900490911660e0909101529392505050565b5f9182525f80516020614610833981519152602052604090912060030180546001600160401b03909216600160401b0267ffffffffffffffff60401b19909216919091179055565b60408051603680825260608281019093525f91906020820181803683370190505090505f5b600281101561199c5761195c8160016143a1565b611967906008614241565b5081515f9083908390811061197e5761197e6143b4565b60200101906001600160f81b03191690815f1a905350600101611948565b505f5b60048110156119ff576119b38160036143a1565b6119be906008614241565b6001901c60f81b826119d18360026143c8565b815181106119e1576119e16143b4565b60200101906001600160f81b03191690815f1a90535060010161199f565b505f5b6020811015611a6157611a1681601f6143a1565b611a21906008614241565b86901c60f81b82611a338360066143c8565b81518110611a4357611a436143b4565b60200101906001600160f81b03191690815f1a905350600101611a02565b505f5b6008811015611acc57611a788160076143a1565b611a83906008614241565b6001600160401b038616901c60f81b82611a9e8360266143c8565b81518110611aae57611aae6143b4565b60200101906001600160f81b03191690815f1a905350600101611a64565b505f5b6008811015611b3757611ae38160076143a1565b611aee906008614241565b6001600160401b038516901c60f81b82611b0983602e6143c8565b81518110611b1957611b196143b4565b60200101906001600160f81b03191690815f1a905350600101611acf565b50949350505050565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d056020526040812080545f80516020614590833981519152929190611b8890613f58565b9050118015611bba575060035f83815260038301602052604090205460ff166004811115611bb857611bb8613f09565b145b611c0f5760405162461bcd60e51b815260206004820152603360248201525f805160206145b083398151915260448201527272656d6f76616c206e6f742070656e64696e6760681b6064820152608401610447565b5050565b611c1b613110565b611c248261315b565b611c0f816131a1565b60408051606080820183525f8083526020830181905292820152905f805160206145d08339815191526040516306f8253560e41b815263ffffffff851660048201529091505f9081906005600160991b0190636f825350906024015f60405180830381865afa158015611ca2573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611cc991908101906142aa565b9150915080611d305760405162461bcd60e51b815260206004820152602d60248201527f56616c696461746f724d616e616765723a20496e76696e76616c6964616c696460448201526c2077617270206d65737361676560981b6064820152608401610447565b8254825114611d935760405162461bcd60e51b815260206004820152602960248201527f56616c696461746f724d616e616765723a20696e76616c696420736f757263656044820152680818da185a5b88125160ba1b6064820152608401610447565b60208201516001600160a01b031615611e065760405162461bcd60e51b815260206004820152602f60248201527f56616c696461746f724d616e616765723a20696e76616c6964206f726967696e60448201526e2073656e646572206164647265737360881b6064820152608401610447565b509392505050565b5f808251602714611e315760405162461bcd60e51b8152600401610447906143db565b5f805b6002811015611e8057611e488160016143a1565b611e53906008614241565b61ffff16858281518110611e6957611e696143b4565b016020015160f81c901b9190911790600101611e34565b5061ffff811615611ea35760405162461bcd60e51b815260040161044790614424565b5f805b6004811015611efe57611eba8160036143a1565b611ec5906008614241565b63ffffffff1686611ed78360026143c8565b81518110611ee757611ee76143b4565b016020015160f81c901b9190911790600101611ea6565b5063ffffffff8116600214611f255760405162461bcd60e51b815260040161044790614467565b5f805b6020811015611f7a57611f3c81601f6143a1565b611f47906008614241565b87611f538360066143c8565b81518110611f6357611f636143b4565b016020015160f81c901b9190911790600101611f28565b505f86602681518110611f8f57611f8f6143b4565b016020015191976001600160f81b03199092161515965090945050505050565b5f805f8351603614611fd35760405162461bcd60e51b8152600401610447906143db565b5f805b600281101561202257611fea8160016143a1565b611ff5906008614241565b61ffff1686828151811061200b5761200b6143b4565b016020015160f81c901b9190911790600101611fd6565b5061ffff8116156120455760405162461bcd60e51b815260040161044790614424565b5f805b60048110156120a05761205c8160036143a1565b612067906008614241565b63ffffffff16876120798360026143c8565b81518110612089576120896143b4565b016020015160f81c901b9190911790600101612048565b5063ffffffff81166003146120c75760405162461bcd60e51b815260040161044790614467565b5f805b602081101561211c576120de81601f6143a1565b6120e9906008614241565b886120f58360066143c8565b81518110612105576121056143b4565b016020015160f81c901b91909117906001016120ca565b505f805b600881101561217b576121348160076143a1565b61213f906008614241565b6001600160401b0316896121548360266143c8565b81518110612164576121646143b4565b016020015160f81c901b9190911790600101612120565b505f805b60088110156121da576121938160076143a1565b61219e906008614241565b6001600160401b03168a6121b383602e6143c8565b815181106121c3576121c36143b4565b016020015160f81c901b919091179060010161217f565b5091989097509095509350505050565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d046020526040812080545f8051602061459083398151915292919061223290613f58565b9050118015612264575060015f83815260038301602052604090205460ff16600481111561226257612262613f09565b145b611c0f5760405162461bcd60e51b815260206004820152603860248201525f805160206145b083398151915260448201527f726567697374726174696f6e206e6f742070656e64696e6700000000000000006064820152608401610447565b5f8181525f8051602061461083398151915260205260408082208151610100810190925280545f805160206145d083398151915293929190829060ff16600581111561231157612311613f09565b600581111561232257612322613f09565b8152600182015460208201526002808301546001600160a01b03811660408401526001600160401b03600160a01b909104811660608401526003909301548084166080840152600160401b8104841660a0840152600160801b8104841660c0840152600160c01b900490921660e090910152909150815160058111156123aa576123aa613f09565b146124065760405162461bcd60e51b815260206004820152602660248201527f56616c696461746f724d616e616765723a2076616c696461746f72206e6f742060448201526561637469766560d01b6064820152608401610447565b60408101516001600160a01b0316336001600160a01b0316146124805760405162461bcd60e51b815260206004820152602c60248201527f56616c696461746f724d616e616765723a2073656e646572206e6f742076616c60448201526b34b230ba37b91037bbb732b960a11b6064820152608401610447565b61248d8160a00151613255565b60038152426001600160401b031660e08201525f83815260078301602052604090208151815483929190829060ff191660018360058111156124d1576124d1613f09565b021790555060208201516001820155604082015160028201805460608501516001600160401b03908116600160a01b026001600160e01b03199092166001600160a01b039094169390931717905560808301516003909201805460a085015160c086015160e0909601518416600160c01b026001600160c01b03968516600160801b02969096166001600160801b03918516600160401b026001600160801b031990931695909416949094171792909216179190911790555f61259d8461259781611756565b5f611923565b5f85815260068501602052604090209091506125b98282613fdb565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb906125e69085906004016140bc565b6020604051808303815f875af1158015612602573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061262691906140ee565b60a0840151604080516001600160401b039092168252426020830152919250829187917f13d58394cf269d48bcf927959a29a5ffee7c9924dafff8927ecdf3c48ffa7c67910160405180910390a35050505050565b5f5f8051602061459083398151915281612694846133f6565b90505f6126a082610a17565b83549091506001600160401b038216108015906126ca57508260010154816001600160401b031611155b6110735760405162461bcd60e51b815260206004820152602960248201527f506f5356616c696461746f724d616e616765723a20696e76616c6964207374616044820152681ad948185b5bdd5b9d60ba1b6064820152608401610447565b5f61273161342c565b5f805160206145d0833981519152426001600160401b03851611801561276b57506001600160401b038416612769426202a3006143c8565b115b6127cd5760405162461bcd60e51b815260206004820152602d60248201527f56616c696461746f724d616e616765723a20696e76616c69642072656769737460448201526c726174696f6e2065787069727960981b6064820152608401610447565b856128245760405162461bcd60e51b815260206004820152602160248201527f56616c696461746f724d616e616765723a20696e76616c6964206e6f646520496044820152601160fa1b6064820152608401610447565b5f868152600882016020526040902054156128925760405162461bcd60e51b815260206004820152602860248201527f56616c696461746f724d616e616765723a206e6f646520494420616c72656164604482015267792061637469766560c01b6064820152608401610447565b82516030146128f95760405162461bcd60e51b815260206004820152602d60248201527f56616c696461746f724d616e616765723a20696e76616c696420626c7350756260448201526c0d8d2c696caf240d8cadccee8d609b1b6064820152608401610447565b61290285613255565b5f806129496040518060a00160405280856001015481526020018a8152602001896001600160401b03168152602001886001600160401b0316815260200187815250613463565b5f828152600586016020526040902091935091506129678282613fdb565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb906129949085906004016140bc565b6020604051808303815f875af11580156129b0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129d491906140ee565b604080516101008101825260018152602081018c90529192508101336001600160a01b031681526001600160401b038a1660208083018290525f604080850182905260608501939093526080840181905260a0909301839052868352600788019052902081518154829060ff19166001836005811115612a5657612a56613f09565b021790555060208201516001820155604082015160028201805460608501516001600160401b03908116600160a01b026001600160e01b03199092166001600160a01b039094169390931717905560808301516003909201805460a085015160c086015160e0909601518416600160c01b026001600160c01b03968516600160801b02969096166001600160801b03918516600160401b026001600160801b03199093169590941694909417179290921617919091179055612b1783611756565b50604080516001600160401b03808b1682528916602082015282918b9186917f79b81620b81daf2c08cd5bb3dbb79e75d2d7a87f52171fde5aadc8c47823026e910160405180910390a450909250505061107360015f805160206145f083398151915255565b5f612b8661342c565b5f612b936101c2846133f6565b90505f805160206145908339815191525f612bad876117ca565b9050600281516005811115612bc457612bc4613f09565b14612c235760405162461bcd60e51b815260206004820152602960248201527f506f5356616c696461746f724d616e616765723a2076616c696461746f72206e6044820152686f742061637469766560b81b6064820152608401610447565b5f838260a00151612c3491906144ae565b9050612c4088826118db565b5f612c4a89611756565b90505f898983604051602001612c929392919092835260609190911b6bffffffffffffffffffffffff1916602083015260c01b6001600160c01b0319166034820152603c0190565b604051602081830303815290604052805190602001209050612cb386613255565b5f612cbf8b8486611923565b5f8381526004880160205260409020909150612cdb8282613fdb565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb90612d089085906004016140bc565b6020604051808303815f875af1158015612d24573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d4891906140ee565b60408051610100810190915290915080600181526020018c6001600160a01b031681526020018d8152602001896001600160401b031681526020015f6001600160401b031681526020015f6001600160401b03168152602001856001600160401b031681526020015f6001600160401b0316815250876003015f8581526020019081526020015f205f820151815f015f6101000a81548160ff02191690836004811115612df757612df7613f09565b02179055506020828101518254610100600160a81b0319166101006001600160a01b039283160217835560408085015160018501556060808601516002860180546080808a015160a08b015160c08c01516001600160401b039687166001600160801b031990951694909417600160401b92871692909202919091176001600160801b0316600160801b918616919091026001600160c01b031617600160c01b928516929092029190911790915560e0909701516003909601805467ffffffffffffffff19169682169690961790955581518a861681528b861694810194909452938d1690830152918101849052908d16918e9186917fb0024b263bc3a0b728a6edea50a69efa841189f8d32ee8af9d1c2b1a1a223426910160405180910390a45090965050505050505061122760015f805160206145f083398151915255565b5f808251602e14612f5b5760405162461bcd60e51b8152600401610447906143db565b5f805b6002811015612faa57612f728160016143a1565b612f7d906008614241565b61ffff16858281518110612f9357612f936143b4565b016020015160f81c901b9190911790600101612f5e565b5061ffff811615612fcd5760405162461bcd60e51b815260040161044790614424565b5f805b600481101561302857612fe48160036143a1565b612fef906008614241565b63ffffffff16866130018360026143c8565b81518110613011576130116143b4565b016020015160f81c901b9190911790600101612fd0565b5063ffffffff811660041461304f5760405162461bcd60e51b815260040161044790614467565b5f805b60208110156130a45761306681601f6143a1565b613071906008614241565b8761307d8360066143c8565b8151811061308d5761308d6143b4565b016020015160f81c901b9190911790600101613052565b505f805b6008811015613103576130bc8160076143a1565b6130c7906008614241565b6001600160401b0316886130dc8360266143c8565b815181106130ec576130ec6143b4565b016020015160f81c901b91909117906001016130a8565b5090969095509350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661315957604051631afcd79f60e31b815260040160405180910390fd5b565b613163613110565b61316c8161381b565b61319e6060820135608083013561318960c0850160a08601613da2565b61319960e0860160c087016144ce565b61383c565b50565b6131a9613110565b7f6e5bdfcce15e53c3406ea67bfce37dcd26f5152d5492824e43fd5e3c8ac5ab006001600160a01b0382166132355760405162461bcd60e51b815260206004820152602c60248201527f4552433230546f6b656e5374616b696e674d616e616765723a207a65726f207460448201526b6f6b656e206164647265737360a01b6064820152608401610447565b80546001600160a01b0319166001600160a01b0392909216919091179055565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb02545f805160206145d08339815191529060ff165f03613293575050565b60408051606081018252600383015480825260048401546001600160401b038082166020850152600160401b9091041692820192909252904290610e10906132db90836143a1565b106132f7576001600160401b0384166040830152808252613316565b838260400181815161330991906144ae565b6001600160401b03169052505b5f82602001518360400151606461332d91906144e9565b6133379190614514565b600285015490915060ff90811690821611156133b25760405162461bcd60e51b815260206004820152603460248201527f56616c696461746f724d616e616765723a206d6178696d756d20686f75726c796044820152730818da1d5c9b881c985d1948195e18d95959195960621b6064820152608401610447565b5050805160038301556020810151600490920180546040909201516001600160401b03908116600160401b026001600160801b031990931693169290921717905550565b5f610a27827f6e5bdfcce15e53c3406ea67bfce37dcd26f5152d5492824e43fd5e3c8ac5ab00546001600160a01b031690613897565b5f805160206145f083398151915280546001190161345d57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f60608260800151516030146134cd5760405162461bcd60e51b815260206004820152602960248201527f5374616b696e674d657373616765733a20696e76616c6964207369676e6174756044820152680e4ca40d8cadccee8d60bb1b6064820152608401610447565b60408051608680825260c082019092525f916020820181803683370190505090505f5b6002811015613544576135048160016143a1565b61350f906008614241565b5081515f90839083908110613526576135266143b4565b60200101906001600160f81b03191690815f1a9053506001016134f0565b505f5b60048110156135a25761355b8160036143a1565b613566906008614241565b505f826135748360026143c8565b81518110613584576135846143b4565b60200101906001600160f81b03191690815f1a905350600101613547565b505f5b60208110156135ff57845181602081106135c1576135c16143b4565b1a60f81b826135d18360066143c8565b815181106135e1576135e16143b4565b60200101906001600160f81b03191690815f1a9053506001016135a5565b505f5b602081101561365f5784602001518160208110613621576136216143b4565b1a60f81b826136318360266143c8565b81518110613641576136416143b4565b60200101906001600160f81b03191690815f1a905350600101613602565b505f5b60088110156136d3576136768160076143a1565b613681906008614241565b60ff1685604001516001600160401b0316901c60f81b828260466136a591906143c8565b815181106136b5576136b56143b4565b60200101906001600160f81b03191690815f1a905350600101613662565b505f5b603081101561373e57846080015181815181106136f5576136f56143b4565b01602001516001600160f81b0319168261371083604e6143c8565b81518110613720576137206143b4565b60200101906001600160f81b03191690815f1a9053506001016136d6565b505f5b60088110156137b0576137558160076143a1565b613760906008614241565b60608601516001600160401b0390811691161c60f81b8261378283607e6143c8565b81518110613792576137926143b4565b60200101906001600160f81b03191690815f1a905350600101613741565b506002816040516137c19190614539565b602060405180830381855afa1580156137dc573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906137ff91906140ee565b94909350915050565b60015f805160206145f083398151915255565b613823613110565b61382b6139f9565b613833613a09565b61319e81613a11565b613844613110565b5f5f80516020614590833981519152948555506001840192909255600290920180546001600160a01b03909216600160401b026001600160e01b03199092166001600160401b0390931692909217179055565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa1580156138dd573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061390191906140ee565b90506139186001600160a01b038516333086613a7d565b6040516370a0823160e01b81523060048201525f906001600160a01b038616906370a0823190602401602060405180830381865afa15801561395c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061398091906140ee565b90508181116139e65760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b6064820152608401610447565b6139f082826143a1565b95945050505050565b613a01613110565b613159613add565b613159613110565b613a19613110565b80355f805160206145d083398151915290815560208201357fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb0155613a636060830160408401614554565b600291909101805460ff191660ff90921691909117905550565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052613ad7908590613ae5565b50505050565b613808613110565b5f613af96001600160a01b03841683613b46565b905080515f14158015613b1d575080806020019051810190613b1b9190614574565b155b156108c157604051635274afe760e01b81526001600160a01b0384166004820152602401610447565b606061122783835f845f80856001600160a01b03168486604051613b6a9190614539565b5f6040518083038185875af1925050503d805f8114613ba4576040519150601f19603f3d011682016040523d82523d5f602084013e613ba9565b606091505b509150915061174c868383606082613bc957613bc482613c10565b611227565b8151158015613be057506001600160a01b0384163b155b15613c0957604051639996b31560e01b81526001600160a01b0385166004820152602401610447565b5080611227565b805115613c205780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b508054613c4590613f58565b5f825580601f10613c54575050565b601f0160209004905f5260205f209081019061319e91905b80821115613c7f575f8155600101613c6c565b5090565b801515811461319e575f80fd5b803563ffffffff81168114613ca3575f80fd5b919050565b5f805f60608486031215613cba575f80fd5b833592506020840135613ccc81613c83565b9150613cda60408501613c90565b90509250925092565b5f60208284031215613cf3575f80fd5b5035919050565b6001600160a01b038116811461319e575f80fd5b5f80828403610100811215613d21575f80fd5b60e0811215613d2e575f80fd5b5082915060e0830135613d4081613cfa565b809150509250929050565b5f60208284031215613d5b575f80fd5b61122782613c90565b5f8060408385031215613d75575f80fd5b613d7e83613c90565b946020939093013593505050565b80356001600160401b0381168114613ca3575f80fd5b5f60208284031215613db2575f80fd5b61122782613d8c565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b0381118282101715613df157613df1613dbb565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613e1f57613e1f613dbb565b604052919050565b5f6001600160401b03821115613e3f57613e3f613dbb565b50601f01601f191660200190565b5f805f8060808587031215613e60575f80fd5b8435935060208501359250613e7760408601613d8c565b915060608501356001600160401b03811115613e91575f80fd5b8501601f81018713613ea1575f80fd5b8035613eb4613eaf82613e27565b613df7565b818152886020838501011115613ec8575f80fd5b816020840160208301375f6020838301015280935050505092959194509250565b5f8060408385031215613efa575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52602160045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b6001600160401b03828116828216039080821115613f5157613f51613f1d565b5092915050565b600181811c90821680613f6c57607f821691505b602082108103613f8a57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156108c157805f5260205f20601f840160051c81016020851015613fb55750805b601f840160051c820191505b81811015613fd4575f8155600101613fc1565b5050505050565b81516001600160401b03811115613ff457613ff4613dbb565b614008816140028454613f58565b84613f90565b602080601f83116001811461403b575f84156140245750858301515b5f19600386901b1c1916600185901b178555614092565b5f85815260208120601f198616915b828110156140695788860151825594840194600190910190840161404a565b508582101561408657878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f5b838110156140b457818101518382015260200161409c565b50505f910152565b602081525f82518060208401526140da81604085016020870161409a565b601f01601f19169190910160400192915050565b5f602082840312156140fe575f80fd5b5051919050565b5f60208083525f845461411781613f58565b806020870152604060018084165f8114614138576001811461415457614181565b60ff19851660408a0152604084151560051b8a01019550614181565b895f5260205f205f5b858110156141785781548b820186015290830190880161415d565b8a016040019650505b509398975050505050505050565b634e487b7160e01b5f52601260045260245ffd5b5f826141b1576141b161418f565b500490565b60208082526022908201527f506f5356616c696461746f724d616e616765723a20696e76616c6964206e6f6e604082015261636560f01b606082015260800190565b60208082526029908201527f506f5356616c696461746f724d616e616765723a206e6f6e636520646f6573206040820152680dcdee840dac2e8c6d60bb1b606082015260800190565b8082028115828204841417610a2757610a27613f1d565b60208082526027908201527f56616c696461746f724d616e616765723a20696e76616c69642076616c6964616040820152661d1a5bdb88125160ca1b606082015260800190565b8051613ca381613c83565b5f80604083850312156142bb575f80fd5b82516001600160401b03808211156142d1575f80fd5b90840190606082870312156142e4575f80fd5b6142ec613dcf565b825181526020808401516142ff81613cfa565b82820152604084015183811115614314575f80fd5b80850194505087601f850112614328575f80fd5b83519250614338613eaf84613e27565b838152888285870101111561434b575f80fd5b61435a8483830184880161409a565b8060408401525081955061436f81880161429f565b9450505050509250929050565b5f6001600160401b0380831681810361439757614397613f1d565b6001019392505050565b81810381811115610a2757610a27613f1d565b634e487b7160e01b5f52603260045260245ffd5b80820180821115610a2757610a27613f1d565b60208082526029908201527f56616c696461746f724d657373616765733a20696e76616c6964206d657373616040820152680ceca40d8cadccee8d60bb1b606082015260800190565b60208082526023908201527f56616c696461746f724d657373616765733a20696e76616c696420636f64656360408201526208125160ea1b606082015260800190565b60208082526027908201527f56616c696461746f724d657373616765733a20696e76616c6964206d657373616040820152666765207479706560c81b606082015260800190565b6001600160401b03818116838216019080821115613f5157613f51613f1d565b5f602082840312156144de575f80fd5b813561122781613cfa565b6001600160401b0381811683821602808216919082811461450c5761450c613f1d565b505092915050565b5f6001600160401b038084168061452d5761452d61418f565b92169190910492915050565b5f825161454a81846020870161409a565b9190910192915050565b5f60208284031215614564575f80fd5b813560ff81168114611227575f80fd5b5f60208284031215614584575f80fd5b815161122781613c8356fe4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d00506f5356616c696461746f724d616e616765723a2064656c65676174696f6e20e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb07a164736f6c6343000819000a", + Bin: "0x608060405234801561000f575f80fd5b5060405161478038038061478083398101604081905261002e91610107565b60018160018111156100425761004261012c565b0361004f5761004f610055565b50610140565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a55760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101045780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610117575f80fd5b815160028110610125575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b6146338061014d5f395ff3fe608060405234801561000f575f80fd5b5060043610610111575f3560e01c806366435abf1161009e57806398f3e2b41161006e57806398f3e2b4146102645780639e1bc4ef14610277578063a3a65e481461028a578063b771b3bc1461029d578063bee0a03f146102c3575f80fd5b806366435abf146102185780636d0e43fa1461022b57806376f786211461023e578063872fda6414610251575f80fd5b806327f39ca8116100e457806327f39ca8146101a15780632e2194d8146101b4578063467ef06f146101df5780635297fae6146101f25780636206585614610205575f80fd5b80630118acc4146101155780630322ed981461012a5780630cdd09851461013d578063162f1f611461018e575b5f80fd5b610128610123366004613c9f565b6102d6565b005b610128610138366004613cda565b610761565b61017b61014b366004613cda565b5f9081527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb08602052604090205490565b6040519081526020015b60405180910390f35b61012861019c366004613cda565b6108bd565b6101286101af366004613d05565b61092a565b6101c76101c2366004613cda565b610a0e565b6040516001600160401b039091168152602001610185565b6101286101ed366004613d42565b610a24565b610128610200366004613d5b565b610da7565b61017b610213366004613d99565b610f98565b6101c7610226366004613cda565b610fb1565b610128610239366004613cda565b610fc5565b61012861024c366004613c9f565b611032565b61017b61025f366004613e44565b61104d565b610128610272366004613d5b565b611072565b61017b610285366004613ee0565b611212565b610128610298366004613d42565b611225565b6102ab6005600160991b0181565b6040516001600160a01b039091168152602001610185565b6101286102d1366004613cda565b6113e2565b5f8381527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d0360205260408120600101545f805160206145878339815191529184156103285761032582856114b1565b90505b5f868152600384016020526040808220815161010081019092528054829060ff16600481111561035a5761035a613f00565b600481111561036b5761036b613f00565b8152815461010090046001600160a01b03166020820152600182015460408201526002808301546001600160401b038082166060850152600160401b820481166080850152600160801b8204811660a0850152600160c01b909104811660c084015260039093015490921660e090910152909150815160048111156103f2576103f2613f00565b146104445760405162461bcd60e51b815260206004820152602a60248201525f805160206145a78339815191526044820152696e6f742061637469766560b01b60648201526084015b60405180910390fd5b60208101516001600160a01b031633146104a95760405162461bcd60e51b815260206004820152603360248201525f805160206145a78339815191526044820152723737ba1037bbb732b210313c9039b2b73232b960691b606482015260840161043b565b5f6104b38461174d565b60038084526001600160401b0342811660a0860152821660e08501525f8a815290870160205260409020835181549293508492829060ff1916600183600481111561050057610500613f00565b021790555060208201518154610100600160a81b0319166101006001600160a01b0390921691909102178155604082015160018201556060820151600282018054608085015160a086015160c08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560e0909201516003909101805467ffffffffffffffff1916919092161790555f6105d2856117c1565b905082606001516001600160401b03168160a001516001600160401b0316116106495760405162461bcd60e51b815260206004820152602360248201527f506f5356616c696461746f724d616e616765723a20496e76616c69642077656960448201526219da1d60ea1b606482015260840161043b565b5f83606001518260a0015161065e9190613f28565b905061066a86826118d2565b5f61067687858461191a565b5f8c815260058a01602052604090209091506106928282613fd2565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb906106bf9085906004016140b3565b6020604051808303815f875af11580156106db573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106ff91906140e5565b604080516001600160401b03868116825242602083015291810183905291925086169089908e907f5318ab4d7cdf77056db2db5b539a08fe7d1a63d6885ecee8236a0dbda2843b4e9060600160405180910390a4505050505050505050505050565b5f8181527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb066020526040812080545f805160206145c78339815191529291906107a990613f4f565b90501180156107db575060035f83815260078301602052604090205460ff1660058111156107d9576107d9613f00565b145b61083f5760405162461bcd60e51b815260206004820152602f60248201527f56616c696461746f724d616e616765723a2056616c696461746f72206e6f742060448201526e1c195b991a5b99c81c995b5bdd985b608a1b606482015260840161043b565b5f82815260068201602052604090819020905163ee5b48eb60e01b81526005600160991b019163ee5b48eb9161087891906004016140fc565b6020604051808303815f875af1158015610894573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b891906140e5565b505050565b6108c681611b37565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d05602052604090819020905163ee5b48eb60e01b81525f80516020614587833981519152916005600160991b019163ee5b48eb91610878916004016140fc565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460029190600160401b900460ff1680610973575080546001600160401b03808416911610155b156109915760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b1781556109bc8484611c0a565b805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050565b5f610a1e64e8d4a510008361419a565b92915050565b5f805160206145c78339815191525f610a3c83611c24565b90505f80610a4d8360400151611e05565b915091508015610ab25760405162461bcd60e51b815260206004820152602a60248201527f56616c696461746f724d616e616765723a20726567697374726174696f6e20736044820152691d1a5b1b081d985b1a5960b21b606482015260840161043b565b5f828152600785016020526040808220815161010081019092528054829060ff166005811115610ae457610ae4613f00565b6005811115610af557610af5613f00565b81526001820154602082015260028201546001600160a01b03811660408301526001600160401b03600160a01b909104811660608301526003928301548082166080840152600160401b8104821660a0840152600160801b8104821660c0840152600160c01b90041660e0909101529091505f9082516005811115610b7c57610b7c613f00565b1480610b9a5750600182516005811115610b9857610b98613f00565b145b610bf95760405162461bcd60e51b815260206004820152602a60248201527f56616c696461746f724d616e616765723a20696e76616c69642076616c696461604482015269746f722073746174757360b01b606482015260840161043b565b600382516005811115610c0e57610c0e613f00565b03610c3557505f8381526006860160205260408120600491610c309190613c30565b610c39565b5060055b6020808301515f90815260088801909152604081205581816005811115610c6257610c62613f00565b90816005811115610c7557610c75613f00565b9052505f84815260078701602052604090208251815484929190829060ff19166001836005811115610ca957610ca9613f00565b021790555060208201516001820155604082015160028201805460608501516001600160401b03908116600160a01b026001600160e01b03199092166001600160a01b039094169390931717905560808301516003909201805460a085015160c086015160e0909601518416600160c01b026001600160c01b03968516600160801b02969096166001600160801b03918516600160401b026001600160801b0319909316959094169490941717929092161791909117905581516005811115610d7457610d74613f00565b60405185907f1c08e59656f1a18dc2da76826cdc52805c43e897a17c50faefb8ab3c1526cc16905f90a350505050505050565b5f805160206145878339815191525f610dbf84611c24565b90505f80610dd08360400151611fa6565b5091509150610dde856121e1565b5f8581526004850160205260408120610df691613c30565b5f610e00836117c1565b9050816001600160401b031681608001516001600160401b03161015610e385760405162461bcd60e51b815260040161043b906141ad565b5f8681526003860160205260409020600201546001600160401b03808416600160c01b909204161115610e7d5760405162461bcd60e51b815260040161043b906141ef565b60015f87815260038701602052604090205460ff166004811115610ea357610ea3613f00565b14610f0c5760405162461bcd60e51b815260206004820152603360248201527f506f5356616c696461746f724d616e616765723a2064656c65676174696f6e4960448201527211081b9bdd081c195b991a5b99c81859191959606a1b606482015260840161043b565b5f868152600386016020908152604091829020805460ff1916600290811782550180546001600160401b0342818116600160401b0267ffffffffffffffff60401b19909316929092179092559251928352841691859189917f245fc69b36e168426e0306fc8d8300661b9af297c7958820dbf804f9f63e7064910160405180910390a450505050505050565b5f610a1e6001600160401b03831664e8d4a51000614238565b5f610fbb826117c1565b60a0015192915050565b610fce816121e1565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d04602052604090819020905163ee5b48eb60e01b81525f80516020614587833981519152916005600160991b019163ee5b48eb91610878916004016140fc565b81156110445761104283826114b1565b505b6108b8836122ba565b5f8061105886612672565b90506110668582868661271f565b9150505b949350505050565b5f805160206145878339815191525f61108a84611c24565b90505f8061109b8360400151611fa6565b50915091506110a985611b37565b5f85815260058501602052604081206110c191613c30565b5f6110cb836117c1565b9050816001600160401b031681608001516001600160401b031610156111035760405162461bcd60e51b815260040161043b906141ad565b5f8681526003808701602052604090912001546001600160401b03808416911611156111415760405162461bcd60e51b815260040161043b906141ef565b60035f87815260038701602052604090205460ff16600481111561116757611167613f00565b146111bb5760405162461bcd60e51b815260206004820152603160248201525f805160206145a78339815191526044820152701b9bdd081c195b991a5b99c81859191959607a1b606482015260840161043b565b5f868152600386016020526040808220805460ff19166004179055516001600160401b03841691859189917f52e9b1eaef84d46cda83ccb9d427267bc4d04f756b4a32c8302722b79e5c65ab91a450505050505050565b5f61121e833384612b74565b9392505050565b5f805160206145c78339815191525f61123d83611c24565b90505f8061124e8360400151611e05565b91509150806112b05760405162461bcd60e51b815260206004820152602860248201527f56616c696461746f724d616e616765723a20526567697374726174696f6e206e6044820152671bdd081d985b1a5960c21b606482015260840161043b565b5f828152600585016020526040812080546112ca90613f4f565b90501180156112fc575060015f83815260078601602052604090205460ff1660058111156112fa576112fa613f00565b145b6113185760405162461bcd60e51b815260040161043b9061424f565b5f828152600585016020526040812061133091613c30565b5f8281526007850160208181526040808420805460ff191660021781556003810180546001600160401b0342818116600160801b0267ffffffffffffffff60801b19909316929092178355600190930154875260088b0185528387208990559588905293835292548151600160401b90910490931683529082019290925283917ff8fd1c90fb9cfa2ca2358fdf5806b086ad43315d92b221c929efc7f105ce7568910160405180910390a25050505050565b5f8181527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb056020526040812080545f805160206145c783398151915292919061142a90613f4f565b905011801561145c575060015f83815260078301602052604090205460ff16600581111561145a5761145a613f00565b145b6114785760405162461bcd60e51b815260040161043b9061424f565b5f82815260058201602052604090819020905163ee5b48eb60e01b81526005600160991b019163ee5b48eb9161087891906004016140fc565b6040516306f8253560e41b815263ffffffff821660048201525f90819081906005600160991b0190636f825350906024015f60405180830381865afa1580156114fc573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261152391908101906142a1565b91509150806115865760405162461bcd60e51b815260206004820152602960248201527f506f5356616c696461746f724d616e616765723a20696e76616c69642077617260448201526870206d65737361676560b81b606482015260840161043b565b6005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115c9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115ed91906140e5565b8251146116515760405162461bcd60e51b815260206004820152602c60248201527f506f5356616c696461746f724d616e616765723a20696e76616c696420736f7560448201526b1c98d94818da185a5b88125160a21b606482015260840161043b565b60208201516001600160a01b0316156116c75760405162461bcd60e51b815260206004820152603260248201527f506f5356616c696461746f724d616e616765723a20696e76616c6964206f726960448201527167696e2073656e646572206164647265737360701b606482015260840161043b565b5f806116d68460400151612f2f565b915091508187146117435760405162461bcd60e51b815260206004820152603160248201527f506f5356616c696461746f724d616e616765723a20696e76616c6964207570746044820152701a5b59481d985b1a59185d1a5bdb881251607a1b606482015260840161043b565b9695505050505050565b5f8181525f805160206146078339815191526020526040812060030180545f805160206145c7833981519152916001600160401b039091169081908461179283614373565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550508092505050919050565b6040805161010080820183525f8083526020808401829052838501829052606084018290526080840182905260a0840182905260c0840182905260e084018290528582525f8051602061460783398151915290528390208351918201909352825491925f805160206145c783398151915292829060ff16600581111561184957611849613f00565b600581111561185a5761185a613f00565b81526001820154602082015260028201546001600160a01b03811660408301526001600160401b03600160a01b909104811660608301526003909201548083166080830152600160401b8104831660a0830152600160801b8104831660c0830152600160c01b900490911660e0909101529392505050565b5f9182525f80516020614607833981519152602052604090912060030180546001600160401b03909216600160401b0267ffffffffffffffff60401b19909216919091179055565b60408051603680825260608281019093525f91906020820181803683370190505090505f5b600281101561199357611953816001614398565b61195e906008614238565b5081515f90839083908110611975576119756143ab565b60200101906001600160f81b03191690815f1a90535060010161193f565b505f5b60048110156119f6576119aa816003614398565b6119b5906008614238565b6001901c60f81b826119c88360026143bf565b815181106119d8576119d86143ab565b60200101906001600160f81b03191690815f1a905350600101611996565b505f5b6020811015611a5857611a0d81601f614398565b611a18906008614238565b86901c60f81b82611a2a8360066143bf565b81518110611a3a57611a3a6143ab565b60200101906001600160f81b03191690815f1a9053506001016119f9565b505f5b6008811015611ac357611a6f816007614398565b611a7a906008614238565b6001600160401b038616901c60f81b82611a958360266143bf565b81518110611aa557611aa56143ab565b60200101906001600160f81b03191690815f1a905350600101611a5b565b505f5b6008811015611b2e57611ada816007614398565b611ae5906008614238565b6001600160401b038516901c60f81b82611b0083602e6143bf565b81518110611b1057611b106143ab565b60200101906001600160f81b03191690815f1a905350600101611ac6565b50949350505050565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d056020526040812080545f80516020614587833981519152929190611b7f90613f4f565b9050118015611bb1575060035f83815260038301602052604090205460ff166004811115611baf57611baf613f00565b145b611c065760405162461bcd60e51b815260206004820152603360248201525f805160206145a783398151915260448201527272656d6f76616c206e6f742070656e64696e6760681b606482015260840161043b565b5050565b611c12613107565b611c1b82613152565b611c0681613198565b60408051606080820183525f8083526020830181905292820152905f805160206145c78339815191526040516306f8253560e41b815263ffffffff851660048201529091505f9081906005600160991b0190636f825350906024015f60405180830381865afa158015611c99573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611cc091908101906142a1565b9150915080611d275760405162461bcd60e51b815260206004820152602d60248201527f56616c696461746f724d616e616765723a20496e76696e76616c6964616c696460448201526c2077617270206d65737361676560981b606482015260840161043b565b8254825114611d8a5760405162461bcd60e51b815260206004820152602960248201527f56616c696461746f724d616e616765723a20696e76616c696420736f757263656044820152680818da185a5b88125160ba1b606482015260840161043b565b60208201516001600160a01b031615611dfd5760405162461bcd60e51b815260206004820152602f60248201527f56616c696461746f724d616e616765723a20696e76616c6964206f726967696e60448201526e2073656e646572206164647265737360881b606482015260840161043b565b509392505050565b5f808251602714611e285760405162461bcd60e51b815260040161043b906143d2565b5f805b6002811015611e7757611e3f816001614398565b611e4a906008614238565b61ffff16858281518110611e6057611e606143ab565b016020015160f81c901b9190911790600101611e2b565b5061ffff811615611e9a5760405162461bcd60e51b815260040161043b9061441b565b5f805b6004811015611ef557611eb1816003614398565b611ebc906008614238565b63ffffffff1686611ece8360026143bf565b81518110611ede57611ede6143ab565b016020015160f81c901b9190911790600101611e9d565b5063ffffffff8116600214611f1c5760405162461bcd60e51b815260040161043b9061445e565b5f805b6020811015611f7157611f3381601f614398565b611f3e906008614238565b87611f4a8360066143bf565b81518110611f5a57611f5a6143ab565b016020015160f81c901b9190911790600101611f1f565b505f86602681518110611f8657611f866143ab565b016020015191976001600160f81b03199092161515965090945050505050565b5f805f8351603614611fca5760405162461bcd60e51b815260040161043b906143d2565b5f805b600281101561201957611fe1816001614398565b611fec906008614238565b61ffff16868281518110612002576120026143ab565b016020015160f81c901b9190911790600101611fcd565b5061ffff81161561203c5760405162461bcd60e51b815260040161043b9061441b565b5f805b600481101561209757612053816003614398565b61205e906008614238565b63ffffffff16876120708360026143bf565b81518110612080576120806143ab565b016020015160f81c901b919091179060010161203f565b5063ffffffff81166003146120be5760405162461bcd60e51b815260040161043b9061445e565b5f805b6020811015612113576120d581601f614398565b6120e0906008614238565b886120ec8360066143bf565b815181106120fc576120fc6143ab565b016020015160f81c901b91909117906001016120c1565b505f805b60088110156121725761212b816007614398565b612136906008614238565b6001600160401b03168961214b8360266143bf565b8151811061215b5761215b6143ab565b016020015160f81c901b9190911790600101612117565b505f805b60088110156121d15761218a816007614398565b612195906008614238565b6001600160401b03168a6121aa83602e6143bf565b815181106121ba576121ba6143ab565b016020015160f81c901b9190911790600101612176565b5091989097509095509350505050565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d046020526040812080545f8051602061458783398151915292919061222990613f4f565b905011801561225b575060015f83815260038301602052604090205460ff16600481111561225957612259613f00565b145b611c065760405162461bcd60e51b815260206004820152603860248201525f805160206145a783398151915260448201527f726567697374726174696f6e206e6f742070656e64696e670000000000000000606482015260840161043b565b5f8181525f8051602061460783398151915260205260408082208151610100810190925280545f805160206145c783398151915293929190829060ff16600581111561230857612308613f00565b600581111561231957612319613f00565b8152600182015460208201526002808301546001600160a01b03811660408401526001600160401b03600160a01b909104811660608401526003909301548084166080840152600160401b8104841660a0840152600160801b8104841660c0840152600160c01b900490921660e090910152909150815160058111156123a1576123a1613f00565b146123fd5760405162461bcd60e51b815260206004820152602660248201527f56616c696461746f724d616e616765723a2076616c696461746f72206e6f742060448201526561637469766560d01b606482015260840161043b565b60408101516001600160a01b0316336001600160a01b0316146124775760405162461bcd60e51b815260206004820152602c60248201527f56616c696461746f724d616e616765723a2073656e646572206e6f742076616c60448201526b34b230ba37b91037bbb732b960a11b606482015260840161043b565b6124848160a0015161324c565b60038152426001600160401b031660e08201525f83815260078301602052604090208151815483929190829060ff191660018360058111156124c8576124c8613f00565b021790555060208201516001820155604082015160028201805460608501516001600160401b03908116600160a01b026001600160e01b03199092166001600160a01b039094169390931717905560808301516003909201805460a085015160c086015160e0909601518416600160c01b026001600160c01b03968516600160801b02969096166001600160801b03918516600160401b026001600160801b031990931695909416949094171792909216179190911790555f6125948461258e8161174d565b5f61191a565b5f85815260068501602052604090209091506125b08282613fd2565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb906125dd9085906004016140b3565b6020604051808303815f875af11580156125f9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061261d91906140e5565b60a0840151604080516001600160401b039092168252426020830152919250829187917f13d58394cf269d48bcf927959a29a5ffee7c9924dafff8927ecdf3c48ffa7c67910160405180910390a35050505050565b5f5f805160206145878339815191528161268b846133ed565b90505f61269782610a0e565b83549091506001600160401b038216108015906126c157508260010154816001600160401b031611155b61106a5760405162461bcd60e51b815260206004820152602960248201527f506f5356616c696461746f724d616e616765723a20696e76616c6964207374616044820152681ad948185b5bdd5b9d60ba1b606482015260840161043b565b5f612728613423565b5f805160206145c7833981519152426001600160401b03851611801561276257506001600160401b038416612760426202a3006143bf565b115b6127c45760405162461bcd60e51b815260206004820152602d60248201527f56616c696461746f724d616e616765723a20696e76616c69642072656769737460448201526c726174696f6e2065787069727960981b606482015260840161043b565b8561281b5760405162461bcd60e51b815260206004820152602160248201527f56616c696461746f724d616e616765723a20696e76616c6964206e6f646520496044820152601160fa1b606482015260840161043b565b5f868152600882016020526040902054156128895760405162461bcd60e51b815260206004820152602860248201527f56616c696461746f724d616e616765723a206e6f646520494420616c72656164604482015267792061637469766560c01b606482015260840161043b565b82516030146128f05760405162461bcd60e51b815260206004820152602d60248201527f56616c696461746f724d616e616765723a20696e76616c696420626c7350756260448201526c0d8d2c696caf240d8cadccee8d609b1b606482015260840161043b565b6128f98561324c565b5f806129406040518060a00160405280856001015481526020018a8152602001896001600160401b03168152602001886001600160401b031681526020018781525061345a565b5f8281526005860160205260409020919350915061295e8282613fd2565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb9061298b9085906004016140b3565b6020604051808303815f875af11580156129a7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906129cb91906140e5565b604080516101008101825260018152602081018c90529192508101336001600160a01b031681526001600160401b038a1660208083018290525f604080850182905260608501939093526080840181905260a0909301839052868352600788019052902081518154829060ff19166001836005811115612a4d57612a4d613f00565b021790555060208201516001820155604082015160028201805460608501516001600160401b03908116600160a01b026001600160e01b03199092166001600160a01b039094169390931717905560808301516003909201805460a085015160c086015160e0909601518416600160c01b026001600160c01b03968516600160801b02969096166001600160801b03918516600160401b026001600160801b03199093169590941694909417179290921617919091179055612b0e8361174d565b50604080516001600160401b03808b1682528916602082015282918b9186917f79b81620b81daf2c08cd5bb3dbb79e75d2d7a87f52171fde5aadc8c47823026e910160405180910390a450909250505061106a60015f805160206145e783398151915255565b5f612b7d613423565b5f612b8a6101c2846133ed565b90505f805160206145878339815191525f612ba4876117c1565b9050600281516005811115612bbb57612bbb613f00565b14612c1a5760405162461bcd60e51b815260206004820152602960248201527f506f5356616c696461746f724d616e616765723a2076616c696461746f72206e6044820152686f742061637469766560b81b606482015260840161043b565b5f838260a00151612c2b91906144a5565b9050612c3788826118d2565b5f612c418961174d565b90505f898983604051602001612c899392919092835260609190911b6bffffffffffffffffffffffff1916602083015260c01b6001600160c01b0319166034820152603c0190565b604051602081830303815290604052805190602001209050612caa8661324c565b5f612cb68b848661191a565b5f8381526004880160205260409020909150612cd28282613fd2565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb90612cff9085906004016140b3565b6020604051808303815f875af1158015612d1b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612d3f91906140e5565b60408051610100810190915290915080600181526020018c6001600160a01b031681526020018d8152602001896001600160401b031681526020015f6001600160401b031681526020015f6001600160401b03168152602001856001600160401b031681526020015f6001600160401b0316815250876003015f8581526020019081526020015f205f820151815f015f6101000a81548160ff02191690836004811115612dee57612dee613f00565b02179055506020828101518254610100600160a81b0319166101006001600160a01b039283160217835560408085015160018501556060808601516002860180546080808a015160a08b015160c08c01516001600160401b039687166001600160801b031990951694909417600160401b92871692909202919091176001600160801b0316600160801b918616919091026001600160c01b031617600160c01b928516929092029190911790915560e0909701516003909601805467ffffffffffffffff19169682169690961790955581518a861681528b861694810194909452938d1690830152918101849052908d16918e9186917fb0024b263bc3a0b728a6edea50a69efa841189f8d32ee8af9d1c2b1a1a223426910160405180910390a45090965050505050505061121e60015f805160206145e783398151915255565b5f808251602e14612f525760405162461bcd60e51b815260040161043b906143d2565b5f805b6002811015612fa157612f69816001614398565b612f74906008614238565b61ffff16858281518110612f8a57612f8a6143ab565b016020015160f81c901b9190911790600101612f55565b5061ffff811615612fc45760405162461bcd60e51b815260040161043b9061441b565b5f805b600481101561301f57612fdb816003614398565b612fe6906008614238565b63ffffffff1686612ff88360026143bf565b81518110613008576130086143ab565b016020015160f81c901b9190911790600101612fc7565b5063ffffffff81166004146130465760405162461bcd60e51b815260040161043b9061445e565b5f805b602081101561309b5761305d81601f614398565b613068906008614238565b876130748360066143bf565b81518110613084576130846143ab565b016020015160f81c901b9190911790600101613049565b505f805b60088110156130fa576130b3816007614398565b6130be906008614238565b6001600160401b0316886130d38360266143bf565b815181106130e3576130e36143ab565b016020015160f81c901b919091179060010161309f565b5090969095509350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661315057604051631afcd79f60e31b815260040160405180910390fd5b565b61315a613107565b61316381613812565b6131956060820135608083013561318060c0850160a08601613d99565b61319060e0860160c087016144c5565b613833565b50565b6131a0613107565b7f6e5bdfcce15e53c3406ea67bfce37dcd26f5152d5492824e43fd5e3c8ac5ab006001600160a01b03821661322c5760405162461bcd60e51b815260206004820152602c60248201527f4552433230546f6b656e5374616b696e674d616e616765723a207a65726f207460448201526b6f6b656e206164647265737360a01b606482015260840161043b565b80546001600160a01b0319166001600160a01b0392909216919091179055565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb02545f805160206145c78339815191529060ff165f0361328a575050565b60408051606081018252600383015480825260048401546001600160401b038082166020850152600160401b9091041692820192909252904290610e10906132d29083614398565b106132ee576001600160401b038416604083015280825261330d565b838260400181815161330091906144a5565b6001600160401b03169052505b5f82602001518360400151606461332491906144e0565b61332e919061450b565b600285015490915060ff90811690821611156133a95760405162461bcd60e51b815260206004820152603460248201527f56616c696461746f724d616e616765723a206d6178696d756d20686f75726c796044820152730818da1d5c9b881c985d1948195e18d95959195960621b606482015260840161043b565b5050805160038301556020810151600490920180546040909201516001600160401b03908116600160401b026001600160801b031990931693169290921717905550565b5f610a1e827f6e5bdfcce15e53c3406ea67bfce37dcd26f5152d5492824e43fd5e3c8ac5ab00546001600160a01b03169061388e565b5f805160206145e783398151915280546001190161345457604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b5f60608260800151516030146134c45760405162461bcd60e51b815260206004820152602960248201527f5374616b696e674d657373616765733a20696e76616c6964207369676e6174756044820152680e4ca40d8cadccee8d60bb1b606482015260840161043b565b60408051608680825260c082019092525f916020820181803683370190505090505f5b600281101561353b576134fb816001614398565b613506906008614238565b5081515f9083908390811061351d5761351d6143ab565b60200101906001600160f81b03191690815f1a9053506001016134e7565b505f5b600481101561359957613552816003614398565b61355d906008614238565b505f8261356b8360026143bf565b8151811061357b5761357b6143ab565b60200101906001600160f81b03191690815f1a90535060010161353e565b505f5b60208110156135f657845181602081106135b8576135b86143ab565b1a60f81b826135c88360066143bf565b815181106135d8576135d86143ab565b60200101906001600160f81b03191690815f1a90535060010161359c565b505f5b60208110156136565784602001518160208110613618576136186143ab565b1a60f81b826136288360266143bf565b81518110613638576136386143ab565b60200101906001600160f81b03191690815f1a9053506001016135f9565b505f5b60088110156136ca5761366d816007614398565b613678906008614238565b60ff1685604001516001600160401b0316901c60f81b8282604661369c91906143bf565b815181106136ac576136ac6143ab565b60200101906001600160f81b03191690815f1a905350600101613659565b505f5b603081101561373557846080015181815181106136ec576136ec6143ab565b01602001516001600160f81b0319168261370783604e6143bf565b81518110613717576137176143ab565b60200101906001600160f81b03191690815f1a9053506001016136cd565b505f5b60088110156137a75761374c816007614398565b613757906008614238565b60608601516001600160401b0390811691161c60f81b8261377983607e6143bf565b81518110613789576137896143ab565b60200101906001600160f81b03191690815f1a905350600101613738565b506002816040516137b89190614530565b602060405180830381855afa1580156137d3573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906137f691906140e5565b94909350915050565b60015f805160206145e783398151915255565b61381a613107565b6138226139f0565b61382a613a00565b61319581613a08565b61383b613107565b5f5f80516020614587833981519152948555506001840192909255600290920180546001600160a01b03909216600160401b026001600160e01b03199092166001600160401b0390931692909217179055565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038516906370a0823190602401602060405180830381865afa1580156138d4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906138f891906140e5565b905061390f6001600160a01b038516333086613a74565b6040516370a0823160e01b81523060048201525f906001600160a01b038616906370a0823190602401602060405180830381865afa158015613953573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061397791906140e5565b90508181116139dd5760405162461bcd60e51b815260206004820152602c60248201527f5361666545524332305472616e7366657246726f6d3a2062616c616e6365206e60448201526b1bdd081a5b98dc99585cd95960a21b606482015260840161043b565b6139e78282614398565b95945050505050565b6139f8613107565b613150613ad4565b613150613107565b613a10613107565b80355f805160206145c783398151915290815560208201357fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb0155613a5a606083016040840161454b565b600291909101805460ff191660ff90921691909117905550565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052613ace908590613adc565b50505050565b6137ff613107565b5f613af06001600160a01b03841683613b3d565b905080515f14158015613b14575080806020019051810190613b12919061456b565b155b156108b857604051635274afe760e01b81526001600160a01b038416600482015260240161043b565b606061121e83835f845f80856001600160a01b03168486604051613b619190614530565b5f6040518083038185875af1925050503d805f8114613b9b576040519150601f19603f3d011682016040523d82523d5f602084013e613ba0565b606091505b5091509150611743868383606082613bc057613bbb82613c07565b61121e565b8151158015613bd757506001600160a01b0384163b155b15613c0057604051639996b31560e01b81526001600160a01b038516600482015260240161043b565b508061121e565b805115613c175780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b508054613c3c90613f4f565b5f825580601f10613c4b575050565b601f0160209004905f5260205f209081019061319591905b80821115613c76575f8155600101613c63565b5090565b8015158114613195575f80fd5b803563ffffffff81168114613c9a575f80fd5b919050565b5f805f60608486031215613cb1575f80fd5b833592506020840135613cc381613c7a565b9150613cd160408501613c87565b90509250925092565b5f60208284031215613cea575f80fd5b5035919050565b6001600160a01b0381168114613195575f80fd5b5f80828403610100811215613d18575f80fd5b60e0811215613d25575f80fd5b5082915060e0830135613d3781613cf1565b809150509250929050565b5f60208284031215613d52575f80fd5b61121e82613c87565b5f8060408385031215613d6c575f80fd5b613d7583613c87565b946020939093013593505050565b80356001600160401b0381168114613c9a575f80fd5b5f60208284031215613da9575f80fd5b61121e82613d83565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b0381118282101715613de857613de8613db2565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613e1657613e16613db2565b604052919050565b5f6001600160401b03821115613e3657613e36613db2565b50601f01601f191660200190565b5f805f8060808587031215613e57575f80fd5b8435935060208501359250613e6e60408601613d83565b915060608501356001600160401b03811115613e88575f80fd5b8501601f81018713613e98575f80fd5b8035613eab613ea682613e1e565b613dee565b818152886020838501011115613ebf575f80fd5b816020840160208301375f6020838301015280935050505092959194509250565b5f8060408385031215613ef1575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52602160045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b6001600160401b03828116828216039080821115613f4857613f48613f14565b5092915050565b600181811c90821680613f6357607f821691505b602082108103613f8157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156108b857805f5260205f20601f840160051c81016020851015613fac5750805b601f840160051c820191505b81811015613fcb575f8155600101613fb8565b5050505050565b81516001600160401b03811115613feb57613feb613db2565b613fff81613ff98454613f4f565b84613f87565b602080601f831160018114614032575f841561401b5750858301515b5f19600386901b1c1916600185901b178555614089565b5f85815260208120601f198616915b8281101561406057888601518255948401946001909101908401614041565b508582101561407d57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f5b838110156140ab578181015183820152602001614093565b50505f910152565b602081525f82518060208401526140d1816040850160208701614091565b601f01601f19169190910160400192915050565b5f602082840312156140f5575f80fd5b5051919050565b5f60208083525f845461410e81613f4f565b806020870152604060018084165f811461412f576001811461414b57614178565b60ff19851660408a0152604084151560051b8a01019550614178565b895f5260205f205f5b8581101561416f5781548b8201860152908301908801614154565b8a016040019650505b509398975050505050505050565b634e487b7160e01b5f52601260045260245ffd5b5f826141a8576141a8614186565b500490565b60208082526022908201527f506f5356616c696461746f724d616e616765723a20696e76616c6964206e6f6e604082015261636560f01b606082015260800190565b60208082526029908201527f506f5356616c696461746f724d616e616765723a206e6f6e636520646f6573206040820152680dcdee840dac2e8c6d60bb1b606082015260800190565b8082028115828204841417610a1e57610a1e613f14565b60208082526027908201527f56616c696461746f724d616e616765723a20696e76616c69642076616c6964616040820152661d1a5bdb88125160ca1b606082015260800190565b8051613c9a81613c7a565b5f80604083850312156142b2575f80fd5b82516001600160401b03808211156142c8575f80fd5b90840190606082870312156142db575f80fd5b6142e3613dc6565b825181526020808401516142f681613cf1565b8282015260408401518381111561430b575f80fd5b80850194505087601f85011261431f575f80fd5b8351925061432f613ea684613e1e565b8381528882858701011115614342575f80fd5b61435184838301848801614091565b80604084015250819550614366818801614296565b9450505050509250929050565b5f6001600160401b0380831681810361438e5761438e613f14565b6001019392505050565b81810381811115610a1e57610a1e613f14565b634e487b7160e01b5f52603260045260245ffd5b80820180821115610a1e57610a1e613f14565b60208082526029908201527f56616c696461746f724d657373616765733a20696e76616c6964206d657373616040820152680ceca40d8cadccee8d60bb1b606082015260800190565b60208082526023908201527f56616c696461746f724d657373616765733a20696e76616c696420636f64656360408201526208125160ea1b606082015260800190565b60208082526027908201527f56616c696461746f724d657373616765733a20696e76616c6964206d657373616040820152666765207479706560c81b606082015260800190565b6001600160401b03818116838216019080821115613f4857613f48613f14565b5f602082840312156144d5575f80fd5b813561121e81613cf1565b6001600160401b0381811683821602808216919082811461450357614503613f14565b505092915050565b5f6001600160401b038084168061452457614524614186565b92169190910492915050565b5f8251614541818460208701614091565b9190910192915050565b5f6020828403121561455b575f80fd5b813560ff8116811461121e575f80fd5b5f6020828403121561457b575f80fd5b815161121e81613c7a56fe4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d00506f5356616c696461746f724d616e616765723a2064656c65676174696f6e20e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb07a164736f6c6343000819000a", } // ERC20TokenStakingManagerABI is the input ABI used to generate the binding from. diff --git a/abi-bindings/go/staking/NativeTokenStakingManager/NativeTokenStakingManager.go b/abi-bindings/go/staking/NativeTokenStakingManager/NativeTokenStakingManager.go index dc2baffd2..511df487d 100644 --- a/abi-bindings/go/staking/NativeTokenStakingManager/NativeTokenStakingManager.go +++ b/abi-bindings/go/staking/NativeTokenStakingManager/NativeTokenStakingManager.go @@ -48,7 +48,7 @@ type ValidatorManagerSettings struct { // NativeTokenStakingManagerMetaData contains all meta data concerning the NativeTokenStakingManager contract. var NativeTokenStakingManagerMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"init\",\"type\":\"uint8\",\"internalType\":\"enumICMInitializable\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"WARP_MESSENGER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIWarpMessenger\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"activeValidators\",\"inputs\":[{\"name\":\"nodeID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"completeDelegatorRegistration\",\"inputs\":[{\"name\":\"messageIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"delegationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"completeEndDelegation\",\"inputs\":[{\"name\":\"messageIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"delegationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"completeEndValidation\",\"inputs\":[{\"name\":\"messageIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"completeValidatorRegistration\",\"inputs\":[{\"name\":\"messageIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"getWeight\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"settings\",\"type\":\"tuple\",\"internalType\":\"structPoSValidatorManagerSettings\",\"components\":[{\"name\":\"baseSettings\",\"type\":\"tuple\",\"internalType\":\"structValidatorManagerSettings\",\"components\":[{\"name\":\"pChainBlockchainID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"subnetID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"maximumHourlyChurn\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"name\":\"minimumStakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"maximumStakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minimumStakeDuration\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"rewardCalculator\",\"type\":\"address\",\"internalType\":\"contractIRewardCalculator\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initializeDelegatorRegistration\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"initializeEndDelegation\",\"inputs\":[{\"name\":\"delegationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"includeUptimeProof\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"messageIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initializeEndValidation\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"includeUptimeProof\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"messageIndex\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initializeValidatorRegistration\",\"inputs\":[{\"name\":\"nodeID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"registrationExpiry\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"blsPublicKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"resendDelegatorRegistration\",\"inputs\":[{\"name\":\"delegationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resendEndDelegation\",\"inputs\":[{\"name\":\"delegationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resendEndValidatorMessage\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"resendRegisterValidatorMessage\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"valueToWeight\",\"inputs\":[{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"weightToValue\",\"inputs\":[{\"name\":\"weight\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"pure\"},{\"type\":\"event\",\"name\":\"DelegationEnded\",\"inputs\":[{\"name\":\"delegationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"nonce\",\"type\":\"uint64\",\"indexed\":true,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegatorAdded\",\"inputs\":[{\"name\":\"delegationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"delegatorAddress\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"validatorWeight\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"delegatorWeight\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"setWeightMessageID\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegatorRegistered\",\"inputs\":[{\"name\":\"delegationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"nonce\",\"type\":\"uint64\",\"indexed\":true,\"internalType\":\"uint64\"},{\"name\":\"startTime\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"DelegatorRemovalInitialized\",\"inputs\":[{\"name\":\"delegationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"nonce\",\"type\":\"uint64\",\"indexed\":true,\"internalType\":\"uint64\"},{\"name\":\"validatorWeight\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"},{\"name\":\"endTime\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"setWeightMessageID\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidationPeriodCreated\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"nodeID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"registerValidationMessageID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"weight\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"registrationExpiry\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidationPeriodEnded\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"status\",\"type\":\"uint8\",\"indexed\":true,\"internalType\":\"enumValidatorStatus\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidationPeriodRegistered\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"weight\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ValidatorRemovalInitialized\",\"inputs\":[{\"name\":\"validationID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"setWeightMessageID\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"weight\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"endTime\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReentrancyGuardReentrantCall\",\"inputs\":[]}]", - Bin: "0x608060405234801561000f575f80fd5b506040516143b13803806143b183398101604081905261002e91610107565b60018160018111156100425761004261012c565b0361004f5761004f610055565b50610140565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a55760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101045780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610117575f80fd5b815160028110610125575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b6142648061014d5f395ff3fe608060405260043610610104575f3560e01c806366435abf11610092578063a3a65e4811610062578063a3a65e48146102f3578063b771b3bc14610312578063bee0a03f14610344578063c599e24f14610363578063f40797d714610376575f80fd5b806366435abf146102775780636d0e43fa1461029657806376f78621146102b557806398f3e2b4146102d4575f80fd5b8063162f1f61116100d8578063162f1f61146101c45780632e2194d8146101e3578063467ef06f1461021a5780635297fae6146102395780636206585614610258575f80fd5b8062e41792146101085780630118acc4146101295780630322ed98146101485780630cdd098514610167575b5f80fd5b348015610113575f80fd5b5061012761012236600461391d565b610389565b005b348015610134575f80fd5b50610127610143366004613958565b61046b565b348015610153575f80fd5b50610127610162366004613993565b6108ff565b348015610172575f80fd5b506101b1610181366004613993565b5f9081527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb08602052604090205490565b6040519081526020015b60405180910390f35b3480156101cf575f80fd5b506101276101de366004613993565b610a5b565b3480156101ee575f80fd5b506102026101fd366004613993565b610ac8565b6040516001600160401b0390911681526020016101bb565b348015610225575f80fd5b506101276102343660046139aa565b610ade565b348015610244575f80fd5b506101276102533660046139c3565b610e61565b348015610263575f80fd5b506101b1610272366004613a01565b611052565b348015610282575f80fd5b50610202610291366004613993565b61106b565b3480156102a1575f80fd5b506101276102b0366004613993565b61107f565b3480156102c0575f80fd5b506101276102cf366004613958565b6110ec565b3480156102df575f80fd5b506101276102ee3660046139c3565b611107565b3480156102fe575f80fd5b5061012761030d3660046139aa565b6112a7565b34801561031d575f80fd5b5061032c6005600160991b0181565b6040516001600160a01b0390911681526020016101bb565b34801561034f575f80fd5b5061012761035e366004613993565b611464565b6101b1610371366004613993565b611533565b6101b1610384366004613aac565b61153f565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460029190600160401b900460ff16806103d2575080546001600160401b03808416911610155b156103f05760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561041a83611563565b805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b5f8381527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d0360205260408120600101545f805160206141b88339815191529184156104bd576104ba8285611577565b90505b5f868152600384016020526040808220815161010081019092528054829060ff1660048111156104ef576104ef613b3e565b600481111561050057610500613b3e565b8152815461010090046001600160a01b031660208201526001820154604082015260028201546001600160401b038082166060840152600160401b820481166080840152600160801b8204811660a0840152600160c01b909104811660c083015260039092015490911660e0909101529050336001600160a01b031681602001516001600160a01b0316146105e55760405162461bcd60e51b815260206004820152603360248201525f805160206141d88339815191526044820152723737ba1037bbb732b210313c9039b2b73232b960691b60648201526084015b60405180910390fd5b6002815160048111156105fa576105fa613b3e565b146106475760405162461bcd60e51b815260206004820152602a60248201525f805160206141d88339815191526044820152696e6f742061637469766560b01b60648201526084016105dc565b5f61065184611813565b60038084526001600160401b0342811660a0860152821660e08501525f8a815290870160205260409020835181549293508492829060ff1916600183600481111561069e5761069e613b3e565b021790555060208201518154610100600160a81b0319166101006001600160a01b0390921691909102178155604082015160018201556060820151600282018054608085015160a086015160c08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560e0909201516003909101805467ffffffffffffffff1916919092161790555f61077085611887565b905082606001516001600160401b03168160a001516001600160401b0316116107e75760405162461bcd60e51b815260206004820152602360248201527f506f5356616c696461746f724d616e616765723a20496e76616c69642077656960448201526219da1d60ea1b60648201526084016105dc565b5f83606001518260a001516107fc9190613b66565b90506108088682611998565b5f6108148785846119e0565b5f8c815260058a01602052604090209091506108308282613c0a565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb9061085d908590600401613ceb565b6020604051808303815f875af1158015610879573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061089d9190613d1d565b604080516001600160401b03868116825242602083015291810183905291925086169089908e907f5318ab4d7cdf77056db2db5b539a08fe7d1a63d6885ecee8236a0dbda2843b4e9060600160405180910390a4505050505050505050505050565b5f8181527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb066020526040812080545f805160206141f883398151915292919061094790613b8d565b9050118015610979575060035f83815260078301602052604090205460ff16600581111561097757610977613b3e565b145b6109dd5760405162461bcd60e51b815260206004820152602f60248201527f56616c696461746f724d616e616765723a2056616c696461746f72206e6f742060448201526e1c195b991a5b99c81c995b5bdd985b608a1b60648201526084016105dc565b5f82815260068201602052604090819020905163ee5b48eb60e01b81526005600160991b019163ee5b48eb91610a169190600401613d34565b6020604051808303815f875af1158015610a32573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a569190613d1d565b505050565b610a6481611bfd565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d05602052604090819020905163ee5b48eb60e01b81525f805160206141b8833981519152916005600160991b019163ee5b48eb91610a1691600401613d34565b5f610ad864e8d4a5100083613dd2565b92915050565b5f805160206141f88339815191525f610af683611cd0565b90505f80610b078360400151611eb1565b915091508015610b6c5760405162461bcd60e51b815260206004820152602a60248201527f56616c696461746f724d616e616765723a20726567697374726174696f6e20736044820152691d1a5b1b081d985b1a5960b21b60648201526084016105dc565b5f828152600785016020526040808220815161010081019092528054829060ff166005811115610b9e57610b9e613b3e565b6005811115610baf57610baf613b3e565b81526001820154602082015260028201546001600160a01b03811660408301526001600160401b03600160a01b909104811660608301526003928301548082166080840152600160401b8104821660a0840152600160801b8104821660c0840152600160c01b90041660e0909101529091505f9082516005811115610c3657610c36613b3e565b1480610c545750600182516005811115610c5257610c52613b3e565b145b610cb35760405162461bcd60e51b815260206004820152602a60248201527f56616c696461746f724d616e616765723a20696e76616c69642076616c696461604482015269746f722073746174757360b01b60648201526084016105dc565b600382516005811115610cc857610cc8613b3e565b03610cef57505f8381526006860160205260408120600491610cea91906138d3565b610cf3565b5060055b6020808301515f90815260088801909152604081205581816005811115610d1c57610d1c613b3e565b90816005811115610d2f57610d2f613b3e565b9052505f84815260078701602052604090208251815484929190829060ff19166001836005811115610d6357610d63613b3e565b021790555060208201516001820155604082015160028201805460608501516001600160401b03908116600160a01b026001600160e01b03199092166001600160a01b039094169390931717905560808301516003909201805460a085015160c086015160e0909601518416600160c01b026001600160c01b03968516600160801b02969096166001600160801b03918516600160401b026001600160801b0319909316959094169490941717929092161791909117905581516005811115610e2e57610e2e613b3e565b60405185907f1c08e59656f1a18dc2da76826cdc52805c43e897a17c50faefb8ab3c1526cc16905f90a350505050505050565b5f805160206141b88339815191525f610e7984611cd0565b90505f80610e8a8360400151612052565b5091509150610e988561228d565b5f8581526004850160205260408120610eb0916138d3565b5f610eba83611887565b9050816001600160401b031681608001516001600160401b03161015610ef25760405162461bcd60e51b81526004016105dc90613de5565b5f8681526003860160205260409020600201546001600160401b03808416600160c01b909204161115610f375760405162461bcd60e51b81526004016105dc90613e27565b60015f87815260038701602052604090205460ff166004811115610f5d57610f5d613b3e565b14610fc65760405162461bcd60e51b815260206004820152603360248201527f506f5356616c696461746f724d616e616765723a2064656c65676174696f6e4960448201527211081b9bdd081c195b991a5b99c81859191959606a1b60648201526084016105dc565b5f868152600386016020908152604091829020805460ff1916600290811782550180546001600160401b0342818116600160401b0267ffffffffffffffff60401b19909316929092179092559251928352841691859189917f245fc69b36e168426e0306fc8d8300661b9af297c7958820dbf804f9f63e7064910160405180910390a450505050505050565b5f610ad86001600160401b03831664e8d4a51000613e70565b5f61107582611887565b60a0015192915050565b6110888161228d565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d04602052604090819020905163ee5b48eb60e01b81525f805160206141b8833981519152916005600160991b019163ee5b48eb91610a1691600401613d34565b81156110fe576110fc8382611577565b505b610a5683612366565b5f805160206141b88339815191525f61111f84611cd0565b90505f806111308360400151612052565b509150915061113e85611bfd565b5f8581526005850160205260408120611156916138d3565b5f61116083611887565b9050816001600160401b031681608001516001600160401b031610156111985760405162461bcd60e51b81526004016105dc90613de5565b5f8681526003808701602052604090912001546001600160401b03808416911611156111d65760405162461bcd60e51b81526004016105dc90613e27565b60035f87815260038701602052604090205460ff1660048111156111fc576111fc613b3e565b146112505760405162461bcd60e51b815260206004820152603160248201525f805160206141d88339815191526044820152701b9bdd081c195b991a5b99c81859191959607a1b60648201526084016105dc565b5f868152600386016020526040808220805460ff19166004179055516001600160401b03841691859189917f52e9b1eaef84d46cda83ccb9d427267bc4d04f756b4a32c8302722b79e5c65ab91a450505050505050565b5f805160206141f88339815191525f6112bf83611cd0565b90505f806112d08360400151611eb1565b91509150806113325760405162461bcd60e51b815260206004820152602860248201527f56616c696461746f724d616e616765723a20526567697374726174696f6e206e6044820152671bdd081d985b1a5960c21b60648201526084016105dc565b5f8281526005850160205260408120805461134c90613b8d565b905011801561137e575060015f83815260078601602052604090205460ff16600581111561137c5761137c613b3e565b145b61139a5760405162461bcd60e51b81526004016105dc90613e87565b5f82815260058501602052604081206113b2916138d3565b5f8281526007850160208181526040808420805460ff191660021781556003810180546001600160401b0342818116600160801b0267ffffffffffffffff60801b19909316929092178355600190930154875260088b0185528387208990559588905293835292548151600160401b90910490931683529082019290925283917ff8fd1c90fb9cfa2ca2358fdf5806b086ad43315d92b221c929efc7f105ce7568910160405180910390a25050505050565b5f8181527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb056020526040812080545f805160206141f88339815191529291906114ac90613b8d565b90501180156114de575060015f83815260078301602052604090205460ff1660058111156114dc576114dc613b3e565b145b6114fa5760405162461bcd60e51b81526004016105dc90613e87565b5f82815260058201602052604090819020905163ee5b48eb60e01b81526005600160991b019163ee5b48eb91610a169190600401613d34565b5f610ad882333461271e565b5f8061154a34612ad6565b905061155885828686612b80565b9150505b9392505050565b61156b612fd5565b61157481613020565b50565b6040516306f8253560e41b815263ffffffff821660048201525f90819081906005600160991b0190636f825350906024015f60405180830381865afa1580156115c2573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526115e99190810190613eed565b915091508061164c5760405162461bcd60e51b815260206004820152602960248201527f506f5356616c696461746f724d616e616765723a20696e76616c69642077617260448201526870206d65737361676560b81b60648201526084016105dc565b6005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa15801561168f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116b39190613d1d565b8251146117175760405162461bcd60e51b815260206004820152602c60248201527f506f5356616c696461746f724d616e616765723a20696e76616c696420736f7560448201526b1c98d94818da185a5b88125160a21b60648201526084016105dc565b60208201516001600160a01b03161561178d5760405162461bcd60e51b815260206004820152603260248201527f506f5356616c696461746f724d616e616765723a20696e76616c6964206f726960448201527167696e2073656e646572206164647265737360701b60648201526084016105dc565b5f8061179c8460400151613063565b915091508187146118095760405162461bcd60e51b815260206004820152603160248201527f506f5356616c696461746f724d616e616765723a20696e76616c6964207570746044820152701a5b59481d985b1a59185d1a5bdb881251607a1b60648201526084016105dc565b9695505050505050565b5f8181525f805160206142388339815191526020526040812060030180545f805160206141f8833981519152916001600160401b039091169081908461185883613fbf565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550508092505050919050565b6040805161010080820183525f8083526020808401829052838501829052606084018290526080840182905260a0840182905260c0840182905260e084018290528582525f8051602061423883398151915290528390208351918201909352825491925f805160206141f883398151915292829060ff16600581111561190f5761190f613b3e565b600581111561192057611920613b3e565b81526001820154602082015260028201546001600160a01b03811660408301526001600160401b03600160a01b909104811660608301526003909201548083166080830152600160401b8104831660a0830152600160801b8104831660c0830152600160c01b900490911660e0909101529392505050565b5f9182525f80516020614238833981519152602052604090912060030180546001600160401b03909216600160401b0267ffffffffffffffff60401b19909216919091179055565b60408051603680825260608281019093525f91906020820181803683370190505090505f5b6002811015611a5957611a19816001613fe4565b611a24906008613e70565b5081515f90839083908110611a3b57611a3b613ff7565b60200101906001600160f81b03191690815f1a905350600101611a05565b505f5b6004811015611abc57611a70816003613fe4565b611a7b906008613e70565b6001901c60f81b82611a8e83600261400b565b81518110611a9e57611a9e613ff7565b60200101906001600160f81b03191690815f1a905350600101611a5c565b505f5b6020811015611b1e57611ad381601f613fe4565b611ade906008613e70565b86901c60f81b82611af083600661400b565b81518110611b0057611b00613ff7565b60200101906001600160f81b03191690815f1a905350600101611abf565b505f5b6008811015611b8957611b35816007613fe4565b611b40906008613e70565b6001600160401b038616901c60f81b82611b5b83602661400b565b81518110611b6b57611b6b613ff7565b60200101906001600160f81b03191690815f1a905350600101611b21565b505f5b6008811015611bf457611ba0816007613fe4565b611bab906008613e70565b6001600160401b038516901c60f81b82611bc683602e61400b565b81518110611bd657611bd6613ff7565b60200101906001600160f81b03191690815f1a905350600101611b8c565b50949350505050565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d056020526040812080545f805160206141b8833981519152929190611c4590613b8d565b9050118015611c77575060035f83815260038301602052604090205460ff166004811115611c7557611c75613b3e565b145b611ccc5760405162461bcd60e51b815260206004820152603360248201525f805160206141d883398151915260448201527272656d6f76616c206e6f742070656e64696e6760681b60648201526084016105dc565b5050565b60408051606080820183525f8083526020830181905292820152905f805160206141f88339815191526040516306f8253560e41b815263ffffffff851660048201529091505f9081906005600160991b0190636f825350906024015f60405180830381865afa158015611d45573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611d6c9190810190613eed565b9150915080611dd35760405162461bcd60e51b815260206004820152602d60248201527f56616c696461746f724d616e616765723a20496e76696e76616c6964616c696460448201526c2077617270206d65737361676560981b60648201526084016105dc565b8254825114611e365760405162461bcd60e51b815260206004820152602960248201527f56616c696461746f724d616e616765723a20696e76616c696420736f757263656044820152680818da185a5b88125160ba1b60648201526084016105dc565b60208201516001600160a01b031615611ea95760405162461bcd60e51b815260206004820152602f60248201527f56616c696461746f724d616e616765723a20696e76616c6964206f726967696e60448201526e2073656e646572206164647265737360881b60648201526084016105dc565b509392505050565b5f808251602714611ed45760405162461bcd60e51b81526004016105dc9061401e565b5f805b6002811015611f2357611eeb816001613fe4565b611ef6906008613e70565b61ffff16858281518110611f0c57611f0c613ff7565b016020015160f81c901b9190911790600101611ed7565b5061ffff811615611f465760405162461bcd60e51b81526004016105dc90614067565b5f805b6004811015611fa157611f5d816003613fe4565b611f68906008613e70565b63ffffffff1686611f7a83600261400b565b81518110611f8a57611f8a613ff7565b016020015160f81c901b9190911790600101611f49565b5063ffffffff8116600214611fc85760405162461bcd60e51b81526004016105dc906140aa565b5f805b602081101561201d57611fdf81601f613fe4565b611fea906008613e70565b87611ff683600661400b565b8151811061200657612006613ff7565b016020015160f81c901b9190911790600101611fcb565b505f8660268151811061203257612032613ff7565b016020015191976001600160f81b03199092161515965090945050505050565b5f805f83516036146120765760405162461bcd60e51b81526004016105dc9061401e565b5f805b60028110156120c55761208d816001613fe4565b612098906008613e70565b61ffff168682815181106120ae576120ae613ff7565b016020015160f81c901b9190911790600101612079565b5061ffff8116156120e85760405162461bcd60e51b81526004016105dc90614067565b5f805b6004811015612143576120ff816003613fe4565b61210a906008613e70565b63ffffffff168761211c83600261400b565b8151811061212c5761212c613ff7565b016020015160f81c901b91909117906001016120eb565b5063ffffffff811660031461216a5760405162461bcd60e51b81526004016105dc906140aa565b5f805b60208110156121bf5761218181601f613fe4565b61218c906008613e70565b8861219883600661400b565b815181106121a8576121a8613ff7565b016020015160f81c901b919091179060010161216d565b505f805b600881101561221e576121d7816007613fe4565b6121e2906008613e70565b6001600160401b0316896121f783602661400b565b8151811061220757612207613ff7565b016020015160f81c901b91909117906001016121c3565b505f805b600881101561227d57612236816007613fe4565b612241906008613e70565b6001600160401b03168a61225683602e61400b565b8151811061226657612266613ff7565b016020015160f81c901b9190911790600101612222565b5091989097509095509350505050565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d046020526040812080545f805160206141b88339815191529291906122d590613b8d565b9050118015612307575060015f83815260038301602052604090205460ff16600481111561230557612305613b3e565b145b611ccc5760405162461bcd60e51b815260206004820152603860248201525f805160206141d883398151915260448201527f726567697374726174696f6e206e6f742070656e64696e67000000000000000060648201526084016105dc565b5f8181525f8051602061423883398151915260205260408082208151610100810190925280545f805160206141f883398151915293929190829060ff1660058111156123b4576123b4613b3e565b60058111156123c5576123c5613b3e565b8152600182015460208201526002808301546001600160a01b03811660408401526001600160401b03600160a01b909104811660608401526003909301548084166080840152600160401b8104841660a0840152600160801b8104841660c0840152600160c01b900490921660e0909101529091508151600581111561244d5761244d613b3e565b146124a95760405162461bcd60e51b815260206004820152602660248201527f56616c696461746f724d616e616765723a2076616c696461746f72206e6f742060448201526561637469766560d01b60648201526084016105dc565b60408101516001600160a01b0316336001600160a01b0316146125235760405162461bcd60e51b815260206004820152602c60248201527f56616c696461746f724d616e616765723a2073656e646572206e6f742076616c60448201526b34b230ba37b91037bbb732b960a11b60648201526084016105dc565b6125308160a0015161323b565b60038152426001600160401b031660e08201525f83815260078301602052604090208151815483929190829060ff1916600183600581111561257457612574613b3e565b021790555060208201516001820155604082015160028201805460608501516001600160401b03908116600160a01b026001600160e01b03199092166001600160a01b039094169390931717905560808301516003909201805460a085015160c086015160e0909601518416600160c01b026001600160c01b03968516600160801b02969096166001600160801b03918516600160401b026001600160801b031990931695909416949094171792909216179190911790555f6126408461263a81611813565b5f6119e0565b5f858152600685016020526040902090915061265c8282613c0a565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb90612689908590600401613ceb565b6020604051808303815f875af11580156126a5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126c99190613d1d565b60a0840151604080516001600160401b039092168252426020830152919250829187917f13d58394cf269d48bcf927959a29a5ffee7c9924dafff8927ecdf3c48ffa7c67910160405180910390a35050505050565b5f6127276133dc565b5f61273183610ac8565b90505f805160206141b88339815191525f61274b87611887565b905060028151600581111561276257612762613b3e565b146127c15760405162461bcd60e51b815260206004820152602960248201527f506f5356616c696461746f724d616e616765723a2076616c696461746f72206e6044820152686f742061637469766560b81b60648201526084016105dc565b5f838260a001516127d291906140f1565b90506127de8882611998565b5f6127e889611813565b90505f8989836040516020016128309392919092835260609190911b6bffffffffffffffffffffffff1916602083015260c01b6001600160c01b0319166034820152603c0190565b6040516020818303038152906040528051906020012090506128518661323b565b5f61285d8b84866119e0565b5f83815260048801602052604090209091506128798282613c0a565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb906128a6908590600401613ceb565b6020604051808303815f875af11580156128c2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128e69190613d1d565b60408051610100810190915290915080600181526020018c6001600160a01b031681526020018d8152602001896001600160401b031681526020015f6001600160401b031681526020015f6001600160401b03168152602001856001600160401b031681526020015f6001600160401b0316815250876003015f8581526020019081526020015f205f820151815f015f6101000a81548160ff0219169083600481111561299557612995613b3e565b02179055506020828101518254610100600160a81b0319166101006001600160a01b039283160217835560408085015160018501556060808601516002860180546080808a015160a08b015160c08c01516001600160401b039687166001600160801b031990951694909417600160401b92871692909202919091176001600160801b0316600160801b918616919091026001600160c01b031617600160c01b928516929092029190911790915560e0909701516003909601805467ffffffffffffffff19169682169690961790955581518a861681528b861694810194909452938d1690830152918101849052908d16918e9186917fb0024b263bc3a0b728a6edea50a69efa841189f8d32ee8af9d1c2b1a1a223426910160405180910390a45090965050505050505061155c60015f8051602061421883398151915255565b5f5f805160206141b88339815191528282612af082610ac8565b83549091506001600160401b03821610801590612b1a57508260010154816001600160401b031611155b612b785760405162461bcd60e51b815260206004820152602960248201527f506f5356616c696461746f724d616e616765723a20696e76616c6964207374616044820152681ad948185b5bdd5b9d60ba1b60648201526084016105dc565b949350505050565b5f612b896133dc565b5f805160206141f8833981519152426001600160401b038516118015612bc357506001600160401b038416612bc1426202a30061400b565b115b612c255760405162461bcd60e51b815260206004820152602d60248201527f56616c696461746f724d616e616765723a20696e76616c69642072656769737460448201526c726174696f6e2065787069727960981b60648201526084016105dc565b85612c7c5760405162461bcd60e51b815260206004820152602160248201527f56616c696461746f724d616e616765723a20696e76616c6964206e6f646520496044820152601160fa1b60648201526084016105dc565b5f86815260088201602052604090205415612cea5760405162461bcd60e51b815260206004820152602860248201527f56616c696461746f724d616e616765723a206e6f646520494420616c72656164604482015267792061637469766560c01b60648201526084016105dc565b8251603014612d515760405162461bcd60e51b815260206004820152602d60248201527f56616c696461746f724d616e616765723a20696e76616c696420626c7350756260448201526c0d8d2c696caf240d8cadccee8d609b1b60648201526084016105dc565b612d5a8561323b565b5f80612da16040518060a00160405280856001015481526020018a8152602001896001600160401b03168152602001886001600160401b0316815260200187815250613426565b5f82815260058601602052604090209193509150612dbf8282613c0a565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb90612dec908590600401613ceb565b6020604051808303815f875af1158015612e08573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612e2c9190613d1d565b604080516101008101825260018152602081018c90529192508101336001600160a01b031681526001600160401b038a1660208083018290525f604080850182905260608501939093526080840181905260a0909301839052868352600788019052902081518154829060ff19166001836005811115612eae57612eae613b3e565b021790555060208201516001820155604082015160028201805460608501516001600160401b03908116600160a01b026001600160e01b03199092166001600160a01b039094169390931717905560808301516003909201805460a085015160c086015160e0909601518416600160c01b026001600160c01b03968516600160801b02969096166001600160801b03918516600160401b026001600160801b03199093169590941694909417179290921617919091179055612f6f83611813565b50604080516001600160401b03808b1682528916602082015282918b9186917f79b81620b81daf2c08cd5bb3dbb79e75d2d7a87f52171fde5aadc8c47823026e910160405180910390a4509092505050612b7860015f8051602061421883398151915255565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661301e57604051631afcd79f60e31b815260040160405180910390fd5b565b613028612fd5565b613031816137cb565b6115746060820135608083013561304e60c0850160a08601613a01565b61305e60e0860160c08701614111565b6137ec565b5f808251602e146130865760405162461bcd60e51b81526004016105dc9061401e565b5f805b60028110156130d55761309d816001613fe4565b6130a8906008613e70565b61ffff168582815181106130be576130be613ff7565b016020015160f81c901b9190911790600101613089565b5061ffff8116156130f85760405162461bcd60e51b81526004016105dc90614067565b5f805b60048110156131535761310f816003613fe4565b61311a906008613e70565b63ffffffff168661312c83600261400b565b8151811061313c5761313c613ff7565b016020015160f81c901b91909117906001016130fb565b5063ffffffff811660041461317a5760405162461bcd60e51b81526004016105dc906140aa565b5f805b60208110156131cf5761319181601f613fe4565b61319c906008613e70565b876131a883600661400b565b815181106131b8576131b8613ff7565b016020015160f81c901b919091179060010161317d565b505f805b600881101561322e576131e7816007613fe4565b6131f2906008613e70565b6001600160401b03168861320783602661400b565b8151811061321757613217613ff7565b016020015160f81c901b91909117906001016131d3565b5090969095509350505050565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb02545f805160206141f88339815191529060ff165f03613279575050565b60408051606081018252600383015480825260048401546001600160401b038082166020850152600160401b9091041692820192909252904290610e10906132c19083613fe4565b106132dd576001600160401b03841660408301528082526132fc565b83826040018181516132ef91906140f1565b6001600160401b03169052505b5f826020015183604001516064613313919061412c565b61331d9190614157565b600285015490915060ff90811690821611156133985760405162461bcd60e51b815260206004820152603460248201527f56616c696461746f724d616e616765723a206d6178696d756d20686f75726c796044820152730818da1d5c9b881c985d1948195e18d95959195960621b60648201526084016105dc565b5050805160038301556020810151600490920180546040909201516001600160401b03908116600160401b026001600160801b031990931693169290921717905550565b5f8051602061421883398151915280546001190161340d57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b60015f8051602061421883398151915255565b5f60608260800151516030146134905760405162461bcd60e51b815260206004820152602960248201527f5374616b696e674d657373616765733a20696e76616c6964207369676e6174756044820152680e4ca40d8cadccee8d60bb1b60648201526084016105dc565b60408051608680825260c082019092525f916020820181803683370190505090505f5b6002811015613507576134c7816001613fe4565b6134d2906008613e70565b5081515f908390839081106134e9576134e9613ff7565b60200101906001600160f81b03191690815f1a9053506001016134b3565b505f5b60048110156135655761351e816003613fe4565b613529906008613e70565b505f8261353783600261400b565b8151811061354757613547613ff7565b60200101906001600160f81b03191690815f1a90535060010161350a565b505f5b60208110156135c2578451816020811061358457613584613ff7565b1a60f81b8261359483600661400b565b815181106135a4576135a4613ff7565b60200101906001600160f81b03191690815f1a905350600101613568565b505f5b602081101561362257846020015181602081106135e4576135e4613ff7565b1a60f81b826135f483602661400b565b8151811061360457613604613ff7565b60200101906001600160f81b03191690815f1a9053506001016135c5565b505f5b600881101561369657613639816007613fe4565b613644906008613e70565b60ff1685604001516001600160401b0316901c60f81b82826046613668919061400b565b8151811061367857613678613ff7565b60200101906001600160f81b03191690815f1a905350600101613625565b505f5b603081101561370157846080015181815181106136b8576136b8613ff7565b01602001516001600160f81b031916826136d383604e61400b565b815181106136e3576136e3613ff7565b60200101906001600160f81b03191690815f1a905350600101613699565b505f5b600881101561377357613718816007613fe4565b613723906008613e70565b60608601516001600160401b0390811691161c60f81b8261374583607e61400b565b8151811061375557613755613ff7565b60200101906001600160f81b03191690815f1a905350600101613704565b50600281604051613784919061417c565b602060405180830381855afa15801561379f573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906137c29190613d1d565b94909350915050565b6137d3612fd5565b6137db613847565b6137e3613857565b6115748161385f565b6137f4612fd5565b5f5f805160206141b8833981519152948555506001840192909255600290920180546001600160a01b03909216600160401b026001600160e01b03199092166001600160401b0390931692909217179055565b61384f612fd5565b61301e6138cb565b61301e612fd5565b613867612fd5565b80355f805160206141f883398151915290815560208201357fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb01556138b16060830160408401614197565b600291909101805460ff191660ff90921691909117905550565b613413612fd5565b5080546138df90613b8d565b5f825580601f106138ee575050565b601f0160209004905f5260205f209081019061157491905b80821115613919575f8155600101613906565b5090565b5f60e0828403121561392d575f80fd5b50919050565b8015158114611574575f80fd5b803563ffffffff81168114613953575f80fd5b919050565b5f805f6060848603121561396a575f80fd5b83359250602084013561397c81613933565b915061398a60408501613940565b90509250925092565b5f602082840312156139a3575f80fd5b5035919050565b5f602082840312156139ba575f80fd5b61155c82613940565b5f80604083850312156139d4575f80fd5b6139dd83613940565b946020939093013593505050565b80356001600160401b0381168114613953575f80fd5b5f60208284031215613a11575f80fd5b61155c826139eb565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b0381118282101715613a5057613a50613a1a565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613a7e57613a7e613a1a565b604052919050565b5f6001600160401b03821115613a9e57613a9e613a1a565b50601f01601f191660200190565b5f805f60608486031215613abe575f80fd5b83359250613ace602085016139eb565b915060408401356001600160401b03811115613ae8575f80fd5b8401601f81018613613af8575f80fd5b8035613b0b613b0682613a86565b613a56565b818152876020838501011115613b1f575f80fd5b816020840160208301375f602083830101528093505050509250925092565b634e487b7160e01b5f52602160045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b6001600160401b03828116828216039080821115613b8657613b86613b52565b5092915050565b600181811c90821680613ba157607f821691505b60208210810361392d57634e487b7160e01b5f52602260045260245ffd5b601f821115610a5657805f5260205f20601f840160051c81016020851015613be45750805b601f840160051c820191505b81811015613c03575f8155600101613bf0565b5050505050565b81516001600160401b03811115613c2357613c23613a1a565b613c3781613c318454613b8d565b84613bbf565b602080601f831160018114613c6a575f8415613c535750858301515b5f19600386901b1c1916600185901b178555613cc1565b5f85815260208120601f198616915b82811015613c9857888601518255948401946001909101908401613c79565b5085821015613cb557878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f5b83811015613ce3578181015183820152602001613ccb565b50505f910152565b602081525f8251806020840152613d09816040850160208701613cc9565b601f01601f19169190910160400192915050565b5f60208284031215613d2d575f80fd5b5051919050565b5f60208083525f8454613d4681613b8d565b806020870152604060018084165f8114613d675760018114613d8357613db0565b60ff19851660408a0152604084151560051b8a01019550613db0565b895f5260205f205f5b85811015613da75781548b8201860152908301908801613d8c565b8a016040019650505b509398975050505050505050565b634e487b7160e01b5f52601260045260245ffd5b5f82613de057613de0613dbe565b500490565b60208082526022908201527f506f5356616c696461746f724d616e616765723a20696e76616c6964206e6f6e604082015261636560f01b606082015260800190565b60208082526029908201527f506f5356616c696461746f724d616e616765723a206e6f6e636520646f6573206040820152680dcdee840dac2e8c6d60bb1b606082015260800190565b8082028115828204841417610ad857610ad8613b52565b60208082526027908201527f56616c696461746f724d616e616765723a20696e76616c69642076616c6964616040820152661d1a5bdb88125160ca1b606082015260800190565b6001600160a01b0381168114611574575f80fd5b805161395381613933565b5f8060408385031215613efe575f80fd5b82516001600160401b0380821115613f14575f80fd5b9084019060608287031215613f27575f80fd5b613f2f613a2e565b82518152602080840151613f4281613ece565b82820152604084015183811115613f57575f80fd5b80850194505087601f850112613f6b575f80fd5b83519250613f7b613b0684613a86565b8381528882858701011115613f8e575f80fd5b613f9d84838301848801613cc9565b80604084015250819550613fb2818801613ee2565b9450505050509250929050565b5f6001600160401b03808316818103613fda57613fda613b52565b6001019392505050565b81810381811115610ad857610ad8613b52565b634e487b7160e01b5f52603260045260245ffd5b80820180821115610ad857610ad8613b52565b60208082526029908201527f56616c696461746f724d657373616765733a20696e76616c6964206d657373616040820152680ceca40d8cadccee8d60bb1b606082015260800190565b60208082526023908201527f56616c696461746f724d657373616765733a20696e76616c696420636f64656360408201526208125160ea1b606082015260800190565b60208082526027908201527f56616c696461746f724d657373616765733a20696e76616c6964206d657373616040820152666765207479706560c81b606082015260800190565b6001600160401b03818116838216019080821115613b8657613b86613b52565b5f60208284031215614121575f80fd5b813561155c81613ece565b6001600160401b0381811683821602808216919082811461414f5761414f613b52565b505092915050565b5f6001600160401b038084168061417057614170613dbe565b92169190910492915050565b5f825161418d818460208701613cc9565b9190910192915050565b5f602082840312156141a7575f80fd5b813560ff8116811461155c575f80fdfe4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d00506f5356616c696461746f724d616e616765723a2064656c65676174696f6e20e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb07a164736f6c6343000819000a", + Bin: "0x608060405234801561000f575f80fd5b506040516143a83803806143a883398101604081905261002e91610107565b60018160018111156100425761004261012c565b0361004f5761004f610055565b50610140565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100a55760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146101045780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b5f60208284031215610117575f80fd5b815160028110610125575f80fd5b9392505050565b634e487b7160e01b5f52602160045260245ffd5b61425b8061014d5f395ff3fe608060405260043610610104575f3560e01c806366435abf11610092578063a3a65e4811610062578063a3a65e48146102f3578063b771b3bc14610312578063bee0a03f14610344578063c599e24f14610363578063f40797d714610376575f80fd5b806366435abf146102775780636d0e43fa1461029657806376f78621146102b557806398f3e2b4146102d4575f80fd5b8063162f1f61116100d8578063162f1f61146101c45780632e2194d8146101e3578063467ef06f1461021a5780635297fae6146102395780636206585614610258575f80fd5b8062e41792146101085780630118acc4146101295780630322ed98146101485780630cdd098514610167575b5f80fd5b348015610113575f80fd5b50610127610122366004613914565b610389565b005b348015610134575f80fd5b5061012761014336600461394f565b61046b565b348015610153575f80fd5b5061012761016236600461398a565b6108f6565b348015610172575f80fd5b506101b161018136600461398a565b5f9081527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb08602052604090205490565b6040519081526020015b60405180910390f35b3480156101cf575f80fd5b506101276101de36600461398a565b610a52565b3480156101ee575f80fd5b506102026101fd36600461398a565b610abf565b6040516001600160401b0390911681526020016101bb565b348015610225575f80fd5b506101276102343660046139a1565b610ad5565b348015610244575f80fd5b506101276102533660046139ba565b610e58565b348015610263575f80fd5b506101b16102723660046139f8565b611049565b348015610282575f80fd5b5061020261029136600461398a565b611062565b3480156102a1575f80fd5b506101276102b036600461398a565b611076565b3480156102c0575f80fd5b506101276102cf36600461394f565b6110e3565b3480156102df575f80fd5b506101276102ee3660046139ba565b6110fe565b3480156102fe575f80fd5b5061012761030d3660046139a1565b61129e565b34801561031d575f80fd5b5061032c6005600160991b0181565b6040516001600160a01b0390911681526020016101bb565b34801561034f575f80fd5b5061012761035e36600461398a565b61145b565b6101b161037136600461398a565b61152a565b6101b1610384366004613aa3565b611536565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805460029190600160401b900460ff16806103d2575080546001600160401b03808416911610155b156103f05760405163f92ee8a960e01b815260040160405180910390fd5b805468ffffffffffffffffff19166001600160401b03831617600160401b17815561041a8361155a565b805468ff0000000000000000191681556040516001600160401b03831681527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a1505050565b5f8381527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d0360205260408120600101545f805160206141af8339815191529184156104bd576104ba828561156e565b90505b5f868152600384016020526040808220815161010081019092528054829060ff1660048111156104ef576104ef613b35565b600481111561050057610500613b35565b8152815461010090046001600160a01b03166020820152600182015460408201526002808301546001600160401b038082166060850152600160401b820481166080850152600160801b8204811660a0850152600160c01b909104811660c084015260039093015490921660e0909101529091508151600481111561058757610587613b35565b146105d95760405162461bcd60e51b815260206004820152602a60248201525f805160206141cf8339815191526044820152696e6f742061637469766560b01b60648201526084015b60405180910390fd5b60208101516001600160a01b0316331461063e5760405162461bcd60e51b815260206004820152603360248201525f805160206141cf8339815191526044820152723737ba1037bbb732b210313c9039b2b73232b960691b60648201526084016105d0565b5f6106488461180a565b60038084526001600160401b0342811660a0860152821660e08501525f8a815290870160205260409020835181549293508492829060ff1916600183600481111561069557610695613b35565b021790555060208201518154610100600160a81b0319166101006001600160a01b0390921691909102178155604082015160018201556060820151600282018054608085015160a086015160c08701516001600160401b039586166001600160801b031990941693909317600160401b92861692909202919091176001600160801b0316600160801b918516919091026001600160c01b031617600160c01b9184169190910217905560e0909201516003909101805467ffffffffffffffff1916919092161790555f6107678561187e565b905082606001516001600160401b03168160a001516001600160401b0316116107de5760405162461bcd60e51b815260206004820152602360248201527f506f5356616c696461746f724d616e616765723a20496e76616c69642077656960448201526219da1d60ea1b60648201526084016105d0565b5f83606001518260a001516107f39190613b5d565b90506107ff868261198f565b5f61080b8785846119d7565b5f8c815260058a01602052604090209091506108278282613c01565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb90610854908590600401613ce2565b6020604051808303815f875af1158015610870573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108949190613d14565b604080516001600160401b03868116825242602083015291810183905291925086169089908e907f5318ab4d7cdf77056db2db5b539a08fe7d1a63d6885ecee8236a0dbda2843b4e9060600160405180910390a4505050505050505050505050565b5f8181527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb066020526040812080545f805160206141ef83398151915292919061093e90613b84565b9050118015610970575060035f83815260078301602052604090205460ff16600581111561096e5761096e613b35565b145b6109d45760405162461bcd60e51b815260206004820152602f60248201527f56616c696461746f724d616e616765723a2056616c696461746f72206e6f742060448201526e1c195b991a5b99c81c995b5bdd985b608a1b60648201526084016105d0565b5f82815260068201602052604090819020905163ee5b48eb60e01b81526005600160991b019163ee5b48eb91610a0d9190600401613d2b565b6020604051808303815f875af1158015610a29573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a4d9190613d14565b505050565b610a5b81611bf4565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d05602052604090819020905163ee5b48eb60e01b81525f805160206141af833981519152916005600160991b019163ee5b48eb91610a0d91600401613d2b565b5f610acf64e8d4a5100083613dc9565b92915050565b5f805160206141ef8339815191525f610aed83611cc7565b90505f80610afe8360400151611ea8565b915091508015610b635760405162461bcd60e51b815260206004820152602a60248201527f56616c696461746f724d616e616765723a20726567697374726174696f6e20736044820152691d1a5b1b081d985b1a5960b21b60648201526084016105d0565b5f828152600785016020526040808220815161010081019092528054829060ff166005811115610b9557610b95613b35565b6005811115610ba657610ba6613b35565b81526001820154602082015260028201546001600160a01b03811660408301526001600160401b03600160a01b909104811660608301526003928301548082166080840152600160401b8104821660a0840152600160801b8104821660c0840152600160c01b90041660e0909101529091505f9082516005811115610c2d57610c2d613b35565b1480610c4b5750600182516005811115610c4957610c49613b35565b145b610caa5760405162461bcd60e51b815260206004820152602a60248201527f56616c696461746f724d616e616765723a20696e76616c69642076616c696461604482015269746f722073746174757360b01b60648201526084016105d0565b600382516005811115610cbf57610cbf613b35565b03610ce657505f8381526006860160205260408120600491610ce191906138ca565b610cea565b5060055b6020808301515f90815260088801909152604081205581816005811115610d1357610d13613b35565b90816005811115610d2657610d26613b35565b9052505f84815260078701602052604090208251815484929190829060ff19166001836005811115610d5a57610d5a613b35565b021790555060208201516001820155604082015160028201805460608501516001600160401b03908116600160a01b026001600160e01b03199092166001600160a01b039094169390931717905560808301516003909201805460a085015160c086015160e0909601518416600160c01b026001600160c01b03968516600160801b02969096166001600160801b03918516600160401b026001600160801b0319909316959094169490941717929092161791909117905581516005811115610e2557610e25613b35565b60405185907f1c08e59656f1a18dc2da76826cdc52805c43e897a17c50faefb8ab3c1526cc16905f90a350505050505050565b5f805160206141af8339815191525f610e7084611cc7565b90505f80610e818360400151612049565b5091509150610e8f85612284565b5f8581526004850160205260408120610ea7916138ca565b5f610eb18361187e565b9050816001600160401b031681608001516001600160401b03161015610ee95760405162461bcd60e51b81526004016105d090613ddc565b5f8681526003860160205260409020600201546001600160401b03808416600160c01b909204161115610f2e5760405162461bcd60e51b81526004016105d090613e1e565b60015f87815260038701602052604090205460ff166004811115610f5457610f54613b35565b14610fbd5760405162461bcd60e51b815260206004820152603360248201527f506f5356616c696461746f724d616e616765723a2064656c65676174696f6e4960448201527211081b9bdd081c195b991a5b99c81859191959606a1b60648201526084016105d0565b5f868152600386016020908152604091829020805460ff1916600290811782550180546001600160401b0342818116600160401b0267ffffffffffffffff60401b19909316929092179092559251928352841691859189917f245fc69b36e168426e0306fc8d8300661b9af297c7958820dbf804f9f63e7064910160405180910390a450505050505050565b5f610acf6001600160401b03831664e8d4a51000613e67565b5f61106c8261187e565b60a0015192915050565b61107f81612284565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d04602052604090819020905163ee5b48eb60e01b81525f805160206141af833981519152916005600160991b019163ee5b48eb91610a0d91600401613d2b565b81156110f5576110f3838261156e565b505b610a4d8361235d565b5f805160206141af8339815191525f61111684611cc7565b90505f806111278360400151612049565b509150915061113585611bf4565b5f858152600585016020526040812061114d916138ca565b5f6111578361187e565b9050816001600160401b031681608001516001600160401b0316101561118f5760405162461bcd60e51b81526004016105d090613ddc565b5f8681526003808701602052604090912001546001600160401b03808416911611156111cd5760405162461bcd60e51b81526004016105d090613e1e565b60035f87815260038701602052604090205460ff1660048111156111f3576111f3613b35565b146112475760405162461bcd60e51b815260206004820152603160248201525f805160206141cf8339815191526044820152701b9bdd081c195b991a5b99c81859191959607a1b60648201526084016105d0565b5f868152600386016020526040808220805460ff19166004179055516001600160401b03841691859189917f52e9b1eaef84d46cda83ccb9d427267bc4d04f756b4a32c8302722b79e5c65ab91a450505050505050565b5f805160206141ef8339815191525f6112b683611cc7565b90505f806112c78360400151611ea8565b91509150806113295760405162461bcd60e51b815260206004820152602860248201527f56616c696461746f724d616e616765723a20526567697374726174696f6e206e6044820152671bdd081d985b1a5960c21b60648201526084016105d0565b5f8281526005850160205260408120805461134390613b84565b9050118015611375575060015f83815260078601602052604090205460ff16600581111561137357611373613b35565b145b6113915760405162461bcd60e51b81526004016105d090613e7e565b5f82815260058501602052604081206113a9916138ca565b5f8281526007850160208181526040808420805460ff191660021781556003810180546001600160401b0342818116600160801b0267ffffffffffffffff60801b19909316929092178355600190930154875260088b0185528387208990559588905293835292548151600160401b90910490931683529082019290925283917ff8fd1c90fb9cfa2ca2358fdf5806b086ad43315d92b221c929efc7f105ce7568910160405180910390a25050505050565b5f8181527fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb056020526040812080545f805160206141ef8339815191529291906114a390613b84565b90501180156114d5575060015f83815260078301602052604090205460ff1660058111156114d3576114d3613b35565b145b6114f15760405162461bcd60e51b81526004016105d090613e7e565b5f82815260058201602052604090819020905163ee5b48eb60e01b81526005600160991b019163ee5b48eb91610a0d9190600401613d2b565b5f610acf823334612715565b5f8061154134612acd565b905061154f85828686612b77565b9150505b9392505050565b611562612fcc565b61156b81613017565b50565b6040516306f8253560e41b815263ffffffff821660048201525f90819081906005600160991b0190636f825350906024015f60405180830381865afa1580156115b9573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526115e09190810190613ee4565b91509150806116435760405162461bcd60e51b815260206004820152602960248201527f506f5356616c696461746f724d616e616765723a20696e76616c69642077617260448201526870206d65737361676560b81b60648201526084016105d0565b6005600160991b016001600160a01b0316634213cf786040518163ffffffff1660e01b8152600401602060405180830381865afa158015611686573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116aa9190613d14565b82511461170e5760405162461bcd60e51b815260206004820152602c60248201527f506f5356616c696461746f724d616e616765723a20696e76616c696420736f7560448201526b1c98d94818da185a5b88125160a21b60648201526084016105d0565b60208201516001600160a01b0316156117845760405162461bcd60e51b815260206004820152603260248201527f506f5356616c696461746f724d616e616765723a20696e76616c6964206f726960448201527167696e2073656e646572206164647265737360701b60648201526084016105d0565b5f80611793846040015161305a565b915091508187146118005760405162461bcd60e51b815260206004820152603160248201527f506f5356616c696461746f724d616e616765723a20696e76616c6964207570746044820152701a5b59481d985b1a59185d1a5bdb881251607a1b60648201526084016105d0565b9695505050505050565b5f8181525f8051602061422f8339815191526020526040812060030180545f805160206141ef833981519152916001600160401b039091169081908461184f83613fb6565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550508092505050919050565b6040805161010080820183525f8083526020808401829052838501829052606084018290526080840182905260a0840182905260c0840182905260e084018290528582525f8051602061422f83398151915290528390208351918201909352825491925f805160206141ef83398151915292829060ff16600581111561190657611906613b35565b600581111561191757611917613b35565b81526001820154602082015260028201546001600160a01b03811660408301526001600160401b03600160a01b909104811660608301526003909201548083166080830152600160401b8104831660a0830152600160801b8104831660c0830152600160c01b900490911660e0909101529392505050565b5f9182525f8051602061422f833981519152602052604090912060030180546001600160401b03909216600160401b0267ffffffffffffffff60401b19909216919091179055565b60408051603680825260608281019093525f91906020820181803683370190505090505f5b6002811015611a5057611a10816001613fdb565b611a1b906008613e67565b5081515f90839083908110611a3257611a32613fee565b60200101906001600160f81b03191690815f1a9053506001016119fc565b505f5b6004811015611ab357611a67816003613fdb565b611a72906008613e67565b6001901c60f81b82611a85836002614002565b81518110611a9557611a95613fee565b60200101906001600160f81b03191690815f1a905350600101611a53565b505f5b6020811015611b1557611aca81601f613fdb565b611ad5906008613e67565b86901c60f81b82611ae7836006614002565b81518110611af757611af7613fee565b60200101906001600160f81b03191690815f1a905350600101611ab6565b505f5b6008811015611b8057611b2c816007613fdb565b611b37906008613e67565b6001600160401b038616901c60f81b82611b52836026614002565b81518110611b6257611b62613fee565b60200101906001600160f81b03191690815f1a905350600101611b18565b505f5b6008811015611beb57611b97816007613fdb565b611ba2906008613e67565b6001600160401b038516901c60f81b82611bbd83602e614002565b81518110611bcd57611bcd613fee565b60200101906001600160f81b03191690815f1a905350600101611b83565b50949350505050565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d056020526040812080545f805160206141af833981519152929190611c3c90613b84565b9050118015611c6e575060035f83815260038301602052604090205460ff166004811115611c6c57611c6c613b35565b145b611cc35760405162461bcd60e51b815260206004820152603360248201525f805160206141cf83398151915260448201527272656d6f76616c206e6f742070656e64696e6760681b60648201526084016105d0565b5050565b60408051606080820183525f8083526020830181905292820152905f805160206141ef8339815191526040516306f8253560e41b815263ffffffff851660048201529091505f9081906005600160991b0190636f825350906024015f60405180830381865afa158015611d3c573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611d639190810190613ee4565b9150915080611dca5760405162461bcd60e51b815260206004820152602d60248201527f56616c696461746f724d616e616765723a20496e76696e76616c6964616c696460448201526c2077617270206d65737361676560981b60648201526084016105d0565b8254825114611e2d5760405162461bcd60e51b815260206004820152602960248201527f56616c696461746f724d616e616765723a20696e76616c696420736f757263656044820152680818da185a5b88125160ba1b60648201526084016105d0565b60208201516001600160a01b031615611ea05760405162461bcd60e51b815260206004820152602f60248201527f56616c696461746f724d616e616765723a20696e76616c6964206f726967696e60448201526e2073656e646572206164647265737360881b60648201526084016105d0565b509392505050565b5f808251602714611ecb5760405162461bcd60e51b81526004016105d090614015565b5f805b6002811015611f1a57611ee2816001613fdb565b611eed906008613e67565b61ffff16858281518110611f0357611f03613fee565b016020015160f81c901b9190911790600101611ece565b5061ffff811615611f3d5760405162461bcd60e51b81526004016105d09061405e565b5f805b6004811015611f9857611f54816003613fdb565b611f5f906008613e67565b63ffffffff1686611f71836002614002565b81518110611f8157611f81613fee565b016020015160f81c901b9190911790600101611f40565b5063ffffffff8116600214611fbf5760405162461bcd60e51b81526004016105d0906140a1565b5f805b602081101561201457611fd681601f613fdb565b611fe1906008613e67565b87611fed836006614002565b81518110611ffd57611ffd613fee565b016020015160f81c901b9190911790600101611fc2565b505f8660268151811061202957612029613fee565b016020015191976001600160f81b03199092161515965090945050505050565b5f805f835160361461206d5760405162461bcd60e51b81526004016105d090614015565b5f805b60028110156120bc57612084816001613fdb565b61208f906008613e67565b61ffff168682815181106120a5576120a5613fee565b016020015160f81c901b9190911790600101612070565b5061ffff8116156120df5760405162461bcd60e51b81526004016105d09061405e565b5f805b600481101561213a576120f6816003613fdb565b612101906008613e67565b63ffffffff1687612113836002614002565b8151811061212357612123613fee565b016020015160f81c901b91909117906001016120e2565b5063ffffffff81166003146121615760405162461bcd60e51b81526004016105d0906140a1565b5f805b60208110156121b65761217881601f613fdb565b612183906008613e67565b8861218f836006614002565b8151811061219f5761219f613fee565b016020015160f81c901b9190911790600101612164565b505f805b6008811015612215576121ce816007613fdb565b6121d9906008613e67565b6001600160401b0316896121ee836026614002565b815181106121fe576121fe613fee565b016020015160f81c901b91909117906001016121ba565b505f805b60088110156122745761222d816007613fdb565b612238906008613e67565b6001600160401b03168a61224d83602e614002565b8151811061225d5761225d613fee565b016020015160f81c901b9190911790600101612219565b5091989097509095509350505050565b5f8181527f4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d046020526040812080545f805160206141af8339815191529291906122cc90613b84565b90501180156122fe575060015f83815260038301602052604090205460ff1660048111156122fc576122fc613b35565b145b611cc35760405162461bcd60e51b815260206004820152603860248201525f805160206141cf83398151915260448201527f726567697374726174696f6e206e6f742070656e64696e67000000000000000060648201526084016105d0565b5f8181525f8051602061422f83398151915260205260408082208151610100810190925280545f805160206141ef83398151915293929190829060ff1660058111156123ab576123ab613b35565b60058111156123bc576123bc613b35565b8152600182015460208201526002808301546001600160a01b03811660408401526001600160401b03600160a01b909104811660608401526003909301548084166080840152600160401b8104841660a0840152600160801b8104841660c0840152600160c01b900490921660e0909101529091508151600581111561244457612444613b35565b146124a05760405162461bcd60e51b815260206004820152602660248201527f56616c696461746f724d616e616765723a2076616c696461746f72206e6f742060448201526561637469766560d01b60648201526084016105d0565b60408101516001600160a01b0316336001600160a01b03161461251a5760405162461bcd60e51b815260206004820152602c60248201527f56616c696461746f724d616e616765723a2073656e646572206e6f742076616c60448201526b34b230ba37b91037bbb732b960a11b60648201526084016105d0565b6125278160a00151613232565b60038152426001600160401b031660e08201525f83815260078301602052604090208151815483929190829060ff1916600183600581111561256b5761256b613b35565b021790555060208201516001820155604082015160028201805460608501516001600160401b03908116600160a01b026001600160e01b03199092166001600160a01b039094169390931717905560808301516003909201805460a085015160c086015160e0909601518416600160c01b026001600160c01b03968516600160801b02969096166001600160801b03918516600160401b026001600160801b031990931695909416949094171792909216179190911790555f612637846126318161180a565b5f6119d7565b5f85815260068501602052604090209091506126538282613c01565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb90612680908590600401613ce2565b6020604051808303815f875af115801561269c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126c09190613d14565b60a0840151604080516001600160401b039092168252426020830152919250829187917f13d58394cf269d48bcf927959a29a5ffee7c9924dafff8927ecdf3c48ffa7c67910160405180910390a35050505050565b5f61271e6133d3565b5f61272883610abf565b90505f805160206141af8339815191525f6127428761187e565b905060028151600581111561275957612759613b35565b146127b85760405162461bcd60e51b815260206004820152602960248201527f506f5356616c696461746f724d616e616765723a2076616c696461746f72206e6044820152686f742061637469766560b81b60648201526084016105d0565b5f838260a001516127c991906140e8565b90506127d5888261198f565b5f6127df8961180a565b90505f8989836040516020016128279392919092835260609190911b6bffffffffffffffffffffffff1916602083015260c01b6001600160c01b0319166034820152603c0190565b60405160208183030381529060405280519060200120905061284886613232565b5f6128548b84866119d7565b5f83815260048801602052604090209091506128708282613c01565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb9061289d908590600401613ce2565b6020604051808303815f875af11580156128b9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906128dd9190613d14565b60408051610100810190915290915080600181526020018c6001600160a01b031681526020018d8152602001896001600160401b031681526020015f6001600160401b031681526020015f6001600160401b03168152602001856001600160401b031681526020015f6001600160401b0316815250876003015f8581526020019081526020015f205f820151815f015f6101000a81548160ff0219169083600481111561298c5761298c613b35565b02179055506020828101518254610100600160a81b0319166101006001600160a01b039283160217835560408085015160018501556060808601516002860180546080808a015160a08b015160c08c01516001600160401b039687166001600160801b031990951694909417600160401b92871692909202919091176001600160801b0316600160801b918616919091026001600160c01b031617600160c01b928516929092029190911790915560e0909701516003909601805467ffffffffffffffff19169682169690961790955581518a861681528b861694810194909452938d1690830152918101849052908d16918e9186917fb0024b263bc3a0b728a6edea50a69efa841189f8d32ee8af9d1c2b1a1a223426910160405180910390a45090965050505050505061155360015f8051602061420f83398151915255565b5f5f805160206141af8339815191528282612ae782610abf565b83549091506001600160401b03821610801590612b1157508260010154816001600160401b031611155b612b6f5760405162461bcd60e51b815260206004820152602960248201527f506f5356616c696461746f724d616e616765723a20696e76616c6964207374616044820152681ad948185b5bdd5b9d60ba1b60648201526084016105d0565b949350505050565b5f612b806133d3565b5f805160206141ef833981519152426001600160401b038516118015612bba57506001600160401b038416612bb8426202a300614002565b115b612c1c5760405162461bcd60e51b815260206004820152602d60248201527f56616c696461746f724d616e616765723a20696e76616c69642072656769737460448201526c726174696f6e2065787069727960981b60648201526084016105d0565b85612c735760405162461bcd60e51b815260206004820152602160248201527f56616c696461746f724d616e616765723a20696e76616c6964206e6f646520496044820152601160fa1b60648201526084016105d0565b5f86815260088201602052604090205415612ce15760405162461bcd60e51b815260206004820152602860248201527f56616c696461746f724d616e616765723a206e6f646520494420616c72656164604482015267792061637469766560c01b60648201526084016105d0565b8251603014612d485760405162461bcd60e51b815260206004820152602d60248201527f56616c696461746f724d616e616765723a20696e76616c696420626c7350756260448201526c0d8d2c696caf240d8cadccee8d609b1b60648201526084016105d0565b612d5185613232565b5f80612d986040518060a00160405280856001015481526020018a8152602001896001600160401b03168152602001886001600160401b031681526020018781525061341d565b5f82815260058601602052604090209193509150612db68282613c01565b5060405163ee5b48eb60e01b81525f906005600160991b019063ee5b48eb90612de3908590600401613ce2565b6020604051808303815f875af1158015612dff573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612e239190613d14565b604080516101008101825260018152602081018c90529192508101336001600160a01b031681526001600160401b038a1660208083018290525f604080850182905260608501939093526080840181905260a0909301839052868352600788019052902081518154829060ff19166001836005811115612ea557612ea5613b35565b021790555060208201516001820155604082015160028201805460608501516001600160401b03908116600160a01b026001600160e01b03199092166001600160a01b039094169390931717905560808301516003909201805460a085015160c086015160e0909601518416600160c01b026001600160c01b03968516600160801b02969096166001600160801b03918516600160401b026001600160801b03199093169590941694909417179290921617919091179055612f668361180a565b50604080516001600160401b03808b1682528916602082015282918b9186917f79b81620b81daf2c08cd5bb3dbb79e75d2d7a87f52171fde5aadc8c47823026e910160405180910390a4509092505050612b6f60015f8051602061420f83398151915255565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661301557604051631afcd79f60e31b815260040160405180910390fd5b565b61301f612fcc565b613028816137c2565b61156b6060820135608083013561304560c0850160a086016139f8565b61305560e0860160c08701614108565b6137e3565b5f808251602e1461307d5760405162461bcd60e51b81526004016105d090614015565b5f805b60028110156130cc57613094816001613fdb565b61309f906008613e67565b61ffff168582815181106130b5576130b5613fee565b016020015160f81c901b9190911790600101613080565b5061ffff8116156130ef5760405162461bcd60e51b81526004016105d09061405e565b5f805b600481101561314a57613106816003613fdb565b613111906008613e67565b63ffffffff1686613123836002614002565b8151811061313357613133613fee565b016020015160f81c901b91909117906001016130f2565b5063ffffffff81166004146131715760405162461bcd60e51b81526004016105d0906140a1565b5f805b60208110156131c65761318881601f613fdb565b613193906008613e67565b8761319f836006614002565b815181106131af576131af613fee565b016020015160f81c901b9190911790600101613174565b505f805b6008811015613225576131de816007613fdb565b6131e9906008613e67565b6001600160401b0316886131fe836026614002565b8151811061320e5761320e613fee565b016020015160f81c901b91909117906001016131ca565b5090969095509350505050565b7fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb02545f805160206141ef8339815191529060ff165f03613270575050565b60408051606081018252600383015480825260048401546001600160401b038082166020850152600160401b9091041692820192909252904290610e10906132b89083613fdb565b106132d4576001600160401b03841660408301528082526132f3565b83826040018181516132e691906140e8565b6001600160401b03169052505b5f82602001518360400151606461330a9190614123565b613314919061414e565b600285015490915060ff908116908216111561338f5760405162461bcd60e51b815260206004820152603460248201527f56616c696461746f724d616e616765723a206d6178696d756d20686f75726c796044820152730818da1d5c9b881c985d1948195e18d95959195960621b60648201526084016105d0565b5050805160038301556020810151600490920180546040909201516001600160401b03908116600160401b026001600160801b031990931693169290921717905550565b5f8051602061420f83398151915280546001190161340457604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b60015f8051602061420f83398151915255565b5f60608260800151516030146134875760405162461bcd60e51b815260206004820152602960248201527f5374616b696e674d657373616765733a20696e76616c6964207369676e6174756044820152680e4ca40d8cadccee8d60bb1b60648201526084016105d0565b60408051608680825260c082019092525f916020820181803683370190505090505f5b60028110156134fe576134be816001613fdb565b6134c9906008613e67565b5081515f908390839081106134e0576134e0613fee565b60200101906001600160f81b03191690815f1a9053506001016134aa565b505f5b600481101561355c57613515816003613fdb565b613520906008613e67565b505f8261352e836002614002565b8151811061353e5761353e613fee565b60200101906001600160f81b03191690815f1a905350600101613501565b505f5b60208110156135b9578451816020811061357b5761357b613fee565b1a60f81b8261358b836006614002565b8151811061359b5761359b613fee565b60200101906001600160f81b03191690815f1a90535060010161355f565b505f5b602081101561361957846020015181602081106135db576135db613fee565b1a60f81b826135eb836026614002565b815181106135fb576135fb613fee565b60200101906001600160f81b03191690815f1a9053506001016135bc565b505f5b600881101561368d57613630816007613fdb565b61363b906008613e67565b60ff1685604001516001600160401b0316901c60f81b8282604661365f9190614002565b8151811061366f5761366f613fee565b60200101906001600160f81b03191690815f1a90535060010161361c565b505f5b60308110156136f857846080015181815181106136af576136af613fee565b01602001516001600160f81b031916826136ca83604e614002565b815181106136da576136da613fee565b60200101906001600160f81b03191690815f1a905350600101613690565b505f5b600881101561376a5761370f816007613fdb565b61371a906008613e67565b60608601516001600160401b0390811691161c60f81b8261373c83607e614002565b8151811061374c5761374c613fee565b60200101906001600160f81b03191690815f1a9053506001016136fb565b5060028160405161377b9190614173565b602060405180830381855afa158015613796573d5f803e3d5ffd5b5050506040513d601f19601f820116820180604052508101906137b99190613d14565b94909350915050565b6137ca612fcc565b6137d261383e565b6137da61384e565b61156b81613856565b6137eb612fcc565b5f5f805160206141af833981519152948555506001840192909255600290920180546001600160a01b03909216600160401b026001600160e01b03199092166001600160401b0390931692909217179055565b613846612fcc565b6130156138c2565b613015612fcc565b61385e612fcc565b80355f805160206141ef83398151915290815560208201357fe92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb01556138a8606083016040840161418e565b600291909101805460ff191660ff90921691909117905550565b61340a612fcc565b5080546138d690613b84565b5f825580601f106138e5575050565b601f0160209004905f5260205f209081019061156b91905b80821115613910575f81556001016138fd565b5090565b5f60e08284031215613924575f80fd5b50919050565b801515811461156b575f80fd5b803563ffffffff8116811461394a575f80fd5b919050565b5f805f60608486031215613961575f80fd5b8335925060208401356139738161392a565b915061398160408501613937565b90509250925092565b5f6020828403121561399a575f80fd5b5035919050565b5f602082840312156139b1575f80fd5b61155382613937565b5f80604083850312156139cb575f80fd5b6139d483613937565b946020939093013593505050565b80356001600160401b038116811461394a575f80fd5b5f60208284031215613a08575f80fd5b611553826139e2565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b0381118282101715613a4757613a47613a11565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613a7557613a75613a11565b604052919050565b5f6001600160401b03821115613a9557613a95613a11565b50601f01601f191660200190565b5f805f60608486031215613ab5575f80fd5b83359250613ac5602085016139e2565b915060408401356001600160401b03811115613adf575f80fd5b8401601f81018613613aef575f80fd5b8035613b02613afd82613a7d565b613a4d565b818152876020838501011115613b16575f80fd5b816020840160208301375f602083830101528093505050509250925092565b634e487b7160e01b5f52602160045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b6001600160401b03828116828216039080821115613b7d57613b7d613b49565b5092915050565b600181811c90821680613b9857607f821691505b60208210810361392457634e487b7160e01b5f52602260045260245ffd5b601f821115610a4d57805f5260205f20601f840160051c81016020851015613bdb5750805b601f840160051c820191505b81811015613bfa575f8155600101613be7565b5050505050565b81516001600160401b03811115613c1a57613c1a613a11565b613c2e81613c288454613b84565b84613bb6565b602080601f831160018114613c61575f8415613c4a5750858301515b5f19600386901b1c1916600185901b178555613cb8565b5f85815260208120601f198616915b82811015613c8f57888601518255948401946001909101908401613c70565b5085821015613cac57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f5b83811015613cda578181015183820152602001613cc2565b50505f910152565b602081525f8251806020840152613d00816040850160208701613cc0565b601f01601f19169190910160400192915050565b5f60208284031215613d24575f80fd5b5051919050565b5f60208083525f8454613d3d81613b84565b806020870152604060018084165f8114613d5e5760018114613d7a57613da7565b60ff19851660408a0152604084151560051b8a01019550613da7565b895f5260205f205f5b85811015613d9e5781548b8201860152908301908801613d83565b8a016040019650505b509398975050505050505050565b634e487b7160e01b5f52601260045260245ffd5b5f82613dd757613dd7613db5565b500490565b60208082526022908201527f506f5356616c696461746f724d616e616765723a20696e76616c6964206e6f6e604082015261636560f01b606082015260800190565b60208082526029908201527f506f5356616c696461746f724d616e616765723a206e6f6e636520646f6573206040820152680dcdee840dac2e8c6d60bb1b606082015260800190565b8082028115828204841417610acf57610acf613b49565b60208082526027908201527f56616c696461746f724d616e616765723a20696e76616c69642076616c6964616040820152661d1a5bdb88125160ca1b606082015260800190565b6001600160a01b038116811461156b575f80fd5b805161394a8161392a565b5f8060408385031215613ef5575f80fd5b82516001600160401b0380821115613f0b575f80fd5b9084019060608287031215613f1e575f80fd5b613f26613a25565b82518152602080840151613f3981613ec5565b82820152604084015183811115613f4e575f80fd5b80850194505087601f850112613f62575f80fd5b83519250613f72613afd84613a7d565b8381528882858701011115613f85575f80fd5b613f9484838301848801613cc0565b80604084015250819550613fa9818801613ed9565b9450505050509250929050565b5f6001600160401b03808316818103613fd157613fd1613b49565b6001019392505050565b81810381811115610acf57610acf613b49565b634e487b7160e01b5f52603260045260245ffd5b80820180821115610acf57610acf613b49565b60208082526029908201527f56616c696461746f724d657373616765733a20696e76616c6964206d657373616040820152680ceca40d8cadccee8d60bb1b606082015260800190565b60208082526023908201527f56616c696461746f724d657373616765733a20696e76616c696420636f64656360408201526208125160ea1b606082015260800190565b60208082526027908201527f56616c696461746f724d657373616765733a20696e76616c6964206d657373616040820152666765207479706560c81b606082015260800190565b6001600160401b03818116838216019080821115613b7d57613b7d613b49565b5f60208284031215614118575f80fd5b813561155381613ec5565b6001600160401b0381811683821602808216919082811461414657614146613b49565b505092915050565b5f6001600160401b038084168061416757614167613db5565b92169190910492915050565b5f8251614184818460208701613cc0565b9190910192915050565b5f6020828403121561419e575f80fd5b813560ff81168114611553575f80fdfe4317713f7ecbdddd4bc99e95d903adedaa883b2e7c2551610bd13e2c7e473d00506f5356616c696461746f724d616e616765723a2064656c65676174696f6e20e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00e92546d698950ddd38910d2e15ed1d923cd0a7b3dde9e2a6a3f380565559cb07a164736f6c6343000819000a", } // NativeTokenStakingManagerABI is the input ABI used to generate the binding from. diff --git a/contracts/staking/PoSValidatorManager.sol b/contracts/staking/PoSValidatorManager.sol index 1b737ea7e..18c958c60 100644 --- a/contracts/staking/PoSValidatorManager.sol +++ b/contracts/staking/PoSValidatorManager.sol @@ -173,7 +173,9 @@ abstract contract PoSValidatorManager is IPoSValidatorManager, ValidatorManager $._pendingRegisterDelegatorMessages[delegationID] = setValidatorWeightPayload; bytes32 messageID = WARP_MESSENGER.sendWarpMessage(setValidatorWeightPayload); - // Store the delegation information + // Store the delegation information. Set the delegator status to pending added, + // so that it can be properly started in the complete step, even if the delivered + // nonce is greater than the nonce used to initialize registration. $._delegatorStakes[delegationID] = Delegator({ status: DelegatorStatus.PendingAdded, owner: delegatorAddress, @@ -216,14 +218,23 @@ abstract contract PoSValidatorManager is IPoSValidatorManager, ValidatorManager Validator memory validator = _getValidator(validationID); - // The received nonce should be no greater than the highest sent nonce + // The received nonce should be no greater than the highest sent nonce. This should never + // happen since the staking manager is the only entity that can trigger a weight update + // on the P-Chain. require(validator.messageNonce >= nonce, "PoSValidatorManager: invalid nonce"); - // It should also be greater than or equal to the delegationID's starting nonce + + // The nonce should also be greater than or equal to the delegationID's starting nonce. This allows + // a weight update using a higher nonce (which implicitly includes the delegation's weight update) + // to be used to complete registration for an earlier delegation. This is necessary because the P-Chain + // is only willing to sign the latest weight update. require( $._delegatorStakes[delegationID].startingNonce <= nonce, "PoSValidatorManager: nonce does not match" ); + // Ensure the delegator is pending added. Since anybody can call this function once + // delegator registration has been initialized, we need to make sure that this function is only + // callable after that has been done. require( $._delegatorStakes[delegationID].status == DelegatorStatus.PendingAdded, "PoSValidatorManager: delegationID not pending added" @@ -257,12 +268,17 @@ abstract contract PoSValidatorManager is IPoSValidatorManager, ValidatorManager // Ensure the delegator is active Delegator memory delegator = $._delegatorStakes[delegationID]; require( - delegator.owner == _msgSender(), "PoSValidatorManager: delegation not owned by sender" + delegator.status == DelegatorStatus.Active, "PoSValidatorManager: delegation not active" ); + // Only the delegation owner can end the delegation. require( - delegator.status == DelegatorStatus.Active, "PoSValidatorManager: delegation not active" + delegator.owner == _msgSender(), "PoSValidatorManager: delegation not owned by sender" ); uint64 nonce = _getAndIncrementNonce(validationID); + + // Set the delegator status to pending removed, so that it can be properly removed in + // the complete step, even if the delivered nonce is greater than the nonce used to + // initialize the removal. delegator.status = DelegatorStatus.PendingRemoved; delegator.endedAt = uint64(block.timestamp); delegator.endingNonce = nonce; @@ -307,14 +323,23 @@ abstract contract PoSValidatorManager is IPoSValidatorManager, ValidatorManager delete $._pendingEndDelegatorMessages[delegationID]; Validator memory validator = _getValidator(validationID); - // The received nonce should be no greater than the highest sent nonce + // The received nonce should be no greater than the highest sent nonce. This should never + // happen since the staking manager is the only entity that can trigger a weight update + // on the P-Chain. require(validator.messageNonce >= nonce, "PoSValidatorManager: invalid nonce"); - // It should also be greater than or equal to the delegator's ending nonce + + // The nonce should also be greater than or equal to the delegationID's ending nonce. This allows + // a weight update using a higher nonce (which implicitly includes the delegation's weight update) + // to be used to complete delisting for an earlier delegation. This is necessary because the P-Chain + // is only willing to sign the latest weight update. require( $._delegatorStakes[delegationID].endingNonce <= nonce, "PoSValidatorManager: nonce does not match" ); + // Ensure the delegator is pending removed. Since anybody can call this function once + // end delegation has been initialized, we need to make sure that this function is only + // callable after that has been done. require( $._delegatorStakes[delegationID].status == DelegatorStatus.PendingRemoved, "PoSValidatorManager: delegation not pending added" diff --git a/contracts/staking/interfaces/IPoSValidatorManager.sol b/contracts/staking/interfaces/IPoSValidatorManager.sol index aae3b8b3b..d7b7421fe 100644 --- a/contracts/staking/interfaces/IPoSValidatorManager.sol +++ b/contracts/staking/interfaces/IPoSValidatorManager.sol @@ -122,7 +122,10 @@ interface IPoSValidatorManager is IValidatorManager { * @notice Completes the delegator registration process by returning an acknowledgement of the registration of a * validationID from the P-Chain. After this function is called, the validator's weight is updated in the contract state. * Any P-Chain acknowledgement with a nonce greater than or equal to the nonce used to initialize registration of the - * delegator is valid, as long as that nonce has been sent by the contract. + * delegator is valid, as long as that nonce has been sent by the contract. For the purposes of computing delegation rewards, + * the delegation is considered active after this function is called. + * Note however that only the specified delegation will be marked as registered, even if the validator weight update + * message implicitly includes multiple weight changes. * @param messageIndex The index of the Warp message to be received providing the acknowledgement. * @param delegationID The ID of the delegation being registered. */ @@ -130,7 +133,9 @@ interface IPoSValidatorManager is IValidatorManager { /** * @notice Begins the process of removing a delegator from a validation period. The delegator must have been previously - * registered with the given validationID. + * registered with the given validationID. For the purposes of computing delegation rewards, the delegation period is + * considered ended when this function is called. In order to be eligible for rewards, an uptime proof must be provided. + * Note that this function can only be called by the address that registered the delegation. * @param delegationID The ID of the delegation being removed. * @param includeUptimeProof Whether or not an uptime proof is provided for the validation period. * If no uptime proof is provided, the validation uptime for the delegation period will be assumed to be 0. @@ -154,7 +159,10 @@ interface IPoSValidatorManager is IValidatorManager { * @notice Completes the process of ending a delegation by receiving an acknowledgement from the P-Chain. * After this function is called, the validator's weight is updated in the contract state. * Any P-Chain acknowledgement with a nonce greater than or equal to the nonce used to initialize the end of the - * delegator's delegation is valid, as long as that nonce has been sent by the contract. + * delegator's delegation is valid, as long as that nonce has been sent by the contract. This is because the validator + * weight change pertaining to the delegation ending is included in any subsequent validator weight update messages. + * Note however that only the specified delegation will be marked as completed, even if the validator weight update + * message implicitly includes multiple weight changes. * @param messageIndex The index of the Warp message to be received providing the acknowledgement. * @param delegationID The ID of the delegation being removed. */ From b8f8f60e1522b3048ccb7857e57e1aa2c9a992ba Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Fri, 6 Sep 2024 07:43:09 -0400 Subject: [PATCH 2/3] Update contracts/staking/interfaces/IPoSValidatorManager.sol Signed-off-by: Geoff Stuart --- contracts/staking/interfaces/IPoSValidatorManager.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/staking/interfaces/IPoSValidatorManager.sol b/contracts/staking/interfaces/IPoSValidatorManager.sol index d7b7421fe..987027559 100644 --- a/contracts/staking/interfaces/IPoSValidatorManager.sol +++ b/contracts/staking/interfaces/IPoSValidatorManager.sol @@ -124,7 +124,7 @@ interface IPoSValidatorManager is IValidatorManager { * Any P-Chain acknowledgement with a nonce greater than or equal to the nonce used to initialize registration of the * delegator is valid, as long as that nonce has been sent by the contract. For the purposes of computing delegation rewards, * the delegation is considered active after this function is called. - * Note however that only the specified delegation will be marked as registered, even if the validator weight update + * Note: only the specified delegation will be marked as registered, even if the validator weight update * message implicitly includes multiple weight changes. * @param messageIndex The index of the Warp message to be received providing the acknowledgement. * @param delegationID The ID of the delegation being registered. From 99a12a50c06e8328f055a2a55ba83d8c422b1f5a Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Fri, 6 Sep 2024 07:43:14 -0400 Subject: [PATCH 3/3] Update contracts/staking/interfaces/IPoSValidatorManager.sol Signed-off-by: Geoff Stuart --- contracts/staking/interfaces/IPoSValidatorManager.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/staking/interfaces/IPoSValidatorManager.sol b/contracts/staking/interfaces/IPoSValidatorManager.sol index 987027559..84cc32b3b 100644 --- a/contracts/staking/interfaces/IPoSValidatorManager.sol +++ b/contracts/staking/interfaces/IPoSValidatorManager.sol @@ -161,7 +161,7 @@ interface IPoSValidatorManager is IValidatorManager { * Any P-Chain acknowledgement with a nonce greater than or equal to the nonce used to initialize the end of the * delegator's delegation is valid, as long as that nonce has been sent by the contract. This is because the validator * weight change pertaining to the delegation ending is included in any subsequent validator weight update messages. - * Note however that only the specified delegation will be marked as completed, even if the validator weight update + * Note: only the specified delegation will be marked as completed, even if the validator weight update * message implicitly includes multiple weight changes. * @param messageIndex The index of the Warp message to be received providing the acknowledgement. * @param delegationID The ID of the delegation being removed.