From 18f3bfbd8db91b3b1a81af7768375a1f770bdeae Mon Sep 17 00:00:00 2001 From: Jongwon Park Date: Fri, 23 Aug 2024 22:55:28 +0900 Subject: [PATCH] feat(contracts): contract upgradeability and predeploy setup (#28) * feat(contracts): upgradeable, visibility, and predeploys * chore(contracts): modify script for upgradeability * test(contracts): upgradeability contracts mod tests * chore(contracts): update bindings * fix: update tests and add event * fix upgradeability and most tests * test(contracts): fix constructor test * lint(contracts): lint tests & fix imports * lint(contracts): fmt bindings --------- Co-authored-by: Raul --- contracts/bindings/iptokenslashing.go | 524 ++++++- contracts/bindings/iptokenslashing_more.go | 2 +- .../iptokenslashing_storage_layout.json | 25 +- contracts/bindings/iptokenstaking.go | 1350 ++++++++++++++--- contracts/bindings/iptokenstaking_more.go | 2 +- .../iptokenstaking_storage_layout.json | 95 +- contracts/bindings/upgradeentrypoint.go | 390 ++++- contracts/bindings/upgradeentrypoint_more.go | 2 +- .../upgradeentrypoint_storage_layout.json | 27 +- contracts/pnpm-lock.yaml | 12 +- contracts/script/DeployIPTokenStaking.sol | 24 +- contracts/script/utils/EIP1967Helper.sol | 37 + .../script/utils/InitializableHelper.sol | 66 + contracts/src/libraries/Predeploys.sol | 41 + contracts/src/libraries/Secp256k1.sol | 2 +- contracts/src/protocol/IPTokenSlashing.sol | 21 +- contracts/src/protocol/IPTokenStaking.sol | 43 +- contracts/src/protocol/UpgradeEntrypoint.sol | 20 +- contracts/test/stake/IPTokenSlashing.t.sol | 33 +- contracts/test/stake/IPTokenStaking.t.sol | 146 +- .../test/upgrade/UpgradeEntryPoint.t.sol | 17 +- contracts/test/utils/Test.sol | 60 + 22 files changed, 2425 insertions(+), 514 deletions(-) create mode 100644 contracts/script/utils/EIP1967Helper.sol create mode 100644 contracts/script/utils/InitializableHelper.sol create mode 100644 contracts/src/libraries/Predeploys.sol create mode 100644 contracts/test/utils/Test.sol diff --git a/contracts/bindings/iptokenslashing.go b/contracts/bindings/iptokenslashing.go index 6ae730d4..b52fe8e9 100644 --- a/contracts/bindings/iptokenslashing.go +++ b/contracts/bindings/iptokenslashing.go @@ -31,8 +31,8 @@ var ( // IPTokenSlashingMetaData contains all meta data concerning the IPTokenSlashing contract. var IPTokenSlashingMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"ipTokenStaking\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"newUnjailFee\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"IP_TOKEN_STAKING\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPTokenStaking\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUnjailFee\",\"inputs\":[{\"name\":\"newUnjailFee\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unjail\",\"inputs\":[{\"name\":\"validatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"unjailFee\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unjailOnBehalf\",\"inputs\":[{\"name\":\"validatorCmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unjail\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"validatorCmpPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]}]", - Bin: "0x60a060405234801561001057600080fd5b50604051610d2f380380610d2f83398101604081905261002f91610107565b826001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161007f565b506001600160a01b0390911660805260025550610143565b600180546001600160a01b03191690556100988161009b565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b038116811461010257600080fd5b919050565b60008060006060848603121561011c57600080fd5b610125846100eb565b9250610133602085016100eb565b9150604084015190509250925092565b608051610bcb6101646000396000818160a8015261059e0152610bcb6000f3fe6080604052600436106100915760003560e01c806379ba50971161005957806379ba5097146101555780638da5cb5b1461016a578063e30c397814610188578063e4dfccd8146101a6578063f2fde38b146101b957600080fd5b806304ff53ed146100965780630c863f77146100e75780632801f1ec1461010957806340eda14a1461012d578063715018a614610140575b600080fd5b3480156100a257600080fd5b506100ca7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100f357600080fd5b506101076101023660046107e0565b6101d9565b005b34801561011557600080fd5b5061011f60025481565b6040519081526020016100de565b61010761013b3660046107f9565b6101e6565b34801561014c57600080fd5b50610107610268565b34801561016157600080fd5b5061010761027c565b34801561017657600080fd5b506000546001600160a01b03166100ca565b34801561019457600080fd5b506001546001600160a01b03166100ca565b6101076101b43660046107f9565b6102c5565b3480156101c557600080fd5b506101076101d436600461086b565b610450565b6101e16104c1565b600255565b61022582828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104ee92505050565b61026482828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061067e92505050565b5050565b6102706104c1565b61027a600061074a565b565b60015433906001600160a01b031681146102b95760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b6102c28161074a565b50565b818133604182146102e85760405162461bcd60e51b81526004016102b09061089b565b828260008181106102fb576102fb6108e1565b9050013560f81c60f81b6001600160f81b031916600460f81b146103315760405162461bcd60e51b81526004016102b0906108f7565b806001600160a01b03166103458484610763565b6001600160a01b0316146103b35760405162461bcd60e51b815260206004820152602f60248201527f4950546f6b656e536c617368696e673a20496e76616c6964207075626b65792060448201526e64657269766564206164647265737360881b60648201526084016102b0565b604051633444d8b760e11b815260009073__$070efe90de6222b6182e3f0710b89d2262$__90636889b16e906103ef908990899060040161093d565b600060405180830381865af415801561040c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104349190810190610a1a565b905061043f816104ee565b6104488161067e565b505050505050565b6104586104c1565b600180546001600160a01b0383166001600160a01b031990911681179091556104896000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b0316331461027a5760405163118cdaa760e01b81523360048201526024016102b0565b805160211461050f5760405162461bcd60e51b81526004016102b09061089b565b80600081518110610522576105226108e1565b6020910101516001600160f81b031916600160f91b1480610568575080600081518110610551576105516108e1565b6020910101516001600160f81b031916600360f81b145b6105845760405162461bcd60e51b81526004016102b0906108f7565b604051638d3e1e4160e01b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690638d3e1e41906105d3908590600401610a6b565b600060405180830381865afa1580156105f0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106189190810190610ab7565b50505050509050806102645760405162461bcd60e51b815260206004820152602960248201527f4950546f6b656e536c617368696e673a2056616c696461746f7220646f6573206044820152681b9bdd08195e1a5cdd60ba1b60648201526084016102b0565b60025434146106d95760405162461bcd60e51b815260206004820152602160248201527f4950546f6b656e536c617368696e673a20496e73756666696369656e742066656044820152606560f81b60648201526084016102b0565b6040516000903480156108fc029183818181858288f19350505050158015610705573d6000803e3d6000fd5b50336001600160a01b03167f4a90ea32527ecacc0f4b32b31f99e4c633a2b4fe81ea7444989e2e68bc9ece3b8260405161073f9190610a6b565b60405180910390a250565b600180546001600160a01b03191690556102c281610790565b60006107728260018186610b5b565b604051610780929190610b85565b6040519081900390209392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156107f257600080fd5b5035919050565b6000806020838503121561080c57600080fd5b823567ffffffffffffffff8082111561082457600080fd5b818501915085601f83011261083857600080fd5b81358181111561084757600080fd5b86602082850101111561085957600080fd5b60209290920196919550909350505050565b60006020828403121561087d57600080fd5b81356001600160a01b038116811461089457600080fd5b9392505050565b60208082526026908201527f4950546f6b656e536c617368696e673a20496e76616c6964207075626b6579206040820152650d8cadccee8d60d31b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526026908201527f4950546f6b656e536c617368696e673a20496e76616c6964207075626b6579206040820152650e0e4caccd2f60d31b606082015260800190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561099d578181015183820152602001610985565b50506000910152565b600067ffffffffffffffff808411156109c1576109c161096c565b604051601f8501601f19908116603f011681019082821181831017156109e9576109e961096c565b81604052809350858152868686011115610a0257600080fd5b610a10866020830187610982565b5050509392505050565b600060208284031215610a2c57600080fd5b815167ffffffffffffffff811115610a4357600080fd5b8201601f81018413610a5457600080fd5b610a63848251602084016109a6565b949350505050565b6020815260008251806020840152610a8a816040850160208701610982565b601f01601f19169190910160400192915050565b805163ffffffff81168114610ab257600080fd5b919050565b60008060008060008060c08789031215610ad057600080fd5b86518015158114610ae057600080fd5b602088015190965067ffffffffffffffff811115610afd57600080fd5b8701601f81018913610b0e57600080fd5b610b1d898251602084016109a6565b95505060408701519350610b3360608801610a9e565b9250610b4160808801610a9e565b9150610b4f60a08801610a9e565b90509295509295509295565b60008085851115610b6b57600080fd5b83861115610b7857600080fd5b5050820193919092039150565b818382376000910190815291905056fea2646970667358221220ef1caa5e2adb7ee57adc7890bbe897a407f3d4c2912ee3a3a663fc33d6345b8c64736f6c63430008180033", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"ipTokenStaking\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"newUnjailFee\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"IP_TOKEN_STAKING\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIPTokenStaking\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"accessManager\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setUnjailFee\",\"inputs\":[{\"name\":\"newUnjailFee\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unjail\",\"inputs\":[{\"name\":\"validatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"unjailFee\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unjailOnBehalf\",\"inputs\":[{\"name\":\"validatorCmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unjail\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"validatorCmpPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"UnjailFeeSet\",\"inputs\":[{\"name\":\"newUnjailFee\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]", + Bin: "0x60c0604052306080523480156200001557600080fd5b5060405162001794380380620017948339810160408190526200003891620001e2565b600081116200009a5760405162461bcd60e51b815260206004820152602360248201527f4950546f6b656e536c617368696e673a20496e76616c696420756e6a61696c2060448201526266656560e81b60648201526084015b60405180910390fd5b6001600160a01b0382166200010a5760405162461bcd60e51b815260206004820152602f60248201527f4950546f6b656e536c617368696e673a20496e76616c6964204950546f6b656e60448201526e5374616b696e67206164647265737360881b606482015260840162000091565b6001600160a01b03821660a0526000819055620001266200012e565b50506200021e565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156200017f5760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620001df5780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60008060408385031215620001f657600080fd5b82516001600160a01b03811681146200020e57600080fd5b6020939093015192949293505050565b60805160a05161153c620002586000396000818160f4015261088b015260008181610a4201528181610a6b0152610bb1015261153c6000f3fe6080604052600436106100dd5760003560e01c806379ba50971161007f578063c4d66de811610059578063c4d66de814610231578063e30c397814610251578063e4dfccd814610266578063f2fde38b1461027957600080fd5b806379ba5097146101c95780638da5cb5b146101de578063ad3cb1cc146101f357600080fd5b806340eda14a116100bb57806340eda14a146101795780634f1ef2861461018c57806352d1902d1461019f578063715018a6146101b457600080fd5b806304ff53ed146100e25780630c863f77146101335780632801f1ec14610155575b600080fd5b3480156100ee57600080fd5b506101167f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561013f57600080fd5b5061015361014e36600461107f565b610299565b005b34801561016157600080fd5b5061016b60005481565b60405190815260200161012a565b610153610187366004611098565b6102dc565b61015361019a366004611195565b61035e565b3480156101ab57600080fd5b5061016b610379565b3480156101c057600080fd5b50610153610396565b3480156101d557600080fd5b506101536103aa565b3480156101ea57600080fd5b506101166103f7565b3480156101ff57600080fd5b50610224604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161012a9190611276565b34801561023d57600080fd5b5061015361024c366004611289565b61042c565b34801561025d57600080fd5b506101166105b8565b610153610274366004611098565b6105e1565b34801561028557600080fd5b50610153610294366004611289565b610724565b6102a16107a9565b60008190556040518181527feac81de2f20162b0540ca5d3f43896af15b471a55729ff0c000e611d8b2723639060200160405180910390a150565b61031b82828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506107db92505050565b61035a82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061096b92505050565b5050565b610366610a37565b61036f82610adc565b61035a8282610ae4565b6000610383610ba6565b506000805160206114e783398151915290565b61039e6107a9565b6103a86000610bef565b565b33806103b46105b8565b6001600160a01b0316146103eb5760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b6103f481610bef565b50565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156104725750825b905060008267ffffffffffffffff16600114801561048f5750303b155b90508115801561049d575080155b156104bb5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156104e557845460ff60401b1916600160401b1785555b6001600160a01b0386166105595760405162461bcd60e51b815260206004820152603560248201527f4950546f6b656e536c617368696e673a206163636573734d616e616765722063604482015274616e6e6f74206265207a65726f206164647265737360581b60648201526084016103e2565b610561610c27565b61056a86610c2f565b83156105b057845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0061041c565b818133604182146106045760405162461bcd60e51b81526004016103e2906112a4565b82826000818110610617576106176112ea565b9050013560f81c60f81b6001600160f81b031916600460f81b1461064d5760405162461bcd60e51b81526004016103e290611300565b806001600160a01b03166106618484610c40565b6001600160a01b0316146106cf5760405162461bcd60e51b815260206004820152602f60248201527f4950546f6b656e536c617368696e673a20496e76616c6964207075626b65792060448201526e64657269766564206164647265737360881b60648201526084016103e2565b600061071086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c6f92505050565b905061071b816107db565b6105b08161096b565b61072c6107a9565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556107706103f7565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b336107b26103f7565b6001600160a01b0316146103a85760405163118cdaa760e01b81523360048201526024016103e2565b80516021146107fc5760405162461bcd60e51b81526004016103e2906112a4565b8060008151811061080f5761080f6112ea565b6020910101516001600160f81b031916600160f91b148061085557508060008151811061083e5761083e6112ea565b6020910101516001600160f81b031916600360f81b145b6108715760405162461bcd60e51b81526004016103e290611300565b604051638d3e1e4160e01b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690638d3e1e41906108c0908590600401611276565b600060405180830381865afa1580156108dd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610905919081019061135a565b505050505090508061035a5760405162461bcd60e51b815260206004820152602960248201527f4950546f6b656e536c617368696e673a2056616c696461746f7220646f6573206044820152681b9bdd08195e1a5cdd60ba1b60648201526084016103e2565b60005434146109c65760405162461bcd60e51b815260206004820152602160248201527f4950546f6b656e536c617368696e673a20496e73756666696369656e742066656044820152606560f81b60648201526084016103e2565b6040516000903480156108fc029183818181858288f193505050501580156109f2573d6000803e3d6000fd5b50336001600160a01b03167f4a90ea32527ecacc0f4b32b31f99e4c633a2b4fe81ea7444989e2e68bc9ece3b82604051610a2c9190611276565b60405180910390a250565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610abe57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610ab26000805160206114e7833981519152546001600160a01b031690565b6001600160a01b031614155b156103a85760405163703e46dd60e11b815260040160405180910390fd5b6103f46107a9565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610b3e575060408051601f3d908101601f19168201909252610b3b91810190611426565b60015b610b6657604051634c9c8ce360e01b81526001600160a01b03831660048201526024016103e2565b6000805160206114e78339815191528114610b9757604051632a87526960e21b8152600481018290526024016103e2565b610ba18383610dbb565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103a85760405163703e46dd60e11b815260040160405180910390fd5b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b031916815561035a82610e11565b6103a8610e82565b610c37610e82565b6103f481610ecb565b6000610c4f826001818661143f565b604051610c5d929190611469565b60405190819003902090505b92915050565b60608151604114610cd15760405162461bcd60e51b815260206004820152602660248201527f496e76616c696420756e636f6d70726573736564207075626c6963206b6579206044820152650d8cadccee8d60d31b60648201526084016103e2565b602182015160418301516000610ceb600260ff8416611479565b60ff1615610cfd57600360f81b610d03565b600160f91b5b60408051602180825260608201909252919250600091906020820181803683370190505090508181600081518110610d3d57610d3d6112ea565b60200101906001600160f81b031916908160001a90535060005b6020811015610db157848160208110610d7257610d726112ea565b1a60f81b82610d828360016114a9565b81518110610d9257610d926112ea565b60200101906001600160f81b031916908160001a905350600101610d57565b5095945050505050565b610dc482610efd565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610e0957610ba18282610f62565b61035a610fd8565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166103a857604051631afcd79f60e31b815260040160405180910390fd5b610ed3610e82565b6001600160a01b0381166103eb57604051631e4fbdf760e01b8152600060048201526024016103e2565b806001600160a01b03163b600003610f3357604051634c9c8ce360e01b81526001600160a01b03821660048201526024016103e2565b6000805160206114e783398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610f7f91906114ca565b600060405180830381855af49150503d8060008114610fba576040519150601f19603f3d011682016040523d82523d6000602084013e610fbf565b606091505b5091509150610fcf858383610ff7565b95945050505050565b34156103a85760405163b398979f60e01b815260040160405180910390fd5b60608261100c5761100782611056565b61104f565b815115801561102357506001600160a01b0384163b155b1561104c57604051639996b31560e01b81526001600160a01b03851660048201526024016103e2565b50805b9392505050565b8051156110665780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60006020828403121561109157600080fd5b5035919050565b600080602083850312156110ab57600080fd5b823567ffffffffffffffff808211156110c357600080fd5b818501915085601f8301126110d757600080fd5b8135818111156110e657600080fd5b8660208285010111156110f857600080fd5b60209290920196919550909350505050565b80356001600160a01b038116811461112157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561116557611165611126565b604052919050565b600067ffffffffffffffff82111561118757611187611126565b50601f01601f191660200190565b600080604083850312156111a857600080fd5b6111b18361110a565b9150602083013567ffffffffffffffff8111156111cd57600080fd5b8301601f810185136111de57600080fd5b80356111f16111ec8261116d565b61113c565b81815286602083850101111561120657600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b83811015611241578181015183820152602001611229565b50506000910152565b60008151808452611262816020860160208601611226565b601f01601f19169290920160200192915050565b60208152600061104f602083018461124a565b60006020828403121561129b57600080fd5b61104f8261110a565b60208082526026908201527f4950546f6b656e536c617368696e673a20496e76616c6964207075626b6579206040820152650d8cadccee8d60d31b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526026908201527f4950546f6b656e536c617368696e673a20496e76616c6964207075626b6579206040820152650e0e4caccd2f60d31b606082015260800190565b805163ffffffff8116811461112157600080fd5b60008060008060008060c0878903121561137357600080fd5b8651801515811461138357600080fd5b602088015190965067ffffffffffffffff8111156113a057600080fd5b8701601f810189136113b157600080fd5b80516113bf6111ec8261116d565b8181528a60208385010111156113d457600080fd5b6113e5826020830160208601611226565b809750505050604087015193506113fe60608801611346565b925061140c60808801611346565b915061141a60a08801611346565b90509295509295509295565b60006020828403121561143857600080fd5b5051919050565b6000808585111561144f57600080fd5b8386111561145c57600080fd5b5050820193919092039150565b8183823760009101908152919050565b600060ff83168061149a57634e487b7160e01b600052601260045260246000fd5b8060ff84160691505092915050565b80820180821115610c6957634e487b7160e01b600052601160045260246000fd5b600082516114dc818460208701611226565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220144587c59cbacff3f2fd676bff35eb96ab661aedce15a1a06cdaf920eda0f2cc64736f6c63430008180033", } // IPTokenSlashingABI is the input ABI used to generate the binding from. @@ -44,7 +44,7 @@ var IPTokenSlashingABI = IPTokenSlashingMetaData.ABI var IPTokenSlashingBin = IPTokenSlashingMetaData.Bin // DeployIPTokenSlashing deploys a new Ethereum contract, binding an instance of IPTokenSlashing to it. -func DeployIPTokenSlashing(auth *bind.TransactOpts, backend bind.ContractBackend, newOwner common.Address, ipTokenStaking common.Address, newUnjailFee *big.Int) (common.Address, *types.Transaction, *IPTokenSlashing, error) { +func DeployIPTokenSlashing(auth *bind.TransactOpts, backend bind.ContractBackend, ipTokenStaking common.Address, newUnjailFee *big.Int) (common.Address, *types.Transaction, *IPTokenSlashing, error) { parsed, err := IPTokenSlashingMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -53,7 +53,7 @@ func DeployIPTokenSlashing(auth *bind.TransactOpts, backend bind.ContractBackend return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(IPTokenSlashingBin), backend, newOwner, ipTokenStaking, newUnjailFee) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(IPTokenSlashingBin), backend, ipTokenStaking, newUnjailFee) if err != nil { return common.Address{}, nil, nil, err } @@ -233,6 +233,37 @@ func (_IPTokenSlashing *IPTokenSlashingCallerSession) IPTOKENSTAKING() (common.A return _IPTokenSlashing.Contract.IPTOKENSTAKING(&_IPTokenSlashing.CallOpts) } +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_IPTokenSlashing *IPTokenSlashingCaller) UPGRADEINTERFACEVERSION(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _IPTokenSlashing.contract.Call(opts, &out, "UPGRADE_INTERFACE_VERSION") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_IPTokenSlashing *IPTokenSlashingSession) UPGRADEINTERFACEVERSION() (string, error) { + return _IPTokenSlashing.Contract.UPGRADEINTERFACEVERSION(&_IPTokenSlashing.CallOpts) +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_IPTokenSlashing *IPTokenSlashingCallerSession) UPGRADEINTERFACEVERSION() (string, error) { + return _IPTokenSlashing.Contract.UPGRADEINTERFACEVERSION(&_IPTokenSlashing.CallOpts) +} + // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // // Solidity: function owner() view returns(address) @@ -295,6 +326,37 @@ func (_IPTokenSlashing *IPTokenSlashingCallerSession) PendingOwner() (common.Add return _IPTokenSlashing.Contract.PendingOwner(&_IPTokenSlashing.CallOpts) } +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_IPTokenSlashing *IPTokenSlashingCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _IPTokenSlashing.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_IPTokenSlashing *IPTokenSlashingSession) ProxiableUUID() ([32]byte, error) { + return _IPTokenSlashing.Contract.ProxiableUUID(&_IPTokenSlashing.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_IPTokenSlashing *IPTokenSlashingCallerSession) ProxiableUUID() ([32]byte, error) { + return _IPTokenSlashing.Contract.ProxiableUUID(&_IPTokenSlashing.CallOpts) +} + // UnjailFee is a free data retrieval call binding the contract method 0x2801f1ec. // // Solidity: function unjailFee() view returns(uint256) @@ -347,6 +409,27 @@ func (_IPTokenSlashing *IPTokenSlashingTransactorSession) AcceptOwnership() (*ty return _IPTokenSlashing.Contract.AcceptOwnership(&_IPTokenSlashing.TransactOpts) } +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address accessManager) returns() +func (_IPTokenSlashing *IPTokenSlashingTransactor) Initialize(opts *bind.TransactOpts, accessManager common.Address) (*types.Transaction, error) { + return _IPTokenSlashing.contract.Transact(opts, "initialize", accessManager) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address accessManager) returns() +func (_IPTokenSlashing *IPTokenSlashingSession) Initialize(accessManager common.Address) (*types.Transaction, error) { + return _IPTokenSlashing.Contract.Initialize(&_IPTokenSlashing.TransactOpts, accessManager) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address accessManager) returns() +func (_IPTokenSlashing *IPTokenSlashingTransactorSession) Initialize(accessManager common.Address) (*types.Transaction, error) { + return _IPTokenSlashing.Contract.Initialize(&_IPTokenSlashing.TransactOpts, accessManager) +} + // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. // // Solidity: function renounceOwnership() returns() @@ -452,6 +535,161 @@ func (_IPTokenSlashing *IPTokenSlashingTransactorSession) UnjailOnBehalf(validat return _IPTokenSlashing.Contract.UnjailOnBehalf(&_IPTokenSlashing.TransactOpts, validatorCmpPubkey) } +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_IPTokenSlashing *IPTokenSlashingTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _IPTokenSlashing.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_IPTokenSlashing *IPTokenSlashingSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _IPTokenSlashing.Contract.UpgradeToAndCall(&_IPTokenSlashing.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_IPTokenSlashing *IPTokenSlashingTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _IPTokenSlashing.Contract.UpgradeToAndCall(&_IPTokenSlashing.TransactOpts, newImplementation, data) +} + +// IPTokenSlashingInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the IPTokenSlashing contract. +type IPTokenSlashingInitializedIterator struct { + Event *IPTokenSlashingInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IPTokenSlashingInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IPTokenSlashingInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IPTokenSlashingInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IPTokenSlashingInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IPTokenSlashingInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IPTokenSlashingInitialized represents a Initialized event raised by the IPTokenSlashing contract. +type IPTokenSlashingInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_IPTokenSlashing *IPTokenSlashingFilterer) FilterInitialized(opts *bind.FilterOpts) (*IPTokenSlashingInitializedIterator, error) { + + logs, sub, err := _IPTokenSlashing.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &IPTokenSlashingInitializedIterator{contract: _IPTokenSlashing.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_IPTokenSlashing *IPTokenSlashingFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *IPTokenSlashingInitialized) (event.Subscription, error) { + + logs, sub, err := _IPTokenSlashing.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IPTokenSlashingInitialized) + if err := _IPTokenSlashing.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_IPTokenSlashing *IPTokenSlashingFilterer) ParseInitialized(log types.Log) (*IPTokenSlashingInitialized, error) { + event := new(IPTokenSlashingInitialized) + if err := _IPTokenSlashing.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // IPTokenSlashingOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the IPTokenSlashing contract. type IPTokenSlashingOwnershipTransferStartedIterator struct { Event *IPTokenSlashingOwnershipTransferStarted // Event containing the contract specifics and raw log @@ -902,3 +1140,281 @@ func (_IPTokenSlashing *IPTokenSlashingFilterer) ParseUnjail(log types.Log) (*IP event.Raw = log return event, nil } + +// IPTokenSlashingUnjailFeeSetIterator is returned from FilterUnjailFeeSet and is used to iterate over the raw logs and unpacked data for UnjailFeeSet events raised by the IPTokenSlashing contract. +type IPTokenSlashingUnjailFeeSetIterator struct { + Event *IPTokenSlashingUnjailFeeSet // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IPTokenSlashingUnjailFeeSetIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IPTokenSlashingUnjailFeeSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IPTokenSlashingUnjailFeeSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IPTokenSlashingUnjailFeeSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IPTokenSlashingUnjailFeeSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IPTokenSlashingUnjailFeeSet represents a UnjailFeeSet event raised by the IPTokenSlashing contract. +type IPTokenSlashingUnjailFeeSet struct { + NewUnjailFee *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnjailFeeSet is a free log retrieval operation binding the contract event 0xeac81de2f20162b0540ca5d3f43896af15b471a55729ff0c000e611d8b272363. +// +// Solidity: event UnjailFeeSet(uint256 newUnjailFee) +func (_IPTokenSlashing *IPTokenSlashingFilterer) FilterUnjailFeeSet(opts *bind.FilterOpts) (*IPTokenSlashingUnjailFeeSetIterator, error) { + + logs, sub, err := _IPTokenSlashing.contract.FilterLogs(opts, "UnjailFeeSet") + if err != nil { + return nil, err + } + return &IPTokenSlashingUnjailFeeSetIterator{contract: _IPTokenSlashing.contract, event: "UnjailFeeSet", logs: logs, sub: sub}, nil +} + +// WatchUnjailFeeSet is a free log subscription operation binding the contract event 0xeac81de2f20162b0540ca5d3f43896af15b471a55729ff0c000e611d8b272363. +// +// Solidity: event UnjailFeeSet(uint256 newUnjailFee) +func (_IPTokenSlashing *IPTokenSlashingFilterer) WatchUnjailFeeSet(opts *bind.WatchOpts, sink chan<- *IPTokenSlashingUnjailFeeSet) (event.Subscription, error) { + + logs, sub, err := _IPTokenSlashing.contract.WatchLogs(opts, "UnjailFeeSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IPTokenSlashingUnjailFeeSet) + if err := _IPTokenSlashing.contract.UnpackLog(event, "UnjailFeeSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnjailFeeSet is a log parse operation binding the contract event 0xeac81de2f20162b0540ca5d3f43896af15b471a55729ff0c000e611d8b272363. +// +// Solidity: event UnjailFeeSet(uint256 newUnjailFee) +func (_IPTokenSlashing *IPTokenSlashingFilterer) ParseUnjailFeeSet(log types.Log) (*IPTokenSlashingUnjailFeeSet, error) { + event := new(IPTokenSlashingUnjailFeeSet) + if err := _IPTokenSlashing.contract.UnpackLog(event, "UnjailFeeSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IPTokenSlashingUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the IPTokenSlashing contract. +type IPTokenSlashingUpgradedIterator struct { + Event *IPTokenSlashingUpgraded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IPTokenSlashingUpgradedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IPTokenSlashingUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IPTokenSlashingUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IPTokenSlashingUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IPTokenSlashingUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IPTokenSlashingUpgraded represents a Upgraded event raised by the IPTokenSlashing contract. +type IPTokenSlashingUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_IPTokenSlashing *IPTokenSlashingFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*IPTokenSlashingUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _IPTokenSlashing.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &IPTokenSlashingUpgradedIterator{contract: _IPTokenSlashing.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_IPTokenSlashing *IPTokenSlashingFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *IPTokenSlashingUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _IPTokenSlashing.contract.WatchLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IPTokenSlashingUpgraded) + if err := _IPTokenSlashing.contract.UnpackLog(event, "Upgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_IPTokenSlashing *IPTokenSlashingFilterer) ParseUpgraded(log types.Log) (*IPTokenSlashingUpgraded, error) { + event := new(IPTokenSlashingUpgraded) + if err := _IPTokenSlashing.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/bindings/iptokenslashing_more.go b/contracts/bindings/iptokenslashing_more.go index 9e144e62..c37a2dcd 100644 --- a/contracts/bindings/iptokenslashing_more.go +++ b/contracts/bindings/iptokenslashing_more.go @@ -5,7 +5,7 @@ import ( ) const ( - IPTokenSlashingDeployedBytecode = "0x6080604052600436106100915760003560e01c806379ba50971161005957806379ba5097146101555780638da5cb5b1461016a578063e30c397814610188578063e4dfccd8146101a6578063f2fde38b146101b957600080fd5b806304ff53ed146100965780630c863f77146100e75780632801f1ec1461010957806340eda14a1461012d578063715018a614610140575b600080fd5b3480156100a257600080fd5b506100ca7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100f357600080fd5b506101076101023660046107e0565b6101d9565b005b34801561011557600080fd5b5061011f60025481565b6040519081526020016100de565b61010761013b3660046107f9565b6101e6565b34801561014c57600080fd5b50610107610268565b34801561016157600080fd5b5061010761027c565b34801561017657600080fd5b506000546001600160a01b03166100ca565b34801561019457600080fd5b506001546001600160a01b03166100ca565b6101076101b43660046107f9565b6102c5565b3480156101c557600080fd5b506101076101d436600461086b565b610450565b6101e16104c1565b600255565b61022582828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104ee92505050565b61026482828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061067e92505050565b5050565b6102706104c1565b61027a600061074a565b565b60015433906001600160a01b031681146102b95760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b6102c28161074a565b50565b818133604182146102e85760405162461bcd60e51b81526004016102b09061089b565b828260008181106102fb576102fb6108e1565b9050013560f81c60f81b6001600160f81b031916600460f81b146103315760405162461bcd60e51b81526004016102b0906108f7565b806001600160a01b03166103458484610763565b6001600160a01b0316146103b35760405162461bcd60e51b815260206004820152602f60248201527f4950546f6b656e536c617368696e673a20496e76616c6964207075626b65792060448201526e64657269766564206164647265737360881b60648201526084016102b0565b604051633444d8b760e11b81526000907300000000000000000000000000000000000256f190636889b16e906103ef908990899060040161093d565b600060405180830381865af415801561040c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104349190810190610a1a565b905061043f816104ee565b6104488161067e565b505050505050565b6104586104c1565b600180546001600160a01b0383166001600160a01b031990911681179091556104896000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b0316331461027a5760405163118cdaa760e01b81523360048201526024016102b0565b805160211461050f5760405162461bcd60e51b81526004016102b09061089b565b80600081518110610522576105226108e1565b6020910101516001600160f81b031916600160f91b1480610568575080600081518110610551576105516108e1565b6020910101516001600160f81b031916600360f81b145b6105845760405162461bcd60e51b81526004016102b0906108f7565b604051638d3e1e4160e01b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690638d3e1e41906105d3908590600401610a6b565b600060405180830381865afa1580156105f0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106189190810190610ab7565b50505050509050806102645760405162461bcd60e51b815260206004820152602960248201527f4950546f6b656e536c617368696e673a2056616c696461746f7220646f6573206044820152681b9bdd08195e1a5cdd60ba1b60648201526084016102b0565b60025434146106d95760405162461bcd60e51b815260206004820152602160248201527f4950546f6b656e536c617368696e673a20496e73756666696369656e742066656044820152606560f81b60648201526084016102b0565b6040516000903480156108fc029183818181858288f19350505050158015610705573d6000803e3d6000fd5b50336001600160a01b03167f4a90ea32527ecacc0f4b32b31f99e4c633a2b4fe81ea7444989e2e68bc9ece3b8260405161073f9190610a6b565b60405180910390a250565b600180546001600160a01b03191690556102c281610790565b60006107728260018186610b5b565b604051610780929190610b85565b6040519081900390209392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156107f257600080fd5b5035919050565b6000806020838503121561080c57600080fd5b823567ffffffffffffffff8082111561082457600080fd5b818501915085601f83011261083857600080fd5b81358181111561084757600080fd5b86602082850101111561085957600080fd5b60209290920196919550909350505050565b60006020828403121561087d57600080fd5b81356001600160a01b038116811461089457600080fd5b9392505050565b60208082526026908201527f4950546f6b656e536c617368696e673a20496e76616c6964207075626b6579206040820152650d8cadccee8d60d31b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526026908201527f4950546f6b656e536c617368696e673a20496e76616c6964207075626b6579206040820152650e0e4caccd2f60d31b606082015260800190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561099d578181015183820152602001610985565b50506000910152565b600067ffffffffffffffff808411156109c1576109c161096c565b604051601f8501601f19908116603f011681019082821181831017156109e9576109e961096c565b81604052809350858152868686011115610a0257600080fd5b610a10866020830187610982565b5050509392505050565b600060208284031215610a2c57600080fd5b815167ffffffffffffffff811115610a4357600080fd5b8201601f81018413610a5457600080fd5b610a63848251602084016109a6565b949350505050565b6020815260008251806020840152610a8a816040850160208701610982565b601f01601f19169190910160400192915050565b805163ffffffff81168114610ab257600080fd5b919050565b60008060008060008060c08789031215610ad057600080fd5b86518015158114610ae057600080fd5b602088015190965067ffffffffffffffff811115610afd57600080fd5b8701601f81018913610b0e57600080fd5b610b1d898251602084016109a6565b95505060408701519350610b3360608801610a9e565b9250610b4160808801610a9e565b9150610b4f60a08801610a9e565b90509295509295509295565b60008085851115610b6b57600080fd5b83861115610b7857600080fd5b5050820193919092039150565b818382376000910190815291905056fea2646970667358221220518734ced1f5808f38b15b569cae72cf48a894f86b1e5a88cac8505c46c3c8d764736f6c63430008180033" + IPTokenSlashingDeployedBytecode = "0x6080604052600436106100dd5760003560e01c806379ba50971161007f578063c4d66de811610059578063c4d66de814610231578063e30c397814610251578063e4dfccd814610266578063f2fde38b1461027957600080fd5b806379ba5097146101c95780638da5cb5b146101de578063ad3cb1cc146101f357600080fd5b806340eda14a116100bb57806340eda14a146101795780634f1ef2861461018c57806352d1902d1461019f578063715018a6146101b457600080fd5b806304ff53ed146100e25780630c863f77146101335780632801f1ec14610155575b600080fd5b3480156100ee57600080fd5b506101167f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561013f57600080fd5b5061015361014e36600461107f565b610299565b005b34801561016157600080fd5b5061016b60005481565b60405190815260200161012a565b610153610187366004611098565b6102dc565b61015361019a366004611195565b61035e565b3480156101ab57600080fd5b5061016b610379565b3480156101c057600080fd5b50610153610396565b3480156101d557600080fd5b506101536103aa565b3480156101ea57600080fd5b506101166103f7565b3480156101ff57600080fd5b50610224604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161012a9190611276565b34801561023d57600080fd5b5061015361024c366004611289565b61042c565b34801561025d57600080fd5b506101166105b8565b610153610274366004611098565b6105e1565b34801561028557600080fd5b50610153610294366004611289565b610724565b6102a16107a9565b60008190556040518181527feac81de2f20162b0540ca5d3f43896af15b471a55729ff0c000e611d8b2723639060200160405180910390a150565b61031b82828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506107db92505050565b61035a82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061096b92505050565b5050565b610366610a37565b61036f82610adc565b61035a8282610ae4565b6000610383610ba6565b506000805160206114e783398151915290565b61039e6107a9565b6103a86000610bef565b565b33806103b46105b8565b6001600160a01b0316146103eb5760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b6103f481610bef565b50565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156104725750825b905060008267ffffffffffffffff16600114801561048f5750303b155b90508115801561049d575080155b156104bb5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156104e557845460ff60401b1916600160401b1785555b6001600160a01b0386166105595760405162461bcd60e51b815260206004820152603560248201527f4950546f6b656e536c617368696e673a206163636573734d616e616765722063604482015274616e6e6f74206265207a65726f206164647265737360581b60648201526084016103e2565b610561610c27565b61056a86610c2f565b83156105b057845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0061041c565b818133604182146106045760405162461bcd60e51b81526004016103e2906112a4565b82826000818110610617576106176112ea565b9050013560f81c60f81b6001600160f81b031916600460f81b1461064d5760405162461bcd60e51b81526004016103e290611300565b806001600160a01b03166106618484610c40565b6001600160a01b0316146106cf5760405162461bcd60e51b815260206004820152602f60248201527f4950546f6b656e536c617368696e673a20496e76616c6964207075626b65792060448201526e64657269766564206164647265737360881b60648201526084016103e2565b600061071086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c6f92505050565b905061071b816107db565b6105b08161096b565b61072c6107a9565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556107706103f7565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b336107b26103f7565b6001600160a01b0316146103a85760405163118cdaa760e01b81523360048201526024016103e2565b80516021146107fc5760405162461bcd60e51b81526004016103e2906112a4565b8060008151811061080f5761080f6112ea565b6020910101516001600160f81b031916600160f91b148061085557508060008151811061083e5761083e6112ea565b6020910101516001600160f81b031916600360f81b145b6108715760405162461bcd60e51b81526004016103e290611300565b604051638d3e1e4160e01b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690638d3e1e41906108c0908590600401611276565b600060405180830381865afa1580156108dd573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610905919081019061135a565b505050505090508061035a5760405162461bcd60e51b815260206004820152602960248201527f4950546f6b656e536c617368696e673a2056616c696461746f7220646f6573206044820152681b9bdd08195e1a5cdd60ba1b60648201526084016103e2565b60005434146109c65760405162461bcd60e51b815260206004820152602160248201527f4950546f6b656e536c617368696e673a20496e73756666696369656e742066656044820152606560f81b60648201526084016103e2565b6040516000903480156108fc029183818181858288f193505050501580156109f2573d6000803e3d6000fd5b50336001600160a01b03167f4a90ea32527ecacc0f4b32b31f99e4c633a2b4fe81ea7444989e2e68bc9ece3b82604051610a2c9190611276565b60405180910390a250565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610abe57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610ab26000805160206114e7833981519152546001600160a01b031690565b6001600160a01b031614155b156103a85760405163703e46dd60e11b815260040160405180910390fd5b6103f46107a9565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610b3e575060408051601f3d908101601f19168201909252610b3b91810190611426565b60015b610b6657604051634c9c8ce360e01b81526001600160a01b03831660048201526024016103e2565b6000805160206114e78339815191528114610b9757604051632a87526960e21b8152600481018290526024016103e2565b610ba18383610dbb565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103a85760405163703e46dd60e11b815260040160405180910390fd5b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b031916815561035a82610e11565b6103a8610e82565b610c37610e82565b6103f481610ecb565b6000610c4f826001818661143f565b604051610c5d929190611469565b60405190819003902090505b92915050565b60608151604114610cd15760405162461bcd60e51b815260206004820152602660248201527f496e76616c696420756e636f6d70726573736564207075626c6963206b6579206044820152650d8cadccee8d60d31b60648201526084016103e2565b602182015160418301516000610ceb600260ff8416611479565b60ff1615610cfd57600360f81b610d03565b600160f91b5b60408051602180825260608201909252919250600091906020820181803683370190505090508181600081518110610d3d57610d3d6112ea565b60200101906001600160f81b031916908160001a90535060005b6020811015610db157848160208110610d7257610d726112ea565b1a60f81b82610d828360016114a9565b81518110610d9257610d926112ea565b60200101906001600160f81b031916908160001a905350600101610d57565b5095945050505050565b610dc482610efd565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610e0957610ba18282610f62565b61035a610fd8565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166103a857604051631afcd79f60e31b815260040160405180910390fd5b610ed3610e82565b6001600160a01b0381166103eb57604051631e4fbdf760e01b8152600060048201526024016103e2565b806001600160a01b03163b600003610f3357604051634c9c8ce360e01b81526001600160a01b03821660048201526024016103e2565b6000805160206114e783398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610f7f91906114ca565b600060405180830381855af49150503d8060008114610fba576040519150601f19603f3d011682016040523d82523d6000602084013e610fbf565b606091505b5091509150610fcf858383610ff7565b95945050505050565b34156103a85760405163b398979f60e01b815260040160405180910390fd5b60608261100c5761100782611056565b61104f565b815115801561102357506001600160a01b0384163b155b1561104c57604051639996b31560e01b81526001600160a01b03851660048201526024016103e2565b50805b9392505050565b8051156110665780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60006020828403121561109157600080fd5b5035919050565b600080602083850312156110ab57600080fd5b823567ffffffffffffffff808211156110c357600080fd5b818501915085601f8301126110d757600080fd5b8135818111156110e657600080fd5b8660208285010111156110f857600080fd5b60209290920196919550909350505050565b80356001600160a01b038116811461112157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561116557611165611126565b604052919050565b600067ffffffffffffffff82111561118757611187611126565b50601f01601f191660200190565b600080604083850312156111a857600080fd5b6111b18361110a565b9150602083013567ffffffffffffffff8111156111cd57600080fd5b8301601f810185136111de57600080fd5b80356111f16111ec8261116d565b61113c565b81815286602083850101111561120657600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b83811015611241578181015183820152602001611229565b50506000910152565b60008151808452611262816020860160208601611226565b601f01601f19169290920160200192915050565b60208152600061104f602083018461124a565b60006020828403121561129b57600080fd5b61104f8261110a565b60208082526026908201527f4950546f6b656e536c617368696e673a20496e76616c6964207075626b6579206040820152650d8cadccee8d60d31b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526026908201527f4950546f6b656e536c617368696e673a20496e76616c6964207075626b6579206040820152650e0e4caccd2f60d31b606082015260800190565b805163ffffffff8116811461112157600080fd5b60008060008060008060c0878903121561137357600080fd5b8651801515811461138357600080fd5b602088015190965067ffffffffffffffff8111156113a057600080fd5b8701601f810189136113b157600080fd5b80516113bf6111ec8261116d565b8181528a60208385010111156113d457600080fd5b6113e5826020830160208601611226565b809750505050604087015193506113fe60608801611346565b925061140c60808801611346565b915061141a60a08801611346565b90509295509295509295565b60006020828403121561143857600080fd5b5051919050565b6000808585111561144f57600080fd5b8386111561145c57600080fd5b5050820193919092039150565b8183823760009101908152919050565b600060ff83168061149a57634e487b7160e01b600052601260045260246000fd5b8060ff84160691505092915050565b80820180821115610c6957634e487b7160e01b600052601160045260246000fd5b600082516114dc818460208701611226565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca264697066735822122057127e720484b2a6e7827a9f911d9b8d98ca7ad65cecc0616bfdbda309d9ac4a64736f6c63430008180033" ) //go:embed iptokenslashing_storage_layout.json diff --git a/contracts/bindings/iptokenslashing_storage_layout.json b/contracts/bindings/iptokenslashing_storage_layout.json index 3062dadf..01d0e304 100644 --- a/contracts/bindings/iptokenslashing_storage_layout.json +++ b/contracts/bindings/iptokenslashing_storage_layout.json @@ -1,36 +1,15 @@ { "storage": [ { - "astId": 8, - "contract": "src/protocol/IPTokenSlashing.sol:IPTokenSlashing", - "label": "_owner", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 156, - "contract": "src/protocol/IPTokenSlashing.sol:IPTokenSlashing", - "label": "_pendingOwner", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 40320, + "astId": 2592, "contract": "src/protocol/IPTokenSlashing.sol:IPTokenSlashing", "label": "unjailFee", "offset": 0, - "slot": "2", + "slot": "0", "type": "t_uint256" } ], "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, "t_uint256": { "encoding": "inplace", "label": "uint256", diff --git a/contracts/bindings/iptokenstaking.go b/contracts/bindings/iptokenstaking.go index f530c97b..01a0feac 100644 --- a/contracts/bindings/iptokenstaking.go +++ b/contracts/bindings/iptokenstaking.go @@ -39,8 +39,8 @@ type IIPTokenStakingRedelegateParams struct { // IPTokenStakingMetaData contains all meta data concerning the IPTokenStaking contract. var IPTokenStakingMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_minStakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minUnstakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minRedelegateAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"stakingRounding\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_withdrawalAddressChangeInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"defaultCommissionRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"defaultMaxCommissionRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"defaultMaxCommissionChangeRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DEFAULT_COMMISSION_RATE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DEFAULT_MAX_COMMISSION_CHANGE_RATE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DEFAULT_MAX_COMMISSION_RATE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"STAKE_ROUNDING\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addOperator\",\"inputs\":[{\"name\":\"uncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createValidator\",\"inputs\":[{\"name\":\"validatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"moniker\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"commissionRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"maxCommissionRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"maxCommissionChangeRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"createValidatorOnBehalf\",\"inputs\":[{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"delegatorTotalStakes\",\"inputs\":[{\"name\":\"delegatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"stakedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegatorValidatorStakes\",\"inputs\":[{\"name\":\"delegatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"stakedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperators\",\"inputs\":[{\"name\":\"pubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minRedelegateAmount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minStakeAmount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minUnstakeAmount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"redelegate\",\"inputs\":[{\"name\":\"p\",\"type\":\"tuple\",\"internalType\":\"structIIPTokenStaking.RedelegateParams\",\"components\":[{\"name\":\"delegatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorSrcPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorDstPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"redelegateOnBehalf\",\"inputs\":[{\"name\":\"p\",\"type\":\"tuple\",\"internalType\":\"structIIPTokenStaking.RedelegateParams\",\"components\":[{\"name\":\"delegatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorSrcPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorDstPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeOperator\",\"inputs\":[{\"name\":\"uncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"roundedStakeAmount\",\"inputs\":[{\"name\":\"rawAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"remainder\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setMinRedelegateAmount\",\"inputs\":[{\"name\":\"newMinRedelegateAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinStakeAmount\",\"inputs\":[{\"name\":\"newMinStakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinUnstakeAmount\",\"inputs\":[{\"name\":\"newMinUnstakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setWithdrawalAddress\",\"inputs\":[{\"name\":\"delegatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"newWithdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setWithdrawalAddressChangeInterval\",\"inputs\":[{\"name\":\"newWithdrawalAddressChangeInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[{\"name\":\"delegatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"stakeOnBehalf\",\"inputs\":[{\"name\":\"delegatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstake\",\"inputs\":[{\"name\":\"delegatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstakeOnBehalf\",\"inputs\":[{\"name\":\"delegatorCmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"validatorMetadata\",\"inputs\":[{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"moniker\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"totalStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"commissionRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"maxCommissionRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"maxCommissionChangeRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawalAddressChange\",\"inputs\":[{\"name\":\"delegatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"lastChange\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawalAddressChangeInterval\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"CreateValidator\",\"inputs\":[{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"moniker\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"stakeAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"commissionRate\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"maxCommissionRate\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"maxCommissionChangeRate\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Deposit\",\"inputs\":[{\"name\":\"depositorPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Redelegate\",\"inputs\":[{\"name\":\"depositorPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"validatorSrcPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"validatorDstPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetWithdrawalAddress\",\"inputs\":[{\"name\":\"depositorPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"executionAddress\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Withdraw\",\"inputs\":[{\"name\":\"depositorPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]}]", - Bin: "0x6101006040523480156200001257600080fd5b5060405162003a3338038062003a3383398101604081905262000035916200012d565b886001600160a01b0381166200006557604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200007081620000a5565b5060029790975560039590955560049390935560055560e05263ffffffff90811660805290811660a0521660c05250620001ca565b600180546001600160a01b0319169055620000c081620000c3565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b805163ffffffff811681146200012857600080fd5b919050565b60008060008060008060008060006101208a8c0312156200014d57600080fd5b89516001600160a01b03811681146200016557600080fd5b8099505060208a0151975060408a0151965060608a0151955060808a0151945060a08a015193506200019a60c08b0162000113565b9250620001aa60e08b0162000113565b9150620001bb6101008b0162000113565b90509295985092959850929598565b60805160a05160c05160e0516137fe6200023560003960008181610585015281816110c001528181611cad01528181611eee0152611f960152600081816106cd0152610ae40152600081816102d00152610ac30152600081816105510152610aa001526137fe6000f3fe6080604052600436106101f95760003560e01c806386eec4a11161010d578063c24ae586116100a0578063eee5cead1161006f578063eee5cead14610652578063f188768414610672578063f2fde38b14610688578063fc2e5932146106a8578063fc56c2a2146106bb57600080fd5b8063c24ae586146105a7578063d2e1f5b8146105df578063e30c397814610614578063eb4af0451461063257600080fd5b80639855c8b5116100dc5780639855c8b5146104ff578063a1cb18461461051f578063b8db983e1461053f578063bda16b151461057357600080fd5b806386eec4a1146104755780638d3e1e41146104885780638da5cb5b146104ba5780638f37ec19146104ec57600080fd5b80635706750311610190578063715018a61161015f578063715018a6146103de578063787f82c8146103f357806379ba5097146104135780637b6e842c1461042857806383dffd6f1461044857600080fd5b806357067503146103505780635a69825d146103885780635d5ab9681461039e5780636ea3a228146103be57600080fd5b80632ebc6034116101cc5780632ebc6034146102be57806339ec4df91461030757806348903e381461031d57806353972c2a1461033057600080fd5b8063057b9296146101fe578063060ceab01461022057806317e42e12146102495780632d1e973e14610269575b600080fd5b34801561020a57600080fd5b5061021e610219366004612d1f565b6106ef565b005b34801561022c57600080fd5b5061023660055481565b6040519081526020015b60405180910390f35b34801561025557600080fd5b5061021e610264366004612d1f565b610854565b34801561027557600080fd5b50610236610284366004612e35565b8151602081840181018051600882529282019482019490942091909352815180830184018051928152908401929093019190912091525481565b3480156102ca57600080fd5b506102f27f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff9091168152602001610240565b34801561031357600080fd5b5061023660035481565b61021e61032b366004612e98565b6109a6565b34801561033c57600080fd5b5061021e61034b366004612ed9565b610b0e565b34801561035c57600080fd5b5061023661036b366004612f13565b805160208183018101805160078252928201919093012091525481565b34801561039457600080fd5b5061023660045481565b3480156103aa57600080fd5b5061021e6103b9366004612f4f565b610e2c565b3480156103ca57600080fd5b5061021e6103d9366004612fc2565b61104e565b3480156103ea57600080fd5b5061021e6110f5565b3480156103ff57600080fd5b5061021e61040e366004612d1f565b611109565b34801561041f57600080fd5b5061021e6113bf565b34801561043457600080fd5b5061021e610443366004612ed9565b611403565b34801561045457600080fd5b50610468610463366004612e98565b611753565b6040516102409190612fdb565b61021e610483366004613028565b611786565b34801561049457600080fd5b506104a86104a3366004612f13565b61199a565b604051610240969594939291906130e3565b3480156104c657600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610240565b61021e6104fa366004613028565b611a76565b34801561050b57600080fd5b5061021e61051a366004612fc2565b611c38565b34801561052b57600080fd5b5061021e61053a366004612f4f565b611ce2565b34801561054b57600080fd5b506102f27f000000000000000000000000000000000000000000000000000000000000000081565b34801561057f57600080fd5b506102367f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b357600080fd5b506102366105c2366004612f13565b8051602081830181018051600a8252928201919093012091525481565b3480156105eb57600080fd5b506105ff6105fa366004612fc2565b611ee6565b60408051928352602083019190915201610240565b34801561062057600080fd5b506001546001600160a01b03166104d4565b34801561063e57600080fd5b5061021e61064d366004612fc2565b611f26565b34801561065e57600080fd5b5061021e61066d366004612fc2565b611fcb565b34801561067e57600080fd5b5061023660025481565b34801561069457600080fd5b5061021e6106a336600461312b565b61204e565b61021e6106b636600461315a565b6120bf565b3480156106c757600080fd5b506102f27f000000000000000000000000000000000000000000000000000000000000000081565b8282336041821461071b5760405162461bcd60e51b8152600401610712906131fb565b60405180910390fd5b8282600081811061072e5761072e613240565b9050013560f81c60f81b6001600160f81b031916600460f81b146107645760405162461bcd60e51b815260040161071290613256565b806001600160a01b0316610778848461222d565b6001600160a01b03161461079e5760405162461bcd60e51b81526004016107129061329b565b604051633444d8b760e11b815260009073__$070efe90de6222b6182e3f0710b89d2262$__90636889b16e906107da908a908a90600401613312565b600060405180830381865af41580156107f7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261081f9190810190613326565b905061084a85600983604051610835919061339c565b9081526040519081900360200190209061225a565b5050505050505050565b828233604182146108775760405162461bcd60e51b8152600401610712906131fb565b8282600081811061088a5761088a613240565b9050013560f81c60f81b6001600160f81b031916600460f81b146108c05760405162461bcd60e51b815260040161071290613256565b806001600160a01b03166108d4848461222d565b6001600160a01b0316146108fa5760405162461bcd60e51b81526004016107129061329b565b604051633444d8b760e11b815260009073__$070efe90de6222b6182e3f0710b89d2262$__90636889b16e90610936908a908a90600401613312565b600060405180830381865af4158015610953573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261097b9190810190613326565b905061084a85600983604051610991919061339c565b9081526040519081900360200190209061226f565b8181602181146109c85760405162461bcd60e51b8152600401610712906131fb565b818160008181106109db576109db613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610a29575081816000818110610a0e57610a0e613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610a455760405162461bcd60e51b815260040161071290613256565b610b0884848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260098152683b30b634b230ba37b960b91b602082015291507f000000000000000000000000000000000000000000000000000000000000000090507f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612284565b50505050565b610b1881806133b8565b60418114610b385760405162461bcd60e51b8152600401610712906131fb565b81816000818110610b4b57610b4b613240565b9050013560f81c60f81b6001600160f81b031916600460f81b14610b815760405162461bcd60e51b815260040161071290613256565b610b8e60208401846133b8565b60218114610bae5760405162461bcd60e51b8152600401610712906131fb565b81816000818110610bc157610bc1613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610c0f575081816000818110610bf457610bf4613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610c2b5760405162461bcd60e51b815260040161071290613256565b60068282604051610c3d9291906133fe565b9081526040519081900360200190205460ff16610c6c5760405162461bcd60e51b81526004016107129061340e565b610c7960408601866133b8565b60218114610c995760405162461bcd60e51b8152600401610712906131fb565b81816000818110610cac57610cac613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610cfa575081816000818110610cdf57610cdf613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610d165760405162461bcd60e51b815260040161071290613256565b60068282604051610d289291906133fe565b9081526040519081900360200190205460ff16610d575760405162461bcd60e51b81526004016107129061340e565b600073__$070efe90de6222b6182e3f0710b89d2262$__636889b16e610d7d8a806133b8565b6040518363ffffffff1660e01b8152600401610d9a929190613312565b600060405180830381865af4158015610db7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ddf9190810190613326565b90506000610df08960600135611ee6565b509050610dfd82336124e6565b610e2182610e0e60208c018c6133b8565b610e1b60408e018e6133b8565b86612571565b505050505050505050565b84843360418214610e4f5760405162461bcd60e51b8152600401610712906131fb565b82826000818110610e6257610e62613240565b9050013560f81c60f81b6001600160f81b031916600460f81b14610e985760405162461bcd60e51b815260040161071290613256565b806001600160a01b0316610eac848461222d565b6001600160a01b031614610ed25760405162461bcd60e51b81526004016107129061329b565b858560218114610ef45760405162461bcd60e51b8152600401610712906131fb565b81816000818110610f0757610f07613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610f55575081816000818110610f3a57610f3a613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610f715760405162461bcd60e51b815260040161071290613256565b60068282604051610f839291906133fe565b9081526040519081900360200190205460ff16610fb25760405162461bcd60e51b81526004016107129061340e565b604051633444d8b760e11b815260009073__$070efe90de6222b6182e3f0710b89d2262$__90636889b16e90610fee908e908e90600401613312565b600060405180830381865af415801561100b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110339190810190613326565b9050611041818a8a8a61272f565b5050505050505050505050565b61105661288f565b600081116110bb5760405162461bcd60e51b815260206004820152602c60248201527f4950546f6b656e5374616b696e673a206d696e556e7374616b65416d6f756e7460448201526b02063616e6e6f7420626520360a41b6064820152608401610712565b6110e57f000000000000000000000000000000000000000000000000000000000000000082613456565b6110ef908261348e565b60035550565b6110fd61288f565b61110760006128bc565b565b8282336041821461112c5760405162461bcd60e51b8152600401610712906131fb565b8282600081811061113f5761113f613240565b9050013560f81c60f81b6001600160f81b031916600460f81b146111755760405162461bcd60e51b815260040161071290613256565b806001600160a01b0316611189848461222d565b6001600160a01b0316146111af5760405162461bcd60e51b81526004016107129061329b565b604051633444d8b760e11b815260009073__$070efe90de6222b6182e3f0710b89d2262$__90636889b16e906111eb908a908a90600401613312565b600060405180830381865af4158015611208573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112309190810190613326565b90506000600782604051611244919061339c565b908152602001604051809103902054116112b25760405162461bcd60e51b815260206004820152602960248201527f4950546f6b656e5374616b696e673a2044656c656761746f72206d7573742068604482015268617665207374616b6560b81b6064820152608401610712565b42600554600a836040516112c6919061339c565b9081526020016040518091039020546112df91906134a1565b106113485760405162461bcd60e51b815260206004820152603360248201527f4950546f6b656e5374616b696e673a205769746864726177616c20616464726560448201527239b99031b430b733b29031b7b7b616b237bbb760691b6064820152608401610712565b42600a82604051611359919061339c565b9081526020016040518091039020819055507f9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca818660601b6bffffffffffffffffffffffff19166040516113ae9291906134b4565b60405180910390a150505050505050565b60015433906001600160a01b031681146113f75760405163118cdaa760e01b81526001600160a01b0382166004820152602401610712565b611400816128bc565b50565b61140d81806133b8565b336041821461142e5760405162461bcd60e51b8152600401610712906131fb565b8282600081811061144157611441613240565b9050013560f81c60f81b6001600160f81b031916600460f81b146114775760405162461bcd60e51b815260040161071290613256565b806001600160a01b031661148b848461222d565b6001600160a01b0316146114b15760405162461bcd60e51b81526004016107129061329b565b6114be60208501856133b8565b602181146114de5760405162461bcd60e51b8152600401610712906131fb565b818160008181106114f1576114f1613240565b9050013560f81c60f81b6001600160f81b031916600260f81b148061153f57508181600081811061152457611524613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b61155b5760405162461bcd60e51b815260040161071290613256565b6006828260405161156d9291906133fe565b9081526040519081900360200190205460ff1661159c5760405162461bcd60e51b81526004016107129061340e565b6115a960408701876133b8565b602181146115c95760405162461bcd60e51b8152600401610712906131fb565b818160008181106115dc576115dc613240565b9050013560f81c60f81b6001600160f81b031916600260f81b148061162a57508181600081811061160f5761160f613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b6116465760405162461bcd60e51b815260040161071290613256565b600682826040516116589291906133fe565b9081526040519081900360200190205460ff166116875760405162461bcd60e51b81526004016107129061340e565b60006116968960600135611ee6565b509050600073__$070efe90de6222b6182e3f0710b89d2262$__636889b16e6116bf8c806133b8565b6040518363ffffffff1660e01b81526004016116dc929190613312565b600060405180830381865af41580156116f9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117219190810190613326565b90506117478161173460208d018d6133b8565b61174160408f018f6133b8565b87612571565b50505050505050505050565b606061177d6009848460405161176a9291906133fe565b90815260200160405180910390206128d5565b90505b92915050565b838333604182146117a95760405162461bcd60e51b8152600401610712906131fb565b828260008181106117bc576117bc613240565b9050013560f81c60f81b6001600160f81b031916600460f81b146117f25760405162461bcd60e51b815260040161071290613256565b806001600160a01b0316611806848461222d565b6001600160a01b03161461182c5760405162461bcd60e51b81526004016107129061329b565b84846021811461184e5760405162461bcd60e51b8152600401610712906131fb565b8181600081811061186157611861613240565b9050013560f81c60f81b6001600160f81b031916600260f81b14806118af57508181600081811061189457611894613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b6118cb5760405162461bcd60e51b815260040161071290613256565b600682826040516118dd9291906133fe565b9081526040519081900360200190205460ff1661190c5760405162461bcd60e51b81526004016107129061340e565b604051633444d8b760e11b815260009073__$070efe90de6222b6182e3f0710b89d2262$__90636889b16e90611948908d908d90600401613312565b600060405180830381865af4158015611965573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261198d9190810190613326565b90506117478189896128e9565b80516020818301810180516006825292820191909301209152805460018201805460ff90921692916119cb906134d6565b80601f01602080910402602001604051908101604052809291908181526020018280546119f7906134d6565b8015611a445780601f10611a1957610100808354040283529160200191611a44565b820191906000526020600020905b815481529060010190602001808311611a2757829003601f168201915b50505050600283015460039093015491929163ffffffff80821692506401000000008204811691600160401b90041686565b838360218114611a985760405162461bcd60e51b8152600401610712906131fb565b81816000818110611aab57611aab613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611af9575081816000818110611ade57611ade613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611b155760405162461bcd60e51b815260040161071290613256565b838360218114611b375760405162461bcd60e51b8152600401610712906131fb565b81816000818110611b4a57611b4a613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611b98575081816000818110611b7d57611b7d613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611bb45760405162461bcd60e51b815260040161071290613256565b60068282604051611bc69291906133fe565b9081526040519081900360200190205460ff16611bf55760405162461bcd60e51b81526004016107129061340e565b61084a88888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92508991506128e99050565b611c4061288f565b60008111611ca85760405162461bcd60e51b815260206004820152602f60248201527f4950546f6b656e5374616b696e673a206d696e526564656c6567617465416d6f60448201526e0756e742063616e6e6f74206265203608c1b6064820152608401610712565b611cd27f000000000000000000000000000000000000000000000000000000000000000082613456565b611cdc908261348e565b60045550565b848460218114611d045760405162461bcd60e51b8152600401610712906131fb565b81816000818110611d1757611d17613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611d65575081816000818110611d4a57611d4a613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611d815760405162461bcd60e51b815260040161071290613256565b848460218114611da35760405162461bcd60e51b8152600401610712906131fb565b81816000818110611db657611db6613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611e04575081816000818110611de957611de9613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611e205760405162461bcd60e51b815260040161071290613256565b60068282604051611e329291906133fe565b9081526040519081900360200190205460ff16611e615760405162461bcd60e51b81526004016107129061340e565b611ea289898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152503392506124e6915050565b610e2189898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a915089905061272f565b600080611f137f000000000000000000000000000000000000000000000000000000000000000084613456565b9050611f1f818461348e565b9150915091565b611f2e61288f565b60008111611f915760405162461bcd60e51b815260206004820152602a60248201527f4950546f6b656e5374616b696e673a206d696e5374616b65416d6f756e7420636044820152690616e6e6f7420626520360b41b6064820152608401610712565b611fbb7f000000000000000000000000000000000000000000000000000000000000000082613456565b611fc5908261348e565b60025550565b611fd361288f565b600081116120495760405162461bcd60e51b815260206004820152603e60248201527f4950546f6b656e5374616b696e673a206e65775769746864726177616c41646460448201527f726573734368616e6765496e74657276616c2063616e6e6f74206265203000006064820152608401610712565b600555565b61205661288f565b600180546001600160a01b0383166001600160a01b031990911681179091556120876000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b868633604182146120e25760405162461bcd60e51b8152600401610712906131fb565b828260008181106120f5576120f5613240565b9050013560f81c60f81b6001600160f81b031916600460f81b1461212b5760405162461bcd60e51b815260040161071290613256565b806001600160a01b031661213f848461222d565b6001600160a01b0316146121655760405162461bcd60e51b81526004016107129061329b565b604051633444d8b760e11b815260009073__$070efe90de6222b6182e3f0710b89d2262$__90636889b16e906121a1908e908e90600401613312565b600060405180830381865af41580156121be573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526121e69190810190613326565b9050611041818a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c92508b91508a9050612284565b600061223c8260018186613510565b60405161224a9291906133fe565b6040519081900390209392505050565b600061177d836001600160a01b038416612a00565b600061177d836001600160a01b038416612a4f565b600685604051612294919061339c565b9081526040519081900360200190205460ff16156123055760405162461bcd60e51b815260206004820152602860248201527f4950546f6b656e5374616b696e673a2056616c696461746f7220616c72656164604482015267792065786973747360c01b6064820152608401610712565b60008061231134611ee6565b91509150600082116123355760405162461bcd60e51b81526004016107129061353a565b6040518060c001604052806001151581526020018781526020018381526020018663ffffffff1681526020018563ffffffff1681526020018463ffffffff16815250600688604051612387919061339c565b908152604051602091819003820190208251815460ff19169015151781559082015160018201906123b890826135cf565b506040828101516002830155606083015160039092018054608085015160a09095015163ffffffff908116600160401b026bffffffff0000000000000000199682166401000000000267ffffffffffffffff199093169190951617179390931691909117909155518290600790612430908a9061339c565b9081526020016040518091039020600082825461244d91906134a1565b9250508190555081600888604051612465919061339c565b908152602001604051809103902088604051612481919061339c565b9081526020016040518091039020600082825461249e91906134a1565b909155506124ad905081612b42565b7f5cecf4ee8b0c1d212b07dbc464fc303e4ffc458fd0f61135d4b9bf7f60197a188787848888886040516113ae9695949392919061368e565b61250f816009846040516124fa919061339c565b90815260405190819003602001902090612bed565b61256d5760405162461bcd60e51b815260206004820152602960248201527f4950546f6b656e5374616b696e673a2043616c6c6572206973206e6f7420616e6044820152681037b832b930ba37b960b91b6064820152608401610712565b5050565b80600887604051612582919061339c565b908152602001604051809103902086866040516125a09291906133fe565b90815260200160405180910390205410156125cd5760405162461bcd60e51b8152600401610712906136e1565b80600686866040516125e09291906133fe565b90815260200160405180910390206002016000828254612600919061348e565b92505081905550806006848460405161261a9291906133fe565b9081526020016040518091039020600201600082825461263a91906134a1565b9250508190555080600887604051612652919061339c565b908152602001604051809103902086866040516126709291906133fe565b9081526020016040518091039020600082825461268d919061348e565b92505081905550806008876040516126a5919061339c565b908152602001604051809103902084846040516126c39291906133fe565b908152602001604051809103902060008282546126e091906134a1565b90915550506040517fb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a9061271f9088908890889088908890889061372b565b60405180910390a1505050505050565b80600885604051612740919061339c565b9081526020016040518091039020848460405161275e9291906133fe565b908152602001604051809103902054101561278b5760405162461bcd60e51b8152600401610712906136e1565b806006848460405161279e9291906133fe565b908152602001604051809103902060020160008282546127be919061348e565b92505081905550806007856040516127d6919061339c565b908152602001604051809103902060008282546127f3919061348e565b925050819055508060088560405161280b919061339c565b908152602001604051809103902084846040516128299291906133fe565b90815260200160405180910390206000828254612846919061348e565b90915550506040517f0526a04a9b113a046b17e2350e42123a2515b5558b3aea91576ccdb1270c1b599061288190869086908690869061377a565b60405180910390a150505050565b6000546001600160a01b031633146111075760405163118cdaa760e01b8152336004820152602401610712565b600180546001600160a01b031916905561140081612c0f565b606060006128e283612c5f565b9392505050565b6000806128f534611ee6565b9150915060025482101561291b5760405162461bcd60e51b81526004016107129061353a565b816006858560405161292e9291906133fe565b9081526040519081900360200181206002018054909201909155829060079061295890889061339c565b9081526040519081900360200181208054909201909155829060089061297f90889061339c565b9081526020016040518091039020858560405161299d9291906133fe565b908152604051908190036020019020805490910190556129bc81612b42565b7fe77f103965e0ff8836ce54ba9bac869f217cd5da27d6bdefd090282c397211c0858585856040516129f1949392919061377a565b60405180910390a15050505050565b6000818152600183016020526040812054612a4757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611780565b506000611780565b60008181526001830160205260408120548015612b38576000612a7360018361348e565b8554909150600090612a879060019061348e565b9050808214612aec576000866000018281548110612aa757612aa7613240565b9060005260206000200154905080876000018481548110612aca57612aca613240565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612afd57612afd6137b2565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611780565b6000915050611780565b604051600090339083908381818185875af1925050503d8060008114612b84576040519150601f19603f3d011682016040523d82523d6000602084013e612b89565b606091505b505090508061256d5760405162461bcd60e51b815260206004820152602a60248201527f4950546f6b656e5374616b696e673a204661696c656420746f20726566756e64604482015269103932b6b0b4b73232b960b11b6064820152608401610712565b6001600160a01b0381166000908152600183016020526040812054151561177d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606081600001805480602002602001604051908101604052809291908181526020018280548015612caf57602002820191906000526020600020905b815481526020019060010190808311612c9b575b50505050509050919050565b60008083601f840112612ccd57600080fd5b5081356001600160401b03811115612ce457600080fd5b602083019150836020828501011115612cfc57600080fd5b9250929050565b80356001600160a01b0381168114612d1a57600080fd5b919050565b600080600060408486031215612d3457600080fd5b83356001600160401b03811115612d4a57600080fd5b612d5686828701612cbb565b9094509250612d69905060208501612d03565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612db057612db0612d72565b604052919050565b60006001600160401b03821115612dd157612dd1612d72565b50601f01601f191660200190565b600082601f830112612df057600080fd5b8135612e03612dfe82612db8565b612d88565b818152846020838601011115612e1857600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215612e4857600080fd5b82356001600160401b0380821115612e5f57600080fd5b612e6b86838701612ddf565b93506020850135915080821115612e8157600080fd5b50612e8e85828601612ddf565b9150509250929050565b60008060208385031215612eab57600080fd5b82356001600160401b03811115612ec157600080fd5b612ecd85828601612cbb565b90969095509350505050565b600060208284031215612eeb57600080fd5b81356001600160401b03811115612f0157600080fd5b8201608081850312156128e257600080fd5b600060208284031215612f2557600080fd5b81356001600160401b03811115612f3b57600080fd5b612f4784828501612ddf565b949350505050565b600080600080600060608688031215612f6757600080fd5b85356001600160401b0380821115612f7e57600080fd5b612f8a89838a01612cbb565b90975095506020880135915080821115612fa357600080fd5b50612fb088828901612cbb565b96999598509660400135949350505050565b600060208284031215612fd457600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561301c5783516001600160a01b031683529284019291840191600101612ff7565b50909695505050505050565b6000806000806040858703121561303e57600080fd5b84356001600160401b038082111561305557600080fd5b61306188838901612cbb565b9096509450602087013591508082111561307a57600080fd5b5061308787828801612cbb565b95989497509550505050565b60005b838110156130ae578181015183820152602001613096565b50506000910152565b600081518084526130cf816020860160208601613093565b601f01601f19169290920160200192915050565b861515815260c0602082015260006130fe60c08301886130b7565b60408301969096525063ffffffff9384166060820152918316608083015290911660a09091015292915050565b60006020828403121561313d57600080fd5b61177d82612d03565b803563ffffffff81168114612d1a57600080fd5b600080600080600080600060a0888a03121561317557600080fd5b87356001600160401b038082111561318c57600080fd5b6131988b838c01612cbb565b909950975060208a01359150808211156131b157600080fd5b506131be8a828b01612cbb565b90965094506131d1905060408901613146565b92506131df60608901613146565b91506131ed60808901613146565b905092959891949750929550565b60208082526025908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579206c6040820152640cadccee8d60db1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526025908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b657920706040820152640e4caccd2f60db1b606082015260800190565b6020808252602e908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579206460408201526d657269766564206164647265737360901b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000612f476020830184866132e9565b60006020828403121561333857600080fd5b81516001600160401b0381111561334e57600080fd5b8201601f8101841361335f57600080fd5b805161336d612dfe82612db8565b81815285602083850101111561338257600080fd5b613393826020830160208601613093565b95945050505050565b600082516133ae818460208701613093565b9190910192915050565b6000808335601e198436030181126133cf57600080fd5b8301803591506001600160401b038211156133e957600080fd5b602001915036819003821315612cfc57600080fd5b8183823760009101908152919050565b60208082526028908201527f4950546f6b656e5374616b696e673a2056616c696461746f7220646f6573206e6040820152671bdd08195e1a5cdd60c21b606082015260800190565b60008261347357634e487b7160e01b600052601260045260246000fd5b500690565b634e487b7160e01b600052601160045260246000fd5b8181038181111561178057611780613478565b8082018082111561178057611780613478565b6040815260006134c760408301856130b7565b90508260208301529392505050565b600181811c908216806134ea57607f821691505b60208210810361350a57634e487b7160e01b600052602260045260246000fd5b50919050565b6000808585111561352057600080fd5b8386111561352d57600080fd5b5050820193919092039150565b60208082526024908201527f4950546f6b656e5374616b696e673a205374616b6520616d6f756e7420746f6f604082015263206c6f7760e01b606082015260800190565b601f8211156135ca576000816000526020600020601f850160051c810160208610156135a75750805b601f850160051c820191505b818110156135c6578281556001016135b3565b5050505b505050565b81516001600160401b038111156135e8576135e8612d72565b6135fc816135f684546134d6565b8461357e565b602080601f83116001811461363157600084156136195750858301515b600019600386901b1c1916600185901b1785556135c6565b600085815260208120601f198616915b8281101561366057888601518255948401946001909101908401613641565b508582101561367e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60c0815260006136a160c08301896130b7565b82810360208401526136b381896130b7565b6040840197909752505063ffffffff9384166060820152918316608083015290911660a09091015292915050565b6020808252602a908201527f4950546f6b656e5374616b696e673a20496e73756666696369656e74207374616040820152691ad95908185b5bdd5b9d60b21b606082015260800190565b60808152600061373e60808301896130b7565b828103602084015261375181888a6132e9565b905082810360408401526137668186886132e9565b915050826060830152979650505050505050565b60608152600061378d60608301876130b7565b82810360208401526137a08186886132e9565b91505082604083015295945050505050565b634e487b7160e01b600052603160045260246000fdfea264697066735822122083dcde7a9cf30ea3ab7c2343bd23f63567f097d7f7d8321e9d2d3ceeac76555264736f6c63430008180033", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_minStakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minUnstakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minRedelegateAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"stakingRounding\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_withdrawalAddressChangeInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"defaultCommissionRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"defaultMaxCommissionRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"defaultMaxCommissionChangeRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DEFAULT_COMMISSION_RATE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DEFAULT_MAX_COMMISSION_CHANGE_RATE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DEFAULT_MAX_COMMISSION_RATE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"STAKE_ROUNDING\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addOperator\",\"inputs\":[{\"name\":\"uncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"createValidator\",\"inputs\":[{\"name\":\"validatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"moniker\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"commissionRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"maxCommissionRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"maxCommissionChangeRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"createValidatorOnBehalf\",\"inputs\":[{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"delegatorTotalStakes\",\"inputs\":[{\"name\":\"delegatorCmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"stakedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegatorValidatorStakes\",\"inputs\":[{\"name\":\"delegatorCmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorCmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"stakedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOperators\",\"inputs\":[{\"name\":\"pubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"accessManager\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minRedelegateAmount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minStakeAmount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"minUnstakeAmount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"redelegate\",\"inputs\":[{\"name\":\"p\",\"type\":\"tuple\",\"internalType\":\"structIIPTokenStaking.RedelegateParams\",\"components\":[{\"name\":\"delegatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorSrcPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorDstPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"redelegateOnBehalf\",\"inputs\":[{\"name\":\"p\",\"type\":\"tuple\",\"internalType\":\"structIIPTokenStaking.RedelegateParams\",\"components\":[{\"name\":\"delegatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorSrcPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorDstPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"removeOperator\",\"inputs\":[{\"name\":\"uncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"operator\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"roundedStakeAmount\",\"inputs\":[{\"name\":\"rawAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"remainder\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"setMinRedelegateAmount\",\"inputs\":[{\"name\":\"newMinRedelegateAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinStakeAmount\",\"inputs\":[{\"name\":\"newMinStakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinUnstakeAmount\",\"inputs\":[{\"name\":\"newMinUnstakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setWithdrawalAddress\",\"inputs\":[{\"name\":\"delegatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"newWithdrawalAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setWithdrawalAddressChangeInterval\",\"inputs\":[{\"name\":\"newWithdrawalAddressChangeInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[{\"name\":\"delegatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"stakeOnBehalf\",\"inputs\":[{\"name\":\"delegatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstake\",\"inputs\":[{\"name\":\"delegatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstakeOnBehalf\",\"inputs\":[{\"name\":\"delegatorCmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"validatorMetadata\",\"inputs\":[{\"name\":\"validatorCmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"exists\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"moniker\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"totalStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"commissionRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"maxCommissionRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"maxCommissionChangeRate\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawalAddressChange\",\"inputs\":[{\"name\":\"delegatorCmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"lastChange\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawalAddressChangeInterval\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"CreateValidator\",\"inputs\":[{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"moniker\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"stakeAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"commissionRate\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"maxCommissionRate\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"maxCommissionChangeRate\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Deposit\",\"inputs\":[{\"name\":\"depositorPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinRedelegateAmountSet\",\"inputs\":[{\"name\":\"minRedelegateAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinStakeAmountSet\",\"inputs\":[{\"name\":\"minStakeAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinUnstakeAmountSet\",\"inputs\":[{\"name\":\"minUnstakeAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Redelegate\",\"inputs\":[{\"name\":\"depositorPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"validatorSrcPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"validatorDstPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SetWithdrawalAddress\",\"inputs\":[{\"name\":\"depositorPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"executionAddress\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Withdraw\",\"inputs\":[{\"name\":\"depositorPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalAddressChangeIntervalSet\",\"inputs\":[{\"name\":\"newInterval\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ReentrancyGuardReentrantCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]", + Bin: "0x610120604052306080523480156200001657600080fd5b50604051620049b0380380620049b083398101604081905262000039916200059d565b6101008590526200004a88620001f2565b6200005587620002af565b620000608662000368565b6200006b8462000424565b6127108363ffffffff161115620000d05760405162461bcd60e51b815260206004820152602f60248201526000805160206200499083398151915260448201526e636f6d6d697373696f6e207261746560881b60648201526084015b60405180910390fd5b63ffffffff80841660a081905290831610801590620000f757506127108263ffffffff1611155b6200015a5760405162461bcd60e51b815260206004820152603360248201526000805160206200499083398151915260448201527f6d617820636f6d6d697373696f6e2072617465000000000000000000000000006064820152608401620000c7565b63ffffffff80831660c0526127109082161115620001d05760405162461bcd60e51b815260206004820152603a60248201526000805160206200499083398151915260448201527f6d617820636f6d6d697373696f6e206368616e676520726174650000000000006064820152608401620000c7565b63ffffffff811660e052620001e4620004d2565b505050505050505062000663565b60008111620002575760405162461bcd60e51b815260206004820152602a60248201527f4950546f6b656e5374616b696e673a206d696e5374616b65416d6f756e7420636044820152690616e6e6f7420626520360b41b6064820152608401620000c7565b6101005162000267908262000618565b6200027390826200063b565b60008190556040519081527fea095c2fea861b87f0fd54d0d4453358692a527e120df22b62c71696247dfb9f906020015b60405180910390a150565b60008111620003165760405162461bcd60e51b815260206004820152602c60248201527f4950546f6b656e5374616b696e673a206d696e556e7374616b65416d6f756e7460448201526b02063616e6e6f7420626520360a41b6064820152608401620000c7565b6101005162000326908262000618565b6200033290826200063b565b60018190556040519081527ff93d77980ae5a1ddd008d6a7f02cbee5af2a4fcea850c4b55828de4f644e589f90602001620002a4565b60008111620003d25760405162461bcd60e51b815260206004820152602f60248201527f4950546f6b656e5374616b696e673a206d696e526564656c6567617465416d6f60448201526e0756e742063616e6e6f74206265203608c1b6064820152608401620000c7565b61010051620003e2908262000618565b620003ee90826200063b565b60028190556040519081527ff1e15ded5b5192ec1a89a3d16f49c46c7fa6c876d1f8299cf036f5abf9924d9b90602001620002a4565b600081116200049c5760405162461bcd60e51b815260206004820152603e60248201527f4950546f6b656e5374616b696e673a206e65775769746864726177616c41646460448201527f726573734368616e6765496e74657276616c2063616e6e6f74206265203000006064820152608401620000c7565b60038190556040518181527fbed33ba1e6aacc702f8e48397b388e43ca92a8898ed8bdb389fd8b18af95d32c90602001620002a4565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff1615620005235760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b0390811614620005805780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602001620002a4565b50565b805163ffffffff811681146200059857600080fd5b919050565b600080600080600080600080610100898b031215620005bb57600080fd5b8851975060208901519650604089015195506060890151945060808901519350620005e960a08a0162000583565b9250620005f960c08a0162000583565b91506200060960e08a0162000583565b90509295985092959890939650565b6000826200063657634e487b7160e01b600052601260045260246000fd5b500690565b818103818111156200065d57634e487b7160e01b600052601160045260246000fd5b92915050565b60805160a05160c05160e051610100516142a9620006e76000396000818161061201528181611f8201528181612d0301528181612f3e01526130330152600081816107710152610bc20152600081816102fc0152610ba10152600081816105de0152610b7e0152600081816126a3015281816126cc015261281201526142a96000f3fe6080604052600436106102255760003560e01c806386eec4a111610123578063c24ae586116100ab578063eee5cead1161006f578063eee5cead146106f6578063f188768414610716578063f2fde38b1461072c578063fc2e59321461074c578063fc56c2a21461075f57600080fd5b8063c24ae58614610634578063c4d66de81461066c578063d2e1f5b81461068c578063e30c3978146106c1578063eb4af045146106d657600080fd5b80639855c8b5116100f25780639855c8b51461054e578063a1cb18461461056e578063ad3cb1cc1461058e578063b8db983e146105cc578063bda16b151461060057600080fd5b806386eec4a1146104c95780638d3e1e41146104dc5780638da5cb5b1461050e5780638f37ec191461053b57600080fd5b806353972c2a116101b1578063715018a611610175578063715018a614610432578063787f82c81461044757806379ba5097146104675780637b6e842c1461047c57806383dffd6f1461049c57600080fd5b806353972c2a1461038457806357067503146103a45780635a69825d146103dc5780635d5ab968146103f25780636ea3a2281461041257600080fd5b80632ebc6034116101f85780632ebc6034146102ea57806339ec4df91461033357806348903e38146103495780634f1ef2861461035c57806352d1902d1461036f57600080fd5b8063057b92961461022a578063060ceab01461024c57806317e42e12146102755780632d1e973e14610295575b600080fd5b34801561023657600080fd5b5061024a610245366004613728565b610793565b005b34801561025857600080fd5b5061026260035481565b6040519081526020015b60405180910390f35b34801561028157600080fd5b5061024a610290366004613728565b610913565b3480156102a157600080fd5b506102626102b036600461381d565b8151602081840181018051600682529282019482019490942091909352815180830184018051928152908401929093019190912091525481565b3480156102f657600080fd5b5061031e7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff909116815260200161026c565b34801561033f57600080fd5b5061026260015481565b61024a610357366004613880565b610a7c565b61024a61036a3660046138c1565b610c03565b34801561037b57600080fd5b50610262610c22565b34801561039057600080fd5b5061024a61039f366004613904565b610c3f565b3480156103b057600080fd5b506102626103bf36600461393e565b805160208183018101805160058252928201919093012091525481565b3480156103e857600080fd5b5061026260025481565b3480156103fe57600080fd5b5061024a61040d36600461397a565b610f1e565b34801561041e57600080fd5b5061024a61042d3660046139ed565b611100565b34801561043e57600080fd5b5061024a611114565b34801561045357600080fd5b5061024a610462366004613728565b611128565b34801561047357600080fd5b5061024a611394565b34801561048857600080fd5b5061024a610497366004613904565b6113d9565b3480156104a857600080fd5b506104bc6104b7366004613880565b6116b0565b60405161026c9190613a06565b61024a6104d7366004613a53565b6116e3565b3480156104e857600080fd5b506104fc6104f736600461393e565b6118d7565b60405161026c96959493929190613b0e565b34801561051a57600080fd5b506105236119b3565b6040516001600160a01b03909116815260200161026c565b61024a610549366004613a53565b6119e8565b34801561055a57600080fd5b5061024a6105693660046139ed565b611bd3565b34801561057a57600080fd5b5061024a61058936600461397a565b611be4565b34801561059a57600080fd5b506105bf604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161026c9190613b56565b3480156105d857600080fd5b5061031e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561060c57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561064057600080fd5b5061026261064f36600461393e565b805160208183018101805160088252928201919093012091525481565b34801561067857600080fd5b5061024a610687366004613b69565b611de8565b34801561069857600080fd5b506106ac6106a73660046139ed565b611f7a565b6040805192835260208301919091520161026c565b3480156106cd57600080fd5b50610523611fba565b3480156106e257600080fd5b5061024a6106f13660046139ed565b611fe3565b34801561070257600080fd5b5061024a6107113660046139ed565b611ff4565b34801561072257600080fd5b5061026260005481565b34801561073857600080fd5b5061024a610747366004613b69565b612005565b61024a61075a366004613b98565b61208a565b34801561076b57600080fd5b5061031e7f000000000000000000000000000000000000000000000000000000000000000081565b828233604182146107bf5760405162461bcd60e51b81526004016107b690613c39565b60405180910390fd5b828260008181106107d2576107d2613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b146108085760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661081c84846121d8565b6001600160a01b0316146108425760405162461bcd60e51b81526004016107b690613cd9565b600061088387878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506108ae856007836040516108999190613d27565b90815260405190819003602001902090612351565b61090a5760405162461bcd60e51b815260206004820152602760248201527f4950546f6b656e5374616b696e673a204f70657261746f7220616c72656164796044820152662065786973747360c81b60648201526084016107b6565b50505050505050565b828233604182146109365760405162461bcd60e51b81526004016107b690613c39565b8282600081811061094957610949613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b1461097f5760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661099384846121d8565b6001600160a01b0316146109b95760405162461bcd60e51b81526004016107b690613cd9565b60006109fa87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b9050610a2585600783604051610a109190613d27565b90815260405190819003602001902090612366565b61090a5760405162461bcd60e51b815260206004820152602260248201527f4950546f6b656e5374616b696e673a204f70657261746f72206e6f7420666f756044820152611b9960f21b60648201526084016107b6565b818160218114610a9e5760405162461bcd60e51b81526004016107b690613c39565b81816000818110610ab157610ab1613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610aff575081816000818110610ae457610ae4613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610b1b5760405162461bcd60e51b81526004016107b690613c94565b610b2361237b565b610be684848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260098152683b30b634b230ba37b960b91b602082015291507f000000000000000000000000000000000000000000000000000000000000000090507f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006123b3565b610bfd600160008051602061425483398151915255565b50505050565b610c0b612698565b610c148261273d565b610c1e8282612745565b5050565b6000610c2c612807565b5060008051602061423483398151915290565b610c498180613d43565b60418114610c695760405162461bcd60e51b81526004016107b690613c39565b81816000818110610c7c57610c7c613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b14610cb25760405162461bcd60e51b81526004016107b690613c94565b610cbf6020840184613d43565b60218114610cdf5760405162461bcd60e51b81526004016107b690613c39565b81816000818110610cf257610cf2613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610d40575081816000818110610d2557610d25613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610d5c5760405162461bcd60e51b81526004016107b690613c94565b60048282604051610d6e929190613d89565b9081526040519081900360200190205460ff16610d9d5760405162461bcd60e51b81526004016107b690613d99565b610daa6040860186613d43565b60218114610dca5760405162461bcd60e51b81526004016107b690613c39565b81816000818110610ddd57610ddd613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610e2b575081816000818110610e1057610e10613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610e475760405162461bcd60e51b81526004016107b690613c94565b60048282604051610e59929190613d89565b9081526040519081900360200190205460ff16610e885760405162461bcd60e51b81526004016107b690613d99565b6000610ed1610e978980613d43565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506000610ee28960600135611f7a565b509050610eef8233612850565b610f1382610f0060208c018c613d43565b610f0d60408e018e613d43565b866128d7565b505050505050505050565b84843360418214610f415760405162461bcd60e51b81526004016107b690613c39565b82826000818110610f5457610f54613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b14610f8a5760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b0316610f9e84846121d8565b6001600160a01b031614610fc45760405162461bcd60e51b81526004016107b690613cd9565b858560218114610fe65760405162461bcd60e51b81526004016107b690613c39565b81816000818110610ff957610ff9613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b148061104757508181600081811061102c5761102c613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b6110635760405162461bcd60e51b81526004016107b690613c94565b60048282604051611075929190613d89565b9081526040519081900360200190205460ff166110a45760405162461bcd60e51b81526004016107b690613d99565b60006110e58b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506110f3818a8a8a612a85565b5050505050505050505050565b611108612c67565b61111181612c99565b50565b61111c612c67565b6111266000612d6e565b565b8282336041821461114b5760405162461bcd60e51b81526004016107b690613c39565b8282600081811061115e5761115e613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b146111945760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b03166111a884846121d8565b6001600160a01b0316146111ce5760405162461bcd60e51b81526004016107b690613cd9565b600061120f87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b905060006005826040516112239190613d27565b908152602001604051809103902054116112915760405162461bcd60e51b815260206004820152602960248201527f4950546f6b656e5374616b696e673a2044656c656761746f72206d7573742068604482015268617665207374616b6560b81b60648201526084016107b6565b426003546008836040516112a59190613d27565b9081526020016040518091039020546112be9190613df7565b106113275760405162461bcd60e51b815260206004820152603360248201527f4950546f6b656e5374616b696e673a205769746864726177616c20616464726560448201527239b99031b430b733b29031b7b7b616b237bbb760691b60648201526084016107b6565b426008826040516113389190613d27565b908152604051908190036020018120919091557f9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca906113839083906001600160a01b03891690613e0a565b60405180910390a150505050505050565b338061139e611fba565b6001600160a01b0316146113d05760405163118cdaa760e01b81526001600160a01b03821660048201526024016107b6565b61111181612d6e565b6113e38180613d43565b33604182146114045760405162461bcd60e51b81526004016107b690613c39565b8282600081811061141757611417613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b1461144d5760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661146184846121d8565b6001600160a01b0316146114875760405162461bcd60e51b81526004016107b690613cd9565b6114946020850185613d43565b602181146114b45760405162461bcd60e51b81526004016107b690613c39565b818160008181106114c7576114c7613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b14806115155750818160008181106114fa576114fa613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b6115315760405162461bcd60e51b81526004016107b690613c94565b60048282604051611543929190613d89565b9081526040519081900360200190205460ff166115725760405162461bcd60e51b81526004016107b690613d99565b61157f6040870187613d43565b6021811461159f5760405162461bcd60e51b81526004016107b690613c39565b818160008181106115b2576115b2613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b14806116005750818160008181106115e5576115e5613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b61161c5760405162461bcd60e51b81526004016107b690613c94565b6004828260405161162e929190613d89565b9081526040519081900360200190205460ff1661165d5760405162461bcd60e51b81526004016107b690613d99565b600061166c8960600135611f7a565b509050600061167e610e978b80613d43565b90506116a48161169160208d018d613d43565b61169e60408f018f613d43565b876128d7565b50505050505050505050565b60606116da600784846040516116c7929190613d89565b9081526020016040518091039020612da6565b90505b92915050565b838333604182146117065760405162461bcd60e51b81526004016107b690613c39565b8282600081811061171957611719613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b1461174f5760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661176384846121d8565b6001600160a01b0316146117895760405162461bcd60e51b81526004016107b690613cd9565b8484602181146117ab5760405162461bcd60e51b81526004016107b690613c39565b818160008181106117be576117be613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b148061180c5750818160008181106117f1576117f1613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b6118285760405162461bcd60e51b81526004016107b690613c94565b6004828260405161183a929190613d89565b9081526040519081900360200190205460ff166118695760405162461bcd60e51b81526004016107b690613d99565b61187161237b565b60006118b28a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506118bf818989612dba565b50610f13600160008051602061425483398151915255565b80516020818301810180516004825292820191909301209152805460018201805460ff909216929161190890613e2c565b80601f016020809104026020016040519081016040528092919081815260200182805461193490613e2c565b80156119815780601f1061195657610100808354040283529160200191611981565b820191906000526020600020905b81548152906001019060200180831161196457829003601f168201915b50505050600283015460039093015491929163ffffffff80821692506401000000008204811691600160401b90041686565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b838360218114611a0a5760405162461bcd60e51b81526004016107b690613c39565b81816000818110611a1d57611a1d613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611a6b575081816000818110611a5057611a50613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611a875760405162461bcd60e51b81526004016107b690613c94565b838360218114611aa95760405162461bcd60e51b81526004016107b690613c39565b81816000818110611abc57611abc613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611b0a575081816000818110611aef57611aef613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611b265760405162461bcd60e51b81526004016107b690613c94565b60048282604051611b38929190613d89565b9081526040519081900360200190205460ff16611b675760405162461bcd60e51b81526004016107b690613d99565b611b6f61237b565b611bb288888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250899150612dba9050565b611bc9600160008051602061425483398151915255565b5050505050505050565b611bdb612c67565b61111181612ed1565b848460218114611c065760405162461bcd60e51b81526004016107b690613c39565b81816000818110611c1957611c19613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611c67575081816000818110611c4c57611c4c613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611c835760405162461bcd60e51b81526004016107b690613c94565b848460218114611ca55760405162461bcd60e51b81526004016107b690613c39565b81816000818110611cb857611cb8613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611d06575081816000818110611ceb57611ceb613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611d225760405162461bcd60e51b81526004016107b690613c94565b60048282604051611d34929190613d89565b9081526040519081900360200190205460ff16611d635760405162461bcd60e51b81526004016107b690613d99565b611da489898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250339250612850915050565b610f1389898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a9150899050612a85565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015611e2d5750825b90506000826001600160401b03166001148015611e495750303b155b905081158015611e57575080155b15611e755760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315611e9f57845460ff60401b1916600160401b1785555b6001600160a01b038616611f125760405162461bcd60e51b815260206004820152603460248201527f4950546f6b656e5374616b696e673a206163636573734d616e616765722063616044820152736e6e6f74206265207a65726f206164647265737360601b60648201526084016107b6565b611f1a612fa2565b611f22612fb2565b611f2b86612fba565b8315611f7257845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2906020015b60405180910390a15b505050505050565b600080611fa77f000000000000000000000000000000000000000000000000000000000000000084613e7c565b9050611fb38184613e90565b9150915091565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c006119d8565b611feb612c67565b61111181612fcb565b611ffc612c67565b61111181613097565b61200d612c67565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556120516119b3565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b868633604182146120ad5760405162461bcd60e51b81526004016107b690613c39565b828260008181106120c0576120c0613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b146120f65760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661210a84846121d8565b6001600160a01b0316146121305760405162461bcd60e51b81526004016107b690613cd9565b61213861237b565b60006121798b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506121c0818a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c92508b91508a90506123b3565b506116a4600160008051602061425483398151915255565b60006121e78260018186613ea3565b6040516121f5929190613d89565b6040519081900390209392505050565b606081516041146122675760405162461bcd60e51b815260206004820152602660248201527f496e76616c696420756e636f6d70726573736564207075626c6963206b6579206044820152650d8cadccee8d60d31b60648201526084016107b6565b602182015160418301516000612281600260ff8416613ecd565b60ff161561229357600360f81b612299565b600160f91b5b604080516021808252606082019092529192506000919060208201818036833701905050905081816000815181106122d3576122d3613c7e565b60200101906001600160f81b031916908160001a90535060005b60208110156123475784816020811061230857612308613c7e565b1a60f81b82612318836001613df7565b8151811061232857612328613c7e565b60200101906001600160f81b031916908160001a9053506001016122ed565b5095945050505050565b60006116da836001600160a01b038416613142565b60006116da836001600160a01b038416613191565b6000805160206142548339815191528054600119016123ad57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b6000806123bf34611f7a565b91509150600082116123e35760405162461bcd60e51b81526004016107b690613eef565b60006004886040516123f59190613d27565b908152604051908190036020019020805460ff198116600117825590915060ff168061242157876124af565b81600101805461243090613e2c565b80601f016020809104026020016040519081016040528092919081815260200182805461245c90613e2c565b80156124a95780601f1061247e576101008083540402835291602001916124a9565b820191906000526020600020905b81548152906001019060200180831161248c57829003601f168201915b50505050505b60018301906124be9082613f7b565b508382600201546124cf9190613df7565b6002830155806124df57866124eb565b600382015463ffffffff165b60038301805463ffffffff191663ffffffff92909216919091179055806125125785612526565b6003820154640100000000900463ffffffff165b8260030160046101000a81548163ffffffff021916908363ffffffff160217905550806125535784612566565b6003820154600160401b900463ffffffff165b8260030160086101000a81548163ffffffff021916908363ffffffff1602179055508360058a6040516125999190613d27565b908152602001604051809103902060008282546125b69190613df7565b925050819055508360068a6040516125ce9190613d27565b90815260200160405180910390208a6040516125ea9190613d27565b908152602001604051809103902060008282546126079190613df7565b90915550612616905083613284565b60038201546040517f5cecf4ee8b0c1d212b07dbc464fc303e4ffc458fd0f61135d4b9bf7f60197a1891612671918c916001870191899163ffffffff808216926401000000008304821692600160401b90049091169061403a565b60405180910390a1505050505050505050565b600160008051602061425483398151915255565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061271f57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316612713600080516020614234833981519152546001600160a01b031690565b6001600160a01b031614155b156111265760405163703e46dd60e11b815260040160405180910390fd5b611111612c67565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561279f575060408051601f3d908101601f1916820190925261279c9181019061410a565b60015b6127c757604051634c9c8ce360e01b81526001600160a01b03831660048201526024016107b6565b60008051602061423483398151915281146127f857604051632a87526960e21b8152600481018290526024016107b6565b612802838361332f565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146111265760405163703e46dd60e11b815260040160405180910390fd5b612879816007846040516128649190613d27565b90815260405190819003602001902090613385565b610c1e5760405162461bcd60e51b815260206004820152602960248201527f4950546f6b656e5374616b696e673a2043616c6c6572206973206e6f7420616e6044820152681037b832b930ba37b960b91b60648201526084016107b6565b806006876040516128e89190613d27565b90815260200160405180910390208686604051612906929190613d89565b90815260200160405180910390205410156129335760405162461bcd60e51b81526004016107b690614123565b8060048686604051612946929190613d89565b908152602001604051809103902060020160008282546129669190613e90565b925050819055508060048484604051612980929190613d89565b908152602001604051809103902060020160008282546129a09190613df7565b92505081905550806006876040516129b89190613d27565b908152602001604051809103902086866040516129d6929190613d89565b908152602001604051809103902060008282546129f39190613e90565b9250508190555080600687604051612a0b9190613d27565b90815260200160405180910390208484604051612a29929190613d89565b90815260200160405180910390206000828254612a469190613df7565b90915550506040517fb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a90611f6990889088908890889088908890614196565b80600685604051612a969190613d27565b90815260200160405180910390208484604051612ab4929190613d89565b9081526020016040518091039020541015612ae15760405162461bcd60e51b81526004016107b690614123565b8060048484604051612af4929190613d89565b90815260200160405180910390206002016000828254612b149190613e90565b9250508190555080600585604051612b2c9190613d27565b90815260200160405180910390206000828254612b499190613e90565b9250508190555080600685604051612b619190613d27565b90815260200160405180910390208484604051612b7f929190613d89565b90815260200160405180910390206000828254612b9c9190613e90565b9091555050604051600490612bb49085908590613d89565b908152602001604051809103902060020154600003612c245760048383604051612bdf929190613d89565b908152604051908190036020019020805460ff191681556000612c056001830182613676565b506000600282015560030180546bffffffffffffffffffffffff191690555b7f0526a04a9b113a046b17e2350e42123a2515b5558b3aea91576ccdb1270c1b5984848484604051612c5994939291906141e5565b60405180910390a150505050565b33612c706119b3565b6001600160a01b0316146111265760405163118cdaa760e01b81523360048201526024016107b6565b60008111612cfe5760405162461bcd60e51b815260206004820152602c60248201527f4950546f6b656e5374616b696e673a206d696e556e7374616b65416d6f756e7460448201526b02063616e6e6f7420626520360a41b60648201526084016107b6565b612d287f000000000000000000000000000000000000000000000000000000000000000082613e7c565b612d329082613e90565b60018190556040519081527ff93d77980ae5a1ddd008d6a7f02cbee5af2a4fcea850c4b55828de4f644e589f906020015b60405180910390a150565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155610c1e826133a7565b60606000612db383613418565b9392505050565b600080612dc634611f7a565b91509150600054821015612dec5760405162461bcd60e51b81526004016107b690613eef565b8160048585604051612dff929190613d89565b90815260405190819003602001812060020180549092019091558290600590612e29908890613d27565b90815260405190819003602001812080549092019091558290600690612e50908890613d27565b90815260200160405180910390208585604051612e6e929190613d89565b90815260405190819003602001902080549091019055612e8d81613284565b7fe77f103965e0ff8836ce54ba9bac869f217cd5da27d6bdefd090282c397211c085858585604051612ec294939291906141e5565b60405180910390a15050505050565b60008111612f395760405162461bcd60e51b815260206004820152602f60248201527f4950546f6b656e5374616b696e673a206d696e526564656c6567617465416d6f60448201526e0756e742063616e6e6f74206265203608c1b60648201526084016107b6565b612f637f000000000000000000000000000000000000000000000000000000000000000082613e7c565b612f6d9082613e90565b60028190556040519081527ff1e15ded5b5192ec1a89a3d16f49c46c7fa6c876d1f8299cf036f5abf9924d9b90602001612d63565b612faa613474565b6111266134bd565b611126613474565b612fc2613474565b611111816134c5565b6000811161302e5760405162461bcd60e51b815260206004820152602a60248201527f4950546f6b656e5374616b696e673a206d696e5374616b65416d6f756e7420636044820152690616e6e6f7420626520360b41b60648201526084016107b6565b6130587f000000000000000000000000000000000000000000000000000000000000000082613e7c565b6130629082613e90565b60008190556040519081527fea095c2fea861b87f0fd54d0d4453358692a527e120df22b62c71696247dfb9f90602001612d63565b6000811161310d5760405162461bcd60e51b815260206004820152603e60248201527f4950546f6b656e5374616b696e673a206e65775769746864726177616c41646460448201527f726573734368616e6765496e74657276616c2063616e6e6f742062652030000060648201526084016107b6565b60038190556040518181527fbed33ba1e6aacc702f8e48397b388e43ca92a8898ed8bdb389fd8b18af95d32c90602001612d63565b6000818152600183016020526040812054613189575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556116dd565b5060006116dd565b6000818152600183016020526040812054801561327a5760006131b5600183613e90565b85549091506000906131c990600190613e90565b905080821461322e5760008660000182815481106131e9576131e9613c7e565b906000526020600020015490508087600001848154811061320c5761320c613c7e565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061323f5761323f61421d565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506116dd565b60009150506116dd565b604051600090339083908381818185875af1925050503d80600081146132c6576040519150601f19603f3d011682016040523d82523d6000602084013e6132cb565b606091505b5050905080610c1e5760405162461bcd60e51b815260206004820152602a60248201527f4950546f6b656e5374616b696e673a204661696c656420746f20726566756e64604482015269103932b6b0b4b73232b960b11b60648201526084016107b6565b613338826134f7565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561337d57612802828261355c565b610c1e6135d2565b6001600160a01b038116600090815260018301602052604081205415156116da565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561346857602002820191906000526020600020905b815481526020019060010190808311613454575b50505050509050919050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661112657604051631afcd79f60e31b815260040160405180910390fd5b612684613474565b6134cd613474565b6001600160a01b0381166113d057604051631e4fbdf760e01b8152600060048201526024016107b6565b806001600160a01b03163b60000361352d57604051634c9c8ce360e01b81526001600160a01b03821660048201526024016107b6565b60008051602061423483398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516135799190613d27565b600060405180830381855af49150503d80600081146135b4576040519150601f19603f3d011682016040523d82523d6000602084013e6135b9565b606091505b50915091506135c98583836135f1565b95945050505050565b34156111265760405163b398979f60e01b815260040160405180910390fd5b606082613606576136018261364d565b612db3565b815115801561361d57506001600160a01b0384163b155b1561364657604051639996b31560e01b81526001600160a01b03851660048201526024016107b6565b5092915050565b80511561365d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50805461368290613e2c565b6000825580601f10613692575050565b601f01602090049060005260206000209081019061111191905b808211156136c057600081556001016136ac565b5090565b60008083601f8401126136d657600080fd5b5081356001600160401b038111156136ed57600080fd5b60208301915083602082850101111561370557600080fd5b9250929050565b80356001600160a01b038116811461372357600080fd5b919050565b60008060006040848603121561373d57600080fd5b83356001600160401b0381111561375357600080fd5b61375f868287016136c4565b909450925061377290506020850161370c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126137a257600080fd5b81356001600160401b03808211156137bc576137bc61377b565b604051601f8301601f19908116603f011681019082821181831017156137e4576137e461377b565b816040528381528660208588010111156137fd57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561383057600080fd5b82356001600160401b038082111561384757600080fd5b61385386838701613791565b9350602085013591508082111561386957600080fd5b5061387685828601613791565b9150509250929050565b6000806020838503121561389357600080fd5b82356001600160401b038111156138a957600080fd5b6138b5858286016136c4565b90969095509350505050565b600080604083850312156138d457600080fd5b6138dd8361370c565b915060208301356001600160401b038111156138f857600080fd5b61387685828601613791565b60006020828403121561391657600080fd5b81356001600160401b0381111561392c57600080fd5b820160808185031215612db357600080fd5b60006020828403121561395057600080fd5b81356001600160401b0381111561396657600080fd5b61397284828501613791565b949350505050565b60008060008060006060868803121561399257600080fd5b85356001600160401b03808211156139a957600080fd5b6139b589838a016136c4565b909750955060208801359150808211156139ce57600080fd5b506139db888289016136c4565b96999598509660400135949350505050565b6000602082840312156139ff57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015613a475783516001600160a01b031683529284019291840191600101613a22565b50909695505050505050565b60008060008060408587031215613a6957600080fd5b84356001600160401b0380821115613a8057600080fd5b613a8c888389016136c4565b90965094506020870135915080821115613aa557600080fd5b50613ab2878288016136c4565b95989497509550505050565b60005b83811015613ad9578181015183820152602001613ac1565b50506000910152565b60008151808452613afa816020860160208601613abe565b601f01601f19169290920160200192915050565b861515815260c060208201526000613b2960c0830188613ae2565b60408301969096525063ffffffff9384166060820152918316608083015290911660a09091015292915050565b6020815260006116da6020830184613ae2565b600060208284031215613b7b57600080fd5b6116da8261370c565b803563ffffffff8116811461372357600080fd5b600080600080600080600060a0888a031215613bb357600080fd5b87356001600160401b0380821115613bca57600080fd5b613bd68b838c016136c4565b909950975060208a0135915080821115613bef57600080fd5b50613bfc8a828b016136c4565b9096509450613c0f905060408901613b84565b9250613c1d60608901613b84565b9150613c2b60808901613b84565b905092959891949750929550565b60208082526025908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579206c6040820152640cadccee8d60db1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526025908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b657920706040820152640e4caccd2f60db1b606082015260800190565b6020808252602e908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579206460408201526d657269766564206164647265737360901b606082015260800190565b60008251613d39818460208701613abe565b9190910192915050565b6000808335601e19843603018112613d5a57600080fd5b8301803591506001600160401b03821115613d7457600080fd5b60200191503681900382131561370557600080fd5b8183823760009101908152919050565b60208082526028908201527f4950546f6b656e5374616b696e673a2056616c696461746f7220646f6573206e6040820152671bdd08195e1a5cdd60c21b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156116dd576116dd613de1565b604081526000613e1d6040830185613ae2565b90508260208301529392505050565b600181811c90821680613e4057607f821691505b602082108103613e6057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b600082613e8b57613e8b613e66565b500690565b818103818111156116dd576116dd613de1565b60008085851115613eb357600080fd5b83861115613ec057600080fd5b5050820193919092039150565b600060ff831680613ee057613ee0613e66565b8060ff84160691505092915050565b60208082526024908201527f4950546f6b656e5374616b696e673a205374616b6520616d6f756e7420746f6f604082015263206c6f7760e01b606082015260800190565b601f821115612802576000816000526020600020601f850160051c81016020861015613f5c5750805b601f850160051c820191505b81811015611f7257828155600101613f68565b81516001600160401b03811115613f9457613f9461377b565b613fa881613fa28454613e2c565b84613f33565b602080601f831160018114613fdd5760008415613fc55750858301515b600019600386901b1c1916600185901b178555611f72565b600085815260208120601f198616915b8281101561400c57888601518255948401946001909101908401613fed565b508582101561402a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60c08152600061404d60c0830189613ae2565b6020838203818501526000895461406381613e2c565b8085526001828116801561407e5760018114614098576140c6565b60ff1984168787015282151560051b8701860194506140c6565b8d6000528560002060005b848110156140be5781548982018901529083019087016140a3565b880187019550505b505050506040850189905263ffffffff8816606086015292506140e7915050565b63ffffffff8416608083015263ffffffff831660a0830152979650505050505050565b60006020828403121561411c57600080fd5b5051919050565b6020808252602a908201527f4950546f6b656e5374616b696e673a20496e73756666696369656e74207374616040820152691ad95908185b5bdd5b9d60b21b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6080815260006141a96080830189613ae2565b82810360208401526141bc81888a61416d565b905082810360408401526141d181868861416d565b915050826060830152979650505050505050565b6060815260006141f86060830187613ae2565b828103602084015261420b81868861416d565b91505082604083015295945050505050565b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00a26469706673582212205d7fe4fb8406b6d5762b590366e5e876f499143d2fed9c578571d9de5d8facb164736f6c634300081800334950546f6b656e5374616b696e673a20496e76616c69642064656661756c7420", } // IPTokenStakingABI is the input ABI used to generate the binding from. @@ -52,7 +52,7 @@ var IPTokenStakingABI = IPTokenStakingMetaData.ABI var IPTokenStakingBin = IPTokenStakingMetaData.Bin // DeployIPTokenStaking deploys a new Ethereum contract, binding an instance of IPTokenStaking to it. -func DeployIPTokenStaking(auth *bind.TransactOpts, backend bind.ContractBackend, newOwner common.Address, _minStakeAmount *big.Int, _minUnstakeAmount *big.Int, _minRedelegateAmount *big.Int, stakingRounding *big.Int, _withdrawalAddressChangeInterval *big.Int, defaultCommissionRate uint32, defaultMaxCommissionRate uint32, defaultMaxCommissionChangeRate uint32) (common.Address, *types.Transaction, *IPTokenStaking, error) { +func DeployIPTokenStaking(auth *bind.TransactOpts, backend bind.ContractBackend, _minStakeAmount *big.Int, _minUnstakeAmount *big.Int, _minRedelegateAmount *big.Int, stakingRounding *big.Int, _withdrawalAddressChangeInterval *big.Int, defaultCommissionRate uint32, defaultMaxCommissionRate uint32, defaultMaxCommissionChangeRate uint32) (common.Address, *types.Transaction, *IPTokenStaking, error) { parsed, err := IPTokenStakingMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -61,7 +61,7 @@ func DeployIPTokenStaking(auth *bind.TransactOpts, backend bind.ContractBackend, return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(IPTokenStakingBin), backend, newOwner, _minStakeAmount, _minUnstakeAmount, _minRedelegateAmount, stakingRounding, _withdrawalAddressChangeInterval, defaultCommissionRate, defaultMaxCommissionRate, defaultMaxCommissionChangeRate) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(IPTokenStakingBin), backend, _minStakeAmount, _minUnstakeAmount, _minRedelegateAmount, stakingRounding, _withdrawalAddressChangeInterval, defaultCommissionRate, defaultMaxCommissionRate, defaultMaxCommissionChangeRate) if err != nil { return common.Address{}, nil, nil, err } @@ -334,12 +334,43 @@ func (_IPTokenStaking *IPTokenStakingCallerSession) STAKEROUNDING() (*big.Int, e return _IPTokenStaking.Contract.STAKEROUNDING(&_IPTokenStaking.CallOpts) } +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_IPTokenStaking *IPTokenStakingCaller) UPGRADEINTERFACEVERSION(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _IPTokenStaking.contract.Call(opts, &out, "UPGRADE_INTERFACE_VERSION") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_IPTokenStaking *IPTokenStakingSession) UPGRADEINTERFACEVERSION() (string, error) { + return _IPTokenStaking.Contract.UPGRADEINTERFACEVERSION(&_IPTokenStaking.CallOpts) +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_IPTokenStaking *IPTokenStakingCallerSession) UPGRADEINTERFACEVERSION() (string, error) { + return _IPTokenStaking.Contract.UPGRADEINTERFACEVERSION(&_IPTokenStaking.CallOpts) +} + // DelegatorTotalStakes is a free data retrieval call binding the contract method 0x57067503. // -// Solidity: function delegatorTotalStakes(bytes delegatorPubkey) view returns(uint256 stakedAmount) -func (_IPTokenStaking *IPTokenStakingCaller) DelegatorTotalStakes(opts *bind.CallOpts, delegatorPubkey []byte) (*big.Int, error) { +// Solidity: function delegatorTotalStakes(bytes delegatorCmpPubkey) view returns(uint256 stakedAmount) +func (_IPTokenStaking *IPTokenStakingCaller) DelegatorTotalStakes(opts *bind.CallOpts, delegatorCmpPubkey []byte) (*big.Int, error) { var out []interface{} - err := _IPTokenStaking.contract.Call(opts, &out, "delegatorTotalStakes", delegatorPubkey) + err := _IPTokenStaking.contract.Call(opts, &out, "delegatorTotalStakes", delegatorCmpPubkey) if err != nil { return *new(*big.Int), err @@ -353,24 +384,24 @@ func (_IPTokenStaking *IPTokenStakingCaller) DelegatorTotalStakes(opts *bind.Cal // DelegatorTotalStakes is a free data retrieval call binding the contract method 0x57067503. // -// Solidity: function delegatorTotalStakes(bytes delegatorPubkey) view returns(uint256 stakedAmount) -func (_IPTokenStaking *IPTokenStakingSession) DelegatorTotalStakes(delegatorPubkey []byte) (*big.Int, error) { - return _IPTokenStaking.Contract.DelegatorTotalStakes(&_IPTokenStaking.CallOpts, delegatorPubkey) +// Solidity: function delegatorTotalStakes(bytes delegatorCmpPubkey) view returns(uint256 stakedAmount) +func (_IPTokenStaking *IPTokenStakingSession) DelegatorTotalStakes(delegatorCmpPubkey []byte) (*big.Int, error) { + return _IPTokenStaking.Contract.DelegatorTotalStakes(&_IPTokenStaking.CallOpts, delegatorCmpPubkey) } // DelegatorTotalStakes is a free data retrieval call binding the contract method 0x57067503. // -// Solidity: function delegatorTotalStakes(bytes delegatorPubkey) view returns(uint256 stakedAmount) -func (_IPTokenStaking *IPTokenStakingCallerSession) DelegatorTotalStakes(delegatorPubkey []byte) (*big.Int, error) { - return _IPTokenStaking.Contract.DelegatorTotalStakes(&_IPTokenStaking.CallOpts, delegatorPubkey) +// Solidity: function delegatorTotalStakes(bytes delegatorCmpPubkey) view returns(uint256 stakedAmount) +func (_IPTokenStaking *IPTokenStakingCallerSession) DelegatorTotalStakes(delegatorCmpPubkey []byte) (*big.Int, error) { + return _IPTokenStaking.Contract.DelegatorTotalStakes(&_IPTokenStaking.CallOpts, delegatorCmpPubkey) } // DelegatorValidatorStakes is a free data retrieval call binding the contract method 0x2d1e973e. // -// Solidity: function delegatorValidatorStakes(bytes delegatorPubkey, bytes validatorPubkey) view returns(uint256 stakedAmount) -func (_IPTokenStaking *IPTokenStakingCaller) DelegatorValidatorStakes(opts *bind.CallOpts, delegatorPubkey []byte, validatorPubkey []byte) (*big.Int, error) { +// Solidity: function delegatorValidatorStakes(bytes delegatorCmpPubkey, bytes validatorCmpPubkey) view returns(uint256 stakedAmount) +func (_IPTokenStaking *IPTokenStakingCaller) DelegatorValidatorStakes(opts *bind.CallOpts, delegatorCmpPubkey []byte, validatorCmpPubkey []byte) (*big.Int, error) { var out []interface{} - err := _IPTokenStaking.contract.Call(opts, &out, "delegatorValidatorStakes", delegatorPubkey, validatorPubkey) + err := _IPTokenStaking.contract.Call(opts, &out, "delegatorValidatorStakes", delegatorCmpPubkey, validatorCmpPubkey) if err != nil { return *new(*big.Int), err @@ -384,16 +415,16 @@ func (_IPTokenStaking *IPTokenStakingCaller) DelegatorValidatorStakes(opts *bind // DelegatorValidatorStakes is a free data retrieval call binding the contract method 0x2d1e973e. // -// Solidity: function delegatorValidatorStakes(bytes delegatorPubkey, bytes validatorPubkey) view returns(uint256 stakedAmount) -func (_IPTokenStaking *IPTokenStakingSession) DelegatorValidatorStakes(delegatorPubkey []byte, validatorPubkey []byte) (*big.Int, error) { - return _IPTokenStaking.Contract.DelegatorValidatorStakes(&_IPTokenStaking.CallOpts, delegatorPubkey, validatorPubkey) +// Solidity: function delegatorValidatorStakes(bytes delegatorCmpPubkey, bytes validatorCmpPubkey) view returns(uint256 stakedAmount) +func (_IPTokenStaking *IPTokenStakingSession) DelegatorValidatorStakes(delegatorCmpPubkey []byte, validatorCmpPubkey []byte) (*big.Int, error) { + return _IPTokenStaking.Contract.DelegatorValidatorStakes(&_IPTokenStaking.CallOpts, delegatorCmpPubkey, validatorCmpPubkey) } // DelegatorValidatorStakes is a free data retrieval call binding the contract method 0x2d1e973e. // -// Solidity: function delegatorValidatorStakes(bytes delegatorPubkey, bytes validatorPubkey) view returns(uint256 stakedAmount) -func (_IPTokenStaking *IPTokenStakingCallerSession) DelegatorValidatorStakes(delegatorPubkey []byte, validatorPubkey []byte) (*big.Int, error) { - return _IPTokenStaking.Contract.DelegatorValidatorStakes(&_IPTokenStaking.CallOpts, delegatorPubkey, validatorPubkey) +// Solidity: function delegatorValidatorStakes(bytes delegatorCmpPubkey, bytes validatorCmpPubkey) view returns(uint256 stakedAmount) +func (_IPTokenStaking *IPTokenStakingCallerSession) DelegatorValidatorStakes(delegatorCmpPubkey []byte, validatorCmpPubkey []byte) (*big.Int, error) { + return _IPTokenStaking.Contract.DelegatorValidatorStakes(&_IPTokenStaking.CallOpts, delegatorCmpPubkey, validatorCmpPubkey) } // GetOperators is a free data retrieval call binding the contract method 0x83dffd6f. @@ -582,6 +613,37 @@ func (_IPTokenStaking *IPTokenStakingCallerSession) PendingOwner() (common.Addre return _IPTokenStaking.Contract.PendingOwner(&_IPTokenStaking.CallOpts) } +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_IPTokenStaking *IPTokenStakingCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _IPTokenStaking.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_IPTokenStaking *IPTokenStakingSession) ProxiableUUID() ([32]byte, error) { + return _IPTokenStaking.Contract.ProxiableUUID(&_IPTokenStaking.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_IPTokenStaking *IPTokenStakingCallerSession) ProxiableUUID() ([32]byte, error) { + return _IPTokenStaking.Contract.ProxiableUUID(&_IPTokenStaking.CallOpts) +} + // RoundedStakeAmount is a free data retrieval call binding the contract method 0xd2e1f5b8. // // Solidity: function roundedStakeAmount(uint256 rawAmount) view returns(uint256 amount, uint256 remainder) @@ -629,8 +691,8 @@ func (_IPTokenStaking *IPTokenStakingCallerSession) RoundedStakeAmount(rawAmount // ValidatorMetadata is a free data retrieval call binding the contract method 0x8d3e1e41. // -// Solidity: function validatorMetadata(bytes validatorPubkey) view returns(bool exists, string moniker, uint256 totalStake, uint32 commissionRate, uint32 maxCommissionRate, uint32 maxCommissionChangeRate) -func (_IPTokenStaking *IPTokenStakingCaller) ValidatorMetadata(opts *bind.CallOpts, validatorPubkey []byte) (struct { +// Solidity: function validatorMetadata(bytes validatorCmpPubkey) view returns(bool exists, string moniker, uint256 totalStake, uint32 commissionRate, uint32 maxCommissionRate, uint32 maxCommissionChangeRate) +func (_IPTokenStaking *IPTokenStakingCaller) ValidatorMetadata(opts *bind.CallOpts, validatorCmpPubkey []byte) (struct { Exists bool Moniker string TotalStake *big.Int @@ -639,7 +701,7 @@ func (_IPTokenStaking *IPTokenStakingCaller) ValidatorMetadata(opts *bind.CallOp MaxCommissionChangeRate uint32 }, error) { var out []interface{} - err := _IPTokenStaking.contract.Call(opts, &out, "validatorMetadata", validatorPubkey) + err := _IPTokenStaking.contract.Call(opts, &out, "validatorMetadata", validatorCmpPubkey) outstruct := new(struct { Exists bool @@ -666,8 +728,8 @@ func (_IPTokenStaking *IPTokenStakingCaller) ValidatorMetadata(opts *bind.CallOp // ValidatorMetadata is a free data retrieval call binding the contract method 0x8d3e1e41. // -// Solidity: function validatorMetadata(bytes validatorPubkey) view returns(bool exists, string moniker, uint256 totalStake, uint32 commissionRate, uint32 maxCommissionRate, uint32 maxCommissionChangeRate) -func (_IPTokenStaking *IPTokenStakingSession) ValidatorMetadata(validatorPubkey []byte) (struct { +// Solidity: function validatorMetadata(bytes validatorCmpPubkey) view returns(bool exists, string moniker, uint256 totalStake, uint32 commissionRate, uint32 maxCommissionRate, uint32 maxCommissionChangeRate) +func (_IPTokenStaking *IPTokenStakingSession) ValidatorMetadata(validatorCmpPubkey []byte) (struct { Exists bool Moniker string TotalStake *big.Int @@ -675,13 +737,13 @@ func (_IPTokenStaking *IPTokenStakingSession) ValidatorMetadata(validatorPubkey MaxCommissionRate uint32 MaxCommissionChangeRate uint32 }, error) { - return _IPTokenStaking.Contract.ValidatorMetadata(&_IPTokenStaking.CallOpts, validatorPubkey) + return _IPTokenStaking.Contract.ValidatorMetadata(&_IPTokenStaking.CallOpts, validatorCmpPubkey) } // ValidatorMetadata is a free data retrieval call binding the contract method 0x8d3e1e41. // -// Solidity: function validatorMetadata(bytes validatorPubkey) view returns(bool exists, string moniker, uint256 totalStake, uint32 commissionRate, uint32 maxCommissionRate, uint32 maxCommissionChangeRate) -func (_IPTokenStaking *IPTokenStakingCallerSession) ValidatorMetadata(validatorPubkey []byte) (struct { +// Solidity: function validatorMetadata(bytes validatorCmpPubkey) view returns(bool exists, string moniker, uint256 totalStake, uint32 commissionRate, uint32 maxCommissionRate, uint32 maxCommissionChangeRate) +func (_IPTokenStaking *IPTokenStakingCallerSession) ValidatorMetadata(validatorCmpPubkey []byte) (struct { Exists bool Moniker string TotalStake *big.Int @@ -689,15 +751,15 @@ func (_IPTokenStaking *IPTokenStakingCallerSession) ValidatorMetadata(validatorP MaxCommissionRate uint32 MaxCommissionChangeRate uint32 }, error) { - return _IPTokenStaking.Contract.ValidatorMetadata(&_IPTokenStaking.CallOpts, validatorPubkey) + return _IPTokenStaking.Contract.ValidatorMetadata(&_IPTokenStaking.CallOpts, validatorCmpPubkey) } // WithdrawalAddressChange is a free data retrieval call binding the contract method 0xc24ae586. // -// Solidity: function withdrawalAddressChange(bytes delegatorPubkey) view returns(uint256 lastChange) -func (_IPTokenStaking *IPTokenStakingCaller) WithdrawalAddressChange(opts *bind.CallOpts, delegatorPubkey []byte) (*big.Int, error) { +// Solidity: function withdrawalAddressChange(bytes delegatorCmpPubkey) view returns(uint256 lastChange) +func (_IPTokenStaking *IPTokenStakingCaller) WithdrawalAddressChange(opts *bind.CallOpts, delegatorCmpPubkey []byte) (*big.Int, error) { var out []interface{} - err := _IPTokenStaking.contract.Call(opts, &out, "withdrawalAddressChange", delegatorPubkey) + err := _IPTokenStaking.contract.Call(opts, &out, "withdrawalAddressChange", delegatorCmpPubkey) if err != nil { return *new(*big.Int), err @@ -711,16 +773,16 @@ func (_IPTokenStaking *IPTokenStakingCaller) WithdrawalAddressChange(opts *bind. // WithdrawalAddressChange is a free data retrieval call binding the contract method 0xc24ae586. // -// Solidity: function withdrawalAddressChange(bytes delegatorPubkey) view returns(uint256 lastChange) -func (_IPTokenStaking *IPTokenStakingSession) WithdrawalAddressChange(delegatorPubkey []byte) (*big.Int, error) { - return _IPTokenStaking.Contract.WithdrawalAddressChange(&_IPTokenStaking.CallOpts, delegatorPubkey) +// Solidity: function withdrawalAddressChange(bytes delegatorCmpPubkey) view returns(uint256 lastChange) +func (_IPTokenStaking *IPTokenStakingSession) WithdrawalAddressChange(delegatorCmpPubkey []byte) (*big.Int, error) { + return _IPTokenStaking.Contract.WithdrawalAddressChange(&_IPTokenStaking.CallOpts, delegatorCmpPubkey) } // WithdrawalAddressChange is a free data retrieval call binding the contract method 0xc24ae586. // -// Solidity: function withdrawalAddressChange(bytes delegatorPubkey) view returns(uint256 lastChange) -func (_IPTokenStaking *IPTokenStakingCallerSession) WithdrawalAddressChange(delegatorPubkey []byte) (*big.Int, error) { - return _IPTokenStaking.Contract.WithdrawalAddressChange(&_IPTokenStaking.CallOpts, delegatorPubkey) +// Solidity: function withdrawalAddressChange(bytes delegatorCmpPubkey) view returns(uint256 lastChange) +func (_IPTokenStaking *IPTokenStakingCallerSession) WithdrawalAddressChange(delegatorCmpPubkey []byte) (*big.Int, error) { + return _IPTokenStaking.Contract.WithdrawalAddressChange(&_IPTokenStaking.CallOpts, delegatorCmpPubkey) } // WithdrawalAddressChangeInterval is a free data retrieval call binding the contract method 0x060ceab0. @@ -838,6 +900,27 @@ func (_IPTokenStaking *IPTokenStakingTransactorSession) CreateValidatorOnBehalf( return _IPTokenStaking.Contract.CreateValidatorOnBehalf(&_IPTokenStaking.TransactOpts, validatorPubkey) } +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address accessManager) returns() +func (_IPTokenStaking *IPTokenStakingTransactor) Initialize(opts *bind.TransactOpts, accessManager common.Address) (*types.Transaction, error) { + return _IPTokenStaking.contract.Transact(opts, "initialize", accessManager) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address accessManager) returns() +func (_IPTokenStaking *IPTokenStakingSession) Initialize(accessManager common.Address) (*types.Transaction, error) { + return _IPTokenStaking.Contract.Initialize(&_IPTokenStaking.TransactOpts, accessManager) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address accessManager) returns() +func (_IPTokenStaking *IPTokenStakingTransactorSession) Initialize(accessManager common.Address) (*types.Transaction, error) { + return _IPTokenStaking.Contract.Initialize(&_IPTokenStaking.TransactOpts, accessManager) +} + // Redelegate is a paid mutator transaction binding the contract method 0x7b6e842c. // // Solidity: function redelegate((bytes,bytes,bytes,uint256) p) returns() @@ -1132,6 +1215,27 @@ func (_IPTokenStaking *IPTokenStakingTransactorSession) UnstakeOnBehalf(delegato return _IPTokenStaking.Contract.UnstakeOnBehalf(&_IPTokenStaking.TransactOpts, delegatorCmpPubkey, validatorPubkey, amount) } +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_IPTokenStaking *IPTokenStakingTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _IPTokenStaking.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_IPTokenStaking *IPTokenStakingSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _IPTokenStaking.Contract.UpgradeToAndCall(&_IPTokenStaking.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_IPTokenStaking *IPTokenStakingTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _IPTokenStaking.Contract.UpgradeToAndCall(&_IPTokenStaking.TransactOpts, newImplementation, data) +} + // IPTokenStakingCreateValidatorIterator is returned from FilterCreateValidator and is used to iterate over the raw logs and unpacked data for CreateValidator events raised by the IPTokenStaking contract. type IPTokenStakingCreateValidatorIterator struct { Event *IPTokenStakingCreateValidator // Event containing the contract specifics and raw log @@ -1407,9 +1511,9 @@ func (_IPTokenStaking *IPTokenStakingFilterer) ParseDeposit(log types.Log) (*IPT return event, nil } -// IPTokenStakingOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the IPTokenStaking contract. -type IPTokenStakingOwnershipTransferStartedIterator struct { - Event *IPTokenStakingOwnershipTransferStarted // Event containing the contract specifics and raw log +// IPTokenStakingInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the IPTokenStaking contract. +type IPTokenStakingInitializedIterator struct { + Event *IPTokenStakingInitialized // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1423,7 +1527,7 @@ type IPTokenStakingOwnershipTransferStartedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *IPTokenStakingOwnershipTransferStartedIterator) Next() bool { +func (it *IPTokenStakingInitializedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1432,7 +1536,7 @@ func (it *IPTokenStakingOwnershipTransferStartedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IPTokenStakingOwnershipTransferStarted) + it.Event = new(IPTokenStakingInitialized) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1447,7 +1551,7 @@ func (it *IPTokenStakingOwnershipTransferStartedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(IPTokenStakingOwnershipTransferStarted) + it.Event = new(IPTokenStakingInitialized) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1463,60 +1567,41 @@ func (it *IPTokenStakingOwnershipTransferStartedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *IPTokenStakingOwnershipTransferStartedIterator) Error() error { +func (it *IPTokenStakingInitializedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *IPTokenStakingOwnershipTransferStartedIterator) Close() error { +func (it *IPTokenStakingInitializedIterator) Close() error { it.sub.Unsubscribe() return nil } -// IPTokenStakingOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the IPTokenStaking contract. -type IPTokenStakingOwnershipTransferStarted struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos +// IPTokenStakingInitialized represents a Initialized event raised by the IPTokenStaking contract. +type IPTokenStakingInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos } -// FilterOwnershipTransferStarted is a free log retrieval operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. // -// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) -func (_IPTokenStaking *IPTokenStakingFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*IPTokenStakingOwnershipTransferStartedIterator, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } +// Solidity: event Initialized(uint64 version) +func (_IPTokenStaking *IPTokenStakingFilterer) FilterInitialized(opts *bind.FilterOpts) (*IPTokenStakingInitializedIterator, error) { - logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "Initialized") if err != nil { return nil, err } - return &IPTokenStakingOwnershipTransferStartedIterator{contract: _IPTokenStaking.contract, event: "OwnershipTransferStarted", logs: logs, sub: sub}, nil + return &IPTokenStakingInitializedIterator{contract: _IPTokenStaking.contract, event: "Initialized", logs: logs, sub: sub}, nil } -// WatchOwnershipTransferStarted is a free log subscription operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. // -// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) -func (_IPTokenStaking *IPTokenStakingFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *IPTokenStakingOwnershipTransferStarted, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } +// Solidity: event Initialized(uint64 version) +func (_IPTokenStaking *IPTokenStakingFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *IPTokenStakingInitialized) (event.Subscription, error) { - logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "Initialized") if err != nil { return nil, err } @@ -1526,8 +1611,8 @@ func (_IPTokenStaking *IPTokenStakingFilterer) WatchOwnershipTransferStarted(opt select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(IPTokenStakingOwnershipTransferStarted) - if err := _IPTokenStaking.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + event := new(IPTokenStakingInitialized) + if err := _IPTokenStaking.contract.UnpackLog(event, "Initialized", log); err != nil { return err } event.Raw = log @@ -1548,21 +1633,21 @@ func (_IPTokenStaking *IPTokenStakingFilterer) WatchOwnershipTransferStarted(opt }), nil } -// ParseOwnershipTransferStarted is a log parse operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. // -// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) -func (_IPTokenStaking *IPTokenStakingFilterer) ParseOwnershipTransferStarted(log types.Log) (*IPTokenStakingOwnershipTransferStarted, error) { - event := new(IPTokenStakingOwnershipTransferStarted) - if err := _IPTokenStaking.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { +// Solidity: event Initialized(uint64 version) +func (_IPTokenStaking *IPTokenStakingFilterer) ParseInitialized(log types.Log) (*IPTokenStakingInitialized, error) { + event := new(IPTokenStakingInitialized) + if err := _IPTokenStaking.contract.UnpackLog(event, "Initialized", log); err != nil { return nil, err } event.Raw = log return event, nil } -// IPTokenStakingOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the IPTokenStaking contract. -type IPTokenStakingOwnershipTransferredIterator struct { - Event *IPTokenStakingOwnershipTransferred // Event containing the contract specifics and raw log +// IPTokenStakingMinRedelegateAmountSetIterator is returned from FilterMinRedelegateAmountSet and is used to iterate over the raw logs and unpacked data for MinRedelegateAmountSet events raised by the IPTokenStaking contract. +type IPTokenStakingMinRedelegateAmountSetIterator struct { + Event *IPTokenStakingMinRedelegateAmountSet // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1576,7 +1661,7 @@ type IPTokenStakingOwnershipTransferredIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *IPTokenStakingOwnershipTransferredIterator) Next() bool { +func (it *IPTokenStakingMinRedelegateAmountSetIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1585,7 +1670,7 @@ func (it *IPTokenStakingOwnershipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IPTokenStakingOwnershipTransferred) + it.Event = new(IPTokenStakingMinRedelegateAmountSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1600,7 +1685,7 @@ func (it *IPTokenStakingOwnershipTransferredIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(IPTokenStakingOwnershipTransferred) + it.Event = new(IPTokenStakingMinRedelegateAmountSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1616,60 +1701,41 @@ func (it *IPTokenStakingOwnershipTransferredIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *IPTokenStakingOwnershipTransferredIterator) Error() error { +func (it *IPTokenStakingMinRedelegateAmountSetIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *IPTokenStakingOwnershipTransferredIterator) Close() error { +func (it *IPTokenStakingMinRedelegateAmountSetIterator) Close() error { it.sub.Unsubscribe() return nil } -// IPTokenStakingOwnershipTransferred represents a OwnershipTransferred event raised by the IPTokenStaking contract. -type IPTokenStakingOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos +// IPTokenStakingMinRedelegateAmountSet represents a MinRedelegateAmountSet event raised by the IPTokenStaking contract. +type IPTokenStakingMinRedelegateAmountSet struct { + MinRedelegateAmount *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// FilterMinRedelegateAmountSet is a free log retrieval operation binding the contract event 0xf1e15ded5b5192ec1a89a3d16f49c46c7fa6c876d1f8299cf036f5abf9924d9b. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_IPTokenStaking *IPTokenStakingFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*IPTokenStakingOwnershipTransferredIterator, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } +// Solidity: event MinRedelegateAmountSet(uint256 minRedelegateAmount) +func (_IPTokenStaking *IPTokenStakingFilterer) FilterMinRedelegateAmountSet(opts *bind.FilterOpts) (*IPTokenStakingMinRedelegateAmountSetIterator, error) { - logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "MinRedelegateAmountSet") if err != nil { return nil, err } - return &IPTokenStakingOwnershipTransferredIterator{contract: _IPTokenStaking.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil + return &IPTokenStakingMinRedelegateAmountSetIterator{contract: _IPTokenStaking.contract, event: "MinRedelegateAmountSet", logs: logs, sub: sub}, nil } -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// WatchMinRedelegateAmountSet is a free log subscription operation binding the contract event 0xf1e15ded5b5192ec1a89a3d16f49c46c7fa6c876d1f8299cf036f5abf9924d9b. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_IPTokenStaking *IPTokenStakingFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *IPTokenStakingOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } +// Solidity: event MinRedelegateAmountSet(uint256 minRedelegateAmount) +func (_IPTokenStaking *IPTokenStakingFilterer) WatchMinRedelegateAmountSet(opts *bind.WatchOpts, sink chan<- *IPTokenStakingMinRedelegateAmountSet) (event.Subscription, error) { - logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "MinRedelegateAmountSet") if err != nil { return nil, err } @@ -1679,8 +1745,8 @@ func (_IPTokenStaking *IPTokenStakingFilterer) WatchOwnershipTransferred(opts *b select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(IPTokenStakingOwnershipTransferred) - if err := _IPTokenStaking.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + event := new(IPTokenStakingMinRedelegateAmountSet) + if err := _IPTokenStaking.contract.UnpackLog(event, "MinRedelegateAmountSet", log); err != nil { return err } event.Raw = log @@ -1701,21 +1767,21 @@ func (_IPTokenStaking *IPTokenStakingFilterer) WatchOwnershipTransferred(opts *b }), nil } -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// ParseMinRedelegateAmountSet is a log parse operation binding the contract event 0xf1e15ded5b5192ec1a89a3d16f49c46c7fa6c876d1f8299cf036f5abf9924d9b. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_IPTokenStaking *IPTokenStakingFilterer) ParseOwnershipTransferred(log types.Log) (*IPTokenStakingOwnershipTransferred, error) { - event := new(IPTokenStakingOwnershipTransferred) - if err := _IPTokenStaking.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { +// Solidity: event MinRedelegateAmountSet(uint256 minRedelegateAmount) +func (_IPTokenStaking *IPTokenStakingFilterer) ParseMinRedelegateAmountSet(log types.Log) (*IPTokenStakingMinRedelegateAmountSet, error) { + event := new(IPTokenStakingMinRedelegateAmountSet) + if err := _IPTokenStaking.contract.UnpackLog(event, "MinRedelegateAmountSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -// IPTokenStakingRedelegateIterator is returned from FilterRedelegate and is used to iterate over the raw logs and unpacked data for Redelegate events raised by the IPTokenStaking contract. -type IPTokenStakingRedelegateIterator struct { - Event *IPTokenStakingRedelegate // Event containing the contract specifics and raw log +// IPTokenStakingMinStakeAmountSetIterator is returned from FilterMinStakeAmountSet and is used to iterate over the raw logs and unpacked data for MinStakeAmountSet events raised by the IPTokenStaking contract. +type IPTokenStakingMinStakeAmountSetIterator struct { + Event *IPTokenStakingMinStakeAmountSet // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1729,7 +1795,7 @@ type IPTokenStakingRedelegateIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *IPTokenStakingRedelegateIterator) Next() bool { +func (it *IPTokenStakingMinStakeAmountSetIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1738,7 +1804,7 @@ func (it *IPTokenStakingRedelegateIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IPTokenStakingRedelegate) + it.Event = new(IPTokenStakingMinStakeAmountSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1753,7 +1819,7 @@ func (it *IPTokenStakingRedelegateIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(IPTokenStakingRedelegate) + it.Event = new(IPTokenStakingMinStakeAmountSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1769,44 +1835,41 @@ func (it *IPTokenStakingRedelegateIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *IPTokenStakingRedelegateIterator) Error() error { +func (it *IPTokenStakingMinStakeAmountSetIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *IPTokenStakingRedelegateIterator) Close() error { +func (it *IPTokenStakingMinStakeAmountSetIterator) Close() error { it.sub.Unsubscribe() return nil } -// IPTokenStakingRedelegate represents a Redelegate event raised by the IPTokenStaking contract. -type IPTokenStakingRedelegate struct { - DepositorPubkey []byte - ValidatorSrcPubkey []byte - ValidatorDstPubkey []byte - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos +// IPTokenStakingMinStakeAmountSet represents a MinStakeAmountSet event raised by the IPTokenStaking contract. +type IPTokenStakingMinStakeAmountSet struct { + MinStakeAmount *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterRedelegate is a free log retrieval operation binding the contract event 0xb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a. +// FilterMinStakeAmountSet is a free log retrieval operation binding the contract event 0xea095c2fea861b87f0fd54d0d4453358692a527e120df22b62c71696247dfb9f. // -// Solidity: event Redelegate(bytes depositorPubkey, bytes validatorSrcPubkey, bytes validatorDstPubkey, uint256 amount) -func (_IPTokenStaking *IPTokenStakingFilterer) FilterRedelegate(opts *bind.FilterOpts) (*IPTokenStakingRedelegateIterator, error) { +// Solidity: event MinStakeAmountSet(uint256 minStakeAmount) +func (_IPTokenStaking *IPTokenStakingFilterer) FilterMinStakeAmountSet(opts *bind.FilterOpts) (*IPTokenStakingMinStakeAmountSetIterator, error) { - logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "Redelegate") + logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "MinStakeAmountSet") if err != nil { return nil, err } - return &IPTokenStakingRedelegateIterator{contract: _IPTokenStaking.contract, event: "Redelegate", logs: logs, sub: sub}, nil + return &IPTokenStakingMinStakeAmountSetIterator{contract: _IPTokenStaking.contract, event: "MinStakeAmountSet", logs: logs, sub: sub}, nil } -// WatchRedelegate is a free log subscription operation binding the contract event 0xb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a. +// WatchMinStakeAmountSet is a free log subscription operation binding the contract event 0xea095c2fea861b87f0fd54d0d4453358692a527e120df22b62c71696247dfb9f. // -// Solidity: event Redelegate(bytes depositorPubkey, bytes validatorSrcPubkey, bytes validatorDstPubkey, uint256 amount) -func (_IPTokenStaking *IPTokenStakingFilterer) WatchRedelegate(opts *bind.WatchOpts, sink chan<- *IPTokenStakingRedelegate) (event.Subscription, error) { +// Solidity: event MinStakeAmountSet(uint256 minStakeAmount) +func (_IPTokenStaking *IPTokenStakingFilterer) WatchMinStakeAmountSet(opts *bind.WatchOpts, sink chan<- *IPTokenStakingMinStakeAmountSet) (event.Subscription, error) { - logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "Redelegate") + logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "MinStakeAmountSet") if err != nil { return nil, err } @@ -1816,8 +1879,8 @@ func (_IPTokenStaking *IPTokenStakingFilterer) WatchRedelegate(opts *bind.WatchO select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(IPTokenStakingRedelegate) - if err := _IPTokenStaking.contract.UnpackLog(event, "Redelegate", log); err != nil { + event := new(IPTokenStakingMinStakeAmountSet) + if err := _IPTokenStaking.contract.UnpackLog(event, "MinStakeAmountSet", log); err != nil { return err } event.Raw = log @@ -1838,21 +1901,21 @@ func (_IPTokenStaking *IPTokenStakingFilterer) WatchRedelegate(opts *bind.WatchO }), nil } -// ParseRedelegate is a log parse operation binding the contract event 0xb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a. +// ParseMinStakeAmountSet is a log parse operation binding the contract event 0xea095c2fea861b87f0fd54d0d4453358692a527e120df22b62c71696247dfb9f. // -// Solidity: event Redelegate(bytes depositorPubkey, bytes validatorSrcPubkey, bytes validatorDstPubkey, uint256 amount) -func (_IPTokenStaking *IPTokenStakingFilterer) ParseRedelegate(log types.Log) (*IPTokenStakingRedelegate, error) { - event := new(IPTokenStakingRedelegate) - if err := _IPTokenStaking.contract.UnpackLog(event, "Redelegate", log); err != nil { +// Solidity: event MinStakeAmountSet(uint256 minStakeAmount) +func (_IPTokenStaking *IPTokenStakingFilterer) ParseMinStakeAmountSet(log types.Log) (*IPTokenStakingMinStakeAmountSet, error) { + event := new(IPTokenStakingMinStakeAmountSet) + if err := _IPTokenStaking.contract.UnpackLog(event, "MinStakeAmountSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -// IPTokenStakingSetWithdrawalAddressIterator is returned from FilterSetWithdrawalAddress and is used to iterate over the raw logs and unpacked data for SetWithdrawalAddress events raised by the IPTokenStaking contract. -type IPTokenStakingSetWithdrawalAddressIterator struct { - Event *IPTokenStakingSetWithdrawalAddress // Event containing the contract specifics and raw log +// IPTokenStakingMinUnstakeAmountSetIterator is returned from FilterMinUnstakeAmountSet and is used to iterate over the raw logs and unpacked data for MinUnstakeAmountSet events raised by the IPTokenStaking contract. +type IPTokenStakingMinUnstakeAmountSetIterator struct { + Event *IPTokenStakingMinUnstakeAmountSet // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1866,7 +1929,7 @@ type IPTokenStakingSetWithdrawalAddressIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *IPTokenStakingSetWithdrawalAddressIterator) Next() bool { +func (it *IPTokenStakingMinUnstakeAmountSetIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1875,7 +1938,7 @@ func (it *IPTokenStakingSetWithdrawalAddressIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IPTokenStakingSetWithdrawalAddress) + it.Event = new(IPTokenStakingMinUnstakeAmountSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1890,7 +1953,7 @@ func (it *IPTokenStakingSetWithdrawalAddressIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(IPTokenStakingSetWithdrawalAddress) + it.Event = new(IPTokenStakingMinUnstakeAmountSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1906,42 +1969,41 @@ func (it *IPTokenStakingSetWithdrawalAddressIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *IPTokenStakingSetWithdrawalAddressIterator) Error() error { +func (it *IPTokenStakingMinUnstakeAmountSetIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *IPTokenStakingSetWithdrawalAddressIterator) Close() error { +func (it *IPTokenStakingMinUnstakeAmountSetIterator) Close() error { it.sub.Unsubscribe() return nil } -// IPTokenStakingSetWithdrawalAddress represents a SetWithdrawalAddress event raised by the IPTokenStaking contract. -type IPTokenStakingSetWithdrawalAddress struct { - DepositorPubkey []byte - ExecutionAddress [32]byte +// IPTokenStakingMinUnstakeAmountSet represents a MinUnstakeAmountSet event raised by the IPTokenStaking contract. +type IPTokenStakingMinUnstakeAmountSet struct { + MinUnstakeAmount *big.Int Raw types.Log // Blockchain specific contextual infos } -// FilterSetWithdrawalAddress is a free log retrieval operation binding the contract event 0x9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca. +// FilterMinUnstakeAmountSet is a free log retrieval operation binding the contract event 0xf93d77980ae5a1ddd008d6a7f02cbee5af2a4fcea850c4b55828de4f644e589f. // -// Solidity: event SetWithdrawalAddress(bytes depositorPubkey, bytes32 executionAddress) -func (_IPTokenStaking *IPTokenStakingFilterer) FilterSetWithdrawalAddress(opts *bind.FilterOpts) (*IPTokenStakingSetWithdrawalAddressIterator, error) { +// Solidity: event MinUnstakeAmountSet(uint256 minUnstakeAmount) +func (_IPTokenStaking *IPTokenStakingFilterer) FilterMinUnstakeAmountSet(opts *bind.FilterOpts) (*IPTokenStakingMinUnstakeAmountSetIterator, error) { - logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "SetWithdrawalAddress") + logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "MinUnstakeAmountSet") if err != nil { return nil, err } - return &IPTokenStakingSetWithdrawalAddressIterator{contract: _IPTokenStaking.contract, event: "SetWithdrawalAddress", logs: logs, sub: sub}, nil + return &IPTokenStakingMinUnstakeAmountSetIterator{contract: _IPTokenStaking.contract, event: "MinUnstakeAmountSet", logs: logs, sub: sub}, nil } -// WatchSetWithdrawalAddress is a free log subscription operation binding the contract event 0x9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca. +// WatchMinUnstakeAmountSet is a free log subscription operation binding the contract event 0xf93d77980ae5a1ddd008d6a7f02cbee5af2a4fcea850c4b55828de4f644e589f. // -// Solidity: event SetWithdrawalAddress(bytes depositorPubkey, bytes32 executionAddress) -func (_IPTokenStaking *IPTokenStakingFilterer) WatchSetWithdrawalAddress(opts *bind.WatchOpts, sink chan<- *IPTokenStakingSetWithdrawalAddress) (event.Subscription, error) { +// Solidity: event MinUnstakeAmountSet(uint256 minUnstakeAmount) +func (_IPTokenStaking *IPTokenStakingFilterer) WatchMinUnstakeAmountSet(opts *bind.WatchOpts, sink chan<- *IPTokenStakingMinUnstakeAmountSet) (event.Subscription, error) { - logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "SetWithdrawalAddress") + logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "MinUnstakeAmountSet") if err != nil { return nil, err } @@ -1951,8 +2013,8 @@ func (_IPTokenStaking *IPTokenStakingFilterer) WatchSetWithdrawalAddress(opts *b select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(IPTokenStakingSetWithdrawalAddress) - if err := _IPTokenStaking.contract.UnpackLog(event, "SetWithdrawalAddress", log); err != nil { + event := new(IPTokenStakingMinUnstakeAmountSet) + if err := _IPTokenStaking.contract.UnpackLog(event, "MinUnstakeAmountSet", log); err != nil { return err } event.Raw = log @@ -1973,21 +2035,21 @@ func (_IPTokenStaking *IPTokenStakingFilterer) WatchSetWithdrawalAddress(opts *b }), nil } -// ParseSetWithdrawalAddress is a log parse operation binding the contract event 0x9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca. +// ParseMinUnstakeAmountSet is a log parse operation binding the contract event 0xf93d77980ae5a1ddd008d6a7f02cbee5af2a4fcea850c4b55828de4f644e589f. // -// Solidity: event SetWithdrawalAddress(bytes depositorPubkey, bytes32 executionAddress) -func (_IPTokenStaking *IPTokenStakingFilterer) ParseSetWithdrawalAddress(log types.Log) (*IPTokenStakingSetWithdrawalAddress, error) { - event := new(IPTokenStakingSetWithdrawalAddress) - if err := _IPTokenStaking.contract.UnpackLog(event, "SetWithdrawalAddress", log); err != nil { +// Solidity: event MinUnstakeAmountSet(uint256 minUnstakeAmount) +func (_IPTokenStaking *IPTokenStakingFilterer) ParseMinUnstakeAmountSet(log types.Log) (*IPTokenStakingMinUnstakeAmountSet, error) { + event := new(IPTokenStakingMinUnstakeAmountSet) + if err := _IPTokenStaking.contract.UnpackLog(event, "MinUnstakeAmountSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -// IPTokenStakingWithdrawIterator is returned from FilterWithdraw and is used to iterate over the raw logs and unpacked data for Withdraw events raised by the IPTokenStaking contract. -type IPTokenStakingWithdrawIterator struct { - Event *IPTokenStakingWithdraw // Event containing the contract specifics and raw log +// IPTokenStakingOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the IPTokenStaking contract. +type IPTokenStakingOwnershipTransferStartedIterator struct { + Event *IPTokenStakingOwnershipTransferStarted // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -2001,7 +2063,7 @@ type IPTokenStakingWithdrawIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *IPTokenStakingWithdrawIterator) Next() bool { +func (it *IPTokenStakingOwnershipTransferStartedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2010,7 +2072,7 @@ func (it *IPTokenStakingWithdrawIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(IPTokenStakingWithdraw) + it.Event = new(IPTokenStakingOwnershipTransferStarted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2025,7 +2087,7 @@ func (it *IPTokenStakingWithdrawIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(IPTokenStakingWithdraw) + it.Event = new(IPTokenStakingOwnershipTransferStarted) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2041,42 +2103,764 @@ func (it *IPTokenStakingWithdrawIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *IPTokenStakingWithdrawIterator) Error() error { +func (it *IPTokenStakingOwnershipTransferStartedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *IPTokenStakingWithdrawIterator) Close() error { +func (it *IPTokenStakingOwnershipTransferStartedIterator) Close() error { it.sub.Unsubscribe() return nil } -// IPTokenStakingWithdraw represents a Withdraw event raised by the IPTokenStaking contract. -type IPTokenStakingWithdraw struct { - DepositorPubkey []byte - ValidatorPubkey []byte - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos +// IPTokenStakingOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the IPTokenStaking contract. +type IPTokenStakingOwnershipTransferStarted struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterWithdraw is a free log retrieval operation binding the contract event 0x0526a04a9b113a046b17e2350e42123a2515b5558b3aea91576ccdb1270c1b59. +// FilterOwnershipTransferStarted is a free log retrieval operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. // -// Solidity: event Withdraw(bytes depositorPubkey, bytes validatorPubkey, uint256 amount) -func (_IPTokenStaking *IPTokenStakingFilterer) FilterWithdraw(opts *bind.FilterOpts) (*IPTokenStakingWithdrawIterator, error) { +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_IPTokenStaking *IPTokenStakingFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*IPTokenStakingOwnershipTransferStartedIterator, error) { - logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "Withdraw") + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) if err != nil { return nil, err } - return &IPTokenStakingWithdrawIterator{contract: _IPTokenStaking.contract, event: "Withdraw", logs: logs, sub: sub}, nil + return &IPTokenStakingOwnershipTransferStartedIterator{contract: _IPTokenStaking.contract, event: "OwnershipTransferStarted", logs: logs, sub: sub}, nil } -// WatchWithdraw is a free log subscription operation binding the contract event 0x0526a04a9b113a046b17e2350e42123a2515b5558b3aea91576ccdb1270c1b59. +// WatchOwnershipTransferStarted is a free log subscription operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. // -// Solidity: event Withdraw(bytes depositorPubkey, bytes validatorPubkey, uint256 amount) -func (_IPTokenStaking *IPTokenStakingFilterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *IPTokenStakingWithdraw) (event.Subscription, error) { - +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_IPTokenStaking *IPTokenStakingFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *IPTokenStakingOwnershipTransferStarted, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IPTokenStakingOwnershipTransferStarted) + if err := _IPTokenStaking.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferStarted is a log parse operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700. +// +// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner) +func (_IPTokenStaking *IPTokenStakingFilterer) ParseOwnershipTransferStarted(log types.Log) (*IPTokenStakingOwnershipTransferStarted, error) { + event := new(IPTokenStakingOwnershipTransferStarted) + if err := _IPTokenStaking.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IPTokenStakingOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the IPTokenStaking contract. +type IPTokenStakingOwnershipTransferredIterator struct { + Event *IPTokenStakingOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IPTokenStakingOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IPTokenStakingOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IPTokenStakingOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IPTokenStakingOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IPTokenStakingOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IPTokenStakingOwnershipTransferred represents a OwnershipTransferred event raised by the IPTokenStaking contract. +type IPTokenStakingOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_IPTokenStaking *IPTokenStakingFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*IPTokenStakingOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &IPTokenStakingOwnershipTransferredIterator{contract: _IPTokenStaking.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_IPTokenStaking *IPTokenStakingFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *IPTokenStakingOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IPTokenStakingOwnershipTransferred) + if err := _IPTokenStaking.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_IPTokenStaking *IPTokenStakingFilterer) ParseOwnershipTransferred(log types.Log) (*IPTokenStakingOwnershipTransferred, error) { + event := new(IPTokenStakingOwnershipTransferred) + if err := _IPTokenStaking.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IPTokenStakingRedelegateIterator is returned from FilterRedelegate and is used to iterate over the raw logs and unpacked data for Redelegate events raised by the IPTokenStaking contract. +type IPTokenStakingRedelegateIterator struct { + Event *IPTokenStakingRedelegate // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IPTokenStakingRedelegateIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IPTokenStakingRedelegate) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IPTokenStakingRedelegate) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IPTokenStakingRedelegateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IPTokenStakingRedelegateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IPTokenStakingRedelegate represents a Redelegate event raised by the IPTokenStaking contract. +type IPTokenStakingRedelegate struct { + DepositorPubkey []byte + ValidatorSrcPubkey []byte + ValidatorDstPubkey []byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRedelegate is a free log retrieval operation binding the contract event 0xb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a. +// +// Solidity: event Redelegate(bytes depositorPubkey, bytes validatorSrcPubkey, bytes validatorDstPubkey, uint256 amount) +func (_IPTokenStaking *IPTokenStakingFilterer) FilterRedelegate(opts *bind.FilterOpts) (*IPTokenStakingRedelegateIterator, error) { + + logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "Redelegate") + if err != nil { + return nil, err + } + return &IPTokenStakingRedelegateIterator{contract: _IPTokenStaking.contract, event: "Redelegate", logs: logs, sub: sub}, nil +} + +// WatchRedelegate is a free log subscription operation binding the contract event 0xb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a. +// +// Solidity: event Redelegate(bytes depositorPubkey, bytes validatorSrcPubkey, bytes validatorDstPubkey, uint256 amount) +func (_IPTokenStaking *IPTokenStakingFilterer) WatchRedelegate(opts *bind.WatchOpts, sink chan<- *IPTokenStakingRedelegate) (event.Subscription, error) { + + logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "Redelegate") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IPTokenStakingRedelegate) + if err := _IPTokenStaking.contract.UnpackLog(event, "Redelegate", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRedelegate is a log parse operation binding the contract event 0xb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a. +// +// Solidity: event Redelegate(bytes depositorPubkey, bytes validatorSrcPubkey, bytes validatorDstPubkey, uint256 amount) +func (_IPTokenStaking *IPTokenStakingFilterer) ParseRedelegate(log types.Log) (*IPTokenStakingRedelegate, error) { + event := new(IPTokenStakingRedelegate) + if err := _IPTokenStaking.contract.UnpackLog(event, "Redelegate", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IPTokenStakingSetWithdrawalAddressIterator is returned from FilterSetWithdrawalAddress and is used to iterate over the raw logs and unpacked data for SetWithdrawalAddress events raised by the IPTokenStaking contract. +type IPTokenStakingSetWithdrawalAddressIterator struct { + Event *IPTokenStakingSetWithdrawalAddress // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IPTokenStakingSetWithdrawalAddressIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IPTokenStakingSetWithdrawalAddress) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IPTokenStakingSetWithdrawalAddress) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IPTokenStakingSetWithdrawalAddressIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IPTokenStakingSetWithdrawalAddressIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IPTokenStakingSetWithdrawalAddress represents a SetWithdrawalAddress event raised by the IPTokenStaking contract. +type IPTokenStakingSetWithdrawalAddress struct { + DepositorPubkey []byte + ExecutionAddress [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetWithdrawalAddress is a free log retrieval operation binding the contract event 0x9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca. +// +// Solidity: event SetWithdrawalAddress(bytes depositorPubkey, bytes32 executionAddress) +func (_IPTokenStaking *IPTokenStakingFilterer) FilterSetWithdrawalAddress(opts *bind.FilterOpts) (*IPTokenStakingSetWithdrawalAddressIterator, error) { + + logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "SetWithdrawalAddress") + if err != nil { + return nil, err + } + return &IPTokenStakingSetWithdrawalAddressIterator{contract: _IPTokenStaking.contract, event: "SetWithdrawalAddress", logs: logs, sub: sub}, nil +} + +// WatchSetWithdrawalAddress is a free log subscription operation binding the contract event 0x9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca. +// +// Solidity: event SetWithdrawalAddress(bytes depositorPubkey, bytes32 executionAddress) +func (_IPTokenStaking *IPTokenStakingFilterer) WatchSetWithdrawalAddress(opts *bind.WatchOpts, sink chan<- *IPTokenStakingSetWithdrawalAddress) (event.Subscription, error) { + + logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "SetWithdrawalAddress") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IPTokenStakingSetWithdrawalAddress) + if err := _IPTokenStaking.contract.UnpackLog(event, "SetWithdrawalAddress", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetWithdrawalAddress is a log parse operation binding the contract event 0x9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca. +// +// Solidity: event SetWithdrawalAddress(bytes depositorPubkey, bytes32 executionAddress) +func (_IPTokenStaking *IPTokenStakingFilterer) ParseSetWithdrawalAddress(log types.Log) (*IPTokenStakingSetWithdrawalAddress, error) { + event := new(IPTokenStakingSetWithdrawalAddress) + if err := _IPTokenStaking.contract.UnpackLog(event, "SetWithdrawalAddress", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IPTokenStakingUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the IPTokenStaking contract. +type IPTokenStakingUpgradedIterator struct { + Event *IPTokenStakingUpgraded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IPTokenStakingUpgradedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IPTokenStakingUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IPTokenStakingUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IPTokenStakingUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IPTokenStakingUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IPTokenStakingUpgraded represents a Upgraded event raised by the IPTokenStaking contract. +type IPTokenStakingUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_IPTokenStaking *IPTokenStakingFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*IPTokenStakingUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &IPTokenStakingUpgradedIterator{contract: _IPTokenStaking.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_IPTokenStaking *IPTokenStakingFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *IPTokenStakingUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IPTokenStakingUpgraded) + if err := _IPTokenStaking.contract.UnpackLog(event, "Upgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_IPTokenStaking *IPTokenStakingFilterer) ParseUpgraded(log types.Log) (*IPTokenStakingUpgraded, error) { + event := new(IPTokenStakingUpgraded) + if err := _IPTokenStaking.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// IPTokenStakingWithdrawIterator is returned from FilterWithdraw and is used to iterate over the raw logs and unpacked data for Withdraw events raised by the IPTokenStaking contract. +type IPTokenStakingWithdrawIterator struct { + Event *IPTokenStakingWithdraw // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IPTokenStakingWithdrawIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IPTokenStakingWithdraw) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IPTokenStakingWithdraw) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IPTokenStakingWithdrawIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IPTokenStakingWithdrawIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IPTokenStakingWithdraw represents a Withdraw event raised by the IPTokenStaking contract. +type IPTokenStakingWithdraw struct { + DepositorPubkey []byte + ValidatorPubkey []byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdraw is a free log retrieval operation binding the contract event 0x0526a04a9b113a046b17e2350e42123a2515b5558b3aea91576ccdb1270c1b59. +// +// Solidity: event Withdraw(bytes depositorPubkey, bytes validatorPubkey, uint256 amount) +func (_IPTokenStaking *IPTokenStakingFilterer) FilterWithdraw(opts *bind.FilterOpts) (*IPTokenStakingWithdrawIterator, error) { + + logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "Withdraw") + if err != nil { + return nil, err + } + return &IPTokenStakingWithdrawIterator{contract: _IPTokenStaking.contract, event: "Withdraw", logs: logs, sub: sub}, nil +} + +// WatchWithdraw is a free log subscription operation binding the contract event 0x0526a04a9b113a046b17e2350e42123a2515b5558b3aea91576ccdb1270c1b59. +// +// Solidity: event Withdraw(bytes depositorPubkey, bytes validatorPubkey, uint256 amount) +func (_IPTokenStaking *IPTokenStakingFilterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *IPTokenStakingWithdraw) (event.Subscription, error) { + logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "Withdraw") if err != nil { return nil, err @@ -2120,3 +2904,137 @@ func (_IPTokenStaking *IPTokenStakingFilterer) ParseWithdraw(log types.Log) (*IP event.Raw = log return event, nil } + +// IPTokenStakingWithdrawalAddressChangeIntervalSetIterator is returned from FilterWithdrawalAddressChangeIntervalSet and is used to iterate over the raw logs and unpacked data for WithdrawalAddressChangeIntervalSet events raised by the IPTokenStaking contract. +type IPTokenStakingWithdrawalAddressChangeIntervalSetIterator struct { + Event *IPTokenStakingWithdrawalAddressChangeIntervalSet // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *IPTokenStakingWithdrawalAddressChangeIntervalSetIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(IPTokenStakingWithdrawalAddressChangeIntervalSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(IPTokenStakingWithdrawalAddressChangeIntervalSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *IPTokenStakingWithdrawalAddressChangeIntervalSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *IPTokenStakingWithdrawalAddressChangeIntervalSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// IPTokenStakingWithdrawalAddressChangeIntervalSet represents a WithdrawalAddressChangeIntervalSet event raised by the IPTokenStaking contract. +type IPTokenStakingWithdrawalAddressChangeIntervalSet struct { + NewInterval *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawalAddressChangeIntervalSet is a free log retrieval operation binding the contract event 0xbed33ba1e6aacc702f8e48397b388e43ca92a8898ed8bdb389fd8b18af95d32c. +// +// Solidity: event WithdrawalAddressChangeIntervalSet(uint256 newInterval) +func (_IPTokenStaking *IPTokenStakingFilterer) FilterWithdrawalAddressChangeIntervalSet(opts *bind.FilterOpts) (*IPTokenStakingWithdrawalAddressChangeIntervalSetIterator, error) { + + logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "WithdrawalAddressChangeIntervalSet") + if err != nil { + return nil, err + } + return &IPTokenStakingWithdrawalAddressChangeIntervalSetIterator{contract: _IPTokenStaking.contract, event: "WithdrawalAddressChangeIntervalSet", logs: logs, sub: sub}, nil +} + +// WatchWithdrawalAddressChangeIntervalSet is a free log subscription operation binding the contract event 0xbed33ba1e6aacc702f8e48397b388e43ca92a8898ed8bdb389fd8b18af95d32c. +// +// Solidity: event WithdrawalAddressChangeIntervalSet(uint256 newInterval) +func (_IPTokenStaking *IPTokenStakingFilterer) WatchWithdrawalAddressChangeIntervalSet(opts *bind.WatchOpts, sink chan<- *IPTokenStakingWithdrawalAddressChangeIntervalSet) (event.Subscription, error) { + + logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "WithdrawalAddressChangeIntervalSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(IPTokenStakingWithdrawalAddressChangeIntervalSet) + if err := _IPTokenStaking.contract.UnpackLog(event, "WithdrawalAddressChangeIntervalSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseWithdrawalAddressChangeIntervalSet is a log parse operation binding the contract event 0xbed33ba1e6aacc702f8e48397b388e43ca92a8898ed8bdb389fd8b18af95d32c. +// +// Solidity: event WithdrawalAddressChangeIntervalSet(uint256 newInterval) +func (_IPTokenStaking *IPTokenStakingFilterer) ParseWithdrawalAddressChangeIntervalSet(log types.Log) (*IPTokenStakingWithdrawalAddressChangeIntervalSet, error) { + event := new(IPTokenStakingWithdrawalAddressChangeIntervalSet) + if err := _IPTokenStaking.contract.UnpackLog(event, "WithdrawalAddressChangeIntervalSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/bindings/iptokenstaking_more.go b/contracts/bindings/iptokenstaking_more.go index 42c1dc28..e714acce 100644 --- a/contracts/bindings/iptokenstaking_more.go +++ b/contracts/bindings/iptokenstaking_more.go @@ -5,7 +5,7 @@ import ( ) const ( - IPTokenStakingDeployedBytecode = "0x6080604052600436106101f95760003560e01c806386eec4a11161010d578063c24ae586116100a0578063eee5cead1161006f578063eee5cead14610652578063f188768414610672578063f2fde38b14610688578063fc2e5932146106a8578063fc56c2a2146106bb57600080fd5b8063c24ae586146105a7578063d2e1f5b8146105df578063e30c397814610614578063eb4af0451461063257600080fd5b80639855c8b5116100dc5780639855c8b5146104ff578063a1cb18461461051f578063b8db983e1461053f578063bda16b151461057357600080fd5b806386eec4a1146104755780638d3e1e41146104885780638da5cb5b146104ba5780638f37ec19146104ec57600080fd5b80635706750311610190578063715018a61161015f578063715018a6146103de578063787f82c8146103f357806379ba5097146104135780637b6e842c1461042857806383dffd6f1461044857600080fd5b806357067503146103505780635a69825d146103885780635d5ab9681461039e5780636ea3a228146103be57600080fd5b80632ebc6034116101cc5780632ebc6034146102be57806339ec4df91461030757806348903e381461031d57806353972c2a1461033057600080fd5b8063057b9296146101fe578063060ceab01461022057806317e42e12146102495780632d1e973e14610269575b600080fd5b34801561020a57600080fd5b5061021e610219366004612d1f565b6106ef565b005b34801561022c57600080fd5b5061023660055481565b6040519081526020015b60405180910390f35b34801561025557600080fd5b5061021e610264366004612d1f565b610854565b34801561027557600080fd5b50610236610284366004612e35565b8151602081840181018051600882529282019482019490942091909352815180830184018051928152908401929093019190912091525481565b3480156102ca57600080fd5b506102f27f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff9091168152602001610240565b34801561031357600080fd5b5061023660035481565b61021e61032b366004612e98565b6109a6565b34801561033c57600080fd5b5061021e61034b366004612ed9565b610b0e565b34801561035c57600080fd5b5061023661036b366004612f13565b805160208183018101805160078252928201919093012091525481565b34801561039457600080fd5b5061023660045481565b3480156103aa57600080fd5b5061021e6103b9366004612f4f565b610e2c565b3480156103ca57600080fd5b5061021e6103d9366004612fc2565b61104e565b3480156103ea57600080fd5b5061021e6110f5565b3480156103ff57600080fd5b5061021e61040e366004612d1f565b611109565b34801561041f57600080fd5b5061021e6113bf565b34801561043457600080fd5b5061021e610443366004612ed9565b611403565b34801561045457600080fd5b50610468610463366004612e98565b611753565b6040516102409190612fdb565b61021e610483366004613028565b611786565b34801561049457600080fd5b506104a86104a3366004612f13565b61199a565b604051610240969594939291906130e3565b3480156104c657600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610240565b61021e6104fa366004613028565b611a76565b34801561050b57600080fd5b5061021e61051a366004612fc2565b611c38565b34801561052b57600080fd5b5061021e61053a366004612f4f565b611ce2565b34801561054b57600080fd5b506102f27f000000000000000000000000000000000000000000000000000000000000000081565b34801561057f57600080fd5b506102367f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b357600080fd5b506102366105c2366004612f13565b8051602081830181018051600a8252928201919093012091525481565b3480156105eb57600080fd5b506105ff6105fa366004612fc2565b611ee6565b60408051928352602083019190915201610240565b34801561062057600080fd5b506001546001600160a01b03166104d4565b34801561063e57600080fd5b5061021e61064d366004612fc2565b611f26565b34801561065e57600080fd5b5061021e61066d366004612fc2565b611fcb565b34801561067e57600080fd5b5061023660025481565b34801561069457600080fd5b5061021e6106a336600461312b565b61204e565b61021e6106b636600461315a565b6120bf565b3480156106c757600080fd5b506102f27f000000000000000000000000000000000000000000000000000000000000000081565b8282336041821461071b5760405162461bcd60e51b8152600401610712906131fb565b60405180910390fd5b8282600081811061072e5761072e613240565b9050013560f81c60f81b6001600160f81b031916600460f81b146107645760405162461bcd60e51b815260040161071290613256565b806001600160a01b0316610778848461222d565b6001600160a01b03161461079e5760405162461bcd60e51b81526004016107129061329b565b604051633444d8b760e11b81526000907300000000000000000000000000000000000256f190636889b16e906107da908a908a90600401613312565b600060405180830381865af41580156107f7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261081f9190810190613326565b905061084a85600983604051610835919061339c565b9081526040519081900360200190209061225a565b5050505050505050565b828233604182146108775760405162461bcd60e51b8152600401610712906131fb565b8282600081811061088a5761088a613240565b9050013560f81c60f81b6001600160f81b031916600460f81b146108c05760405162461bcd60e51b815260040161071290613256565b806001600160a01b03166108d4848461222d565b6001600160a01b0316146108fa5760405162461bcd60e51b81526004016107129061329b565b604051633444d8b760e11b81526000907300000000000000000000000000000000000256f190636889b16e90610936908a908a90600401613312565b600060405180830381865af4158015610953573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261097b9190810190613326565b905061084a85600983604051610991919061339c565b9081526040519081900360200190209061226f565b8181602181146109c85760405162461bcd60e51b8152600401610712906131fb565b818160008181106109db576109db613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610a29575081816000818110610a0e57610a0e613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610a455760405162461bcd60e51b815260040161071290613256565b610b0884848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260098152683b30b634b230ba37b960b91b602082015291507f000000000000000000000000000000000000000000000000000000000000000090507f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612284565b50505050565b610b1881806133b8565b60418114610b385760405162461bcd60e51b8152600401610712906131fb565b81816000818110610b4b57610b4b613240565b9050013560f81c60f81b6001600160f81b031916600460f81b14610b815760405162461bcd60e51b815260040161071290613256565b610b8e60208401846133b8565b60218114610bae5760405162461bcd60e51b8152600401610712906131fb565b81816000818110610bc157610bc1613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610c0f575081816000818110610bf457610bf4613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610c2b5760405162461bcd60e51b815260040161071290613256565b60068282604051610c3d9291906133fe565b9081526040519081900360200190205460ff16610c6c5760405162461bcd60e51b81526004016107129061340e565b610c7960408601866133b8565b60218114610c995760405162461bcd60e51b8152600401610712906131fb565b81816000818110610cac57610cac613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610cfa575081816000818110610cdf57610cdf613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610d165760405162461bcd60e51b815260040161071290613256565b60068282604051610d289291906133fe565b9081526040519081900360200190205460ff16610d575760405162461bcd60e51b81526004016107129061340e565b60007300000000000000000000000000000000000256f1636889b16e610d7d8a806133b8565b6040518363ffffffff1660e01b8152600401610d9a929190613312565b600060405180830381865af4158015610db7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ddf9190810190613326565b90506000610df08960600135611ee6565b509050610dfd82336124e6565b610e2182610e0e60208c018c6133b8565b610e1b60408e018e6133b8565b86612571565b505050505050505050565b84843360418214610e4f5760405162461bcd60e51b8152600401610712906131fb565b82826000818110610e6257610e62613240565b9050013560f81c60f81b6001600160f81b031916600460f81b14610e985760405162461bcd60e51b815260040161071290613256565b806001600160a01b0316610eac848461222d565b6001600160a01b031614610ed25760405162461bcd60e51b81526004016107129061329b565b858560218114610ef45760405162461bcd60e51b8152600401610712906131fb565b81816000818110610f0757610f07613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610f55575081816000818110610f3a57610f3a613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610f715760405162461bcd60e51b815260040161071290613256565b60068282604051610f839291906133fe565b9081526040519081900360200190205460ff16610fb25760405162461bcd60e51b81526004016107129061340e565b604051633444d8b760e11b81526000907300000000000000000000000000000000000256f190636889b16e90610fee908e908e90600401613312565b600060405180830381865af415801561100b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110339190810190613326565b9050611041818a8a8a61272f565b5050505050505050505050565b61105661288f565b600081116110bb5760405162461bcd60e51b815260206004820152602c60248201527f4950546f6b656e5374616b696e673a206d696e556e7374616b65416d6f756e7460448201526b02063616e6e6f7420626520360a41b6064820152608401610712565b6110e57f000000000000000000000000000000000000000000000000000000000000000082613456565b6110ef908261348e565b60035550565b6110fd61288f565b61110760006128bc565b565b8282336041821461112c5760405162461bcd60e51b8152600401610712906131fb565b8282600081811061113f5761113f613240565b9050013560f81c60f81b6001600160f81b031916600460f81b146111755760405162461bcd60e51b815260040161071290613256565b806001600160a01b0316611189848461222d565b6001600160a01b0316146111af5760405162461bcd60e51b81526004016107129061329b565b604051633444d8b760e11b81526000907300000000000000000000000000000000000256f190636889b16e906111eb908a908a90600401613312565b600060405180830381865af4158015611208573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112309190810190613326565b90506000600782604051611244919061339c565b908152602001604051809103902054116112b25760405162461bcd60e51b815260206004820152602960248201527f4950546f6b656e5374616b696e673a2044656c656761746f72206d7573742068604482015268617665207374616b6560b81b6064820152608401610712565b42600554600a836040516112c6919061339c565b9081526020016040518091039020546112df91906134a1565b106113485760405162461bcd60e51b815260206004820152603360248201527f4950546f6b656e5374616b696e673a205769746864726177616c20616464726560448201527239b99031b430b733b29031b7b7b616b237bbb760691b6064820152608401610712565b42600a82604051611359919061339c565b9081526020016040518091039020819055507f9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca818660601b6bffffffffffffffffffffffff19166040516113ae9291906134b4565b60405180910390a150505050505050565b60015433906001600160a01b031681146113f75760405163118cdaa760e01b81526001600160a01b0382166004820152602401610712565b611400816128bc565b50565b61140d81806133b8565b336041821461142e5760405162461bcd60e51b8152600401610712906131fb565b8282600081811061144157611441613240565b9050013560f81c60f81b6001600160f81b031916600460f81b146114775760405162461bcd60e51b815260040161071290613256565b806001600160a01b031661148b848461222d565b6001600160a01b0316146114b15760405162461bcd60e51b81526004016107129061329b565b6114be60208501856133b8565b602181146114de5760405162461bcd60e51b8152600401610712906131fb565b818160008181106114f1576114f1613240565b9050013560f81c60f81b6001600160f81b031916600260f81b148061153f57508181600081811061152457611524613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b61155b5760405162461bcd60e51b815260040161071290613256565b6006828260405161156d9291906133fe565b9081526040519081900360200190205460ff1661159c5760405162461bcd60e51b81526004016107129061340e565b6115a960408701876133b8565b602181146115c95760405162461bcd60e51b8152600401610712906131fb565b818160008181106115dc576115dc613240565b9050013560f81c60f81b6001600160f81b031916600260f81b148061162a57508181600081811061160f5761160f613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b6116465760405162461bcd60e51b815260040161071290613256565b600682826040516116589291906133fe565b9081526040519081900360200190205460ff166116875760405162461bcd60e51b81526004016107129061340e565b60006116968960600135611ee6565b50905060007300000000000000000000000000000000000256f1636889b16e6116bf8c806133b8565b6040518363ffffffff1660e01b81526004016116dc929190613312565b600060405180830381865af41580156116f9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117219190810190613326565b90506117478161173460208d018d6133b8565b61174160408f018f6133b8565b87612571565b50505050505050505050565b606061177d6009848460405161176a9291906133fe565b90815260200160405180910390206128d5565b90505b92915050565b838333604182146117a95760405162461bcd60e51b8152600401610712906131fb565b828260008181106117bc576117bc613240565b9050013560f81c60f81b6001600160f81b031916600460f81b146117f25760405162461bcd60e51b815260040161071290613256565b806001600160a01b0316611806848461222d565b6001600160a01b03161461182c5760405162461bcd60e51b81526004016107129061329b565b84846021811461184e5760405162461bcd60e51b8152600401610712906131fb565b8181600081811061186157611861613240565b9050013560f81c60f81b6001600160f81b031916600260f81b14806118af57508181600081811061189457611894613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b6118cb5760405162461bcd60e51b815260040161071290613256565b600682826040516118dd9291906133fe565b9081526040519081900360200190205460ff1661190c5760405162461bcd60e51b81526004016107129061340e565b604051633444d8b760e11b81526000907300000000000000000000000000000000000256f190636889b16e90611948908d908d90600401613312565b600060405180830381865af4158015611965573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261198d9190810190613326565b90506117478189896128e9565b80516020818301810180516006825292820191909301209152805460018201805460ff90921692916119cb906134d6565b80601f01602080910402602001604051908101604052809291908181526020018280546119f7906134d6565b8015611a445780601f10611a1957610100808354040283529160200191611a44565b820191906000526020600020905b815481529060010190602001808311611a2757829003601f168201915b50505050600283015460039093015491929163ffffffff80821692506401000000008204811691600160401b90041686565b838360218114611a985760405162461bcd60e51b8152600401610712906131fb565b81816000818110611aab57611aab613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611af9575081816000818110611ade57611ade613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611b155760405162461bcd60e51b815260040161071290613256565b838360218114611b375760405162461bcd60e51b8152600401610712906131fb565b81816000818110611b4a57611b4a613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611b98575081816000818110611b7d57611b7d613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611bb45760405162461bcd60e51b815260040161071290613256565b60068282604051611bc69291906133fe565b9081526040519081900360200190205460ff16611bf55760405162461bcd60e51b81526004016107129061340e565b61084a88888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92508991506128e99050565b611c4061288f565b60008111611ca85760405162461bcd60e51b815260206004820152602f60248201527f4950546f6b656e5374616b696e673a206d696e526564656c6567617465416d6f60448201526e0756e742063616e6e6f74206265203608c1b6064820152608401610712565b611cd27f000000000000000000000000000000000000000000000000000000000000000082613456565b611cdc908261348e565b60045550565b848460218114611d045760405162461bcd60e51b8152600401610712906131fb565b81816000818110611d1757611d17613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611d65575081816000818110611d4a57611d4a613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611d815760405162461bcd60e51b815260040161071290613256565b848460218114611da35760405162461bcd60e51b8152600401610712906131fb565b81816000818110611db657611db6613240565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611e04575081816000818110611de957611de9613240565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611e205760405162461bcd60e51b815260040161071290613256565b60068282604051611e329291906133fe565b9081526040519081900360200190205460ff16611e615760405162461bcd60e51b81526004016107129061340e565b611ea289898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152503392506124e6915050565b610e2189898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a915089905061272f565b600080611f137f000000000000000000000000000000000000000000000000000000000000000084613456565b9050611f1f818461348e565b9150915091565b611f2e61288f565b60008111611f915760405162461bcd60e51b815260206004820152602a60248201527f4950546f6b656e5374616b696e673a206d696e5374616b65416d6f756e7420636044820152690616e6e6f7420626520360b41b6064820152608401610712565b611fbb7f000000000000000000000000000000000000000000000000000000000000000082613456565b611fc5908261348e565b60025550565b611fd361288f565b600081116120495760405162461bcd60e51b815260206004820152603e60248201527f4950546f6b656e5374616b696e673a206e65775769746864726177616c41646460448201527f726573734368616e6765496e74657276616c2063616e6e6f74206265203000006064820152608401610712565b600555565b61205661288f565b600180546001600160a01b0383166001600160a01b031990911681179091556120876000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b868633604182146120e25760405162461bcd60e51b8152600401610712906131fb565b828260008181106120f5576120f5613240565b9050013560f81c60f81b6001600160f81b031916600460f81b1461212b5760405162461bcd60e51b815260040161071290613256565b806001600160a01b031661213f848461222d565b6001600160a01b0316146121655760405162461bcd60e51b81526004016107129061329b565b604051633444d8b760e11b81526000907300000000000000000000000000000000000256f190636889b16e906121a1908e908e90600401613312565b600060405180830381865af41580156121be573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526121e69190810190613326565b9050611041818a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c92508b91508a9050612284565b600061223c8260018186613510565b60405161224a9291906133fe565b6040519081900390209392505050565b600061177d836001600160a01b038416612a00565b600061177d836001600160a01b038416612a4f565b600685604051612294919061339c565b9081526040519081900360200190205460ff16156123055760405162461bcd60e51b815260206004820152602860248201527f4950546f6b656e5374616b696e673a2056616c696461746f7220616c72656164604482015267792065786973747360c01b6064820152608401610712565b60008061231134611ee6565b91509150600082116123355760405162461bcd60e51b81526004016107129061353a565b6040518060c001604052806001151581526020018781526020018381526020018663ffffffff1681526020018563ffffffff1681526020018463ffffffff16815250600688604051612387919061339c565b908152604051602091819003820190208251815460ff19169015151781559082015160018201906123b890826135cf565b506040828101516002830155606083015160039092018054608085015160a09095015163ffffffff908116600160401b026bffffffff0000000000000000199682166401000000000267ffffffffffffffff199093169190951617179390931691909117909155518290600790612430908a9061339c565b9081526020016040518091039020600082825461244d91906134a1565b9250508190555081600888604051612465919061339c565b908152602001604051809103902088604051612481919061339c565b9081526020016040518091039020600082825461249e91906134a1565b909155506124ad905081612b42565b7f5cecf4ee8b0c1d212b07dbc464fc303e4ffc458fd0f61135d4b9bf7f60197a188787848888886040516113ae9695949392919061368e565b61250f816009846040516124fa919061339c565b90815260405190819003602001902090612bed565b61256d5760405162461bcd60e51b815260206004820152602960248201527f4950546f6b656e5374616b696e673a2043616c6c6572206973206e6f7420616e6044820152681037b832b930ba37b960b91b6064820152608401610712565b5050565b80600887604051612582919061339c565b908152602001604051809103902086866040516125a09291906133fe565b90815260200160405180910390205410156125cd5760405162461bcd60e51b8152600401610712906136e1565b80600686866040516125e09291906133fe565b90815260200160405180910390206002016000828254612600919061348e565b92505081905550806006848460405161261a9291906133fe565b9081526020016040518091039020600201600082825461263a91906134a1565b9250508190555080600887604051612652919061339c565b908152602001604051809103902086866040516126709291906133fe565b9081526020016040518091039020600082825461268d919061348e565b92505081905550806008876040516126a5919061339c565b908152602001604051809103902084846040516126c39291906133fe565b908152602001604051809103902060008282546126e091906134a1565b90915550506040517fb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a9061271f9088908890889088908890889061372b565b60405180910390a1505050505050565b80600885604051612740919061339c565b9081526020016040518091039020848460405161275e9291906133fe565b908152602001604051809103902054101561278b5760405162461bcd60e51b8152600401610712906136e1565b806006848460405161279e9291906133fe565b908152602001604051809103902060020160008282546127be919061348e565b92505081905550806007856040516127d6919061339c565b908152602001604051809103902060008282546127f3919061348e565b925050819055508060088560405161280b919061339c565b908152602001604051809103902084846040516128299291906133fe565b90815260200160405180910390206000828254612846919061348e565b90915550506040517f0526a04a9b113a046b17e2350e42123a2515b5558b3aea91576ccdb1270c1b599061288190869086908690869061377a565b60405180910390a150505050565b6000546001600160a01b031633146111075760405163118cdaa760e01b8152336004820152602401610712565b600180546001600160a01b031916905561140081612c0f565b606060006128e283612c5f565b9392505050565b6000806128f534611ee6565b9150915060025482101561291b5760405162461bcd60e51b81526004016107129061353a565b816006858560405161292e9291906133fe565b9081526040519081900360200181206002018054909201909155829060079061295890889061339c565b9081526040519081900360200181208054909201909155829060089061297f90889061339c565b9081526020016040518091039020858560405161299d9291906133fe565b908152604051908190036020019020805490910190556129bc81612b42565b7fe77f103965e0ff8836ce54ba9bac869f217cd5da27d6bdefd090282c397211c0858585856040516129f1949392919061377a565b60405180910390a15050505050565b6000818152600183016020526040812054612a4757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611780565b506000611780565b60008181526001830160205260408120548015612b38576000612a7360018361348e565b8554909150600090612a879060019061348e565b9050808214612aec576000866000018281548110612aa757612aa7613240565b9060005260206000200154905080876000018481548110612aca57612aca613240565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612afd57612afd6137b2565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611780565b6000915050611780565b604051600090339083908381818185875af1925050503d8060008114612b84576040519150601f19603f3d011682016040523d82523d6000602084013e612b89565b606091505b505090508061256d5760405162461bcd60e51b815260206004820152602a60248201527f4950546f6b656e5374616b696e673a204661696c656420746f20726566756e64604482015269103932b6b0b4b73232b960b11b6064820152608401610712565b6001600160a01b0381166000908152600183016020526040812054151561177d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606081600001805480602002602001604051908101604052809291908181526020018280548015612caf57602002820191906000526020600020905b815481526020019060010190808311612c9b575b50505050509050919050565b60008083601f840112612ccd57600080fd5b5081356001600160401b03811115612ce457600080fd5b602083019150836020828501011115612cfc57600080fd5b9250929050565b80356001600160a01b0381168114612d1a57600080fd5b919050565b600080600060408486031215612d3457600080fd5b83356001600160401b03811115612d4a57600080fd5b612d5686828701612cbb565b9094509250612d69905060208501612d03565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612db057612db0612d72565b604052919050565b60006001600160401b03821115612dd157612dd1612d72565b50601f01601f191660200190565b600082601f830112612df057600080fd5b8135612e03612dfe82612db8565b612d88565b818152846020838601011115612e1857600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215612e4857600080fd5b82356001600160401b0380821115612e5f57600080fd5b612e6b86838701612ddf565b93506020850135915080821115612e8157600080fd5b50612e8e85828601612ddf565b9150509250929050565b60008060208385031215612eab57600080fd5b82356001600160401b03811115612ec157600080fd5b612ecd85828601612cbb565b90969095509350505050565b600060208284031215612eeb57600080fd5b81356001600160401b03811115612f0157600080fd5b8201608081850312156128e257600080fd5b600060208284031215612f2557600080fd5b81356001600160401b03811115612f3b57600080fd5b612f4784828501612ddf565b949350505050565b600080600080600060608688031215612f6757600080fd5b85356001600160401b0380821115612f7e57600080fd5b612f8a89838a01612cbb565b90975095506020880135915080821115612fa357600080fd5b50612fb088828901612cbb565b96999598509660400135949350505050565b600060208284031215612fd457600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561301c5783516001600160a01b031683529284019291840191600101612ff7565b50909695505050505050565b6000806000806040858703121561303e57600080fd5b84356001600160401b038082111561305557600080fd5b61306188838901612cbb565b9096509450602087013591508082111561307a57600080fd5b5061308787828801612cbb565b95989497509550505050565b60005b838110156130ae578181015183820152602001613096565b50506000910152565b600081518084526130cf816020860160208601613093565b601f01601f19169290920160200192915050565b861515815260c0602082015260006130fe60c08301886130b7565b60408301969096525063ffffffff9384166060820152918316608083015290911660a09091015292915050565b60006020828403121561313d57600080fd5b61177d82612d03565b803563ffffffff81168114612d1a57600080fd5b600080600080600080600060a0888a03121561317557600080fd5b87356001600160401b038082111561318c57600080fd5b6131988b838c01612cbb565b909950975060208a01359150808211156131b157600080fd5b506131be8a828b01612cbb565b90965094506131d1905060408901613146565b92506131df60608901613146565b91506131ed60808901613146565b905092959891949750929550565b60208082526025908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579206c6040820152640cadccee8d60db1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526025908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b657920706040820152640e4caccd2f60db1b606082015260800190565b6020808252602e908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579206460408201526d657269766564206164647265737360901b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000612f476020830184866132e9565b60006020828403121561333857600080fd5b81516001600160401b0381111561334e57600080fd5b8201601f8101841361335f57600080fd5b805161336d612dfe82612db8565b81815285602083850101111561338257600080fd5b613393826020830160208601613093565b95945050505050565b600082516133ae818460208701613093565b9190910192915050565b6000808335601e198436030181126133cf57600080fd5b8301803591506001600160401b038211156133e957600080fd5b602001915036819003821315612cfc57600080fd5b8183823760009101908152919050565b60208082526028908201527f4950546f6b656e5374616b696e673a2056616c696461746f7220646f6573206e6040820152671bdd08195e1a5cdd60c21b606082015260800190565b60008261347357634e487b7160e01b600052601260045260246000fd5b500690565b634e487b7160e01b600052601160045260246000fd5b8181038181111561178057611780613478565b8082018082111561178057611780613478565b6040815260006134c760408301856130b7565b90508260208301529392505050565b600181811c908216806134ea57607f821691505b60208210810361350a57634e487b7160e01b600052602260045260246000fd5b50919050565b6000808585111561352057600080fd5b8386111561352d57600080fd5b5050820193919092039150565b60208082526024908201527f4950546f6b656e5374616b696e673a205374616b6520616d6f756e7420746f6f604082015263206c6f7760e01b606082015260800190565b601f8211156135ca576000816000526020600020601f850160051c810160208610156135a75750805b601f850160051c820191505b818110156135c6578281556001016135b3565b5050505b505050565b81516001600160401b038111156135e8576135e8612d72565b6135fc816135f684546134d6565b8461357e565b602080601f83116001811461363157600084156136195750858301515b600019600386901b1c1916600185901b1785556135c6565b600085815260208120601f198616915b8281101561366057888601518255948401946001909101908401613641565b508582101561367e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60c0815260006136a160c08301896130b7565b82810360208401526136b381896130b7565b6040840197909752505063ffffffff9384166060820152918316608083015290911660a09091015292915050565b6020808252602a908201527f4950546f6b656e5374616b696e673a20496e73756666696369656e74207374616040820152691ad95908185b5bdd5b9d60b21b606082015260800190565b60808152600061373e60808301896130b7565b828103602084015261375181888a6132e9565b905082810360408401526137668186886132e9565b915050826060830152979650505050505050565b60608152600061378d60608301876130b7565b82810360208401526137a08186886132e9565b91505082604083015295945050505050565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220cbf37ead0066eb6657879ff233410633a0ad7abf7542d7cf2a2155f0dd30195b64736f6c63430008180033" + IPTokenStakingDeployedBytecode = "0x6080604052600436106102255760003560e01c806386eec4a111610123578063c24ae586116100ab578063eee5cead1161006f578063eee5cead146106f6578063f188768414610716578063f2fde38b1461072c578063fc2e59321461074c578063fc56c2a21461075f57600080fd5b8063c24ae58614610634578063c4d66de81461066c578063d2e1f5b81461068c578063e30c3978146106c1578063eb4af045146106d657600080fd5b80639855c8b5116100f25780639855c8b51461054e578063a1cb18461461056e578063ad3cb1cc1461058e578063b8db983e146105cc578063bda16b151461060057600080fd5b806386eec4a1146104c95780638d3e1e41146104dc5780638da5cb5b1461050e5780638f37ec191461053b57600080fd5b806353972c2a116101b1578063715018a611610175578063715018a614610432578063787f82c81461044757806379ba5097146104675780637b6e842c1461047c57806383dffd6f1461049c57600080fd5b806353972c2a1461038457806357067503146103a45780635a69825d146103dc5780635d5ab968146103f25780636ea3a2281461041257600080fd5b80632ebc6034116101f85780632ebc6034146102ea57806339ec4df91461033357806348903e38146103495780634f1ef2861461035c57806352d1902d1461036f57600080fd5b8063057b92961461022a578063060ceab01461024c57806317e42e12146102755780632d1e973e14610295575b600080fd5b34801561023657600080fd5b5061024a610245366004613728565b610793565b005b34801561025857600080fd5b5061026260035481565b6040519081526020015b60405180910390f35b34801561028157600080fd5b5061024a610290366004613728565b610913565b3480156102a157600080fd5b506102626102b036600461381d565b8151602081840181018051600682529282019482019490942091909352815180830184018051928152908401929093019190912091525481565b3480156102f657600080fd5b5061031e7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff909116815260200161026c565b34801561033f57600080fd5b5061026260015481565b61024a610357366004613880565b610a7c565b61024a61036a3660046138c1565b610c03565b34801561037b57600080fd5b50610262610c22565b34801561039057600080fd5b5061024a61039f366004613904565b610c3f565b3480156103b057600080fd5b506102626103bf36600461393e565b805160208183018101805160058252928201919093012091525481565b3480156103e857600080fd5b5061026260025481565b3480156103fe57600080fd5b5061024a61040d36600461397a565b610f1e565b34801561041e57600080fd5b5061024a61042d3660046139ed565b611100565b34801561043e57600080fd5b5061024a611114565b34801561045357600080fd5b5061024a610462366004613728565b611128565b34801561047357600080fd5b5061024a611394565b34801561048857600080fd5b5061024a610497366004613904565b6113d9565b3480156104a857600080fd5b506104bc6104b7366004613880565b6116b0565b60405161026c9190613a06565b61024a6104d7366004613a53565b6116e3565b3480156104e857600080fd5b506104fc6104f736600461393e565b6118d7565b60405161026c96959493929190613b0e565b34801561051a57600080fd5b506105236119b3565b6040516001600160a01b03909116815260200161026c565b61024a610549366004613a53565b6119e8565b34801561055a57600080fd5b5061024a6105693660046139ed565b611bd3565b34801561057a57600080fd5b5061024a61058936600461397a565b611be4565b34801561059a57600080fd5b506105bf604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161026c9190613b56565b3480156105d857600080fd5b5061031e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561060c57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561064057600080fd5b5061026261064f36600461393e565b805160208183018101805160088252928201919093012091525481565b34801561067857600080fd5b5061024a610687366004613b69565b611de8565b34801561069857600080fd5b506106ac6106a73660046139ed565b611f7a565b6040805192835260208301919091520161026c565b3480156106cd57600080fd5b50610523611fba565b3480156106e257600080fd5b5061024a6106f13660046139ed565b611fe3565b34801561070257600080fd5b5061024a6107113660046139ed565b611ff4565b34801561072257600080fd5b5061026260005481565b34801561073857600080fd5b5061024a610747366004613b69565b612005565b61024a61075a366004613b98565b61208a565b34801561076b57600080fd5b5061031e7f000000000000000000000000000000000000000000000000000000000000000081565b828233604182146107bf5760405162461bcd60e51b81526004016107b690613c39565b60405180910390fd5b828260008181106107d2576107d2613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b146108085760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661081c84846121d8565b6001600160a01b0316146108425760405162461bcd60e51b81526004016107b690613cd9565b600061088387878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506108ae856007836040516108999190613d27565b90815260405190819003602001902090612351565b61090a5760405162461bcd60e51b815260206004820152602760248201527f4950546f6b656e5374616b696e673a204f70657261746f7220616c72656164796044820152662065786973747360c81b60648201526084016107b6565b50505050505050565b828233604182146109365760405162461bcd60e51b81526004016107b690613c39565b8282600081811061094957610949613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b1461097f5760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661099384846121d8565b6001600160a01b0316146109b95760405162461bcd60e51b81526004016107b690613cd9565b60006109fa87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b9050610a2585600783604051610a109190613d27565b90815260405190819003602001902090612366565b61090a5760405162461bcd60e51b815260206004820152602260248201527f4950546f6b656e5374616b696e673a204f70657261746f72206e6f7420666f756044820152611b9960f21b60648201526084016107b6565b818160218114610a9e5760405162461bcd60e51b81526004016107b690613c39565b81816000818110610ab157610ab1613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610aff575081816000818110610ae457610ae4613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610b1b5760405162461bcd60e51b81526004016107b690613c94565b610b2361237b565b610be684848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260098152683b30b634b230ba37b960b91b602082015291507f000000000000000000000000000000000000000000000000000000000000000090507f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006123b3565b610bfd600160008051602061425483398151915255565b50505050565b610c0b612698565b610c148261273d565b610c1e8282612745565b5050565b6000610c2c612807565b5060008051602061423483398151915290565b610c498180613d43565b60418114610c695760405162461bcd60e51b81526004016107b690613c39565b81816000818110610c7c57610c7c613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b14610cb25760405162461bcd60e51b81526004016107b690613c94565b610cbf6020840184613d43565b60218114610cdf5760405162461bcd60e51b81526004016107b690613c39565b81816000818110610cf257610cf2613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610d40575081816000818110610d2557610d25613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610d5c5760405162461bcd60e51b81526004016107b690613c94565b60048282604051610d6e929190613d89565b9081526040519081900360200190205460ff16610d9d5760405162461bcd60e51b81526004016107b690613d99565b610daa6040860186613d43565b60218114610dca5760405162461bcd60e51b81526004016107b690613c39565b81816000818110610ddd57610ddd613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610e2b575081816000818110610e1057610e10613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610e475760405162461bcd60e51b81526004016107b690613c94565b60048282604051610e59929190613d89565b9081526040519081900360200190205460ff16610e885760405162461bcd60e51b81526004016107b690613d99565b6000610ed1610e978980613d43565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506000610ee28960600135611f7a565b509050610eef8233612850565b610f1382610f0060208c018c613d43565b610f0d60408e018e613d43565b866128d7565b505050505050505050565b84843360418214610f415760405162461bcd60e51b81526004016107b690613c39565b82826000818110610f5457610f54613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b14610f8a5760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b0316610f9e84846121d8565b6001600160a01b031614610fc45760405162461bcd60e51b81526004016107b690613cd9565b858560218114610fe65760405162461bcd60e51b81526004016107b690613c39565b81816000818110610ff957610ff9613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b148061104757508181600081811061102c5761102c613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b6110635760405162461bcd60e51b81526004016107b690613c94565b60048282604051611075929190613d89565b9081526040519081900360200190205460ff166110a45760405162461bcd60e51b81526004016107b690613d99565b60006110e58b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506110f3818a8a8a612a85565b5050505050505050505050565b611108612c67565b61111181612c99565b50565b61111c612c67565b6111266000612d6e565b565b8282336041821461114b5760405162461bcd60e51b81526004016107b690613c39565b8282600081811061115e5761115e613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b146111945760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b03166111a884846121d8565b6001600160a01b0316146111ce5760405162461bcd60e51b81526004016107b690613cd9565b600061120f87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b905060006005826040516112239190613d27565b908152602001604051809103902054116112915760405162461bcd60e51b815260206004820152602960248201527f4950546f6b656e5374616b696e673a2044656c656761746f72206d7573742068604482015268617665207374616b6560b81b60648201526084016107b6565b426003546008836040516112a59190613d27565b9081526020016040518091039020546112be9190613df7565b106113275760405162461bcd60e51b815260206004820152603360248201527f4950546f6b656e5374616b696e673a205769746864726177616c20616464726560448201527239b99031b430b733b29031b7b7b616b237bbb760691b60648201526084016107b6565b426008826040516113389190613d27565b908152604051908190036020018120919091557f9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca906113839083906001600160a01b03891690613e0a565b60405180910390a150505050505050565b338061139e611fba565b6001600160a01b0316146113d05760405163118cdaa760e01b81526001600160a01b03821660048201526024016107b6565b61111181612d6e565b6113e38180613d43565b33604182146114045760405162461bcd60e51b81526004016107b690613c39565b8282600081811061141757611417613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b1461144d5760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661146184846121d8565b6001600160a01b0316146114875760405162461bcd60e51b81526004016107b690613cd9565b6114946020850185613d43565b602181146114b45760405162461bcd60e51b81526004016107b690613c39565b818160008181106114c7576114c7613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b14806115155750818160008181106114fa576114fa613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b6115315760405162461bcd60e51b81526004016107b690613c94565b60048282604051611543929190613d89565b9081526040519081900360200190205460ff166115725760405162461bcd60e51b81526004016107b690613d99565b61157f6040870187613d43565b6021811461159f5760405162461bcd60e51b81526004016107b690613c39565b818160008181106115b2576115b2613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b14806116005750818160008181106115e5576115e5613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b61161c5760405162461bcd60e51b81526004016107b690613c94565b6004828260405161162e929190613d89565b9081526040519081900360200190205460ff1661165d5760405162461bcd60e51b81526004016107b690613d99565b600061166c8960600135611f7a565b509050600061167e610e978b80613d43565b90506116a48161169160208d018d613d43565b61169e60408f018f613d43565b876128d7565b50505050505050505050565b60606116da600784846040516116c7929190613d89565b9081526020016040518091039020612da6565b90505b92915050565b838333604182146117065760405162461bcd60e51b81526004016107b690613c39565b8282600081811061171957611719613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b1461174f5760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661176384846121d8565b6001600160a01b0316146117895760405162461bcd60e51b81526004016107b690613cd9565b8484602181146117ab5760405162461bcd60e51b81526004016107b690613c39565b818160008181106117be576117be613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b148061180c5750818160008181106117f1576117f1613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b6118285760405162461bcd60e51b81526004016107b690613c94565b6004828260405161183a929190613d89565b9081526040519081900360200190205460ff166118695760405162461bcd60e51b81526004016107b690613d99565b61187161237b565b60006118b28a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506118bf818989612dba565b50610f13600160008051602061425483398151915255565b80516020818301810180516004825292820191909301209152805460018201805460ff909216929161190890613e2c565b80601f016020809104026020016040519081016040528092919081815260200182805461193490613e2c565b80156119815780601f1061195657610100808354040283529160200191611981565b820191906000526020600020905b81548152906001019060200180831161196457829003601f168201915b50505050600283015460039093015491929163ffffffff80821692506401000000008204811691600160401b90041686565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b838360218114611a0a5760405162461bcd60e51b81526004016107b690613c39565b81816000818110611a1d57611a1d613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611a6b575081816000818110611a5057611a50613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611a875760405162461bcd60e51b81526004016107b690613c94565b838360218114611aa95760405162461bcd60e51b81526004016107b690613c39565b81816000818110611abc57611abc613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611b0a575081816000818110611aef57611aef613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611b265760405162461bcd60e51b81526004016107b690613c94565b60048282604051611b38929190613d89565b9081526040519081900360200190205460ff16611b675760405162461bcd60e51b81526004016107b690613d99565b611b6f61237b565b611bb288888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250899150612dba9050565b611bc9600160008051602061425483398151915255565b5050505050505050565b611bdb612c67565b61111181612ed1565b848460218114611c065760405162461bcd60e51b81526004016107b690613c39565b81816000818110611c1957611c19613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611c67575081816000818110611c4c57611c4c613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611c835760405162461bcd60e51b81526004016107b690613c94565b848460218114611ca55760405162461bcd60e51b81526004016107b690613c39565b81816000818110611cb857611cb8613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611d06575081816000818110611ceb57611ceb613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611d225760405162461bcd60e51b81526004016107b690613c94565b60048282604051611d34929190613d89565b9081526040519081900360200190205460ff16611d635760405162461bcd60e51b81526004016107b690613d99565b611da489898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250339250612850915050565b610f1389898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a9150899050612a85565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015611e2d5750825b90506000826001600160401b03166001148015611e495750303b155b905081158015611e57575080155b15611e755760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315611e9f57845460ff60401b1916600160401b1785555b6001600160a01b038616611f125760405162461bcd60e51b815260206004820152603460248201527f4950546f6b656e5374616b696e673a206163636573734d616e616765722063616044820152736e6e6f74206265207a65726f206164647265737360601b60648201526084016107b6565b611f1a612fa2565b611f22612fb2565b611f2b86612fba565b8315611f7257845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2906020015b60405180910390a15b505050505050565b600080611fa77f000000000000000000000000000000000000000000000000000000000000000084613e7c565b9050611fb38184613e90565b9150915091565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c006119d8565b611feb612c67565b61111181612fcb565b611ffc612c67565b61111181613097565b61200d612c67565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556120516119b3565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b868633604182146120ad5760405162461bcd60e51b81526004016107b690613c39565b828260008181106120c0576120c0613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b146120f65760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661210a84846121d8565b6001600160a01b0316146121305760405162461bcd60e51b81526004016107b690613cd9565b61213861237b565b60006121798b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506121c0818a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c92508b91508a90506123b3565b506116a4600160008051602061425483398151915255565b60006121e78260018186613ea3565b6040516121f5929190613d89565b6040519081900390209392505050565b606081516041146122675760405162461bcd60e51b815260206004820152602660248201527f496e76616c696420756e636f6d70726573736564207075626c6963206b6579206044820152650d8cadccee8d60d31b60648201526084016107b6565b602182015160418301516000612281600260ff8416613ecd565b60ff161561229357600360f81b612299565b600160f91b5b604080516021808252606082019092529192506000919060208201818036833701905050905081816000815181106122d3576122d3613c7e565b60200101906001600160f81b031916908160001a90535060005b60208110156123475784816020811061230857612308613c7e565b1a60f81b82612318836001613df7565b8151811061232857612328613c7e565b60200101906001600160f81b031916908160001a9053506001016122ed565b5095945050505050565b60006116da836001600160a01b038416613142565b60006116da836001600160a01b038416613191565b6000805160206142548339815191528054600119016123ad57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b6000806123bf34611f7a565b91509150600082116123e35760405162461bcd60e51b81526004016107b690613eef565b60006004886040516123f59190613d27565b908152604051908190036020019020805460ff198116600117825590915060ff168061242157876124af565b81600101805461243090613e2c565b80601f016020809104026020016040519081016040528092919081815260200182805461245c90613e2c565b80156124a95780601f1061247e576101008083540402835291602001916124a9565b820191906000526020600020905b81548152906001019060200180831161248c57829003601f168201915b50505050505b60018301906124be9082613f7b565b508382600201546124cf9190613df7565b6002830155806124df57866124eb565b600382015463ffffffff165b60038301805463ffffffff191663ffffffff92909216919091179055806125125785612526565b6003820154640100000000900463ffffffff165b8260030160046101000a81548163ffffffff021916908363ffffffff160217905550806125535784612566565b6003820154600160401b900463ffffffff165b8260030160086101000a81548163ffffffff021916908363ffffffff1602179055508360058a6040516125999190613d27565b908152602001604051809103902060008282546125b69190613df7565b925050819055508360068a6040516125ce9190613d27565b90815260200160405180910390208a6040516125ea9190613d27565b908152602001604051809103902060008282546126079190613df7565b90915550612616905083613284565b60038201546040517f5cecf4ee8b0c1d212b07dbc464fc303e4ffc458fd0f61135d4b9bf7f60197a1891612671918c916001870191899163ffffffff808216926401000000008304821692600160401b90049091169061403a565b60405180910390a1505050505050505050565b600160008051602061425483398151915255565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061271f57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316612713600080516020614234833981519152546001600160a01b031690565b6001600160a01b031614155b156111265760405163703e46dd60e11b815260040160405180910390fd5b611111612c67565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561279f575060408051601f3d908101601f1916820190925261279c9181019061410a565b60015b6127c757604051634c9c8ce360e01b81526001600160a01b03831660048201526024016107b6565b60008051602061423483398151915281146127f857604051632a87526960e21b8152600481018290526024016107b6565b612802838361332f565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146111265760405163703e46dd60e11b815260040160405180910390fd5b612879816007846040516128649190613d27565b90815260405190819003602001902090613385565b610c1e5760405162461bcd60e51b815260206004820152602960248201527f4950546f6b656e5374616b696e673a2043616c6c6572206973206e6f7420616e6044820152681037b832b930ba37b960b91b60648201526084016107b6565b806006876040516128e89190613d27565b90815260200160405180910390208686604051612906929190613d89565b90815260200160405180910390205410156129335760405162461bcd60e51b81526004016107b690614123565b8060048686604051612946929190613d89565b908152602001604051809103902060020160008282546129669190613e90565b925050819055508060048484604051612980929190613d89565b908152602001604051809103902060020160008282546129a09190613df7565b92505081905550806006876040516129b89190613d27565b908152602001604051809103902086866040516129d6929190613d89565b908152602001604051809103902060008282546129f39190613e90565b9250508190555080600687604051612a0b9190613d27565b90815260200160405180910390208484604051612a29929190613d89565b90815260200160405180910390206000828254612a469190613df7565b90915550506040517fb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a90611f6990889088908890889088908890614196565b80600685604051612a969190613d27565b90815260200160405180910390208484604051612ab4929190613d89565b9081526020016040518091039020541015612ae15760405162461bcd60e51b81526004016107b690614123565b8060048484604051612af4929190613d89565b90815260200160405180910390206002016000828254612b149190613e90565b9250508190555080600585604051612b2c9190613d27565b90815260200160405180910390206000828254612b499190613e90565b9250508190555080600685604051612b619190613d27565b90815260200160405180910390208484604051612b7f929190613d89565b90815260200160405180910390206000828254612b9c9190613e90565b9091555050604051600490612bb49085908590613d89565b908152602001604051809103902060020154600003612c245760048383604051612bdf929190613d89565b908152604051908190036020019020805460ff191681556000612c056001830182613676565b506000600282015560030180546bffffffffffffffffffffffff191690555b7f0526a04a9b113a046b17e2350e42123a2515b5558b3aea91576ccdb1270c1b5984848484604051612c5994939291906141e5565b60405180910390a150505050565b33612c706119b3565b6001600160a01b0316146111265760405163118cdaa760e01b81523360048201526024016107b6565b60008111612cfe5760405162461bcd60e51b815260206004820152602c60248201527f4950546f6b656e5374616b696e673a206d696e556e7374616b65416d6f756e7460448201526b02063616e6e6f7420626520360a41b60648201526084016107b6565b612d287f000000000000000000000000000000000000000000000000000000000000000082613e7c565b612d329082613e90565b60018190556040519081527ff93d77980ae5a1ddd008d6a7f02cbee5af2a4fcea850c4b55828de4f644e589f906020015b60405180910390a150565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155610c1e826133a7565b60606000612db383613418565b9392505050565b600080612dc634611f7a565b91509150600054821015612dec5760405162461bcd60e51b81526004016107b690613eef565b8160048585604051612dff929190613d89565b90815260405190819003602001812060020180549092019091558290600590612e29908890613d27565b90815260405190819003602001812080549092019091558290600690612e50908890613d27565b90815260200160405180910390208585604051612e6e929190613d89565b90815260405190819003602001902080549091019055612e8d81613284565b7fe77f103965e0ff8836ce54ba9bac869f217cd5da27d6bdefd090282c397211c085858585604051612ec294939291906141e5565b60405180910390a15050505050565b60008111612f395760405162461bcd60e51b815260206004820152602f60248201527f4950546f6b656e5374616b696e673a206d696e526564656c6567617465416d6f60448201526e0756e742063616e6e6f74206265203608c1b60648201526084016107b6565b612f637f000000000000000000000000000000000000000000000000000000000000000082613e7c565b612f6d9082613e90565b60028190556040519081527ff1e15ded5b5192ec1a89a3d16f49c46c7fa6c876d1f8299cf036f5abf9924d9b90602001612d63565b612faa613474565b6111266134bd565b611126613474565b612fc2613474565b611111816134c5565b6000811161302e5760405162461bcd60e51b815260206004820152602a60248201527f4950546f6b656e5374616b696e673a206d696e5374616b65416d6f756e7420636044820152690616e6e6f7420626520360b41b60648201526084016107b6565b6130587f000000000000000000000000000000000000000000000000000000000000000082613e7c565b6130629082613e90565b60008190556040519081527fea095c2fea861b87f0fd54d0d4453358692a527e120df22b62c71696247dfb9f90602001612d63565b6000811161310d5760405162461bcd60e51b815260206004820152603e60248201527f4950546f6b656e5374616b696e673a206e65775769746864726177616c41646460448201527f726573734368616e6765496e74657276616c2063616e6e6f742062652030000060648201526084016107b6565b60038190556040518181527fbed33ba1e6aacc702f8e48397b388e43ca92a8898ed8bdb389fd8b18af95d32c90602001612d63565b6000818152600183016020526040812054613189575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556116dd565b5060006116dd565b6000818152600183016020526040812054801561327a5760006131b5600183613e90565b85549091506000906131c990600190613e90565b905080821461322e5760008660000182815481106131e9576131e9613c7e565b906000526020600020015490508087600001848154811061320c5761320c613c7e565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061323f5761323f61421d565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506116dd565b60009150506116dd565b604051600090339083908381818185875af1925050503d80600081146132c6576040519150601f19603f3d011682016040523d82523d6000602084013e6132cb565b606091505b5050905080610c1e5760405162461bcd60e51b815260206004820152602a60248201527f4950546f6b656e5374616b696e673a204661696c656420746f20726566756e64604482015269103932b6b0b4b73232b960b11b60648201526084016107b6565b613338826134f7565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561337d57612802828261355c565b610c1e6135d2565b6001600160a01b038116600090815260018301602052604081205415156116da565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561346857602002820191906000526020600020905b815481526020019060010190808311613454575b50505050509050919050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661112657604051631afcd79f60e31b815260040160405180910390fd5b612684613474565b6134cd613474565b6001600160a01b0381166113d057604051631e4fbdf760e01b8152600060048201526024016107b6565b806001600160a01b03163b60000361352d57604051634c9c8ce360e01b81526001600160a01b03821660048201526024016107b6565b60008051602061423483398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516135799190613d27565b600060405180830381855af49150503d80600081146135b4576040519150601f19603f3d011682016040523d82523d6000602084013e6135b9565b606091505b50915091506135c98583836135f1565b95945050505050565b34156111265760405163b398979f60e01b815260040160405180910390fd5b606082613606576136018261364d565b612db3565b815115801561361d57506001600160a01b0384163b155b1561364657604051639996b31560e01b81526001600160a01b03851660048201526024016107b6565b5092915050565b80511561365d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50805461368290613e2c565b6000825580601f10613692575050565b601f01602090049060005260206000209081019061111191905b808211156136c057600081556001016136ac565b5090565b60008083601f8401126136d657600080fd5b5081356001600160401b038111156136ed57600080fd5b60208301915083602082850101111561370557600080fd5b9250929050565b80356001600160a01b038116811461372357600080fd5b919050565b60008060006040848603121561373d57600080fd5b83356001600160401b0381111561375357600080fd5b61375f868287016136c4565b909450925061377290506020850161370c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126137a257600080fd5b81356001600160401b03808211156137bc576137bc61377b565b604051601f8301601f19908116603f011681019082821181831017156137e4576137e461377b565b816040528381528660208588010111156137fd57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561383057600080fd5b82356001600160401b038082111561384757600080fd5b61385386838701613791565b9350602085013591508082111561386957600080fd5b5061387685828601613791565b9150509250929050565b6000806020838503121561389357600080fd5b82356001600160401b038111156138a957600080fd5b6138b5858286016136c4565b90969095509350505050565b600080604083850312156138d457600080fd5b6138dd8361370c565b915060208301356001600160401b038111156138f857600080fd5b61387685828601613791565b60006020828403121561391657600080fd5b81356001600160401b0381111561392c57600080fd5b820160808185031215612db357600080fd5b60006020828403121561395057600080fd5b81356001600160401b0381111561396657600080fd5b61397284828501613791565b949350505050565b60008060008060006060868803121561399257600080fd5b85356001600160401b03808211156139a957600080fd5b6139b589838a016136c4565b909750955060208801359150808211156139ce57600080fd5b506139db888289016136c4565b96999598509660400135949350505050565b6000602082840312156139ff57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015613a475783516001600160a01b031683529284019291840191600101613a22565b50909695505050505050565b60008060008060408587031215613a6957600080fd5b84356001600160401b0380821115613a8057600080fd5b613a8c888389016136c4565b90965094506020870135915080821115613aa557600080fd5b50613ab2878288016136c4565b95989497509550505050565b60005b83811015613ad9578181015183820152602001613ac1565b50506000910152565b60008151808452613afa816020860160208601613abe565b601f01601f19169290920160200192915050565b861515815260c060208201526000613b2960c0830188613ae2565b60408301969096525063ffffffff9384166060820152918316608083015290911660a09091015292915050565b6020815260006116da6020830184613ae2565b600060208284031215613b7b57600080fd5b6116da8261370c565b803563ffffffff8116811461372357600080fd5b600080600080600080600060a0888a031215613bb357600080fd5b87356001600160401b0380821115613bca57600080fd5b613bd68b838c016136c4565b909950975060208a0135915080821115613bef57600080fd5b50613bfc8a828b016136c4565b9096509450613c0f905060408901613b84565b9250613c1d60608901613b84565b9150613c2b60808901613b84565b905092959891949750929550565b60208082526025908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579206c6040820152640cadccee8d60db1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526025908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b657920706040820152640e4caccd2f60db1b606082015260800190565b6020808252602e908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579206460408201526d657269766564206164647265737360901b606082015260800190565b60008251613d39818460208701613abe565b9190910192915050565b6000808335601e19843603018112613d5a57600080fd5b8301803591506001600160401b03821115613d7457600080fd5b60200191503681900382131561370557600080fd5b8183823760009101908152919050565b60208082526028908201527f4950546f6b656e5374616b696e673a2056616c696461746f7220646f6573206e6040820152671bdd08195e1a5cdd60c21b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156116dd576116dd613de1565b604081526000613e1d6040830185613ae2565b90508260208301529392505050565b600181811c90821680613e4057607f821691505b602082108103613e6057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b600082613e8b57613e8b613e66565b500690565b818103818111156116dd576116dd613de1565b60008085851115613eb357600080fd5b83861115613ec057600080fd5b5050820193919092039150565b600060ff831680613ee057613ee0613e66565b8060ff84160691505092915050565b60208082526024908201527f4950546f6b656e5374616b696e673a205374616b6520616d6f756e7420746f6f604082015263206c6f7760e01b606082015260800190565b601f821115612802576000816000526020600020601f850160051c81016020861015613f5c5750805b601f850160051c820191505b81811015611f7257828155600101613f68565b81516001600160401b03811115613f9457613f9461377b565b613fa881613fa28454613e2c565b84613f33565b602080601f831160018114613fdd5760008415613fc55750858301515b600019600386901b1c1916600185901b178555611f72565b600085815260208120601f198616915b8281101561400c57888601518255948401946001909101908401613fed565b508582101561402a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60c08152600061404d60c0830189613ae2565b6020838203818501526000895461406381613e2c565b8085526001828116801561407e5760018114614098576140c6565b60ff1984168787015282151560051b8701860194506140c6565b8d6000528560002060005b848110156140be5781548982018901529083019087016140a3565b880187019550505b505050506040850189905263ffffffff8816606086015292506140e7915050565b63ffffffff8416608083015263ffffffff831660a0830152979650505050505050565b60006020828403121561411c57600080fd5b5051919050565b6020808252602a908201527f4950546f6b656e5374616b696e673a20496e73756666696369656e74207374616040820152691ad95908185b5bdd5b9d60b21b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6080815260006141a96080830189613ae2565b82810360208401526141bc81888a61416d565b905082810360408401526141d181868861416d565b915050826060830152979650505050505050565b6060815260006141f86060830187613ae2565b828103602084015261420b81868861416d565b91505082604083015295945050505050565b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00a26469706673582212209485bc3ef41c6266ff4611fed83ef81fee36b767cd694958239847e269ffa3ce64736f6c63430008180033" ) //go:embed iptokenstaking_storage_layout.json diff --git a/contracts/bindings/iptokenstaking_storage_layout.json b/contracts/bindings/iptokenstaking_storage_layout.json index 4ccd4d8b..a4a4d789 100644 --- a/contracts/bindings/iptokenstaking_storage_layout.json +++ b/contracts/bindings/iptokenstaking_storage_layout.json @@ -1,100 +1,79 @@ { "storage": [ { - "astId": 8, - "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", - "label": "_owner", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 156, - "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", - "label": "_pendingOwner", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 40493, + "astId": 2581, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "minStakeAmount", "offset": 0, - "slot": "2", + "slot": "0", "type": "t_uint256" }, { - "astId": 40496, + "astId": 2584, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "minUnstakeAmount", "offset": 0, - "slot": "3", + "slot": "1", "type": "t_uint256" }, { - "astId": 40499, + "astId": 2587, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "minRedelegateAmount", "offset": 0, - "slot": "4", + "slot": "2", "type": "t_uint256" }, { - "astId": 40502, + "astId": 2590, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "withdrawalAddressChangeInterval", "offset": 0, - "slot": "5", + "slot": "3", "type": "t_uint256" }, { - "astId": 40508, + "astId": 2596, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "validatorMetadata", "offset": 0, - "slot": "6", - "type": "t_mapping(t_bytes_memory_ptr,t_struct(ValidatorMetadata)40039_storage)" + "slot": "4", + "type": "t_mapping(t_bytes_memory_ptr,t_struct(ValidatorMetadata)2257_storage)" }, { - "astId": 40513, + "astId": 2601, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "delegatorTotalStakes", "offset": 0, - "slot": "7", + "slot": "5", "type": "t_mapping(t_bytes_memory_ptr,t_uint256)" }, { - "astId": 40520, + "astId": 2608, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "delegatorValidatorStakes", "offset": 0, - "slot": "8", + "slot": "6", "type": "t_mapping(t_bytes_memory_ptr,t_mapping(t_bytes_memory_ptr,t_uint256))" }, { - "astId": 40526, + "astId": 2614, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "delegatorOperators", "offset": 0, - "slot": "9", - "type": "t_mapping(t_bytes_memory_ptr,t_struct(AddressSet)589_storage)" + "slot": "7", + "type": "t_mapping(t_bytes_memory_ptr,t_struct(AddressSet)1954_storage)" }, { - "astId": 40531, + "astId": 2619, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "withdrawalAddressChange", "offset": 0, - "slot": "10", + "slot": "8", "type": "t_mapping(t_bytes_memory_ptr,t_uint256)" } ], "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, "t_array(t_bytes32)dyn_storage": { "encoding": "dynamic_array", "label": "bytes32[]", @@ -130,19 +109,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_bytes_memory_ptr,t_uint256)" }, - "t_mapping(t_bytes_memory_ptr,t_struct(AddressSet)589_storage)": { + "t_mapping(t_bytes_memory_ptr,t_struct(AddressSet)1954_storage)": { "encoding": "mapping", "key": "t_bytes_memory_ptr", "label": "mapping(bytes => struct EnumerableSet.AddressSet)", "numberOfBytes": "32", - "value": "t_struct(AddressSet)589_storage" + "value": "t_struct(AddressSet)1954_storage" }, - "t_mapping(t_bytes_memory_ptr,t_struct(ValidatorMetadata)40039_storage)": { + "t_mapping(t_bytes_memory_ptr,t_struct(ValidatorMetadata)2257_storage)": { "encoding": "mapping", "key": "t_bytes_memory_ptr", "label": "mapping(bytes => struct IIPTokenStaking.ValidatorMetadata)", "numberOfBytes": "32", - "value": "t_struct(ValidatorMetadata)40039_storage" + "value": "t_struct(ValidatorMetadata)2257_storage" }, "t_mapping(t_bytes_memory_ptr,t_uint256)": { "encoding": "mapping", @@ -156,28 +135,28 @@ "label": "string", "numberOfBytes": "32" }, - "t_struct(AddressSet)589_storage": { + "t_struct(AddressSet)1954_storage": { "encoding": "inplace", "label": "struct EnumerableSet.AddressSet", "numberOfBytes": "64", "members": [ { - "astId": 588, + "astId": 1953, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Set)274_storage" + "type": "t_struct(Set)1639_storage" } ] }, - "t_struct(Set)274_storage": { + "t_struct(Set)1639_storage": { "encoding": "inplace", "label": "struct EnumerableSet.Set", "numberOfBytes": "64", "members": [ { - "astId": 269, + "astId": 1634, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "_values", "offset": 0, @@ -185,7 +164,7 @@ "type": "t_array(t_bytes32)dyn_storage" }, { - "astId": 273, + "astId": 1638, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "_positions", "offset": 0, @@ -194,13 +173,13 @@ } ] }, - "t_struct(ValidatorMetadata)40039_storage": { + "t_struct(ValidatorMetadata)2257_storage": { "encoding": "inplace", "label": "struct IIPTokenStaking.ValidatorMetadata", "numberOfBytes": "128", "members": [ { - "astId": 40028, + "astId": 2246, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "exists", "offset": 0, @@ -208,7 +187,7 @@ "type": "t_bool" }, { - "astId": 40030, + "astId": 2248, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "moniker", "offset": 0, @@ -216,7 +195,7 @@ "type": "t_string_storage" }, { - "astId": 40032, + "astId": 2250, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "totalStake", "offset": 0, @@ -224,7 +203,7 @@ "type": "t_uint256" }, { - "astId": 40034, + "astId": 2252, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "commissionRate", "offset": 0, @@ -232,7 +211,7 @@ "type": "t_uint32" }, { - "astId": 40036, + "astId": 2254, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "maxCommissionRate", "offset": 4, @@ -240,7 +219,7 @@ "type": "t_uint32" }, { - "astId": 40038, + "astId": 2256, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "maxCommissionChangeRate", "offset": 8, diff --git a/contracts/bindings/upgradeentrypoint.go b/contracts/bindings/upgradeentrypoint.go index 74132a8b..b6108c36 100644 --- a/contracts/bindings/upgradeentrypoint.go +++ b/contracts/bindings/upgradeentrypoint.go @@ -31,8 +31,8 @@ var ( // UpgradeEntrypointMetaData contains all meta data concerning the UpgradeEntrypoint contract. var UpgradeEntrypointMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"planUpgrade\",\"inputs\":[{\"name\":\"name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"height\",\"type\":\"int64\",\"internalType\":\"int64\"},{\"name\":\"info\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SoftwareUpgrade\",\"inputs\":[{\"name\":\"name\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"height\",\"type\":\"int64\",\"indexed\":false,\"internalType\":\"int64\"},{\"name\":\"info\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]}]", - Bin: "0x608060405234801561001057600080fd5b5060405161053f38038061053f83398101604081905261002f916100da565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b505061010a565b600180546001600160a01b03191690556100878161008a565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100ec57600080fd5b81516001600160a01b038116811461010357600080fd5b9392505050565b610426806101196000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063715018a61461006757806379ba5097146100715780638da5cb5b14610079578063e30c3978146100a2578063ef176e0e146100b3578063f2fde38b146100c6575b600080fd5b61006f6100d9565b005b61006f6100ed565b6000546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b6001546001600160a01b0316610086565b61006f6100c13660046102cf565b610136565b61006f6100d436600461035b565b610184565b6100e16101f5565b6100eb6000610222565b565b60015433906001600160a01b0316811461012a5760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b61013381610222565b50565b61013e6101f5565b7f112749e79b2098b58eab36c21f123b2883c3ecbbb4f41623a744fa6d9b3e37c685858585856040516101759594939291906103b4565b60405180910390a15050505050565b61018c6101f5565b600180546001600160a01b0383166001600160a01b031990911681179091556101bd6000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146100eb5760405163118cdaa760e01b8152336004820152602401610121565b600180546001600160a01b031916905561013381600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008083601f84011261029857600080fd5b50813567ffffffffffffffff8111156102b057600080fd5b6020830191508360208285010111156102c857600080fd5b9250929050565b6000806000806000606086880312156102e757600080fd5b853567ffffffffffffffff808211156102ff57600080fd5b61030b89838a01610286565b909750955060208801359150600782900b821461032757600080fd5b9093506040870135908082111561033d57600080fd5b5061034a88828901610286565b969995985093965092949392505050565b60006020828403121561036d57600080fd5b81356001600160a01b038116811461038457600080fd5b9392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6060815260006103c860608301878961038b565b8560070b602084015282810360408401526103e481858761038b565b9897505050505050505056fea2646970667358221220f12e8408869738cf77e756c57f3dbd8115f9eea757a287364347b7f1ff36591964736f6c63430008180033", + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"accessManager\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"planUpgrade\",\"inputs\":[{\"name\":\"name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"height\",\"type\":\"int64\",\"internalType\":\"int64\"},{\"name\":\"info\",\"type\":\"string\",\"internalType\":\"string\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SoftwareUpgrade\",\"inputs\":[{\"name\":\"name\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"},{\"name\":\"height\",\"type\":\"int64\",\"indexed\":false,\"internalType\":\"int64\"},{\"name\":\"info\",\"type\":\"string\",\"indexed\":false,\"internalType\":\"string\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]", + Bin: "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d4565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100725760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100d15780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051610d696100fd6000396000818161054a0152818161057301526106b90152610d696000f3fe6080604052600436106100915760003560e01c8063ad3cb1cc11610059578063ad3cb1cc1461012a578063c4d66de814610168578063e30c397814610188578063ef176e0e1461019d578063f2fde38b146101bd57600080fd5b80634f1ef2861461009657806352d1902d146100ab578063715018a6146100d357806379ba5097146100e85780638da5cb5b146100fd575b600080fd5b6100a96100a4366004610a70565b6101dd565b005b3480156100b757600080fd5b506100c06101fc565b6040519081526020015b60405180910390f35b3480156100df57600080fd5b506100a9610219565b3480156100f457600080fd5b506100a961022d565b34801561010957600080fd5b5061011261027a565b6040516001600160a01b0390911681526020016100ca565b34801561013657600080fd5b5061015b604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100ca9190610b56565b34801561017457600080fd5b506100a9610183366004610b89565b6102af565b34801561019457600080fd5b50610112610443565b3480156101a957600080fd5b506100a96101b8366004610bed565b61046c565b3480156101c957600080fd5b506100a96101d8366004610b89565b6104ba565b6101e561053f565b6101ee826105e4565b6101f882826105ec565b5050565b60006102066106ae565b50600080516020610d1483398151915290565b6102216106f7565b61022b6000610729565b565b3380610237610443565b6001600160a01b03161461026e5760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b61027781610729565b50565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156102f55750825b905060008267ffffffffffffffff1660011480156103125750303b155b905081158015610320575080155b1561033e5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561036857845460ff60401b1916600160401b1785555b6001600160a01b0386166103e45760405162461bcd60e51b815260206004820152603760248201527f55706772616465456e747279706f696e743a206163636573734d616e6167657260448201527f2063616e6e6f74206265207a65726f20616464726573730000000000000000006064820152608401610265565b6103ec610761565b6103f586610769565b831561043b57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0061029f565b6104746106f7565b7f112749e79b2098b58eab36c21f123b2883c3ecbbb4f41623a744fa6d9b3e37c685858585856040516104ab959493929190610ca2565b60405180910390a15050505050565b6104c26106f7565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b038316908117825561050661027a565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806105c657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166105ba600080516020610d14833981519152546001600160a01b031690565b6001600160a01b031614155b1561022b5760405163703e46dd60e11b815260040160405180910390fd5b6102776106f7565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610646575060408051601f3d908101601f1916820190925261064391810190610cde565b60015b61066e57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610265565b600080516020610d14833981519152811461069f57604051632a87526960e21b815260048101829052602401610265565b6106a9838361077a565b505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461022b5760405163703e46dd60e11b815260040160405180910390fd5b3361070061027a565b6001600160a01b03161461022b5760405163118cdaa760e01b8152336004820152602401610265565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556101f8826107d0565b61022b610841565b610771610841565b6102778161088a565b610783826108bc565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156107c8576106a98282610921565b6101f8610997565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661022b57604051631afcd79f60e31b815260040160405180910390fd5b610892610841565b6001600160a01b03811661026e57604051631e4fbdf760e01b815260006004820152602401610265565b806001600160a01b03163b6000036108f257604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610265565b600080516020610d1483398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161093e9190610cf7565b600060405180830381855af49150503d8060008114610979576040519150601f19603f3d011682016040523d82523d6000602084013e61097e565b606091505b509150915061098e8583836109b6565b95945050505050565b341561022b5760405163b398979f60e01b815260040160405180910390fd5b6060826109cb576109c682610a15565b610a0e565b81511580156109e257506001600160a01b0384163b155b15610a0b57604051639996b31560e01b81526001600160a01b0385166004820152602401610265565b50805b9392505050565b805115610a255780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610a5557600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610a8357600080fd5b610a8c83610a3e565b9150602083013567ffffffffffffffff80821115610aa957600080fd5b818501915085601f830112610abd57600080fd5b813581811115610acf57610acf610a5a565b604051601f8201601f19908116603f01168101908382118183101715610af757610af7610a5a565b81604052828152886020848701011115610b1057600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b83811015610b4d578181015183820152602001610b35565b50506000910152565b6020815260008251806020840152610b75816040850160208701610b32565b601f01601f19169190910160400192915050565b600060208284031215610b9b57600080fd5b610a0e82610a3e565b60008083601f840112610bb657600080fd5b50813567ffffffffffffffff811115610bce57600080fd5b602083019150836020828501011115610be657600080fd5b9250929050565b600080600080600060608688031215610c0557600080fd5b853567ffffffffffffffff80821115610c1d57600080fd5b610c2989838a01610ba4565b909750955060208801359150600782900b8214610c4557600080fd5b90935060408701359080821115610c5b57600080fd5b50610c6888828901610ba4565b969995985093965092949392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b606081526000610cb6606083018789610c79565b8560070b60208401528281036040840152610cd2818587610c79565b98975050505050505050565b600060208284031215610cf057600080fd5b5051919050565b60008251610d09818460208701610b32565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212202fed7feda2d375d5be4b2847badd7e61be35b824b0a1a393337ce76a48fe290564736f6c63430008180033", } // UpgradeEntrypointABI is the input ABI used to generate the binding from. @@ -44,7 +44,7 @@ var UpgradeEntrypointABI = UpgradeEntrypointMetaData.ABI var UpgradeEntrypointBin = UpgradeEntrypointMetaData.Bin // DeployUpgradeEntrypoint deploys a new Ethereum contract, binding an instance of UpgradeEntrypoint to it. -func DeployUpgradeEntrypoint(auth *bind.TransactOpts, backend bind.ContractBackend, newOwner common.Address) (common.Address, *types.Transaction, *UpgradeEntrypoint, error) { +func DeployUpgradeEntrypoint(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *UpgradeEntrypoint, error) { parsed, err := UpgradeEntrypointMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -53,7 +53,7 @@ func DeployUpgradeEntrypoint(auth *bind.TransactOpts, backend bind.ContractBacke return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(UpgradeEntrypointBin), backend, newOwner) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(UpgradeEntrypointBin), backend) if err != nil { return common.Address{}, nil, nil, err } @@ -202,6 +202,37 @@ func (_UpgradeEntrypoint *UpgradeEntrypointTransactorRaw) Transact(opts *bind.Tr return _UpgradeEntrypoint.Contract.contract.Transact(opts, method, params...) } +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_UpgradeEntrypoint *UpgradeEntrypointCaller) UPGRADEINTERFACEVERSION(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _UpgradeEntrypoint.contract.Call(opts, &out, "UPGRADE_INTERFACE_VERSION") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_UpgradeEntrypoint *UpgradeEntrypointSession) UPGRADEINTERFACEVERSION() (string, error) { + return _UpgradeEntrypoint.Contract.UPGRADEINTERFACEVERSION(&_UpgradeEntrypoint.CallOpts) +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_UpgradeEntrypoint *UpgradeEntrypointCallerSession) UPGRADEINTERFACEVERSION() (string, error) { + return _UpgradeEntrypoint.Contract.UPGRADEINTERFACEVERSION(&_UpgradeEntrypoint.CallOpts) +} + // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // // Solidity: function owner() view returns(address) @@ -264,6 +295,37 @@ func (_UpgradeEntrypoint *UpgradeEntrypointCallerSession) PendingOwner() (common return _UpgradeEntrypoint.Contract.PendingOwner(&_UpgradeEntrypoint.CallOpts) } +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_UpgradeEntrypoint *UpgradeEntrypointCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _UpgradeEntrypoint.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_UpgradeEntrypoint *UpgradeEntrypointSession) ProxiableUUID() ([32]byte, error) { + return _UpgradeEntrypoint.Contract.ProxiableUUID(&_UpgradeEntrypoint.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_UpgradeEntrypoint *UpgradeEntrypointCallerSession) ProxiableUUID() ([32]byte, error) { + return _UpgradeEntrypoint.Contract.ProxiableUUID(&_UpgradeEntrypoint.CallOpts) +} + // AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097. // // Solidity: function acceptOwnership() returns() @@ -285,6 +347,27 @@ func (_UpgradeEntrypoint *UpgradeEntrypointTransactorSession) AcceptOwnership() return _UpgradeEntrypoint.Contract.AcceptOwnership(&_UpgradeEntrypoint.TransactOpts) } +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address accessManager) returns() +func (_UpgradeEntrypoint *UpgradeEntrypointTransactor) Initialize(opts *bind.TransactOpts, accessManager common.Address) (*types.Transaction, error) { + return _UpgradeEntrypoint.contract.Transact(opts, "initialize", accessManager) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address accessManager) returns() +func (_UpgradeEntrypoint *UpgradeEntrypointSession) Initialize(accessManager common.Address) (*types.Transaction, error) { + return _UpgradeEntrypoint.Contract.Initialize(&_UpgradeEntrypoint.TransactOpts, accessManager) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address accessManager) returns() +func (_UpgradeEntrypoint *UpgradeEntrypointTransactorSession) Initialize(accessManager common.Address) (*types.Transaction, error) { + return _UpgradeEntrypoint.Contract.Initialize(&_UpgradeEntrypoint.TransactOpts, accessManager) +} + // PlanUpgrade is a paid mutator transaction binding the contract method 0xef176e0e. // // Solidity: function planUpgrade(string name, int64 height, string info) returns() @@ -348,6 +431,161 @@ func (_UpgradeEntrypoint *UpgradeEntrypointTransactorSession) TransferOwnership( return _UpgradeEntrypoint.Contract.TransferOwnership(&_UpgradeEntrypoint.TransactOpts, newOwner) } +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_UpgradeEntrypoint *UpgradeEntrypointTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _UpgradeEntrypoint.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_UpgradeEntrypoint *UpgradeEntrypointSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _UpgradeEntrypoint.Contract.UpgradeToAndCall(&_UpgradeEntrypoint.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_UpgradeEntrypoint *UpgradeEntrypointTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _UpgradeEntrypoint.Contract.UpgradeToAndCall(&_UpgradeEntrypoint.TransactOpts, newImplementation, data) +} + +// UpgradeEntrypointInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the UpgradeEntrypoint contract. +type UpgradeEntrypointInitializedIterator struct { + Event *UpgradeEntrypointInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *UpgradeEntrypointInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(UpgradeEntrypointInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(UpgradeEntrypointInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *UpgradeEntrypointInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UpgradeEntrypointInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UpgradeEntrypointInitialized represents a Initialized event raised by the UpgradeEntrypoint contract. +type UpgradeEntrypointInitialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_UpgradeEntrypoint *UpgradeEntrypointFilterer) FilterInitialized(opts *bind.FilterOpts) (*UpgradeEntrypointInitializedIterator, error) { + + logs, sub, err := _UpgradeEntrypoint.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &UpgradeEntrypointInitializedIterator{contract: _UpgradeEntrypoint.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_UpgradeEntrypoint *UpgradeEntrypointFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *UpgradeEntrypointInitialized) (event.Subscription, error) { + + logs, sub, err := _UpgradeEntrypoint.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(UpgradeEntrypointInitialized) + if err := _UpgradeEntrypoint.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_UpgradeEntrypoint *UpgradeEntrypointFilterer) ParseInitialized(log types.Log) (*UpgradeEntrypointInitialized, error) { + event := new(UpgradeEntrypointInitialized) + if err := _UpgradeEntrypoint.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // UpgradeEntrypointOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the UpgradeEntrypoint contract. type UpgradeEntrypointOwnershipTransferStartedIterator struct { Event *UpgradeEntrypointOwnershipTransferStarted // Event containing the contract specifics and raw log @@ -789,3 +1027,147 @@ func (_UpgradeEntrypoint *UpgradeEntrypointFilterer) ParseSoftwareUpgrade(log ty event.Raw = log return event, nil } + +// UpgradeEntrypointUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the UpgradeEntrypoint contract. +type UpgradeEntrypointUpgradedIterator struct { + Event *UpgradeEntrypointUpgraded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *UpgradeEntrypointUpgradedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(UpgradeEntrypointUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(UpgradeEntrypointUpgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *UpgradeEntrypointUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UpgradeEntrypointUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UpgradeEntrypointUpgraded represents a Upgraded event raised by the UpgradeEntrypoint contract. +type UpgradeEntrypointUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_UpgradeEntrypoint *UpgradeEntrypointFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*UpgradeEntrypointUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _UpgradeEntrypoint.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &UpgradeEntrypointUpgradedIterator{contract: _UpgradeEntrypoint.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_UpgradeEntrypoint *UpgradeEntrypointFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *UpgradeEntrypointUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _UpgradeEntrypoint.contract.WatchLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(UpgradeEntrypointUpgraded) + if err := _UpgradeEntrypoint.contract.UnpackLog(event, "Upgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_UpgradeEntrypoint *UpgradeEntrypointFilterer) ParseUpgraded(log types.Log) (*UpgradeEntrypointUpgraded, error) { + event := new(UpgradeEntrypointUpgraded) + if err := _UpgradeEntrypoint.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/contracts/bindings/upgradeentrypoint_more.go b/contracts/bindings/upgradeentrypoint_more.go index 0c33c269..c7eed16e 100644 --- a/contracts/bindings/upgradeentrypoint_more.go +++ b/contracts/bindings/upgradeentrypoint_more.go @@ -5,7 +5,7 @@ import ( ) const ( - UpgradeEntrypointDeployedBytecode = "0x608060405234801561001057600080fd5b50600436106100625760003560e01c8063715018a61461006757806379ba5097146100715780638da5cb5b14610079578063e30c3978146100a2578063ef176e0e146100b3578063f2fde38b146100c6575b600080fd5b61006f6100d9565b005b61006f6100ed565b6000546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b6001546001600160a01b0316610086565b61006f6100c13660046102cf565b610136565b61006f6100d436600461035b565b610184565b6100e16101f5565b6100eb6000610222565b565b60015433906001600160a01b0316811461012a5760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b61013381610222565b50565b61013e6101f5565b7f112749e79b2098b58eab36c21f123b2883c3ecbbb4f41623a744fa6d9b3e37c685858585856040516101759594939291906103b4565b60405180910390a15050505050565b61018c6101f5565b600180546001600160a01b0383166001600160a01b031990911681179091556101bd6000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146100eb5760405163118cdaa760e01b8152336004820152602401610121565b600180546001600160a01b031916905561013381600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008083601f84011261029857600080fd5b50813567ffffffffffffffff8111156102b057600080fd5b6020830191508360208285010111156102c857600080fd5b9250929050565b6000806000806000606086880312156102e757600080fd5b853567ffffffffffffffff808211156102ff57600080fd5b61030b89838a01610286565b909750955060208801359150600782900b821461032757600080fd5b9093506040870135908082111561033d57600080fd5b5061034a88828901610286565b969995985093965092949392505050565b60006020828403121561036d57600080fd5b81356001600160a01b038116811461038457600080fd5b9392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6060815260006103c860608301878961038b565b8560070b602084015282810360408401526103e481858761038b565b9897505050505050505056fea2646970667358221220b5368e57893f3d7629f1e008c242a82e4675b883e77bab8dd19a2293fdfbae5464736f6c63430008180033" + UpgradeEntrypointDeployedBytecode = "0x6080604052600436106100915760003560e01c8063ad3cb1cc11610059578063ad3cb1cc1461012a578063c4d66de814610168578063e30c397814610188578063ef176e0e1461019d578063f2fde38b146101bd57600080fd5b80634f1ef2861461009657806352d1902d146100ab578063715018a6146100d357806379ba5097146100e85780638da5cb5b146100fd575b600080fd5b6100a96100a4366004610a70565b6101dd565b005b3480156100b757600080fd5b506100c06101fc565b6040519081526020015b60405180910390f35b3480156100df57600080fd5b506100a9610219565b3480156100f457600080fd5b506100a961022d565b34801561010957600080fd5b5061011261027a565b6040516001600160a01b0390911681526020016100ca565b34801561013657600080fd5b5061015b604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100ca9190610b56565b34801561017457600080fd5b506100a9610183366004610b89565b6102af565b34801561019457600080fd5b50610112610443565b3480156101a957600080fd5b506100a96101b8366004610bed565b61046c565b3480156101c957600080fd5b506100a96101d8366004610b89565b6104ba565b6101e561053f565b6101ee826105e4565b6101f882826105ec565b5050565b60006102066106ae565b50600080516020610d1483398151915290565b6102216106f7565b61022b6000610729565b565b3380610237610443565b6001600160a01b03161461026e5760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b61027781610729565b50565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156102f55750825b905060008267ffffffffffffffff1660011480156103125750303b155b905081158015610320575080155b1561033e5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561036857845460ff60401b1916600160401b1785555b6001600160a01b0386166103e45760405162461bcd60e51b815260206004820152603760248201527f55706772616465456e747279706f696e743a206163636573734d616e6167657260448201527f2063616e6e6f74206265207a65726f20616464726573730000000000000000006064820152608401610265565b6103ec610761565b6103f586610769565b831561043b57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0061029f565b6104746106f7565b7f112749e79b2098b58eab36c21f123b2883c3ecbbb4f41623a744fa6d9b3e37c685858585856040516104ab959493929190610ca2565b60405180910390a15050505050565b6104c26106f7565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b038316908117825561050661027a565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806105c657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166105ba600080516020610d14833981519152546001600160a01b031690565b6001600160a01b031614155b1561022b5760405163703e46dd60e11b815260040160405180910390fd5b6102776106f7565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610646575060408051601f3d908101601f1916820190925261064391810190610cde565b60015b61066e57604051634c9c8ce360e01b81526001600160a01b0383166004820152602401610265565b600080516020610d14833981519152811461069f57604051632a87526960e21b815260048101829052602401610265565b6106a9838361077a565b505050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461022b5760405163703e46dd60e11b815260040160405180910390fd5b3361070061027a565b6001600160a01b03161461022b5760405163118cdaa760e01b8152336004820152602401610265565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556101f8826107d0565b61022b610841565b610771610841565b6102778161088a565b610783826108bc565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156107c8576106a98282610921565b6101f8610997565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661022b57604051631afcd79f60e31b815260040160405180910390fd5b610892610841565b6001600160a01b03811661026e57604051631e4fbdf760e01b815260006004820152602401610265565b806001600160a01b03163b6000036108f257604051634c9c8ce360e01b81526001600160a01b0382166004820152602401610265565b600080516020610d1483398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161093e9190610cf7565b600060405180830381855af49150503d8060008114610979576040519150601f19603f3d011682016040523d82523d6000602084013e61097e565b606091505b509150915061098e8583836109b6565b95945050505050565b341561022b5760405163b398979f60e01b815260040160405180910390fd5b6060826109cb576109c682610a15565b610a0e565b81511580156109e257506001600160a01b0384163b155b15610a0b57604051639996b31560e01b81526001600160a01b0385166004820152602401610265565b50805b9392505050565b805115610a255780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610a5557600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610a8357600080fd5b610a8c83610a3e565b9150602083013567ffffffffffffffff80821115610aa957600080fd5b818501915085601f830112610abd57600080fd5b813581811115610acf57610acf610a5a565b604051601f8201601f19908116603f01168101908382118183101715610af757610af7610a5a565b81604052828152886020848701011115610b1057600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b83811015610b4d578181015183820152602001610b35565b50506000910152565b6020815260008251806020840152610b75816040850160208701610b32565b601f01601f19169190910160400192915050565b600060208284031215610b9b57600080fd5b610a0e82610a3e565b60008083601f840112610bb657600080fd5b50813567ffffffffffffffff811115610bce57600080fd5b602083019150836020828501011115610be657600080fd5b9250929050565b600080600080600060608688031215610c0557600080fd5b853567ffffffffffffffff80821115610c1d57600080fd5b610c2989838a01610ba4565b909750955060208801359150600782900b8214610c4557600080fd5b90935060408701359080821115610c5b57600080fd5b50610c6888828901610ba4565b969995985093965092949392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b606081526000610cb6606083018789610c79565b8560070b60208401528281036040840152610cd2818587610c79565b98975050505050505050565b600060208284031215610cf057600080fd5b5051919050565b60008251610d09818460208701610b32565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220d75dd098236b926683dd323449cf80275a972566f8513e91af7fe88e8bd100d364736f6c63430008180033" ) //go:embed upgradeentrypoint_storage_layout.json diff --git a/contracts/bindings/upgradeentrypoint_storage_layout.json b/contracts/bindings/upgradeentrypoint_storage_layout.json index 1e729502..127dec9f 100644 --- a/contracts/bindings/upgradeentrypoint_storage_layout.json +++ b/contracts/bindings/upgradeentrypoint_storage_layout.json @@ -1,27 +1,4 @@ { - "storage": [ - { - "astId": 8, - "contract": "src/protocol/UpgradeEntrypoint.sol:UpgradeEntrypoint", - "label": "_owner", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 156, - "contract": "src/protocol/UpgradeEntrypoint.sol:UpgradeEntrypoint", - "label": "_pendingOwner", - "offset": 0, - "slot": "1", - "type": "t_address" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - } - } + "storage": [], + "types": {} } diff --git a/contracts/pnpm-lock.yaml b/contracts/pnpm-lock.yaml index 379d243e..08901052 100644 --- a/contracts/pnpm-lock.yaml +++ b/contracts/pnpm-lock.yaml @@ -47,7 +47,7 @@ importers: version: 4.0.0(typescript@5.5.3) solhint-plugin-prettier: specifier: ^0.1.0 - version: 0.1.0(prettier-plugin-solidity@1.3.1)(prettier@3.3.3) + version: 0.1.0(prettier-plugin-solidity@1.3.1(prettier@3.3.3))(prettier@3.3.3) ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@20.14.10)(typescript@5.5.3) @@ -376,7 +376,6 @@ packages: ds-test@https://codeload.github.com/dapphub/ds-test/tar.gz/e282159d5170298eb2455a6c05280ab5a73a4ef0: resolution: {tarball: https://codeload.github.com/dapphub/ds-test/tar.gz/e282159d5170298eb2455a6c05280ab5a73a4ef0} - name: ds-test version: 1.0.0 elliptic@6.5.4: @@ -409,7 +408,6 @@ packages: forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/07263d193d621c4b2b0ce8b4d54af58f6957d97d: resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/07263d193d621c4b2b0ce8b4d54af58f6957d97d} - name: forge-std version: 1.9.1 form-data-encoder@2.1.4: @@ -994,7 +992,7 @@ snapshots: undici-types: 5.26.5 abitype@1.0.5(typescript@5.5.3): - dependencies: + optionalDependencies: typescript: 5.5.3 acorn-walk@8.3.3: @@ -1105,6 +1103,7 @@ snapshots: js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 + optionalDependencies: typescript: 5.5.3 create-require@1.1.1: {} @@ -1393,7 +1392,7 @@ snapshots: transitivePeerDependencies: - typescript - solhint-plugin-prettier@0.1.0(prettier-plugin-solidity@1.3.1)(prettier@3.3.3): + solhint-plugin-prettier@0.1.0(prettier-plugin-solidity@1.3.1(prettier@3.3.3))(prettier@3.3.3): dependencies: '@prettier/sync': 0.3.0(prettier@3.3.3) prettier: 3.3.3 @@ -1496,8 +1495,9 @@ snapshots: '@scure/bip39': 1.3.0 abitype: 1.0.5(typescript@5.5.3) isows: 1.0.4(ws@8.17.1) - typescript: 5.5.3 ws: 8.17.1 + optionalDependencies: + typescript: 5.5.3 transitivePeerDependencies: - bufferutil - utf-8-validate diff --git a/contracts/script/DeployIPTokenStaking.sol b/contracts/script/DeployIPTokenStaking.sol index 370d310b..a2ceed81 100644 --- a/contracts/script/DeployIPTokenStaking.sol +++ b/contracts/script/DeployIPTokenStaking.sol @@ -5,6 +5,7 @@ pragma solidity ^0.8.23; import { Script } from "forge-std/Script.sol"; import { console2 } from "forge-std/console2.sol"; +import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; import { IPTokenStaking } from "../src/protocol/IPTokenStaking.sol"; @@ -23,17 +24,20 @@ contract DeployIPTokenStaking is Script { uint256 deployerKey = vm.envUint("IPTOKENSTAKING_DEPLOYER_KEY"); vm.startBroadcast(deployerKey); - IPTokenStaking ipTokenStaking = new IPTokenStaking( - protocolAccessManagerAddr, - 1 ether, // minStakeAmount - 1 ether, // minUnstakeAmount - 1 ether, // minRedelegateAmount - 1 gwei, // stakingRounding - 7 days, // withdrawalAddressChangeInterval - 1000, // defaultCommissionRate, 10% - 5000, // defaultMaxCommissionRate, 50% - 500 // defaultMaxCommissionChangeRate, 5% + address impl = address( + new IPTokenStaking( + 1 gwei, // stakingRounding + 1000, // defaultCommissionRate, 10% + 5000, // defaultMaxCommissionRate, 50% + 500 // defaultMaxCommissionChangeRate, 5% + ) ); + //1 ether, // minStakeAmount + //1 ether, // minUnstakeAmount + //1 ether, // minRedelegateAmount + //7 days, // withdrawalAddressChangeInterval + + IPTokenStaking ipTokenStaking = IPTokenStaking(address(new ERC1967Proxy(impl, ""))); vm.stopBroadcast(); console2.log("IPTokenStaking deployed at:", address(ipTokenStaking)); diff --git a/contracts/script/utils/EIP1967Helper.sol b/contracts/script/utils/EIP1967Helper.sol new file mode 100644 index 00000000..b9c125c8 --- /dev/null +++ b/contracts/script/utils/EIP1967Helper.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +/* solhint-disable max-line-length */ +pragma solidity ^0.8.23; + +import { Vm } from "forge-std/Vm.sol"; + +/// @title EIP1967Helper +/// @dev Testing library to help with reading EIP 1967 variables from state +/// @custom:attribution https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/test/mocks/EIP1967Helper.sol +library EIP1967Helper { + /// @notice The storage slot that holds the address of a proxy implementation. + /// @dev `bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)` + bytes32 internal constant PROXY_IMPLEMENTATION_SLOT = + 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; + + /// @notice The storage slot that holds the address of the owner. + /// @dev `bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)` + bytes32 internal constant PROXY_ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; + + Vm internal constant vm = Vm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); + + function getAdmin(address _proxy) internal view returns (address) { + return address(uint160(uint256(vm.load(address(_proxy), PROXY_ADMIN_SLOT)))); + } + + function setAdmin(address _addr, address _admin) internal { + vm.store(_addr, PROXY_ADMIN_SLOT, bytes32(uint256(uint160(_admin)))); + } + + function getImplementation(address _proxy) internal view returns (address) { + return address(uint160(uint256(vm.load(address(_proxy), PROXY_IMPLEMENTATION_SLOT)))); + } + + function setImplementation(address _addr, address _impl) internal { + vm.store(_addr, PROXY_IMPLEMENTATION_SLOT, bytes32(uint256(uint160(_impl)))); + } +} diff --git a/contracts/script/utils/InitializableHelper.sol b/contracts/script/utils/InitializableHelper.sol new file mode 100644 index 00000000..3ac1600d --- /dev/null +++ b/contracts/script/utils/InitializableHelper.sol @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.23; + +import { Vm } from "forge-std/Vm.sol"; + +/** + * @title InitializableHelper + * @notice Helper library to read / manipulate OpenZeppelin v5 Initializable storage + */ +library InitializableHelper { + Vm internal constant vm = Vm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); + + // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) + bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; + + // INITIALIZABLE_STORAGE stores the following struct: + // + // struct InitializableStorage { + // /** + // * @dev Indicates that the contract has been initialized. + // */ + // uint64 _initialized; + // /** + // * @dev Indicates that the contract is in the process of being initialized. + // */ + // bool _initializing; + // } + + /** + * @notice Returns the Initializable._initialized value for a given address, at slot 0. + * @dev Reverts in _initializing. + */ + function getInitialized(address addr) internal view returns (uint64) { + // _initialized is the first field in the storage layout + bytes32 slot = vm.load(addr, INITIALIZABLE_STORAGE); + + // if _initializing is false, it's bit will be 0, and will not affect uint conversion + // if _initializing is true, it's bit will be 1, and will affect uint conversion + // we therefore require it is 0 + require(uint256(slot) <= uint256(type(uint64).max), "initializing"); + + return uint64(uint256(slot)); + } + + /** + * @notice Returns true if the address has been initialized. + */ + function isInitialized(address addr) internal view returns (bool) { + return getInitialized(addr) == uint64(1); + } + + /** + * @notice Returns true if the initializers are disabled for a given address. + */ + function areInitializersDisabled(address addr) internal view returns (bool) { + return getInitialized(addr) == type(uint64).max; + } + + /** + * @notice Disables the initializers for a given address. + * @dev Sets _initialized to max uint64 (0xFFFFFFFFFFFFFFFF), which disables all initializers. + */ + function disableInitializers(address addr) internal { + vm.store(addr, INITIALIZABLE_STORAGE, bytes32(uint256(type(uint64).max))); + } +} diff --git a/contracts/src/libraries/Predeploys.sol b/contracts/src/libraries/Predeploys.sol new file mode 100644 index 00000000..1099cb8e --- /dev/null +++ b/contracts/src/libraries/Predeploys.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity =0.8.24; + +/** + * @title Predeploys + * @notice Predeploy addresses (match story/genutil/evm/predeploys.go) + */ +library Predeploys { + address internal constant Namespace = 0xCCcCCc0000000000000000000000000000000000; + uint256 internal constant NamespaceSize = 1024; + + /// @notice Predeploys + address internal constant WIP = 0x1513000000000000000000000000000000000000; + address internal constant Staking = 0xCCcCcC0000000000000000000000000000000001; + address internal constant Slashing = 0xCccCCC0000000000000000000000000000000002; + address internal constant Upgrade = 0xccCCcc0000000000000000000000000000000003; + + /// @notice Return true if `addr` is not proxied + function notProxied(address addr) internal pure returns (bool) { + return addr == WIP; + } + + /// @notice Return implementation address for a proxied predeploy + function impl(address addr) internal pure returns (address) { + require(isPredeploy(addr), "Predeploys: not a predeploy"); + require(!notProxied(addr), "Predeploys: not proxied"); + + // max uint160 is odd, which gives us unique implementation for each predeploy + return address(type(uint160).max - uint160(addr)); + } + + /// @notice Return true if `addr` is an active predeploy + function isActivePredeploy(address addr) internal pure returns (bool) { + return addr == WIP || addr == Staking || addr == Slashing || addr == Upgrade; + } + + /// @notice Return true if `addr` is in some predeploy namespace + function isPredeploy(address addr) internal pure returns (bool) { + return (uint160(addr) >> 11 == uint160(Namespace) >> 11); + } +} diff --git a/contracts/src/libraries/Secp256k1.sol b/contracts/src/libraries/Secp256k1.sol index 9d0d8dfd..547386be 100644 --- a/contracts/src/libraries/Secp256k1.sol +++ b/contracts/src/libraries/Secp256k1.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.23; library Secp256k1 { /// @notice Compress an uncompressed 65-byte Secp256k1 public key. /// @dev Assumes that the input is a valid 65-byte uncompressed public key. - function compressPublicKey(bytes memory uncompressedKey) public pure returns (bytes memory) { + function compressPublicKey(bytes memory uncompressedKey) internal pure returns (bytes memory) { require(uncompressedKey.length == 65, "Invalid uncompressed public key length"); // Extract the X and Y coordinates diff --git a/contracts/src/protocol/IPTokenSlashing.sol b/contracts/src/protocol/IPTokenSlashing.sol index d4b22ef3..c2fa3f2f 100644 --- a/contracts/src/protocol/IPTokenSlashing.sol +++ b/contracts/src/protocol/IPTokenSlashing.sol @@ -1,7 +1,8 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.23; -import { Ownable, Ownable2Step } from "@openzeppelin/contracts/access/Ownable2Step.sol"; +import { Ownable2StepUpgradeable } from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; +import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import { IIPTokenSlashing } from "../interfaces/IIPTokenSlashing.sol"; import { IPTokenStaking } from "./IPTokenStaking.sol"; @@ -12,18 +13,26 @@ import { Secp256k1 } from "../libraries/Secp256k1.sol"; * @notice The EVM interface to the consensus chain's x/slashing module. Calls are proxied to the consensus chain, but * not executed synchronously; execution is left to the consensus chain, which may fail. */ -contract IPTokenSlashing is IIPTokenSlashing, Ownable2Step { +contract IPTokenSlashing is IIPTokenSlashing, Ownable2StepUpgradeable, UUPSUpgradeable { /// @notice IPTokenStaking contract address. IPTokenStaking public immutable IP_TOKEN_STAKING; /// @notice The fee paid to unjail a validator. uint256 public unjailFee; - constructor(address newOwner, address ipTokenStaking, uint256 newUnjailFee) Ownable(newOwner) { - require(newUnjailFee > 0, "IPTokenSlashing: Invalid unjail fee"); + constructor(address ipTokenStaking) { require(ipTokenStaking != address(0), "IPTokenSlashing: Invalid IPTokenStaking address"); IP_TOKEN_STAKING = IPTokenStaking(ipTokenStaking); + _disableInitializers(); + } + + /// @notice Initializes the contract. + function initialize(address accessManager, uint256 newUnjailFee) public initializer { + __UUPSUpgradeable_init(); + __Ownable_init(accessManager); + require(newUnjailFee > 0, "IPTokenSlashing: Invalid unjail fee"); unjailFee = newUnjailFee; + emit UnjailFeeSet(newUnjailFee); } /// @notice Verifies that the given 65 byte uncompressed secp256k1 public key (with 0x04 prefix) is valid and @@ -87,4 +96,8 @@ contract IPTokenSlashing is IIPTokenSlashing, Ownable2Step { (bool validatorExists, , , , , ) = IP_TOKEN_STAKING.validatorMetadata(validatorCmpPubkey); require(validatorExists, "IPTokenSlashing: Validator does not exist"); } + + /// @dev Hook to authorize the upgrade according to UUPSUpgradeable + /// @param newImplementation The address of the new implementation + function _authorizeUpgrade(address newImplementation) internal override onlyOwner {} } diff --git a/contracts/src/protocol/IPTokenStaking.sol b/contracts/src/protocol/IPTokenStaking.sol index fb2a6390..3a81b62c 100644 --- a/contracts/src/protocol/IPTokenStaking.sol +++ b/contracts/src/protocol/IPTokenStaking.sol @@ -1,8 +1,9 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.23; -import { Ownable, Ownable2Step } from "@openzeppelin/contracts/access/Ownable2Step.sol"; -import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; +import { Ownable2StepUpgradeable } from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; +import { ReentrancyGuardUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; +import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { IIPTokenStaking } from "../interfaces/IIPTokenStaking.sol"; @@ -12,7 +13,7 @@ import { Secp256k1 } from "../libraries/Secp256k1.sol"; * @title IPTokenStaking * @notice The deposit contract for IP token staked validators. */ -contract IPTokenStaking is IIPTokenStaking, Ownable2Step, ReentrancyGuard { +contract IPTokenStaking is IIPTokenStaking, Ownable2StepUpgradeable, ReentrancyGuardUpgradeable, UUPSUpgradeable { using EnumerableSet for EnumerableSet.AddressSet; /// @notice Default commission rate for a validator. Out of 100%, or 10_000. @@ -61,23 +62,12 @@ contract IPTokenStaking is IIPTokenStaking, Ownable2Step, ReentrancyGuard { mapping(bytes delegatorCmpPubkey => uint256 lastChange) public withdrawalAddressChange; constructor( - address newOwner, - uint256 _minStakeAmount, - uint256 _minUnstakeAmount, - uint256 _minRedelegateAmount, uint256 stakingRounding, - uint256 _withdrawalAddressChangeInterval, uint32 defaultCommissionRate, uint32 defaultMaxCommissionRate, uint32 defaultMaxCommissionChangeRate - ) Ownable(newOwner) { + ) { STAKE_ROUNDING = stakingRounding; // Recommended: 1 gwei (10^9) - - _setMinStakeAmount(_minStakeAmount); - _setMinUnstakeAmount(_minUnstakeAmount); - _setMinRedelegateAmount(_minRedelegateAmount); - _setWithdrawalAddressChangeInterval(_withdrawalAddressChangeInterval); - require(defaultCommissionRate <= 10_000, "IPTokenStaking: Invalid default commission rate"); DEFAULT_COMMISSION_RATE = defaultCommissionRate; // Recommended: 10%, or 1_000 / 10_000 @@ -89,6 +79,25 @@ contract IPTokenStaking is IIPTokenStaking, Ownable2Step, ReentrancyGuard { require(defaultMaxCommissionChangeRate <= 10_000, "IPTokenStaking: Invalid default max commission change rate"); DEFAULT_MAX_COMMISSION_CHANGE_RATE = defaultMaxCommissionChangeRate; // Recommended: 5%, or 500 / 10_000 + + _disableInitializers(); + } + + /// @notice Initializes the contract. + function initialize( + address accessManager, + uint256 _minStakeAmount, + uint256 _minUnstakeAmount, + uint256 _minRedelegateAmount, + uint256 _withdrawalAddressChangeInterval + ) public initializer { + __ReentrancyGuard_init(); + __UUPSUpgradeable_init(); + __Ownable_init(accessManager); + _setMinStakeAmount(_minStakeAmount); + _setMinUnstakeAmount(_minUnstakeAmount); + _setMinRedelegateAmount(_minRedelegateAmount); + _setWithdrawalAddressChangeInterval(_withdrawalAddressChangeInterval); } /// @notice Verifies that the syntax of the given public key is a 33 byte compressed secp256k1 public key. @@ -528,4 +537,8 @@ contract IPTokenStaking is IIPTokenStaking, Ownable2Step, ReentrancyGuard { (bool success, ) = msg.sender.call{ value: remainder }(""); require(success, "IPTokenStaking: Failed to refund remainder"); } + + /// @dev Hook to authorize the upgrade according to UUPSUpgradeable + /// @param newImplementation The address of the new implementation + function _authorizeUpgrade(address newImplementation) internal override onlyOwner {} } diff --git a/contracts/src/protocol/UpgradeEntrypoint.sol b/contracts/src/protocol/UpgradeEntrypoint.sol index 1e72a64e..f7f387dd 100644 --- a/contracts/src/protocol/UpgradeEntrypoint.sol +++ b/contracts/src/protocol/UpgradeEntrypoint.sol @@ -1,7 +1,8 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.23; -import { Ownable, Ownable2Step } from "@openzeppelin/contracts/access/Ownable2Step.sol"; +import { Ownable2StepUpgradeable } from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; +import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import { IUpgradeEntrypoint } from "../interfaces/IUpgradeEntrypoint.sol"; @@ -9,8 +10,17 @@ import { IUpgradeEntrypoint } from "../interfaces/IUpgradeEntrypoint.sol"; * @title UpgradeEntrypoint * @notice Entrypoint contract for submitting x/upgrade module actions. */ -contract UpgradeEntrypoint is IUpgradeEntrypoint, Ownable2Step { - constructor(address newOwner) Ownable(newOwner) {} +contract UpgradeEntrypoint is IUpgradeEntrypoint, Ownable2StepUpgradeable, UUPSUpgradeable { + constructor() { + _disableInitializers(); + } + + /// @notice Initializes the contract. + function initialize(address accessManager) public initializer { + require(accessManager != address(0), "UpgradeEntrypoint: accessManager cannot be zero address"); + __UUPSUpgradeable_init(); + __Ownable_init(accessManager); + } /// @notice Submits an upgrade plan. /// @param name Sets the name for the upgrade. This name will be used by the upgraded version of the software to @@ -24,4 +34,8 @@ contract UpgradeEntrypoint is IUpgradeEntrypoint, Ownable2Step { function planUpgrade(string calldata name, int64 height, string calldata info) external onlyOwner { emit SoftwareUpgrade({ name: name, height: height, info: info }); } + + /// @dev Hook to authorize the upgrade according to UUPSUpgradeable + /// @param newImplementation The address of the new implementation + function _authorizeUpgrade(address newImplementation) internal override onlyOwner {} } diff --git a/contracts/test/stake/IPTokenSlashing.t.sol b/contracts/test/stake/IPTokenSlashing.t.sol index 903df5a7..c36e2c43 100644 --- a/contracts/test/stake/IPTokenSlashing.t.sol +++ b/contracts/test/stake/IPTokenSlashing.t.sol @@ -5,15 +5,11 @@ pragma solidity ^0.8.23; /// NOTE: pragma allowlist-secret must be inline (same line as the pubkey hex string) to avoid false positive /// flag "Hex High Entropy String" in CI run detect-secrets -import { Test } from "forge-std/Test.sol"; +import { IIPTokenSlashing } from "../../src/protocol/IPTokenSlashing.sol"; -import { IPTokenSlashing, IIPTokenSlashing } from "../../src/protocol/IPTokenSlashing.sol"; -import { IPTokenStaking } from "../../src/protocol/IPTokenStaking.sol"; +import { Test } from "../utils/Test.sol"; contract IPTokenSlashingTest is Test { - IPTokenSlashing private ipTokenSlashing; - IPTokenStaking private ipTokenStaking; - bytes private delegatorUncmpPubkey = hex"04e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa988ced195e9327ac89cd362eaa0397f8d7f007c02b2a75642f174e455d339e4a1efe47b"; // pragma: allowlist-secret // Address matching delegatorUncmpPubkey @@ -28,26 +24,9 @@ contract IPTokenSlashingTest is Test { emit Received(msg.sender, msg.value); } - function setUp() public { - address protocolAccessManagerAddr = address(this); - - ipTokenStaking = new IPTokenStaking( - protocolAccessManagerAddr, - 1 ether, // minStakeAmount - 1 ether, // minUnstakeAmount - 1 ether, // minRedelegateAmount - 1 gwei, // stakingRounding - 7 days, // withdrawalAddressChangeInterval - 1000, // defaultCommissionRate, 10% - 5000, // defaultMaxCommissionRate, 50% - 500 // defaultMaxCommissionChangeRate, 5% - ); - - ipTokenSlashing = new IPTokenSlashing( - protocolAccessManagerAddr, - address(ipTokenStaking), - 1 ether // unjailFee - ); + function setUp() public override { + setStaking(); + setSlashing(); } function testIPTokenSlashing_Parameters() public view { @@ -170,7 +149,7 @@ contract IPTokenSlashingTest is Test { uint256 newUnjailFee = 2 ether; vm.expectEmit(address(ipTokenSlashing)); emit IIPTokenSlashing.UnjailFeeSet(newUnjailFee); - vm.prank(address(this)); + vm.prank(admin); ipTokenSlashing.setUnjailFee(newUnjailFee); assertEq(ipTokenSlashing.unjailFee(), newUnjailFee); diff --git a/contracts/test/stake/IPTokenStaking.t.sol b/contracts/test/stake/IPTokenStaking.t.sol index 15fb86c0..89a38b09 100644 --- a/contracts/test/stake/IPTokenStaking.t.sol +++ b/contracts/test/stake/IPTokenStaking.t.sol @@ -5,14 +5,14 @@ pragma solidity ^0.8.23; /// NOTE: pragma allowlist-secret must be inline (same line as the pubkey hex string) to avoid false positive /// flag "Hex High Entropy String" in CI run detect-secrets -import { Test } from "forge-std/Test.sol"; +import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; import { IPTokenStaking, IIPTokenStaking } from "../../src/protocol/IPTokenStaking.sol"; import { Secp256k1 } from "../../src/libraries/Secp256k1.sol"; -contract IPTokenStakingTest is Test { - IPTokenStaking private ipTokenStaking; +import { Test } from "../utils/Test.sol"; +contract IPTokenStakingTest is Test { bytes private delegatorUncmpPubkey = hex"04e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa988ced195e9327ac89cd362eaa0397f8d7f007c02b2a75642f174e455d339e4a1efe47b"; // pragma: allowlist-secret // Address matching delegatorUncmpPubkey @@ -27,133 +27,67 @@ contract IPTokenStakingTest is Test { emit Received(msg.sender, msg.value); } - function setUp() public { - address protocolAccessManagerAddr = address(this); - - ipTokenStaking = new IPTokenStaking( - protocolAccessManagerAddr, - 1 ether, // minStakeAmount - 1 ether, // minUnstakeAmount - 1 ether, // minRedelegateAmount - 1 gwei, // stakingRounding - 7 days, // withdrawalAddressChangeInterval - 1000, // defaultCommissionRate, 10% - 5000, // defaultMaxCommissionRate, 50% - 500 // defaultMaxCommissionChangeRate, 5% - ); + function setUp() public override { + setStaking(); vm.assertEq(delegatorCmpPubkey, Secp256k1.compressPublicKey(delegatorUncmpPubkey)); } function testIPTokenStaking_Constructor() public { - vm.expectRevert("IPTokenStaking: minStakeAmount cannot be 0"); - new IPTokenStaking( - address(this), - 0, // minStakeAmount - 1 ether, // minUnstakeAmount - 1 ether, // minRedelegateAmount - 1 gwei, // stakingRounding - 7 days, // withdrawalAddressChangeInterval - 1000, // defaultCommissionRate, 10% - 5000, // defaultMaxCommissionRate, 50% - 500 // defaultMaxCommissionChangeRate, 5% - ); - vm.expectRevert("IPTokenStaking: minUnstakeAmount cannot be 0"); - new IPTokenStaking( - address(this), - 1 ether, // minStakeAmount - 0, // minUnstakeAmount - 1 ether, // minRedelegateAmount - 1 gwei, // stakingRounding - 7 days, // withdrawalAddressChangeInterval - 1000, // defaultCommissionRate, 10% - 5000, // defaultMaxCommissionRate, 50% - 500 // defaultMaxCommissionChangeRate, 5% - ); - vm.expectRevert("IPTokenStaking: minRedelegateAmount cannot be 0"); - new IPTokenStaking( - address(this), - 1 ether, // minStakeAmount - 1 ether, // minUnstakeAmount - 0, // minRedelegateAmount - 1 gwei, // stakingRounding - 7 days, // withdrawalAddressChangeInterval - 1000, // defaultCommissionRate, 10% - 5000, // defaultMaxCommissionRate, 50% - 500 // defaultMaxCommissionChangeRate, 5% - ); - vm.expectRevert(); - new IPTokenStaking( - address(this), - 1 ether, // minStakeAmount - 1 ether, // minUnstakeAmount - 1 ether, // minRedelegateAmount - 0, // stakingRounding - 7 days, // withdrawalAddressChangeInterval - 1000, // defaultCommissionRate, 10% - 5000, // defaultMaxCommissionRate, 50% - 500 // defaultMaxCommissionChangeRate, 5% - ); - vm.expectRevert("IPTokenStaking: newWithdrawalAddressChangeInterval cannot be 0"); - new IPTokenStaking( - address(this), - 1 ether, // minStakeAmount - 1 ether, // minUnstakeAmount - 1 ether, // minRedelegateAmount - 1 gwei, // stakingRounding - 0, // withdrawalAddressChangeInterval - 1000, // defaultCommissionRate, 10% - 5000, // defaultMaxCommissionRate, 50% - 500 // defaultMaxCommissionChangeRate, 5% - ); vm.expectRevert("IPTokenStaking: Invalid default commission rate"); new IPTokenStaking( - address(this), - 1 ether, // minStakeAmount - 1 ether, // minUnstakeAmount - 1 ether, // minRedelegateAmount 1 gwei, // stakingRounding - 7 days, // withdrawalAddressChangeInterval 10_001, // defaultCommissionRate, 10% 5000, // defaultMaxCommissionRate, 50% 500 // defaultMaxCommissionChangeRate, 5% ); vm.expectRevert("IPTokenStaking: Invalid default max commission rate"); new IPTokenStaking( - address(this), - 1 ether, // minStakeAmount - 1 ether, // minUnstakeAmount - 1 ether, // minRedelegateAmount 1 gwei, // stakingRounding - 7 days, // withdrawalAddressChangeInterval 1000, // defaultCommissionRate, 10% 10_001, // defaultMaxCommissionRate, 50% 500 // defaultMaxCommissionChangeRate, 5% ); vm.expectRevert("IPTokenStaking: Invalid default max commission rate"); new IPTokenStaking( - address(this), - 1 ether, // minStakeAmount - 1 ether, // minUnstakeAmount - 1 ether, // minRedelegateAmount 1 gwei, // stakingRounding - 7 days, // withdrawalAddressChangeInterval 1000, // defaultCommissionRate, 10% 1, // defaultMaxCommissionRate, 50% 500 // defaultMaxCommissionChangeRate, 5% ); vm.expectRevert("IPTokenStaking: Invalid default max commission change rate"); new IPTokenStaking( - address(this), - 1 ether, // minStakeAmount - 1 ether, // minUnstakeAmount - 1 ether, // minRedelegateAmount 1 gwei, // stakingRounding - 7 days, // withdrawalAddressChangeInterval 1000, // defaultCommissionRate, 10% 5000, // defaultMaxCommissionRate, 50% 10_001 // defaultMaxCommissionChangeRate, 5% ); + + address impl = address( + new IPTokenStaking( + 0, // stakingRounding + 1000, // defaultCommissionRate, 10% + 5000, // defaultMaxCommissionRate, 50% + 500 // defaultMaxCommissionChangeRate, 5% + ) + ); + IPTokenStaking staking = IPTokenStaking(address(new ERC1967Proxy(impl, ""))); + + // IPTokenStaking: minStakeAmount cannot be 0 + vm.expectRevert(); + staking.initialize(admin, 0, 1 ether, 1 ether, 7 days); + + // IPTokenStaking: minUnstakeAmount cannot be 0 + vm.expectRevert(); + staking.initialize(admin, 1 ether, 0, 1 ether, 7 days); + + // IPTokenStaking: minRedelegateAmount cannot be 0 + vm.expectRevert(); + staking.initialize(admin, 1 ether, 1 ether, 0, 7 days); + + // IPTokenStaking: newWithdrawalAddressChangeInterval cannot be 0 + vm.expectRevert(); + staking.initialize(admin, 1 ether, 1 ether, 1 ether, 0); } function testIPTokenStaking_Parameters() public view { @@ -861,19 +795,19 @@ contract IPTokenStakingTest is Test { function testIPTokenStaking_setMinStakeAmount() public { // Set amount that will be rounded down to 0 - vm.prank(address(this)); + vm.prank(admin); ipTokenStaking.setMinStakeAmount(5 wei); assertEq(ipTokenStaking.minStakeAmount(), 0); // Set amount that will not be rounded - vm.prank(address(this)); + vm.prank(admin); vm.expectEmit(address(ipTokenStaking)); emit IIPTokenStaking.MinStakeAmountSet(1 ether); ipTokenStaking.setMinStakeAmount(1 ether); assertEq(ipTokenStaking.minStakeAmount(), 1 ether); // Set 0 - vm.prank(address(this)); + vm.prank(admin); vm.expectRevert("IPTokenStaking: minStakeAmount cannot be 0"); ipTokenStaking.setMinStakeAmount(0 ether); @@ -885,19 +819,19 @@ contract IPTokenStakingTest is Test { function testIPTokenStaking_setMinUnstakeAmount() public { // Set amount that will be rounded down to 0 - vm.prank(address(this)); + vm.prank(admin); ipTokenStaking.setMinUnstakeAmount(5 wei); assertEq(ipTokenStaking.minUnstakeAmount(), 0); // Set amount that will not be rounded - vm.prank(address(this)); + vm.prank(admin); vm.expectEmit(address(ipTokenStaking)); emit IIPTokenStaking.MinUnstakeAmountSet(1 ether); ipTokenStaking.setMinUnstakeAmount(1 ether); assertEq(ipTokenStaking.minUnstakeAmount(), 1 ether); // Set 0 - vm.prank(address(this)); + vm.prank(admin); vm.expectRevert("IPTokenStaking: minUnstakeAmount cannot be 0"); ipTokenStaking.setMinUnstakeAmount(0 ether); @@ -909,17 +843,17 @@ contract IPTokenStakingTest is Test { function testIPTokenStaking_setMinRedelegateAmount() public { // Set amount that will be rounded down to 0 - vm.prank(address(this)); + vm.prank(admin); ipTokenStaking.setMinRedelegateAmount(5 wei); assertEq(ipTokenStaking.minRedelegateAmount(), 0); // Set amount that will not be rounded - vm.prank(address(this)); + vm.prank(admin); ipTokenStaking.setMinRedelegateAmount(1 ether); assertEq(ipTokenStaking.minRedelegateAmount(), 1 ether); // Set 0 - vm.prank(address(this)); + vm.prank(admin); vm.expectRevert("IPTokenStaking: minRedelegateAmount cannot be 0"); ipTokenStaking.setMinRedelegateAmount(0 ether); diff --git a/contracts/test/upgrade/UpgradeEntryPoint.t.sol b/contracts/test/upgrade/UpgradeEntryPoint.t.sol index 93c76879..35ddc803 100644 --- a/contracts/test/upgrade/UpgradeEntryPoint.t.sol +++ b/contracts/test/upgrade/UpgradeEntryPoint.t.sol @@ -5,17 +5,16 @@ pragma solidity ^0.8.23; /// NOTE: pragma allowlist-secret must be inline (same line as the pubkey hex string) to avoid false positive /// flag "Hex High Entropy String" in CI run detect-secrets -import { Test } from "forge-std/Test.sol"; - import { UpgradeEntrypoint, IUpgradeEntrypoint } from "../../src/protocol/UpgradeEntrypoint.sol"; +import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; -contract UpgradeEntrypointTest is Test { - UpgradeEntrypoint private upgradeEntrypoint; - - function setUp() public { - address protocolAccessManagerAddr = address(this); +import { Test } from "../utils/Test.sol"; - upgradeEntrypoint = new UpgradeEntrypoint(protocolAccessManagerAddr); +contract UpgradeEntrypointTest is Test { + function setUp() public override { + address impl = address(new UpgradeEntrypoint()); + bytes memory initializer = abi.encodeCall(UpgradeEntrypoint.initialize, (admin)); + upgradeEntrypoint = UpgradeEntrypoint(address(new ERC1967Proxy(impl, initializer))); } function testUpgradeEntrypoint_planUpgrade() public { @@ -24,9 +23,9 @@ contract UpgradeEntrypointTest is Test { int64 height = 1; string memory info = "info"; - vm.prank(address(this)); vm.expectEmit(address(upgradeEntrypoint)); emit IUpgradeEntrypoint.SoftwareUpgrade(name, height, info); + vm.prank(admin); upgradeEntrypoint.planUpgrade(name, height, info); // Network shall not allow non-protocol owner to submit an upgrade plan. diff --git a/contracts/test/utils/Test.sol b/contracts/test/utils/Test.sol new file mode 100644 index 00000000..b5509d88 --- /dev/null +++ b/contracts/test/utils/Test.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.23; +/* solhint-disable no-console */ +/* solhint-disable max-line-length */ + +import { console2 } from "forge-std/console2.sol"; +import { Test as ForgeTest } from "forge-std/Test.sol"; +import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; + +import { IPTokenStaking } from "../../src/protocol/IPTokenStaking.sol"; +import { IPTokenSlashing } from "../../src/protocol/IPTokenSlashing.sol"; +import { UpgradeEntrypoint } from "../../src/protocol/UpgradeEntrypoint.sol"; + +contract Test is ForgeTest { + address internal admin = address(0x123); + + IPTokenStaking internal ipTokenStaking; + IPTokenSlashing internal ipTokenSlashing; + UpgradeEntrypoint internal upgradeEntrypoint; + + function setUp() public virtual { + setStaking(); + setSlashing(); + // setUpgrade(); + } + + function setStaking() internal { + address impl = address( + new IPTokenStaking( + 1 gwei, // stakingRounding + 1000, // defaultCommissionRate, 10% + 5000, // defaultMaxCommissionRate, 50% + 500 // defaultMaxCommissionChangeRate, 5% + ) + ); + bytes memory initializer = abi.encodeCall( + IPTokenStaking.initialize, + (admin, 1 ether, 1 ether, 1 ether, 7 days) + ); + ipTokenStaking = IPTokenStaking(address(new ERC1967Proxy(impl, initializer))); + } + + function setSlashing() internal { + require(address(ipTokenStaking) != address(0), "ipTokenStaking not set"); + + address impl = address(new IPTokenSlashing(address(ipTokenStaking))); + + bytes memory initializer = abi.encodeCall(IPTokenSlashing.initialize, (admin, 1 ether)); + ipTokenSlashing = IPTokenSlashing(address(new ERC1967Proxy(impl, initializer))); + + console2.log("unjailFee:", ipTokenSlashing.unjailFee()); + } + + function setUpgrade() internal { + address impl = address(new UpgradeEntrypoint()); + + bytes memory initializer = abi.encodeWithSignature("initialize(address)", admin); + upgradeEntrypoint = UpgradeEntrypoint(address(new ERC1967Proxy(impl, initializer))); + } +}