From 7aedb4382d9fc0e6267c80a507133f5ecb3b21d3 Mon Sep 17 00:00:00 2001 From: Jongwon Park Date: Sat, 24 Aug 2024 00:48:55 +0900 Subject: [PATCH] feat(contracts): add event params & make explicit un/cmp names (#11) * feat(contracts): add event params & explicit cmp/uncmp names * test(contracts): test updated staking * config(contracts): optimizer and via-ir * chore(contracts): contract bindings * chore(x/evmstaking): rename parsed event params * lint(contracts): lint test * fix(contracts): solidity version * chore(contracts): update staking bindings & test, and lint --- client/cmd/init.go | 1 + client/x/evmstaking/keeper/deposit.go | 4 +- client/x/evmstaking/keeper/redelegation.go | 2 +- .../x/evmstaking/keeper/redelegation_test.go | 2 +- client/x/evmstaking/keeper/set_address.go | 2 +- client/x/evmstaking/keeper/validator.go | 2 +- client/x/evmstaking/keeper/withdraw.go | 4 +- contracts/bindings/iptokenstaking.go | 200 +++++++++--------- contracts/bindings/iptokenstaking_more.go | 2 +- .../iptokenstaking_storage_layout.json | 56 ++--- contracts/foundry.toml | 7 + contracts/src/interfaces/IIPTokenStaking.sol | 57 ++--- contracts/src/libraries/Predeploys.sol | 2 +- contracts/src/protocol/IPTokenStaking.sol | 140 ++++++------ contracts/test/stake/IPTokenStaking.t.sol | 156 +++++++++----- 15 files changed, 354 insertions(+), 283 deletions(-) diff --git a/client/cmd/init.go b/client/cmd/init.go index 4518ce9f..55e1dab2 100644 --- a/client/cmd/init.go +++ b/client/cmd/init.go @@ -294,5 +294,6 @@ func SplitAndTrim(input string) []string { ret = append(ret, r) } } + return ret } diff --git a/client/x/evmstaking/keeper/deposit.go b/client/x/evmstaking/keeper/deposit.go index 3ea4af2d..8727e37b 100644 --- a/client/x/evmstaking/keeper/deposit.go +++ b/client/x/evmstaking/keeper/deposit.go @@ -16,12 +16,12 @@ import ( ) func (k Keeper) ProcessDeposit(ctx context.Context, ev *bindings.IPTokenStakingDeposit) error { - depositorPubkey, err := k1util.PubKeyBytesToCosmos(ev.DepositorPubkey) + depositorPubkey, err := k1util.PubKeyBytesToCosmos(ev.DelegatorCmpPubkey) if err != nil { return errors.Wrap(err, "depositor pubkey to cosmos") } - validatorPubkey, err := k1util.PubKeyBytesToCosmos(ev.ValidatorPubkey) + validatorPubkey, err := k1util.PubKeyBytesToCosmos(ev.ValidatorCmpPubkey) if err != nil { return errors.Wrap(err, "validator pubkey to cosmos") } diff --git a/client/x/evmstaking/keeper/redelegation.go b/client/x/evmstaking/keeper/redelegation.go index c2a40822..eb4e5072 100644 --- a/client/x/evmstaking/keeper/redelegation.go +++ b/client/x/evmstaking/keeper/redelegation.go @@ -15,7 +15,7 @@ import ( ) func (k Keeper) ProcessRedelegate(ctx context.Context, ev *bindings.IPTokenStakingRedelegate) error { - depositorPubkey, err := k1util.PubKeyBytesToCosmos(ev.DepositorPubkey) + depositorPubkey, err := k1util.PubKeyBytesToCosmos(ev.DelegatorCmpPubkey) if err != nil { return errors.Wrap(err, "depositor pubkey to cosmos") } diff --git a/client/x/evmstaking/keeper/redelegation_test.go b/client/x/evmstaking/keeper/redelegation_test.go index 79ae8ec6..49fa1a82 100644 --- a/client/x/evmstaking/keeper/redelegation_test.go +++ b/client/x/evmstaking/keeper/redelegation_test.go @@ -85,7 +85,7 @@ func (s *TestSuite) TestRedelegation() { redelTokens := stakingKeeper.TokensFromConsensusPower(ctx, 5) ipTokenRedelegate := &bindings.IPTokenStakingRedelegate{ - DepositorPubkey: pubKeys[0].Bytes(), + DelegatorCmpPubkey: pubKeys[0].Bytes(), ValidatorSrcPubkey: pubKeys[1].Bytes(), ValidatorDstPubkey: pubKeys[2].Bytes(), Amount: big.NewInt(redelTokens.Int64()), // multiply power reduction of 1000000 diff --git a/client/x/evmstaking/keeper/set_address.go b/client/x/evmstaking/keeper/set_address.go index c8f1a276..900c10d4 100644 --- a/client/x/evmstaking/keeper/set_address.go +++ b/client/x/evmstaking/keeper/set_address.go @@ -12,7 +12,7 @@ import ( ) func (k Keeper) ProcessSetWithdrawalAddress(ctx context.Context, ev *bindings.IPTokenStakingSetWithdrawalAddress) error { - depositorPubkey, err := k1util.PubKeyBytesToCosmos(ev.DepositorPubkey) + depositorPubkey, err := k1util.PubKeyBytesToCosmos(ev.DelegatorCmpPubkey) if err != nil { return errors.Wrap(err, "depositor pubkey to cosmos") } diff --git a/client/x/evmstaking/keeper/validator.go b/client/x/evmstaking/keeper/validator.go index 1cfb6525..734c1e0d 100644 --- a/client/x/evmstaking/keeper/validator.go +++ b/client/x/evmstaking/keeper/validator.go @@ -19,7 +19,7 @@ import ( func (k Keeper) ProcessCreateValidator(ctx context.Context, ev *bindings.IPTokenStakingCreateValidator) error { // When creating a validator, it's self-delegation. Thus, validator pubkey is also delegation pubkey. - validatorPubkey, err := k1util.PubKeyBytesToCosmos(ev.ValidatorPubkey) + validatorPubkey, err := k1util.PubKeyBytesToCosmos(ev.ValidatorCmpPubkey) if err != nil { return errors.Wrap(err, "validator pubkey to cosmos") } diff --git a/client/x/evmstaking/keeper/withdraw.go b/client/x/evmstaking/keeper/withdraw.go index 72de3aec..38311b64 100644 --- a/client/x/evmstaking/keeper/withdraw.go +++ b/client/x/evmstaking/keeper/withdraw.go @@ -236,12 +236,12 @@ func (k Keeper) EnqueueEligiblePartialWithdrawal(ctx context.Context, withdrawal } func (k Keeper) ProcessWithdraw(ctx context.Context, ev *bindings.IPTokenStakingWithdraw) error { - depositorPubkey, err := k1util.PubKeyBytesToCosmos(ev.DepositorPubkey) + depositorPubkey, err := k1util.PubKeyBytesToCosmos(ev.DelegatorCmpPubkey) if err != nil { return errors.Wrap(err, "depositor pubkey to cosmos") } - validatorPubkey, err := k1util.PubKeyBytesToCosmos(ev.ValidatorPubkey) + validatorPubkey, err := k1util.PubKeyBytesToCosmos(ev.ValidatorCmpPubkey) if err != nil { return errors.Wrap(err, "validator pubkey to cosmos") } diff --git a/contracts/bindings/iptokenstaking.go b/contracts/bindings/iptokenstaking.go index 01a0feac..cc7979e6 100644 --- a/contracts/bindings/iptokenstaking.go +++ b/contracts/bindings/iptokenstaking.go @@ -31,16 +31,16 @@ var ( // IIPTokenStakingRedelegateParams is an auto generated low-level Go binding around an user-defined struct. type IIPTokenStakingRedelegateParams struct { - DelegatorUncmpPubkey []byte - ValidatorSrcPubkey []byte - ValidatorDstPubkey []byte - Amount *big.Int + DelegatorUncmpPubkey []byte + ValidatorCmpSrcPubkey []byte + ValidatorCmpDstPubkey []byte + Amount *big.Int } // IPTokenStakingMetaData contains all meta data concerning the IPTokenStaking contract. var IPTokenStakingMetaData = &bind.MetaData{ - 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", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"stakingRounding\",\"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\":\"validatorUncmpPubkey\",\"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\"},{\"name\":\"_minStakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minUnstakeAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_minRedelegateAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_withdrawalAddressChangeInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"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\":\"validatorCmpSrcPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorCmpDstPubkey\",\"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\":\"validatorCmpSrcPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorCmpDstPubkey\",\"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\":\"validatorCmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"stakeOnBehalf\",\"inputs\":[{\"name\":\"delegatorUncmpPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"validatorCmpPubkey\",\"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\":\"validatorCmpPubkey\",\"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\":\"validatorCmpPubkey\",\"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\":\"validatorUncmpPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"validatorCmpPubkey\",\"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\":\"delegatorUncmpPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"delegatorCmpPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"validatorCmpPubkey\",\"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\":\"delegatorCmpPubkey\",\"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\":\"delegatorCmpPubkey\",\"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\":\"delegatorCmpPubkey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"validatorCmpPubkey\",\"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: "0x61012034620002ca57601f62003f1238819003918201601f19168301916001600160401b039182841185851017620002cf578160809286926040968752833981010312620002ca578251926200005860208201620002e5565b6200007360606200006b868501620002e5565b9301620002e5565b913060805261010095865263ffffffff90818316612710938482116200027f5760a0528383831691821015918262000273575b5050156200021a5760c052821611620001c15760e0527ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a009081549060ff82851c16620001b05780808316036200016b575b50505051613bfa9182620002f88339608051828181610a4a0152610c21015260a0518281816109b10152611982015260c05182818161084d015261098f015260e05182818161096d0152611f000152518181816119be015281816126180152818161329c0152818161344401526135380152f35b6001600160401b0319909116811790915581519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a1388080620000f7565b835163f92ee8a960e01b8152600490fd5b825162461bcd60e51b815260206004820152603a602482015260008051602062003ef283398151915260448201527f6d617820636f6d6d697373696f6e206368616e676520726174650000000000006064820152608490fd5b855162461bcd60e51b8152602060048201526033602482015260008051602062003ef283398151915260448201527f6d617820636f6d6d697373696f6e2072617465000000000000000000000000006064820152608490fd5b111590508338620000a6565b875162461bcd60e51b815260206004820152602f602482015260008051602062003ef283398151915260448201526e636f6d6d697373696f6e207261746560881b6064820152608490fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b519063ffffffff82168203620002ca5756fe6080604052600436101561001257600080fd5b60003560e01c8063057b929614610277578063060ceab01461027257806317e42e121461026d5780632d1e973e146102685780632ebc60341461026357806339ec4df91461025e57806348903e38146102595780634f1ef2861461025457806352d1902d1461024f57806353972c2a1461024a57806357067503146102455780635a69825d146102405780635d5ab9681461023b5780636ea3a22814610236578063715018a614610231578063787f82c81461022c57806379ba5097146102275780637b6e842c1461022257806383dffd6f1461021d57806386eec4a1146102185780638d3e1e41146102135780638da5cb5b1461020e5780638f37ec19146102095780639855c8b514610204578063a1cb1846146101ff578063ad3cb1cc146101fa578063b8db983e146101f5578063bda16b15146101f0578063c24ae586146101eb578063d2e1f5b8146101e6578063e30c3978146101e1578063eb4af045146101dc578063eee5cead146101d7578063f1887684146101d2578063f2fde38b146101cd578063f92ad219146101c8578063fc2e5932146101c35763fc56c2a2146101be57600080fd5b611ee3565b611de5565b611ba9565b611adc565b611abe565b611a9a565b611a76565b611a23565b6119f9565b6119e1565b6119a6565b611965565b611903565b611844565b611820565b6117b4565b611761565b6116d6565b611480565b611384565b61127b565b6111f3565b611061565b610f96565b610f72565b610e6e565b610e01565b610de9565b610ca3565b610bf9565b6109fc565b6108be565b610871565b610830565b6107c7565b610491565b610473565b610322565b9181601f840112156102aa5782359167ffffffffffffffff83116102aa57602083818601950101116102aa57565b600080fd5b6004359073ffffffffffffffffffffffffffffffffffffffff821682036102aa57565b60406003198201126102aa576004359067ffffffffffffffff82116102aa576102fd9160040161027c565b909160243573ffffffffffffffffffffffffffffffffffffffff811681036102aa5790565b346102aa57610330366102d2565b9061033d60418214611f24565b801561046e576103db6103d66103d18561039e7f04000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000006103e399351614611fde565b73ffffffffffffffffffffffffffffffffffffffff946103ca33876103c3848661271a565b1614612069565b369161066b565b6127bf565b6106e3565b9116906136f0565b156103ea57005b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4950546f6b656e5374616b696e673a204f70657261746f7220616c726561647960448201527f20657869737473000000000000000000000000000000000000000000000000006064820152fd5b611faf565b346102aa5760006003193601126102aa576020600354604051908152f35b346102aa5761049f366102d2565b906104ac60418214611f24565b801561046e5761050d6103d66103d18561039e7f04000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000061051599351614611fde565b9116906137f8565b1561051c57005b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4950546f6b656e5374616b696e673a204f70657261746f72206e6f7420666f7560448201527f6e640000000000000000000000000000000000000000000000000000000000006064820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176105eb57604052565b6105a0565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176105eb57604052565b67ffffffffffffffff81116105eb57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b92919261067782610631565b9161068560405193846105f0565b8294818452818301116102aa578281602093846000960137010152565b9080601f830112156102aa578160206106bd9335910161066b565b90565b60005b8381106106d35750506000910152565b81810151838201526020016106c3565b60206106fc9181604051938285809451938492016106c0565b8101600781520301902090565b60206107229181604051938285809451938492016106c0565b8101600681520301902090565b60206107489181604051938285809451938492016106c0565b8101600581520301902090565b602061076e9181604051938285809451938492016106c0565b8101600881520301902090565b60206107949181604051938285809451938492016106c0565b8101600481520301902090565b6020906107bb9282604051948386809551938492016106c0565b82019081520301902090565b346102aa5760406003193601126102aa5767ffffffffffffffff6004358181116102aa576107f99036906004016106a2565b906024359081116102aa5760209161082161081b6108279336906004016106a2565b91610709565b906107a1565b54604051908152f35b346102aa5760006003193601126102aa57602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102aa5760006003193601126102aa576020600154604051908152f35b60206003198201126102aa576004359067ffffffffffffffff82116102aa576108ba9160040161027c565b9091565b6108c73661088f565b906108d460418314611f24565b811561046e576109d69161092c7f04000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000084351614611fde565b6109346128f6565b60405191610941836105cf565b600983527f76616c696461746f72000000000000000000000000000000000000000000000060208401527f0000000000000000000000000000000000000000000000000000000000000000927f0000000000000000000000000000000000000000000000000000000000000000927f000000000000000000000000000000000000000000000000000000000000000092612c3c565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b60406003193601126102aa57610a106102af565b60243567ffffffffffffffff81116102aa57610a309036906004016106a2565b9073ffffffffffffffffffffffffffffffffffffffff91827f000000000000000000000000000000000000000000000000000000000000000016803014908115610bcb575b50610ba1576020600493610a87613254565b604051948580927f52d1902d00000000000000000000000000000000000000000000000000000000825286165afa60009381610b70575b50610b0a576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602490fd5b907f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8303610b3e57610b3c9250613998565b005b6040517faa1d49a400000000000000000000000000000000000000000000000000000000815260048101849052602490fd5b610b9391945060203d602011610b9a575b610b8b81836105f0565b810190612e7d565b9238610abe565b503d610b81565b60046040517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b9050837f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416141538610a75565b346102aa5760006003193601126102aa5773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003610ba15760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b600319906020828201126102aa576004359167ffffffffffffffff83116102aa57826080920301126102aa5760040190565b346102aa57610cb136610c71565b610cbb81806120f4565b610cca60418294939414611f24565b1561046e57610d1e7f04000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008094351614611fde565b610d2b60208201826120f4565b90610d3860218314611f24565b811561046e57610d88610d8f9282610d83610b3c9760ff9535167f02000000000000000000000000000000000000000000000000000000000000008114908115610d94575b50611fde565b612145565b5416612190565b61221b565b7f030000000000000000000000000000000000000000000000000000000000000091501438610d7d565b60206003198201126102aa576004359067ffffffffffffffff82116102aa576106bd916004016106a2565b346102aa576020610827610dfc36610dbe565b61072f565b346102aa5760006003193601126102aa576020600254604051908152f35b60606003198201126102aa5767ffffffffffffffff916004358381116102aa5782610e4c9160040161027c565b939093926024359182116102aa57610e669160040161027c565b909160443590565b346102aa57610e7c36610e1f565b92610e8c60418294939414611f24565b801561046e577fff0000000000000000000000000000000000000000000000000000000000000094610ee27f04000000000000000000000000000000000000000000000000000000000000008783351614611fde565b610f053373ffffffffffffffffffffffffffffffffffffffff6103c3858561271a565b610f1160218514611f24565b831561046e57610f51610b3c968435167f02000000000000000000000000000000000000000000000000000000000000008114908115610d945750611fde565b610f6d610f68610f618686612145565b5460ff1690565b612190565b6122ea565b346102aa5760206003193601126102aa57610f8b613254565b610b3c600435613294565b346102aa5760008060031936011261105e57610fb0613254565b8073ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffff00000000000000000000000000000000000000007f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c008181541690557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080549182169055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b346102aa5761106f366102d2565b9161107c60418314611f24565b811561046e576103d1816110d77f04000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000006110fc95351614611fde565b73ffffffffffffffffffffffffffffffffffffffff936103ca33866103c3848661271a565b916111068361072f565b541561116f5761116a8361115161114a6111407f9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca97610755565b5460035490612346565b4211612353565b4261115b82610755565b556040519384931690836123de565b0390a1005b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4950546f6b656e5374616b696e673a2044656c656761746f72206d757374206860448201527f617665207374616b6500000000000000000000000000000000000000000000006064820152fd5b346102aa5760006003193601126102aa573373ffffffffffffffffffffffffffffffffffffffff7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0054160361124b57610b3c33613388565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b346102aa5761128936610c71565b61129381806120f4565b91906112a160418414611f24565b821561046e5761131a9073ffffffffffffffffffffffffffffffffffffffff6103c37fff00000000000000000000000000000000000000000000000000000000000000956113137f04000000000000000000000000000000000000000000000000000000000000008886351614611fde565b339361271a565b61132760208201826120f4565b9061133460218314611f24565b811561046e57610f6161137f9282610d83610b3c97610f689535167f02000000000000000000000000000000000000000000000000000000000000008114908115610d945750611fde565b6123fa565b346102aa5761139b6113953661088f565b9061215e565b60405190819080548084526020809401908192600052846000209060005b868282106114255786866113cf828803836105f0565b604051928392818401908285525180915260408401929160005b8281106113f857505050500390f35b835173ffffffffffffffffffffffffffffffffffffffff16855286955093810193928101926001016113e9565b8354855290930192600192830192016113b9565b60406003198201126102aa5767ffffffffffffffff916004358381116102aa57826114669160040161027c565b939093926024359182116102aa576108ba9160040161027c565b61148936611439565b9161149660418214611f24565b801561046e577fff00000000000000000000000000000000000000000000000000000000000000936114ec7f04000000000000000000000000000000000000000000000000000000000000008683351614611fde565b61150f3373ffffffffffffffffffffffffffffffffffffffff6103c3858561271a565b61151b60218514611f24565b831561046e5761155b610b3c958435167f02000000000000000000000000000000000000000000000000000000000000008114908115610d945750611fde565b61156a60ff610d888686612145565b6124b0565b90600182811c921680156115b8575b602083101461158957565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161157e565b8054600093926115d18261156f565b9182825260209360019160018116908160001461163957506001146115f8575b5050505050565b90939495506000929192528360002092846000945b838610611625575050505001019038808080806115f1565b80548587018301529401938590820161160d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168685015250505090151560051b0101915038808080806115f1565b9061169161168a92604051938480926115c2565b03836105f0565b565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936116cf815180928187528780880191016106c0565b0116010190565b346102aa576116ec6116e736610dbe565b61077b565b60ff8154166040519161170d8361170681600185016115c2565b03846105f0565b6003600282015491015463ffffffff9061173b6040519586951515865260c0602087015260c0860190611693565b9260408501528181166060850152818160201c16608085015260401c1660a08301520390f35b346102aa5760006003193601126102aa57602073ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b6117bd36611439565b916117ca60418214611f24565b801561046e577fff000000000000000000000000000000000000000000000000000000000000009361150f7f04000000000000000000000000000000000000000000000000000000000000008683351614611fde565b346102aa5760206003193601126102aa57611839613254565b610b3c60043561343c565b346102aa5761185236610e1f565b9261186260218294939414611f24565b801561046e577f0200000000000000000000000000000000000000000000000000000000000000947fff000000000000000000000000000000000000000000000000000000000000006118c282358216888114908115610d945750611fde565b6118ce60218614611f24565b841561046e57610b3c966118ef91853516908114908115610d945750611fde565b6118fe60ff610d888686612145565b6125bb565b346102aa5760006003193601126102aa57611961604051611923816105cf565b600581527f352e302e300000000000000000000000000000000000000000000000000000006020820152604051918291602083526020830190611693565b0390f35b346102aa5760006003193601126102aa57602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102aa5760006003193601126102aa5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346102aa5760206108276119f436610dbe565b610755565b346102aa5760206003193601126102aa576040611a17600435612616565b82519182526020820152f35b346102aa5760006003193601126102aa57602073ffffffffffffffffffffffffffffffffffffffff7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c005416604051908152f35b346102aa5760206003193601126102aa57611a8f613254565b610b3c600435613530565b346102aa5760206003193601126102aa57611ab3613254565b610b3c60043561361d565b346102aa5760006003193601126102aa576020600054604051908152f35b346102aa5760206003193601126102aa57611af56102af565b611afd613254565b73ffffffffffffffffffffffffffffffffffffffff809116907f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00827fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700600080a3005b346102aa5760a06003193601126102aa57611bc26102af565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549067ffffffffffffffff60ff8360401c1615921680159081611da4575b6001149081611d9a575b159081611d91575b50611d6757611c869082611c6c7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0060017fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000825416179055565b611d0b575b60843590606435906044359060243590612652565b611c8c57005b611cd87ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a007fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff8154169055565b604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290806020810161116a565b611d627ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00680100000000000000007fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff825416179055565b611c71565b60046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b90501538611c13565b303b159150611c0b565b839150611c01565b6044359063ffffffff821682036102aa57565b6064359063ffffffff821682036102aa57565b6084359063ffffffff821682036102aa57565b60a06003193601126102aa5767ffffffffffffffff6004358181116102aa57611e1290369060040161027c565b90916024359081116102aa57611e2c90369060040161027c565b919092611e37611dac565b90611e40611dbf565b92611e49611dd2565b94611e5660418314611f24565b811561046e576109d696611edd91611eb27f04000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000087351614611fde565b611ed53373ffffffffffffffffffffffffffffffffffffffff6103c3878961271a565b6103ca6128f6565b91612c3c565b346102aa5760006003193601126102aa57602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b15611f2b57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579206c60448201527f656e6774680000000000000000000000000000000000000000000000000000006064820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b15611fe557565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579207060448201527f72656669780000000000000000000000000000000000000000000000000000006064820152fd5b1561207057565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579206460448201527f65726976656420616464726573730000000000000000000000000000000000006064820152fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156102aa570180359067ffffffffffffffff82116102aa576020019181360383136102aa57565b6020908260405193849283378101600481520301902090565b6020908260405193849283378101600781520301902090565b6020919283604051948593843782019081520301902090565b1561219757565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4950546f6b656e5374616b696e673a2056616c696461746f7220646f6573206e60448201527f6f742065786973740000000000000000000000000000000000000000000000006064820152fd5b6040810161222981836120f4565b929061223760218514611f24565b831561046e5760ff610d886116919583610d837fff000000000000000000000000000000000000000000000000000000000000006122a19635167f02000000000000000000000000000000000000000000000000000000000000008114908115610d945750611fde565b6122b16103d16103ca83806120f4565b6122be6060830135612616565b50926122ca3383612e8c565b6122e26122da60208501856120f4565b9290946120f4565b939092613019565b6103d16122ff9161169196959493369161066b565b613180565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b906001820180921161234157565b612304565b9190820180921161234157565b1561235a57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4950546f6b656e5374616b696e673a205769746864726177616c20616464726560448201527f7373206368616e676520636f6f6c2d646f776e000000000000000000000000006064820152fd5b9291906123f5602091604086526040860190611693565b930152565b6040810161240881836120f4565b929061241660218514611f24565b831561046e5760ff610d886116919583610d837fff000000000000000000000000000000000000000000000000000000000000006124809635167f02000000000000000000000000000000000000000000000000000000000000008114908115610d945750611fde565b61248d6060820135612616565b509161249f6103d16103ca84806120f4565b906122e26122da60208501856120f4565b61258c612570936124e961257e937f6f0ca1c9f1795cb6a6ba44d788bc09dfb45b3a223470ae03e049ee954f0829ed97956103ca6128f6565b936124f334612616565b612504600096929654871015612950565b61255c612510886127bf565b916002604051868882376020818881016004815203019020018881540190556125388361072f565b88815401905561255161254a84610709565b8688612177565b8881540190556138fb565b604051978897608089526080890190611693565b908782036020890152611693565b918583036040870152612b9d565b9060608301520390a160017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b6122ff90611691959493926103ca336125d536848661066b565b612e8c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b9190820391821161234157565b7f0000000000000000000000000000000000000000000000000000000000000000801561264d578106908181039081116123415791565b6125da565b9193929061265e613ab2565b612666613ab2565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055612692613ab2565b61269a613ab2565b6126a2613ab2565b73ffffffffffffffffffffffffffffffffffffffff8316156126e957611691946126da6126df926126d56126e496613388565b613530565b613294565b61343c565b61361d565b60246040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152fd5b816001116102aa5773ffffffffffffffffffffffffffffffffffffffff916127699160017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff369301910161066b565b602081519101201690565b604051906060820182811067ffffffffffffffff8211176105eb5760405260218252604082602036910137565b80511561046e5760200190565b90815181101561046e570160200190565b9060418251036128725760ff6127e081604160218601519501511660011690565b1661284c577f02000000000000000000000000000000000000000000000000000000000000005b61280f612774565b9060001a61281c826127a1565b5360005b6020811061282d57509150565b80846001921a61284561283f83612333565b856127ae565b5301612820565b7f0300000000000000000000000000000000000000000000000000000000000000612807565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f496e76616c696420756e636f6d70726573736564207075626c6963206b65792060448201527f6c656e67746800000000000000000000000000000000000000000000000000006064820152fd5b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0060028154146129265760029055565b60046040517f3ee5aeb5000000000000000000000000000000000000000000000000000000008152fd5b1561295757565b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4950546f6b656e5374616b696e673a205374616b6520616d6f756e7420746f6f60448201527f206c6f77000000000000000000000000000000000000000000000000000000006064820152fd5b91612a12918354907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055565b818110612a21575050565b60008155600101612a16565b9190601f8111612a3c57505050565b611691926000526020600020906020601f840160051c83019310612a68575b601f0160051c0190612a16565b9091508190612a5b565b919091825167ffffffffffffffff81116105eb57612a9a81612a94845461156f565b84612a2d565b602080601f8311600114612af657508190612a12939495600092612aeb575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b015190503880612ab9565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0831695612b2a85600052602060002090565b926000905b888210612b8557505083600195969710612b4e575b505050811b019055565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080612b44565b80600185968294968601518155019501930190612b2f565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b96949897939060c09693612bff612c0d92612c1b9560e08c5260e08c0191612b9d565b9089820360208b0152611693565b9087820360408901526115c2565b96606086015263ffffffff928380921660808701521660a085015216910152565b947f86e28854e4d50fe7db57c8bede0c9deb5abf1e451982b19cc58742edef74459f95612e549395949294612e30612c7334612616565b9094612c80861515612950565b612c8e6103d1368b8861066b565b99612c988b61077b565b94612ca4865460ff1690565b86547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001178755918215612e775750612ce160018701611676565b985b612cf1600188019a8b612a72565b60028701612d008a8254612346565b90558215612e6b5750612d536003612d1e8189015463ffffffff1690565b975b0196879063ffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000825416179055565b8115612e6257508454612da39060201c63ffffffff165b86547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1660209190911b67ffffffff0000000016178655565b15612e5957508254612df69060401c63ffffffff165b84547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1660409190911b6bffffffff000000000000000016178455565b612dff8961072f565b612e0a868254612346565b9055612e1e612e188a610709565b8a6107a1565b612e29868254612346565b90556138fb565b549163ffffffff93604051978897868660401c1696808760201c1696169489612bdc565b0390a1565b612df690612db9565b612da390612d6a565b6003612d539197612d20565b98612ce3565b908160209103126102aa575190565b9073ffffffffffffffffffffffffffffffffffffffff612eae612ec6936106e3565b91169060019160005201602052604060002054151590565b15612ecd57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4950546f6b656e5374616b696e673a2043616c6c6572206973206e6f7420616e60448201527f206f70657261746f7200000000000000000000000000000000000000000000006064820152fd5b15612f5857565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4950546f6b656e5374616b696e673a20496e73756666696369656e742073746160448201527f6b656420616d6f756e74000000000000000000000000000000000000000000006064820152fd5b96959490606094926123f594612ffd61300b9360808c5260808c0190611693565b918a830360208c0152612b9d565b918783036040890152612b9d565b929194909361303d8261303561302e87610709565b8989612177565b541015612f51565b6002604051878782376020818981016004815203019020018054908382039182116123415755600261306f8285612145565b0192835496838801809811612341577fb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a97612e5495556130b86130b187610709565b8289612177565b6130c3858254612609565b90556130d86130d187610709565b8484612177565b6130e3858254612346565b905560405196879687612fdc565b60036000918281558260018201613108815461156f565b80613119575b505060028201550155565b82601f8211600114613131575050555b82388061310e565b909180825261314f601f60208420940160051c840160018501612a16565b5555613129565b949392916040926131726123f593606089526060890190611693565b918783036020890152612b9d565b90919261319a8161303561319385610709565b8787612177565b60026040518585823760208187810160048152030190200190815494818603958611612341577f0526a04a9b113a046b17e2350e42123a2515b5558b3aea91576ccdb1270c1b5995612e5493556131f08461072f565b6131fb838254612609565b905561321061320985610709565b8287612177565b61321b838254612609565b905560026132298287612145565b01541561323d575b60405194859485613156565b61324f61324a8287612145565b6130f1565b613231565b73ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416330361124b57565b8015613304577f0000000000000000000000000000000000000000000000000000000000000000801561264d5781068103908111612341576001556001546040519081527ff93d77980ae5a1ddd008d6a7f02cbee5af2a4fcea850c4b55828de4f644e589f908060208101612e54565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4950546f6b656e5374616b696e673a206d696e556e7374616b65416d6f756e7460448201527f2063616e6e6f74206265203000000000000000000000000000000000000000006064820152fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000907f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c008281541690557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080549073ffffffffffffffffffffffffffffffffffffffff80931680948316179055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b80156134ac577f0000000000000000000000000000000000000000000000000000000000000000801561264d5781068103908111612341576002556002546040519081527ff1e15ded5b5192ec1a89a3d16f49c46c7fa6c876d1f8299cf036f5abf9924d9b908060208101612e54565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4950546f6b656e5374616b696e673a206d696e526564656c6567617465416d6f60448201527f756e742063616e6e6f74206265203000000000000000000000000000000000006064820152fd5b8015613599577f0000000000000000000000000000000000000000000000000000000000000000801561264d5781068103908111612341576020817fea095c2fea861b87f0fd54d0d4453358692a527e120df22b62c71696247dfb9f92600055604051908152a1565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4950546f6b656e5374616b696e673a206d696e5374616b65416d6f756e74206360448201527f616e6e6f742062652030000000000000000000000000000000000000000000006064820152fd5b8015613654576020817fbed33ba1e6aacc702f8e48397b388e43ca92a8898ed8bdb389fd8b18af95d32c92600355604051908152a1565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4950546f6b656e5374616b696e673a206e65775769746864726177616c41646460448201527f726573734368616e6765496e74657276616c2063616e6e6f74206265203000006064820152fd5b805482101561046e5760005260206000200190600090565b600082815260018201602052604090205461377a57805490680100000000000000008210156105eb578261376361372e8460018096018555846136d8565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b905580549260005201602052604060002055600190565b5050600090565b80549081156137c9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff809201916137b983836136d8565b909182549160031b1b1916905555565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60018101918060005282602052604060002054928315156000146138c2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92838501908582116123415780549485019485116123415760009585836138799761386a950361387f575b505050613781565b90600052602052604060002090565b55600190565b6138a96138a3916138936138b994876136d8565b90549060031b1c928391876136d8565b906129da565b8590600052602052604060002090565b55388080613862565b50505050600090565b3d156138f6573d906138dc82610631565b916138ea60405193846105f0565b82523d6000602084013e565b606090565b600080808093335af161390c6138cb565b501561391457565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4950546f6b656e5374616b696e673a204661696c656420746f20726566756e6460448201527f2072656d61696e646572000000000000000000000000000000000000000000006064820152fd5b90813b15613a6b5773ffffffffffffffffffffffffffffffffffffffff82167f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a2805115613a3857613a3591613b0b565b50565b505034613a4157565b60046040517fb398979f000000000000000000000000000000000000000000000000000000008152fd5b60248273ffffffffffffffffffffffffffffffffffffffff604051917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352166004820152fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615613ae157565b60046040517fd7e6bcf8000000000000000000000000000000000000000000000000000000008152fd5b6000806106bd93602081519101845af4613b236138cb565b9190613b635750805115613b3957805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b81511580613bbb575b613b74575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b15613b6c56fea2646970667358221220de1ce9f057900b2bfc3f0fc2c4177c813a83b46195b7e5e476abf21a987dc08864736f6c634300081700334950546f6b656e5374616b696e673a20496e76616c69642064656661756c7420", } // 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, _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, stakingRounding *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, _minStakeAmount, _minUnstakeAmount, _minRedelegateAmount, stakingRounding, _withdrawalAddressChangeInterval, defaultCommissionRate, defaultMaxCommissionRate, defaultMaxCommissionChangeRate) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(IPTokenStakingBin), backend, stakingRounding, defaultCommissionRate, defaultMaxCommissionRate, defaultMaxCommissionChangeRate) if err != nil { return common.Address{}, nil, nil, err } @@ -881,44 +881,44 @@ func (_IPTokenStaking *IPTokenStakingTransactorSession) CreateValidator(validato // CreateValidatorOnBehalf is a paid mutator transaction binding the contract method 0x48903e38. // -// Solidity: function createValidatorOnBehalf(bytes validatorPubkey) payable returns() -func (_IPTokenStaking *IPTokenStakingTransactor) CreateValidatorOnBehalf(opts *bind.TransactOpts, validatorPubkey []byte) (*types.Transaction, error) { - return _IPTokenStaking.contract.Transact(opts, "createValidatorOnBehalf", validatorPubkey) +// Solidity: function createValidatorOnBehalf(bytes validatorUncmpPubkey) payable returns() +func (_IPTokenStaking *IPTokenStakingTransactor) CreateValidatorOnBehalf(opts *bind.TransactOpts, validatorUncmpPubkey []byte) (*types.Transaction, error) { + return _IPTokenStaking.contract.Transact(opts, "createValidatorOnBehalf", validatorUncmpPubkey) } // CreateValidatorOnBehalf is a paid mutator transaction binding the contract method 0x48903e38. // -// Solidity: function createValidatorOnBehalf(bytes validatorPubkey) payable returns() -func (_IPTokenStaking *IPTokenStakingSession) CreateValidatorOnBehalf(validatorPubkey []byte) (*types.Transaction, error) { - return _IPTokenStaking.Contract.CreateValidatorOnBehalf(&_IPTokenStaking.TransactOpts, validatorPubkey) +// Solidity: function createValidatorOnBehalf(bytes validatorUncmpPubkey) payable returns() +func (_IPTokenStaking *IPTokenStakingSession) CreateValidatorOnBehalf(validatorUncmpPubkey []byte) (*types.Transaction, error) { + return _IPTokenStaking.Contract.CreateValidatorOnBehalf(&_IPTokenStaking.TransactOpts, validatorUncmpPubkey) } // CreateValidatorOnBehalf is a paid mutator transaction binding the contract method 0x48903e38. // -// Solidity: function createValidatorOnBehalf(bytes validatorPubkey) payable returns() -func (_IPTokenStaking *IPTokenStakingTransactorSession) CreateValidatorOnBehalf(validatorPubkey []byte) (*types.Transaction, error) { - return _IPTokenStaking.Contract.CreateValidatorOnBehalf(&_IPTokenStaking.TransactOpts, validatorPubkey) +// Solidity: function createValidatorOnBehalf(bytes validatorUncmpPubkey) payable returns() +func (_IPTokenStaking *IPTokenStakingTransactorSession) CreateValidatorOnBehalf(validatorUncmpPubkey []byte) (*types.Transaction, error) { + return _IPTokenStaking.Contract.CreateValidatorOnBehalf(&_IPTokenStaking.TransactOpts, validatorUncmpPubkey) } -// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// Initialize is a paid mutator transaction binding the contract method 0xf92ad219. // -// 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) +// Solidity: function initialize(address accessManager, uint256 _minStakeAmount, uint256 _minUnstakeAmount, uint256 _minRedelegateAmount, uint256 _withdrawalAddressChangeInterval) returns() +func (_IPTokenStaking *IPTokenStakingTransactor) Initialize(opts *bind.TransactOpts, accessManager common.Address, _minStakeAmount *big.Int, _minUnstakeAmount *big.Int, _minRedelegateAmount *big.Int, _withdrawalAddressChangeInterval *big.Int) (*types.Transaction, error) { + return _IPTokenStaking.contract.Transact(opts, "initialize", accessManager, _minStakeAmount, _minUnstakeAmount, _minRedelegateAmount, _withdrawalAddressChangeInterval) } -// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// Initialize is a paid mutator transaction binding the contract method 0xf92ad219. // -// Solidity: function initialize(address accessManager) returns() -func (_IPTokenStaking *IPTokenStakingSession) Initialize(accessManager common.Address) (*types.Transaction, error) { - return _IPTokenStaking.Contract.Initialize(&_IPTokenStaking.TransactOpts, accessManager) +// Solidity: function initialize(address accessManager, uint256 _minStakeAmount, uint256 _minUnstakeAmount, uint256 _minRedelegateAmount, uint256 _withdrawalAddressChangeInterval) returns() +func (_IPTokenStaking *IPTokenStakingSession) Initialize(accessManager common.Address, _minStakeAmount *big.Int, _minUnstakeAmount *big.Int, _minRedelegateAmount *big.Int, _withdrawalAddressChangeInterval *big.Int) (*types.Transaction, error) { + return _IPTokenStaking.Contract.Initialize(&_IPTokenStaking.TransactOpts, accessManager, _minStakeAmount, _minUnstakeAmount, _minRedelegateAmount, _withdrawalAddressChangeInterval) } -// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// Initialize is a paid mutator transaction binding the contract method 0xf92ad219. // -// Solidity: function initialize(address accessManager) returns() -func (_IPTokenStaking *IPTokenStakingTransactorSession) Initialize(accessManager common.Address) (*types.Transaction, error) { - return _IPTokenStaking.Contract.Initialize(&_IPTokenStaking.TransactOpts, accessManager) +// Solidity: function initialize(address accessManager, uint256 _minStakeAmount, uint256 _minUnstakeAmount, uint256 _minRedelegateAmount, uint256 _withdrawalAddressChangeInterval) returns() +func (_IPTokenStaking *IPTokenStakingTransactorSession) Initialize(accessManager common.Address, _minStakeAmount *big.Int, _minUnstakeAmount *big.Int, _minRedelegateAmount *big.Int, _withdrawalAddressChangeInterval *big.Int) (*types.Transaction, error) { + return _IPTokenStaking.Contract.Initialize(&_IPTokenStaking.TransactOpts, accessManager, _minStakeAmount, _minUnstakeAmount, _minRedelegateAmount, _withdrawalAddressChangeInterval) } // Redelegate is a paid mutator transaction binding the contract method 0x7b6e842c. @@ -1112,44 +1112,44 @@ func (_IPTokenStaking *IPTokenStakingTransactorSession) SetWithdrawalAddressChan // Stake is a paid mutator transaction binding the contract method 0x86eec4a1. // -// Solidity: function stake(bytes delegatorUncmpPubkey, bytes validatorPubkey) payable returns() -func (_IPTokenStaking *IPTokenStakingTransactor) Stake(opts *bind.TransactOpts, delegatorUncmpPubkey []byte, validatorPubkey []byte) (*types.Transaction, error) { - return _IPTokenStaking.contract.Transact(opts, "stake", delegatorUncmpPubkey, validatorPubkey) +// Solidity: function stake(bytes delegatorUncmpPubkey, bytes validatorCmpPubkey) payable returns() +func (_IPTokenStaking *IPTokenStakingTransactor) Stake(opts *bind.TransactOpts, delegatorUncmpPubkey []byte, validatorCmpPubkey []byte) (*types.Transaction, error) { + return _IPTokenStaking.contract.Transact(opts, "stake", delegatorUncmpPubkey, validatorCmpPubkey) } // Stake is a paid mutator transaction binding the contract method 0x86eec4a1. // -// Solidity: function stake(bytes delegatorUncmpPubkey, bytes validatorPubkey) payable returns() -func (_IPTokenStaking *IPTokenStakingSession) Stake(delegatorUncmpPubkey []byte, validatorPubkey []byte) (*types.Transaction, error) { - return _IPTokenStaking.Contract.Stake(&_IPTokenStaking.TransactOpts, delegatorUncmpPubkey, validatorPubkey) +// Solidity: function stake(bytes delegatorUncmpPubkey, bytes validatorCmpPubkey) payable returns() +func (_IPTokenStaking *IPTokenStakingSession) Stake(delegatorUncmpPubkey []byte, validatorCmpPubkey []byte) (*types.Transaction, error) { + return _IPTokenStaking.Contract.Stake(&_IPTokenStaking.TransactOpts, delegatorUncmpPubkey, validatorCmpPubkey) } // Stake is a paid mutator transaction binding the contract method 0x86eec4a1. // -// Solidity: function stake(bytes delegatorUncmpPubkey, bytes validatorPubkey) payable returns() -func (_IPTokenStaking *IPTokenStakingTransactorSession) Stake(delegatorUncmpPubkey []byte, validatorPubkey []byte) (*types.Transaction, error) { - return _IPTokenStaking.Contract.Stake(&_IPTokenStaking.TransactOpts, delegatorUncmpPubkey, validatorPubkey) +// Solidity: function stake(bytes delegatorUncmpPubkey, bytes validatorCmpPubkey) payable returns() +func (_IPTokenStaking *IPTokenStakingTransactorSession) Stake(delegatorUncmpPubkey []byte, validatorCmpPubkey []byte) (*types.Transaction, error) { + return _IPTokenStaking.Contract.Stake(&_IPTokenStaking.TransactOpts, delegatorUncmpPubkey, validatorCmpPubkey) } // StakeOnBehalf is a paid mutator transaction binding the contract method 0x8f37ec19. // -// Solidity: function stakeOnBehalf(bytes delegatorPubkey, bytes validatorPubkey) payable returns() -func (_IPTokenStaking *IPTokenStakingTransactor) StakeOnBehalf(opts *bind.TransactOpts, delegatorPubkey []byte, validatorPubkey []byte) (*types.Transaction, error) { - return _IPTokenStaking.contract.Transact(opts, "stakeOnBehalf", delegatorPubkey, validatorPubkey) +// Solidity: function stakeOnBehalf(bytes delegatorUncmpPubkey, bytes validatorCmpPubkey) payable returns() +func (_IPTokenStaking *IPTokenStakingTransactor) StakeOnBehalf(opts *bind.TransactOpts, delegatorUncmpPubkey []byte, validatorCmpPubkey []byte) (*types.Transaction, error) { + return _IPTokenStaking.contract.Transact(opts, "stakeOnBehalf", delegatorUncmpPubkey, validatorCmpPubkey) } // StakeOnBehalf is a paid mutator transaction binding the contract method 0x8f37ec19. // -// Solidity: function stakeOnBehalf(bytes delegatorPubkey, bytes validatorPubkey) payable returns() -func (_IPTokenStaking *IPTokenStakingSession) StakeOnBehalf(delegatorPubkey []byte, validatorPubkey []byte) (*types.Transaction, error) { - return _IPTokenStaking.Contract.StakeOnBehalf(&_IPTokenStaking.TransactOpts, delegatorPubkey, validatorPubkey) +// Solidity: function stakeOnBehalf(bytes delegatorUncmpPubkey, bytes validatorCmpPubkey) payable returns() +func (_IPTokenStaking *IPTokenStakingSession) StakeOnBehalf(delegatorUncmpPubkey []byte, validatorCmpPubkey []byte) (*types.Transaction, error) { + return _IPTokenStaking.Contract.StakeOnBehalf(&_IPTokenStaking.TransactOpts, delegatorUncmpPubkey, validatorCmpPubkey) } // StakeOnBehalf is a paid mutator transaction binding the contract method 0x8f37ec19. // -// Solidity: function stakeOnBehalf(bytes delegatorPubkey, bytes validatorPubkey) payable returns() -func (_IPTokenStaking *IPTokenStakingTransactorSession) StakeOnBehalf(delegatorPubkey []byte, validatorPubkey []byte) (*types.Transaction, error) { - return _IPTokenStaking.Contract.StakeOnBehalf(&_IPTokenStaking.TransactOpts, delegatorPubkey, validatorPubkey) +// Solidity: function stakeOnBehalf(bytes delegatorUncmpPubkey, bytes validatorCmpPubkey) payable returns() +func (_IPTokenStaking *IPTokenStakingTransactorSession) StakeOnBehalf(delegatorUncmpPubkey []byte, validatorCmpPubkey []byte) (*types.Transaction, error) { + return _IPTokenStaking.Contract.StakeOnBehalf(&_IPTokenStaking.TransactOpts, delegatorUncmpPubkey, validatorCmpPubkey) } // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. @@ -1175,44 +1175,44 @@ func (_IPTokenStaking *IPTokenStakingTransactorSession) TransferOwnership(newOwn // Unstake is a paid mutator transaction binding the contract method 0x5d5ab968. // -// Solidity: function unstake(bytes delegatorUncmpPubkey, bytes validatorPubkey, uint256 amount) returns() -func (_IPTokenStaking *IPTokenStakingTransactor) Unstake(opts *bind.TransactOpts, delegatorUncmpPubkey []byte, validatorPubkey []byte, amount *big.Int) (*types.Transaction, error) { - return _IPTokenStaking.contract.Transact(opts, "unstake", delegatorUncmpPubkey, validatorPubkey, amount) +// Solidity: function unstake(bytes delegatorUncmpPubkey, bytes validatorCmpPubkey, uint256 amount) returns() +func (_IPTokenStaking *IPTokenStakingTransactor) Unstake(opts *bind.TransactOpts, delegatorUncmpPubkey []byte, validatorCmpPubkey []byte, amount *big.Int) (*types.Transaction, error) { + return _IPTokenStaking.contract.Transact(opts, "unstake", delegatorUncmpPubkey, validatorCmpPubkey, amount) } // Unstake is a paid mutator transaction binding the contract method 0x5d5ab968. // -// Solidity: function unstake(bytes delegatorUncmpPubkey, bytes validatorPubkey, uint256 amount) returns() -func (_IPTokenStaking *IPTokenStakingSession) Unstake(delegatorUncmpPubkey []byte, validatorPubkey []byte, amount *big.Int) (*types.Transaction, error) { - return _IPTokenStaking.Contract.Unstake(&_IPTokenStaking.TransactOpts, delegatorUncmpPubkey, validatorPubkey, amount) +// Solidity: function unstake(bytes delegatorUncmpPubkey, bytes validatorCmpPubkey, uint256 amount) returns() +func (_IPTokenStaking *IPTokenStakingSession) Unstake(delegatorUncmpPubkey []byte, validatorCmpPubkey []byte, amount *big.Int) (*types.Transaction, error) { + return _IPTokenStaking.Contract.Unstake(&_IPTokenStaking.TransactOpts, delegatorUncmpPubkey, validatorCmpPubkey, amount) } // Unstake is a paid mutator transaction binding the contract method 0x5d5ab968. // -// Solidity: function unstake(bytes delegatorUncmpPubkey, bytes validatorPubkey, uint256 amount) returns() -func (_IPTokenStaking *IPTokenStakingTransactorSession) Unstake(delegatorUncmpPubkey []byte, validatorPubkey []byte, amount *big.Int) (*types.Transaction, error) { - return _IPTokenStaking.Contract.Unstake(&_IPTokenStaking.TransactOpts, delegatorUncmpPubkey, validatorPubkey, amount) +// Solidity: function unstake(bytes delegatorUncmpPubkey, bytes validatorCmpPubkey, uint256 amount) returns() +func (_IPTokenStaking *IPTokenStakingTransactorSession) Unstake(delegatorUncmpPubkey []byte, validatorCmpPubkey []byte, amount *big.Int) (*types.Transaction, error) { + return _IPTokenStaking.Contract.Unstake(&_IPTokenStaking.TransactOpts, delegatorUncmpPubkey, validatorCmpPubkey, amount) } // UnstakeOnBehalf is a paid mutator transaction binding the contract method 0xa1cb1846. // -// Solidity: function unstakeOnBehalf(bytes delegatorCmpPubkey, bytes validatorPubkey, uint256 amount) returns() -func (_IPTokenStaking *IPTokenStakingTransactor) UnstakeOnBehalf(opts *bind.TransactOpts, delegatorCmpPubkey []byte, validatorPubkey []byte, amount *big.Int) (*types.Transaction, error) { - return _IPTokenStaking.contract.Transact(opts, "unstakeOnBehalf", delegatorCmpPubkey, validatorPubkey, amount) +// Solidity: function unstakeOnBehalf(bytes delegatorCmpPubkey, bytes validatorCmpPubkey, uint256 amount) returns() +func (_IPTokenStaking *IPTokenStakingTransactor) UnstakeOnBehalf(opts *bind.TransactOpts, delegatorCmpPubkey []byte, validatorCmpPubkey []byte, amount *big.Int) (*types.Transaction, error) { + return _IPTokenStaking.contract.Transact(opts, "unstakeOnBehalf", delegatorCmpPubkey, validatorCmpPubkey, amount) } // UnstakeOnBehalf is a paid mutator transaction binding the contract method 0xa1cb1846. // -// Solidity: function unstakeOnBehalf(bytes delegatorCmpPubkey, bytes validatorPubkey, uint256 amount) returns() -func (_IPTokenStaking *IPTokenStakingSession) UnstakeOnBehalf(delegatorCmpPubkey []byte, validatorPubkey []byte, amount *big.Int) (*types.Transaction, error) { - return _IPTokenStaking.Contract.UnstakeOnBehalf(&_IPTokenStaking.TransactOpts, delegatorCmpPubkey, validatorPubkey, amount) +// Solidity: function unstakeOnBehalf(bytes delegatorCmpPubkey, bytes validatorCmpPubkey, uint256 amount) returns() +func (_IPTokenStaking *IPTokenStakingSession) UnstakeOnBehalf(delegatorCmpPubkey []byte, validatorCmpPubkey []byte, amount *big.Int) (*types.Transaction, error) { + return _IPTokenStaking.Contract.UnstakeOnBehalf(&_IPTokenStaking.TransactOpts, delegatorCmpPubkey, validatorCmpPubkey, amount) } // UnstakeOnBehalf is a paid mutator transaction binding the contract method 0xa1cb1846. // -// Solidity: function unstakeOnBehalf(bytes delegatorCmpPubkey, bytes validatorPubkey, uint256 amount) returns() -func (_IPTokenStaking *IPTokenStakingTransactorSession) UnstakeOnBehalf(delegatorCmpPubkey []byte, validatorPubkey []byte, amount *big.Int) (*types.Transaction, error) { - return _IPTokenStaking.Contract.UnstakeOnBehalf(&_IPTokenStaking.TransactOpts, delegatorCmpPubkey, validatorPubkey, amount) +// Solidity: function unstakeOnBehalf(bytes delegatorCmpPubkey, bytes validatorCmpPubkey, uint256 amount) returns() +func (_IPTokenStaking *IPTokenStakingTransactorSession) UnstakeOnBehalf(delegatorCmpPubkey []byte, validatorCmpPubkey []byte, amount *big.Int) (*types.Transaction, error) { + return _IPTokenStaking.Contract.UnstakeOnBehalf(&_IPTokenStaking.TransactOpts, delegatorCmpPubkey, validatorCmpPubkey, amount) } // UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. @@ -1305,7 +1305,8 @@ func (it *IPTokenStakingCreateValidatorIterator) Close() error { // IPTokenStakingCreateValidator represents a CreateValidator event raised by the IPTokenStaking contract. type IPTokenStakingCreateValidator struct { - ValidatorPubkey []byte + ValidatorUncmpPubkey []byte + ValidatorCmpPubkey []byte Moniker string StakeAmount *big.Int CommissionRate uint32 @@ -1314,9 +1315,9 @@ type IPTokenStakingCreateValidator struct { Raw types.Log // Blockchain specific contextual infos } -// FilterCreateValidator is a free log retrieval operation binding the contract event 0x5cecf4ee8b0c1d212b07dbc464fc303e4ffc458fd0f61135d4b9bf7f60197a18. +// FilterCreateValidator is a free log retrieval operation binding the contract event 0x86e28854e4d50fe7db57c8bede0c9deb5abf1e451982b19cc58742edef74459f. // -// Solidity: event CreateValidator(bytes validatorPubkey, string moniker, uint256 stakeAmount, uint32 commissionRate, uint32 maxCommissionRate, uint32 maxCommissionChangeRate) +// Solidity: event CreateValidator(bytes validatorUncmpPubkey, bytes validatorCmpPubkey, string moniker, uint256 stakeAmount, uint32 commissionRate, uint32 maxCommissionRate, uint32 maxCommissionChangeRate) func (_IPTokenStaking *IPTokenStakingFilterer) FilterCreateValidator(opts *bind.FilterOpts) (*IPTokenStakingCreateValidatorIterator, error) { logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "CreateValidator") @@ -1326,9 +1327,9 @@ func (_IPTokenStaking *IPTokenStakingFilterer) FilterCreateValidator(opts *bind. return &IPTokenStakingCreateValidatorIterator{contract: _IPTokenStaking.contract, event: "CreateValidator", logs: logs, sub: sub}, nil } -// WatchCreateValidator is a free log subscription operation binding the contract event 0x5cecf4ee8b0c1d212b07dbc464fc303e4ffc458fd0f61135d4b9bf7f60197a18. +// WatchCreateValidator is a free log subscription operation binding the contract event 0x86e28854e4d50fe7db57c8bede0c9deb5abf1e451982b19cc58742edef74459f. // -// Solidity: event CreateValidator(bytes validatorPubkey, string moniker, uint256 stakeAmount, uint32 commissionRate, uint32 maxCommissionRate, uint32 maxCommissionChangeRate) +// Solidity: event CreateValidator(bytes validatorUncmpPubkey, bytes validatorCmpPubkey, string moniker, uint256 stakeAmount, uint32 commissionRate, uint32 maxCommissionRate, uint32 maxCommissionChangeRate) func (_IPTokenStaking *IPTokenStakingFilterer) WatchCreateValidator(opts *bind.WatchOpts, sink chan<- *IPTokenStakingCreateValidator) (event.Subscription, error) { logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "CreateValidator") @@ -1363,9 +1364,9 @@ func (_IPTokenStaking *IPTokenStakingFilterer) WatchCreateValidator(opts *bind.W }), nil } -// ParseCreateValidator is a log parse operation binding the contract event 0x5cecf4ee8b0c1d212b07dbc464fc303e4ffc458fd0f61135d4b9bf7f60197a18. +// ParseCreateValidator is a log parse operation binding the contract event 0x86e28854e4d50fe7db57c8bede0c9deb5abf1e451982b19cc58742edef74459f. // -// Solidity: event CreateValidator(bytes validatorPubkey, string moniker, uint256 stakeAmount, uint32 commissionRate, uint32 maxCommissionRate, uint32 maxCommissionChangeRate) +// Solidity: event CreateValidator(bytes validatorUncmpPubkey, bytes validatorCmpPubkey, string moniker, uint256 stakeAmount, uint32 commissionRate, uint32 maxCommissionRate, uint32 maxCommissionChangeRate) func (_IPTokenStaking *IPTokenStakingFilterer) ParseCreateValidator(log types.Log) (*IPTokenStakingCreateValidator, error) { event := new(IPTokenStakingCreateValidator) if err := _IPTokenStaking.contract.UnpackLog(event, "CreateValidator", log); err != nil { @@ -1444,15 +1445,16 @@ func (it *IPTokenStakingDepositIterator) Close() error { // IPTokenStakingDeposit represents a Deposit event raised by the IPTokenStaking contract. type IPTokenStakingDeposit struct { - DepositorPubkey []byte - ValidatorPubkey []byte - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos + DelegatorUncmpPubkey []byte + DelegatorCmpPubkey []byte + ValidatorCmpPubkey []byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterDeposit is a free log retrieval operation binding the contract event 0xe77f103965e0ff8836ce54ba9bac869f217cd5da27d6bdefd090282c397211c0. +// FilterDeposit is a free log retrieval operation binding the contract event 0x6f0ca1c9f1795cb6a6ba44d788bc09dfb45b3a223470ae03e049ee954f0829ed. // -// Solidity: event Deposit(bytes depositorPubkey, bytes validatorPubkey, uint256 amount) +// Solidity: event Deposit(bytes delegatorUncmpPubkey, bytes delegatorCmpPubkey, bytes validatorCmpPubkey, uint256 amount) func (_IPTokenStaking *IPTokenStakingFilterer) FilterDeposit(opts *bind.FilterOpts) (*IPTokenStakingDepositIterator, error) { logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "Deposit") @@ -1462,9 +1464,9 @@ func (_IPTokenStaking *IPTokenStakingFilterer) FilterDeposit(opts *bind.FilterOp return &IPTokenStakingDepositIterator{contract: _IPTokenStaking.contract, event: "Deposit", logs: logs, sub: sub}, nil } -// WatchDeposit is a free log subscription operation binding the contract event 0xe77f103965e0ff8836ce54ba9bac869f217cd5da27d6bdefd090282c397211c0. +// WatchDeposit is a free log subscription operation binding the contract event 0x6f0ca1c9f1795cb6a6ba44d788bc09dfb45b3a223470ae03e049ee954f0829ed. // -// Solidity: event Deposit(bytes depositorPubkey, bytes validatorPubkey, uint256 amount) +// Solidity: event Deposit(bytes delegatorUncmpPubkey, bytes delegatorCmpPubkey, bytes validatorCmpPubkey, uint256 amount) func (_IPTokenStaking *IPTokenStakingFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *IPTokenStakingDeposit) (event.Subscription, error) { logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "Deposit") @@ -1499,9 +1501,9 @@ func (_IPTokenStaking *IPTokenStakingFilterer) WatchDeposit(opts *bind.WatchOpts }), nil } -// ParseDeposit is a log parse operation binding the contract event 0xe77f103965e0ff8836ce54ba9bac869f217cd5da27d6bdefd090282c397211c0. +// ParseDeposit is a log parse operation binding the contract event 0x6f0ca1c9f1795cb6a6ba44d788bc09dfb45b3a223470ae03e049ee954f0829ed. // -// Solidity: event Deposit(bytes depositorPubkey, bytes validatorPubkey, uint256 amount) +// Solidity: event Deposit(bytes delegatorUncmpPubkey, bytes delegatorCmpPubkey, bytes validatorCmpPubkey, uint256 amount) func (_IPTokenStaking *IPTokenStakingFilterer) ParseDeposit(log types.Log) (*IPTokenStakingDeposit, error) { event := new(IPTokenStakingDeposit) if err := _IPTokenStaking.contract.UnpackLog(event, "Deposit", log); err != nil { @@ -2422,7 +2424,7 @@ func (it *IPTokenStakingRedelegateIterator) Close() error { // IPTokenStakingRedelegate represents a Redelegate event raised by the IPTokenStaking contract. type IPTokenStakingRedelegate struct { - DepositorPubkey []byte + DelegatorCmpPubkey []byte ValidatorSrcPubkey []byte ValidatorDstPubkey []byte Amount *big.Int @@ -2431,7 +2433,7 @@ type IPTokenStakingRedelegate struct { // FilterRedelegate is a free log retrieval operation binding the contract event 0xb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a. // -// Solidity: event Redelegate(bytes depositorPubkey, bytes validatorSrcPubkey, bytes validatorDstPubkey, uint256 amount) +// Solidity: event Redelegate(bytes delegatorCmpPubkey, bytes validatorSrcPubkey, bytes validatorDstPubkey, uint256 amount) func (_IPTokenStaking *IPTokenStakingFilterer) FilterRedelegate(opts *bind.FilterOpts) (*IPTokenStakingRedelegateIterator, error) { logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "Redelegate") @@ -2443,7 +2445,7 @@ func (_IPTokenStaking *IPTokenStakingFilterer) FilterRedelegate(opts *bind.Filte // WatchRedelegate is a free log subscription operation binding the contract event 0xb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a. // -// Solidity: event Redelegate(bytes depositorPubkey, bytes validatorSrcPubkey, bytes validatorDstPubkey, uint256 amount) +// Solidity: event Redelegate(bytes delegatorCmpPubkey, 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") @@ -2480,7 +2482,7 @@ func (_IPTokenStaking *IPTokenStakingFilterer) WatchRedelegate(opts *bind.WatchO // ParseRedelegate is a log parse operation binding the contract event 0xb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a. // -// Solidity: event Redelegate(bytes depositorPubkey, bytes validatorSrcPubkey, bytes validatorDstPubkey, uint256 amount) +// Solidity: event Redelegate(bytes delegatorCmpPubkey, 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 { @@ -2559,14 +2561,14 @@ func (it *IPTokenStakingSetWithdrawalAddressIterator) Close() error { // 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 + DelegatorCmpPubkey []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) +// Solidity: event SetWithdrawalAddress(bytes delegatorCmpPubkey, bytes32 executionAddress) func (_IPTokenStaking *IPTokenStakingFilterer) FilterSetWithdrawalAddress(opts *bind.FilterOpts) (*IPTokenStakingSetWithdrawalAddressIterator, error) { logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "SetWithdrawalAddress") @@ -2578,7 +2580,7 @@ func (_IPTokenStaking *IPTokenStakingFilterer) FilterSetWithdrawalAddress(opts * // WatchSetWithdrawalAddress is a free log subscription operation binding the contract event 0x9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca. // -// Solidity: event SetWithdrawalAddress(bytes depositorPubkey, bytes32 executionAddress) +// Solidity: event SetWithdrawalAddress(bytes delegatorCmpPubkey, bytes32 executionAddress) func (_IPTokenStaking *IPTokenStakingFilterer) WatchSetWithdrawalAddress(opts *bind.WatchOpts, sink chan<- *IPTokenStakingSetWithdrawalAddress) (event.Subscription, error) { logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "SetWithdrawalAddress") @@ -2615,7 +2617,7 @@ func (_IPTokenStaking *IPTokenStakingFilterer) WatchSetWithdrawalAddress(opts *b // ParseSetWithdrawalAddress is a log parse operation binding the contract event 0x9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca. // -// Solidity: event SetWithdrawalAddress(bytes depositorPubkey, bytes32 executionAddress) +// Solidity: event SetWithdrawalAddress(bytes delegatorCmpPubkey, bytes32 executionAddress) func (_IPTokenStaking *IPTokenStakingFilterer) ParseSetWithdrawalAddress(log types.Log) (*IPTokenStakingSetWithdrawalAddress, error) { event := new(IPTokenStakingSetWithdrawalAddress) if err := _IPTokenStaking.contract.UnpackLog(event, "SetWithdrawalAddress", log); err != nil { @@ -2838,15 +2840,15 @@ func (it *IPTokenStakingWithdrawIterator) Close() error { // 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 + DelegatorCmpPubkey []byte + ValidatorCmpPubkey []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) +// Solidity: event Withdraw(bytes delegatorCmpPubkey, bytes validatorCmpPubkey, uint256 amount) func (_IPTokenStaking *IPTokenStakingFilterer) FilterWithdraw(opts *bind.FilterOpts) (*IPTokenStakingWithdrawIterator, error) { logs, sub, err := _IPTokenStaking.contract.FilterLogs(opts, "Withdraw") @@ -2858,7 +2860,7 @@ func (_IPTokenStaking *IPTokenStakingFilterer) FilterWithdraw(opts *bind.FilterO // WatchWithdraw is a free log subscription operation binding the contract event 0x0526a04a9b113a046b17e2350e42123a2515b5558b3aea91576ccdb1270c1b59. // -// Solidity: event Withdraw(bytes depositorPubkey, bytes validatorPubkey, uint256 amount) +// Solidity: event Withdraw(bytes delegatorCmpPubkey, bytes validatorCmpPubkey, uint256 amount) func (_IPTokenStaking *IPTokenStakingFilterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *IPTokenStakingWithdraw) (event.Subscription, error) { logs, sub, err := _IPTokenStaking.contract.WatchLogs(opts, "Withdraw") @@ -2895,7 +2897,7 @@ func (_IPTokenStaking *IPTokenStakingFilterer) WatchWithdraw(opts *bind.WatchOpt // ParseWithdraw is a log parse operation binding the contract event 0x0526a04a9b113a046b17e2350e42123a2515b5558b3aea91576ccdb1270c1b59. // -// Solidity: event Withdraw(bytes depositorPubkey, bytes validatorPubkey, uint256 amount) +// Solidity: event Withdraw(bytes delegatorCmpPubkey, bytes validatorCmpPubkey, uint256 amount) func (_IPTokenStaking *IPTokenStakingFilterer) ParseWithdraw(log types.Log) (*IPTokenStakingWithdraw, error) { event := new(IPTokenStakingWithdraw) if err := _IPTokenStaking.contract.UnpackLog(event, "Withdraw", log); err != nil { diff --git a/contracts/bindings/iptokenstaking_more.go b/contracts/bindings/iptokenstaking_more.go index e714acce..c2b8b6b3 100644 --- a/contracts/bindings/iptokenstaking_more.go +++ b/contracts/bindings/iptokenstaking_more.go @@ -5,7 +5,7 @@ import ( ) const ( - IPTokenStakingDeployedBytecode = "0x6080604052600436106102255760003560e01c806386eec4a111610123578063c24ae586116100ab578063eee5cead1161006f578063eee5cead146106f6578063f188768414610716578063f2fde38b1461072c578063fc2e59321461074c578063fc56c2a21461075f57600080fd5b8063c24ae58614610634578063c4d66de81461066c578063d2e1f5b81461068c578063e30c3978146106c1578063eb4af045146106d657600080fd5b80639855c8b5116100f25780639855c8b51461054e578063a1cb18461461056e578063ad3cb1cc1461058e578063b8db983e146105cc578063bda16b151461060057600080fd5b806386eec4a1146104c95780638d3e1e41146104dc5780638da5cb5b1461050e5780638f37ec191461053b57600080fd5b806353972c2a116101b1578063715018a611610175578063715018a614610432578063787f82c81461044757806379ba5097146104675780637b6e842c1461047c57806383dffd6f1461049c57600080fd5b806353972c2a1461038457806357067503146103a45780635a69825d146103dc5780635d5ab968146103f25780636ea3a2281461041257600080fd5b80632ebc6034116101f85780632ebc6034146102ea57806339ec4df91461033357806348903e38146103495780634f1ef2861461035c57806352d1902d1461036f57600080fd5b8063057b92961461022a578063060ceab01461024c57806317e42e12146102755780632d1e973e14610295575b600080fd5b34801561023657600080fd5b5061024a610245366004613728565b610793565b005b34801561025857600080fd5b5061026260035481565b6040519081526020015b60405180910390f35b34801561028157600080fd5b5061024a610290366004613728565b610913565b3480156102a157600080fd5b506102626102b036600461381d565b8151602081840181018051600682529282019482019490942091909352815180830184018051928152908401929093019190912091525481565b3480156102f657600080fd5b5061031e7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff909116815260200161026c565b34801561033f57600080fd5b5061026260015481565b61024a610357366004613880565b610a7c565b61024a61036a3660046138c1565b610c03565b34801561037b57600080fd5b50610262610c22565b34801561039057600080fd5b5061024a61039f366004613904565b610c3f565b3480156103b057600080fd5b506102626103bf36600461393e565b805160208183018101805160058252928201919093012091525481565b3480156103e857600080fd5b5061026260025481565b3480156103fe57600080fd5b5061024a61040d36600461397a565b610f1e565b34801561041e57600080fd5b5061024a61042d3660046139ed565b611100565b34801561043e57600080fd5b5061024a611114565b34801561045357600080fd5b5061024a610462366004613728565b611128565b34801561047357600080fd5b5061024a611394565b34801561048857600080fd5b5061024a610497366004613904565b6113d9565b3480156104a857600080fd5b506104bc6104b7366004613880565b6116b0565b60405161026c9190613a06565b61024a6104d7366004613a53565b6116e3565b3480156104e857600080fd5b506104fc6104f736600461393e565b6118d7565b60405161026c96959493929190613b0e565b34801561051a57600080fd5b506105236119b3565b6040516001600160a01b03909116815260200161026c565b61024a610549366004613a53565b6119e8565b34801561055a57600080fd5b5061024a6105693660046139ed565b611bd3565b34801561057a57600080fd5b5061024a61058936600461397a565b611be4565b34801561059a57600080fd5b506105bf604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161026c9190613b56565b3480156105d857600080fd5b5061031e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561060c57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561064057600080fd5b5061026261064f36600461393e565b805160208183018101805160088252928201919093012091525481565b34801561067857600080fd5b5061024a610687366004613b69565b611de8565b34801561069857600080fd5b506106ac6106a73660046139ed565b611f7a565b6040805192835260208301919091520161026c565b3480156106cd57600080fd5b50610523611fba565b3480156106e257600080fd5b5061024a6106f13660046139ed565b611fe3565b34801561070257600080fd5b5061024a6107113660046139ed565b611ff4565b34801561072257600080fd5b5061026260005481565b34801561073857600080fd5b5061024a610747366004613b69565b612005565b61024a61075a366004613b98565b61208a565b34801561076b57600080fd5b5061031e7f000000000000000000000000000000000000000000000000000000000000000081565b828233604182146107bf5760405162461bcd60e51b81526004016107b690613c39565b60405180910390fd5b828260008181106107d2576107d2613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b146108085760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661081c84846121d8565b6001600160a01b0316146108425760405162461bcd60e51b81526004016107b690613cd9565b600061088387878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506108ae856007836040516108999190613d27565b90815260405190819003602001902090612351565b61090a5760405162461bcd60e51b815260206004820152602760248201527f4950546f6b656e5374616b696e673a204f70657261746f7220616c72656164796044820152662065786973747360c81b60648201526084016107b6565b50505050505050565b828233604182146109365760405162461bcd60e51b81526004016107b690613c39565b8282600081811061094957610949613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b1461097f5760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661099384846121d8565b6001600160a01b0316146109b95760405162461bcd60e51b81526004016107b690613cd9565b60006109fa87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b9050610a2585600783604051610a109190613d27565b90815260405190819003602001902090612366565b61090a5760405162461bcd60e51b815260206004820152602260248201527f4950546f6b656e5374616b696e673a204f70657261746f72206e6f7420666f756044820152611b9960f21b60648201526084016107b6565b818160218114610a9e5760405162461bcd60e51b81526004016107b690613c39565b81816000818110610ab157610ab1613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610aff575081816000818110610ae457610ae4613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610b1b5760405162461bcd60e51b81526004016107b690613c94565b610b2361237b565b610be684848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260098152683b30b634b230ba37b960b91b602082015291507f000000000000000000000000000000000000000000000000000000000000000090507f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006123b3565b610bfd600160008051602061425483398151915255565b50505050565b610c0b612698565b610c148261273d565b610c1e8282612745565b5050565b6000610c2c612807565b5060008051602061423483398151915290565b610c498180613d43565b60418114610c695760405162461bcd60e51b81526004016107b690613c39565b81816000818110610c7c57610c7c613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b14610cb25760405162461bcd60e51b81526004016107b690613c94565b610cbf6020840184613d43565b60218114610cdf5760405162461bcd60e51b81526004016107b690613c39565b81816000818110610cf257610cf2613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610d40575081816000818110610d2557610d25613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610d5c5760405162461bcd60e51b81526004016107b690613c94565b60048282604051610d6e929190613d89565b9081526040519081900360200190205460ff16610d9d5760405162461bcd60e51b81526004016107b690613d99565b610daa6040860186613d43565b60218114610dca5760405162461bcd60e51b81526004016107b690613c39565b81816000818110610ddd57610ddd613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480610e2b575081816000818110610e1057610e10613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b610e475760405162461bcd60e51b81526004016107b690613c94565b60048282604051610e59929190613d89565b9081526040519081900360200190205460ff16610e885760405162461bcd60e51b81526004016107b690613d99565b6000610ed1610e978980613d43565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506000610ee28960600135611f7a565b509050610eef8233612850565b610f1382610f0060208c018c613d43565b610f0d60408e018e613d43565b866128d7565b505050505050505050565b84843360418214610f415760405162461bcd60e51b81526004016107b690613c39565b82826000818110610f5457610f54613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b14610f8a5760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b0316610f9e84846121d8565b6001600160a01b031614610fc45760405162461bcd60e51b81526004016107b690613cd9565b858560218114610fe65760405162461bcd60e51b81526004016107b690613c39565b81816000818110610ff957610ff9613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b148061104757508181600081811061102c5761102c613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b6110635760405162461bcd60e51b81526004016107b690613c94565b60048282604051611075929190613d89565b9081526040519081900360200190205460ff166110a45760405162461bcd60e51b81526004016107b690613d99565b60006110e58b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506110f3818a8a8a612a85565b5050505050505050505050565b611108612c67565b61111181612c99565b50565b61111c612c67565b6111266000612d6e565b565b8282336041821461114b5760405162461bcd60e51b81526004016107b690613c39565b8282600081811061115e5761115e613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b146111945760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b03166111a884846121d8565b6001600160a01b0316146111ce5760405162461bcd60e51b81526004016107b690613cd9565b600061120f87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b905060006005826040516112239190613d27565b908152602001604051809103902054116112915760405162461bcd60e51b815260206004820152602960248201527f4950546f6b656e5374616b696e673a2044656c656761746f72206d7573742068604482015268617665207374616b6560b81b60648201526084016107b6565b426003546008836040516112a59190613d27565b9081526020016040518091039020546112be9190613df7565b106113275760405162461bcd60e51b815260206004820152603360248201527f4950546f6b656e5374616b696e673a205769746864726177616c20616464726560448201527239b99031b430b733b29031b7b7b616b237bbb760691b60648201526084016107b6565b426008826040516113389190613d27565b908152604051908190036020018120919091557f9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca906113839083906001600160a01b03891690613e0a565b60405180910390a150505050505050565b338061139e611fba565b6001600160a01b0316146113d05760405163118cdaa760e01b81526001600160a01b03821660048201526024016107b6565b61111181612d6e565b6113e38180613d43565b33604182146114045760405162461bcd60e51b81526004016107b690613c39565b8282600081811061141757611417613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b1461144d5760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661146184846121d8565b6001600160a01b0316146114875760405162461bcd60e51b81526004016107b690613cd9565b6114946020850185613d43565b602181146114b45760405162461bcd60e51b81526004016107b690613c39565b818160008181106114c7576114c7613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b14806115155750818160008181106114fa576114fa613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b6115315760405162461bcd60e51b81526004016107b690613c94565b60048282604051611543929190613d89565b9081526040519081900360200190205460ff166115725760405162461bcd60e51b81526004016107b690613d99565b61157f6040870187613d43565b6021811461159f5760405162461bcd60e51b81526004016107b690613c39565b818160008181106115b2576115b2613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b14806116005750818160008181106115e5576115e5613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b61161c5760405162461bcd60e51b81526004016107b690613c94565b6004828260405161162e929190613d89565b9081526040519081900360200190205460ff1661165d5760405162461bcd60e51b81526004016107b690613d99565b600061166c8960600135611f7a565b509050600061167e610e978b80613d43565b90506116a48161169160208d018d613d43565b61169e60408f018f613d43565b876128d7565b50505050505050505050565b60606116da600784846040516116c7929190613d89565b9081526020016040518091039020612da6565b90505b92915050565b838333604182146117065760405162461bcd60e51b81526004016107b690613c39565b8282600081811061171957611719613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b1461174f5760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661176384846121d8565b6001600160a01b0316146117895760405162461bcd60e51b81526004016107b690613cd9565b8484602181146117ab5760405162461bcd60e51b81526004016107b690613c39565b818160008181106117be576117be613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b148061180c5750818160008181106117f1576117f1613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b6118285760405162461bcd60e51b81526004016107b690613c94565b6004828260405161183a929190613d89565b9081526040519081900360200190205460ff166118695760405162461bcd60e51b81526004016107b690613d99565b61187161237b565b60006118b28a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506118bf818989612dba565b50610f13600160008051602061425483398151915255565b80516020818301810180516004825292820191909301209152805460018201805460ff909216929161190890613e2c565b80601f016020809104026020016040519081016040528092919081815260200182805461193490613e2c565b80156119815780601f1061195657610100808354040283529160200191611981565b820191906000526020600020905b81548152906001019060200180831161196457829003601f168201915b50505050600283015460039093015491929163ffffffff80821692506401000000008204811691600160401b90041686565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b838360218114611a0a5760405162461bcd60e51b81526004016107b690613c39565b81816000818110611a1d57611a1d613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611a6b575081816000818110611a5057611a50613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611a875760405162461bcd60e51b81526004016107b690613c94565b838360218114611aa95760405162461bcd60e51b81526004016107b690613c39565b81816000818110611abc57611abc613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611b0a575081816000818110611aef57611aef613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611b265760405162461bcd60e51b81526004016107b690613c94565b60048282604051611b38929190613d89565b9081526040519081900360200190205460ff16611b675760405162461bcd60e51b81526004016107b690613d99565b611b6f61237b565b611bb288888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250899150612dba9050565b611bc9600160008051602061425483398151915255565b5050505050505050565b611bdb612c67565b61111181612ed1565b848460218114611c065760405162461bcd60e51b81526004016107b690613c39565b81816000818110611c1957611c19613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611c67575081816000818110611c4c57611c4c613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611c835760405162461bcd60e51b81526004016107b690613c94565b848460218114611ca55760405162461bcd60e51b81526004016107b690613c39565b81816000818110611cb857611cb8613c7e565b9050013560f81c60f81b6001600160f81b031916600260f81b1480611d06575081816000818110611ceb57611ceb613c7e565b9050013560f81c60f81b6001600160f81b031916600360f81b145b611d225760405162461bcd60e51b81526004016107b690613c94565b60048282604051611d34929190613d89565b9081526040519081900360200190205460ff16611d635760405162461bcd60e51b81526004016107b690613d99565b611da489898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250339250612850915050565b610f1389898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a9150899050612a85565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015611e2d5750825b90506000826001600160401b03166001148015611e495750303b155b905081158015611e57575080155b15611e755760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315611e9f57845460ff60401b1916600160401b1785555b6001600160a01b038616611f125760405162461bcd60e51b815260206004820152603460248201527f4950546f6b656e5374616b696e673a206163636573734d616e616765722063616044820152736e6e6f74206265207a65726f206164647265737360601b60648201526084016107b6565b611f1a612fa2565b611f22612fb2565b611f2b86612fba565b8315611f7257845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2906020015b60405180910390a15b505050505050565b600080611fa77f000000000000000000000000000000000000000000000000000000000000000084613e7c565b9050611fb38184613e90565b9150915091565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c006119d8565b611feb612c67565b61111181612fcb565b611ffc612c67565b61111181613097565b61200d612c67565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556120516119b3565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b868633604182146120ad5760405162461bcd60e51b81526004016107b690613c39565b828260008181106120c0576120c0613c7e565b9050013560f81c60f81b6001600160f81b031916600460f81b146120f65760405162461bcd60e51b81526004016107b690613c94565b806001600160a01b031661210a84846121d8565b6001600160a01b0316146121305760405162461bcd60e51b81526004016107b690613cd9565b61213861237b565b60006121798b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061220592505050565b90506121c0818a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c92508b91508a90506123b3565b506116a4600160008051602061425483398151915255565b60006121e78260018186613ea3565b6040516121f5929190613d89565b6040519081900390209392505050565b606081516041146122675760405162461bcd60e51b815260206004820152602660248201527f496e76616c696420756e636f6d70726573736564207075626c6963206b6579206044820152650d8cadccee8d60d31b60648201526084016107b6565b602182015160418301516000612281600260ff8416613ecd565b60ff161561229357600360f81b612299565b600160f91b5b604080516021808252606082019092529192506000919060208201818036833701905050905081816000815181106122d3576122d3613c7e565b60200101906001600160f81b031916908160001a90535060005b60208110156123475784816020811061230857612308613c7e565b1a60f81b82612318836001613df7565b8151811061232857612328613c7e565b60200101906001600160f81b031916908160001a9053506001016122ed565b5095945050505050565b60006116da836001600160a01b038416613142565b60006116da836001600160a01b038416613191565b6000805160206142548339815191528054600119016123ad57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b6000806123bf34611f7a565b91509150600082116123e35760405162461bcd60e51b81526004016107b690613eef565b60006004886040516123f59190613d27565b908152604051908190036020019020805460ff198116600117825590915060ff168061242157876124af565b81600101805461243090613e2c565b80601f016020809104026020016040519081016040528092919081815260200182805461245c90613e2c565b80156124a95780601f1061247e576101008083540402835291602001916124a9565b820191906000526020600020905b81548152906001019060200180831161248c57829003601f168201915b50505050505b60018301906124be9082613f7b565b508382600201546124cf9190613df7565b6002830155806124df57866124eb565b600382015463ffffffff165b60038301805463ffffffff191663ffffffff92909216919091179055806125125785612526565b6003820154640100000000900463ffffffff165b8260030160046101000a81548163ffffffff021916908363ffffffff160217905550806125535784612566565b6003820154600160401b900463ffffffff165b8260030160086101000a81548163ffffffff021916908363ffffffff1602179055508360058a6040516125999190613d27565b908152602001604051809103902060008282546125b69190613df7565b925050819055508360068a6040516125ce9190613d27565b90815260200160405180910390208a6040516125ea9190613d27565b908152602001604051809103902060008282546126079190613df7565b90915550612616905083613284565b60038201546040517f5cecf4ee8b0c1d212b07dbc464fc303e4ffc458fd0f61135d4b9bf7f60197a1891612671918c916001870191899163ffffffff808216926401000000008304821692600160401b90049091169061403a565b60405180910390a1505050505050505050565b600160008051602061425483398151915255565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061271f57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316612713600080516020614234833981519152546001600160a01b031690565b6001600160a01b031614155b156111265760405163703e46dd60e11b815260040160405180910390fd5b611111612c67565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561279f575060408051601f3d908101601f1916820190925261279c9181019061410a565b60015b6127c757604051634c9c8ce360e01b81526001600160a01b03831660048201526024016107b6565b60008051602061423483398151915281146127f857604051632a87526960e21b8152600481018290526024016107b6565b612802838361332f565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146111265760405163703e46dd60e11b815260040160405180910390fd5b612879816007846040516128649190613d27565b90815260405190819003602001902090613385565b610c1e5760405162461bcd60e51b815260206004820152602960248201527f4950546f6b656e5374616b696e673a2043616c6c6572206973206e6f7420616e6044820152681037b832b930ba37b960b91b60648201526084016107b6565b806006876040516128e89190613d27565b90815260200160405180910390208686604051612906929190613d89565b90815260200160405180910390205410156129335760405162461bcd60e51b81526004016107b690614123565b8060048686604051612946929190613d89565b908152602001604051809103902060020160008282546129669190613e90565b925050819055508060048484604051612980929190613d89565b908152602001604051809103902060020160008282546129a09190613df7565b92505081905550806006876040516129b89190613d27565b908152602001604051809103902086866040516129d6929190613d89565b908152602001604051809103902060008282546129f39190613e90565b9250508190555080600687604051612a0b9190613d27565b90815260200160405180910390208484604051612a29929190613d89565b90815260200160405180910390206000828254612a469190613df7565b90915550506040517fb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a90611f6990889088908890889088908890614196565b80600685604051612a969190613d27565b90815260200160405180910390208484604051612ab4929190613d89565b9081526020016040518091039020541015612ae15760405162461bcd60e51b81526004016107b690614123565b8060048484604051612af4929190613d89565b90815260200160405180910390206002016000828254612b149190613e90565b9250508190555080600585604051612b2c9190613d27565b90815260200160405180910390206000828254612b499190613e90565b9250508190555080600685604051612b619190613d27565b90815260200160405180910390208484604051612b7f929190613d89565b90815260200160405180910390206000828254612b9c9190613e90565b9091555050604051600490612bb49085908590613d89565b908152602001604051809103902060020154600003612c245760048383604051612bdf929190613d89565b908152604051908190036020019020805460ff191681556000612c056001830182613676565b506000600282015560030180546bffffffffffffffffffffffff191690555b7f0526a04a9b113a046b17e2350e42123a2515b5558b3aea91576ccdb1270c1b5984848484604051612c5994939291906141e5565b60405180910390a150505050565b33612c706119b3565b6001600160a01b0316146111265760405163118cdaa760e01b81523360048201526024016107b6565b60008111612cfe5760405162461bcd60e51b815260206004820152602c60248201527f4950546f6b656e5374616b696e673a206d696e556e7374616b65416d6f756e7460448201526b02063616e6e6f7420626520360a41b60648201526084016107b6565b612d287f000000000000000000000000000000000000000000000000000000000000000082613e7c565b612d329082613e90565b60018190556040519081527ff93d77980ae5a1ddd008d6a7f02cbee5af2a4fcea850c4b55828de4f644e589f906020015b60405180910390a150565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155610c1e826133a7565b60606000612db383613418565b9392505050565b600080612dc634611f7a565b91509150600054821015612dec5760405162461bcd60e51b81526004016107b690613eef565b8160048585604051612dff929190613d89565b90815260405190819003602001812060020180549092019091558290600590612e29908890613d27565b90815260405190819003602001812080549092019091558290600690612e50908890613d27565b90815260200160405180910390208585604051612e6e929190613d89565b90815260405190819003602001902080549091019055612e8d81613284565b7fe77f103965e0ff8836ce54ba9bac869f217cd5da27d6bdefd090282c397211c085858585604051612ec294939291906141e5565b60405180910390a15050505050565b60008111612f395760405162461bcd60e51b815260206004820152602f60248201527f4950546f6b656e5374616b696e673a206d696e526564656c6567617465416d6f60448201526e0756e742063616e6e6f74206265203608c1b60648201526084016107b6565b612f637f000000000000000000000000000000000000000000000000000000000000000082613e7c565b612f6d9082613e90565b60028190556040519081527ff1e15ded5b5192ec1a89a3d16f49c46c7fa6c876d1f8299cf036f5abf9924d9b90602001612d63565b612faa613474565b6111266134bd565b611126613474565b612fc2613474565b611111816134c5565b6000811161302e5760405162461bcd60e51b815260206004820152602a60248201527f4950546f6b656e5374616b696e673a206d696e5374616b65416d6f756e7420636044820152690616e6e6f7420626520360b41b60648201526084016107b6565b6130587f000000000000000000000000000000000000000000000000000000000000000082613e7c565b6130629082613e90565b60008190556040519081527fea095c2fea861b87f0fd54d0d4453358692a527e120df22b62c71696247dfb9f90602001612d63565b6000811161310d5760405162461bcd60e51b815260206004820152603e60248201527f4950546f6b656e5374616b696e673a206e65775769746864726177616c41646460448201527f726573734368616e6765496e74657276616c2063616e6e6f742062652030000060648201526084016107b6565b60038190556040518181527fbed33ba1e6aacc702f8e48397b388e43ca92a8898ed8bdb389fd8b18af95d32c90602001612d63565b6000818152600183016020526040812054613189575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556116dd565b5060006116dd565b6000818152600183016020526040812054801561327a5760006131b5600183613e90565b85549091506000906131c990600190613e90565b905080821461322e5760008660000182815481106131e9576131e9613c7e565b906000526020600020015490508087600001848154811061320c5761320c613c7e565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061323f5761323f61421d565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506116dd565b60009150506116dd565b604051600090339083908381818185875af1925050503d80600081146132c6576040519150601f19603f3d011682016040523d82523d6000602084013e6132cb565b606091505b5050905080610c1e5760405162461bcd60e51b815260206004820152602a60248201527f4950546f6b656e5374616b696e673a204661696c656420746f20726566756e64604482015269103932b6b0b4b73232b960b11b60648201526084016107b6565b613338826134f7565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561337d57612802828261355c565b610c1e6135d2565b6001600160a01b038116600090815260018301602052604081205415156116da565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561346857602002820191906000526020600020905b815481526020019060010190808311613454575b50505050509050919050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661112657604051631afcd79f60e31b815260040160405180910390fd5b612684613474565b6134cd613474565b6001600160a01b0381166113d057604051631e4fbdf760e01b8152600060048201526024016107b6565b806001600160a01b03163b60000361352d57604051634c9c8ce360e01b81526001600160a01b03821660048201526024016107b6565b60008051602061423483398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516135799190613d27565b600060405180830381855af49150503d80600081146135b4576040519150601f19603f3d011682016040523d82523d6000602084013e6135b9565b606091505b50915091506135c98583836135f1565b95945050505050565b34156111265760405163b398979f60e01b815260040160405180910390fd5b606082613606576136018261364d565b612db3565b815115801561361d57506001600160a01b0384163b155b1561364657604051639996b31560e01b81526001600160a01b03851660048201526024016107b6565b5092915050565b80511561365d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50805461368290613e2c565b6000825580601f10613692575050565b601f01602090049060005260206000209081019061111191905b808211156136c057600081556001016136ac565b5090565b60008083601f8401126136d657600080fd5b5081356001600160401b038111156136ed57600080fd5b60208301915083602082850101111561370557600080fd5b9250929050565b80356001600160a01b038116811461372357600080fd5b919050565b60008060006040848603121561373d57600080fd5b83356001600160401b0381111561375357600080fd5b61375f868287016136c4565b909450925061377290506020850161370c565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126137a257600080fd5b81356001600160401b03808211156137bc576137bc61377b565b604051601f8301601f19908116603f011681019082821181831017156137e4576137e461377b565b816040528381528660208588010111156137fd57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806040838503121561383057600080fd5b82356001600160401b038082111561384757600080fd5b61385386838701613791565b9350602085013591508082111561386957600080fd5b5061387685828601613791565b9150509250929050565b6000806020838503121561389357600080fd5b82356001600160401b038111156138a957600080fd5b6138b5858286016136c4565b90969095509350505050565b600080604083850312156138d457600080fd5b6138dd8361370c565b915060208301356001600160401b038111156138f857600080fd5b61387685828601613791565b60006020828403121561391657600080fd5b81356001600160401b0381111561392c57600080fd5b820160808185031215612db357600080fd5b60006020828403121561395057600080fd5b81356001600160401b0381111561396657600080fd5b61397284828501613791565b949350505050565b60008060008060006060868803121561399257600080fd5b85356001600160401b03808211156139a957600080fd5b6139b589838a016136c4565b909750955060208801359150808211156139ce57600080fd5b506139db888289016136c4565b96999598509660400135949350505050565b6000602082840312156139ff57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015613a475783516001600160a01b031683529284019291840191600101613a22565b50909695505050505050565b60008060008060408587031215613a6957600080fd5b84356001600160401b0380821115613a8057600080fd5b613a8c888389016136c4565b90965094506020870135915080821115613aa557600080fd5b50613ab2878288016136c4565b95989497509550505050565b60005b83811015613ad9578181015183820152602001613ac1565b50506000910152565b60008151808452613afa816020860160208601613abe565b601f01601f19169290920160200192915050565b861515815260c060208201526000613b2960c0830188613ae2565b60408301969096525063ffffffff9384166060820152918316608083015290911660a09091015292915050565b6020815260006116da6020830184613ae2565b600060208284031215613b7b57600080fd5b6116da8261370c565b803563ffffffff8116811461372357600080fd5b600080600080600080600060a0888a031215613bb357600080fd5b87356001600160401b0380821115613bca57600080fd5b613bd68b838c016136c4565b909950975060208a0135915080821115613bef57600080fd5b50613bfc8a828b016136c4565b9096509450613c0f905060408901613b84565b9250613c1d60608901613b84565b9150613c2b60808901613b84565b905092959891949750929550565b60208082526025908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579206c6040820152640cadccee8d60db1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526025908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b657920706040820152640e4caccd2f60db1b606082015260800190565b6020808252602e908201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579206460408201526d657269766564206164647265737360901b606082015260800190565b60008251613d39818460208701613abe565b9190910192915050565b6000808335601e19843603018112613d5a57600080fd5b8301803591506001600160401b03821115613d7457600080fd5b60200191503681900382131561370557600080fd5b8183823760009101908152919050565b60208082526028908201527f4950546f6b656e5374616b696e673a2056616c696461746f7220646f6573206e6040820152671bdd08195e1a5cdd60c21b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156116dd576116dd613de1565b604081526000613e1d6040830185613ae2565b90508260208301529392505050565b600181811c90821680613e4057607f821691505b602082108103613e6057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b600082613e8b57613e8b613e66565b500690565b818103818111156116dd576116dd613de1565b60008085851115613eb357600080fd5b83861115613ec057600080fd5b5050820193919092039150565b600060ff831680613ee057613ee0613e66565b8060ff84160691505092915050565b60208082526024908201527f4950546f6b656e5374616b696e673a205374616b6520616d6f756e7420746f6f604082015263206c6f7760e01b606082015260800190565b601f821115612802576000816000526020600020601f850160051c81016020861015613f5c5750805b601f850160051c820191505b81811015611f7257828155600101613f68565b81516001600160401b03811115613f9457613f9461377b565b613fa881613fa28454613e2c565b84613f33565b602080601f831160018114613fdd5760008415613fc55750858301515b600019600386901b1c1916600185901b178555611f72565b600085815260208120601f198616915b8281101561400c57888601518255948401946001909101908401613fed565b508582101561402a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60c08152600061404d60c0830189613ae2565b6020838203818501526000895461406381613e2c565b8085526001828116801561407e5760018114614098576140c6565b60ff1984168787015282151560051b8701860194506140c6565b8d6000528560002060005b848110156140be5781548982018901529083019087016140a3565b880187019550505b505050506040850189905263ffffffff8816606086015292506140e7915050565b63ffffffff8416608083015263ffffffff831660a0830152979650505050505050565b60006020828403121561411c57600080fd5b5051919050565b6020808252602a908201527f4950546f6b656e5374616b696e673a20496e73756666696369656e74207374616040820152691ad95908185b5bdd5b9d60b21b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6080815260006141a96080830189613ae2565b82810360208401526141bc81888a61416d565b905082810360408401526141d181868861416d565b915050826060830152979650505050505050565b6060815260006141f86060830187613ae2565b828103602084015261420b81868861416d565b91505082604083015295945050505050565b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00a26469706673582212209485bc3ef41c6266ff4611fed83ef81fee36b767cd694958239847e269ffa3ce64736f6c63430008180033" + IPTokenStakingDeployedBytecode = "0x6080604052600436101561001257600080fd5b60003560e01c8063057b929614610277578063060ceab01461027257806317e42e121461026d5780632d1e973e146102685780632ebc60341461026357806339ec4df91461025e57806348903e38146102595780634f1ef2861461025457806352d1902d1461024f57806353972c2a1461024a57806357067503146102455780635a69825d146102405780635d5ab9681461023b5780636ea3a22814610236578063715018a614610231578063787f82c81461022c57806379ba5097146102275780637b6e842c1461022257806383dffd6f1461021d57806386eec4a1146102185780638d3e1e41146102135780638da5cb5b1461020e5780638f37ec19146102095780639855c8b514610204578063a1cb1846146101ff578063ad3cb1cc146101fa578063b8db983e146101f5578063bda16b15146101f0578063c24ae586146101eb578063d2e1f5b8146101e6578063e30c3978146101e1578063eb4af045146101dc578063eee5cead146101d7578063f1887684146101d2578063f2fde38b146101cd578063f92ad219146101c8578063fc2e5932146101c35763fc56c2a2146101be57600080fd5b611ee3565b611de5565b611ba9565b611adc565b611abe565b611a9a565b611a76565b611a23565b6119f9565b6119e1565b6119a6565b611965565b611903565b611844565b611820565b6117b4565b611761565b6116d6565b611480565b611384565b61127b565b6111f3565b611061565b610f96565b610f72565b610e6e565b610e01565b610de9565b610ca3565b610bf9565b6109fc565b6108be565b610871565b610830565b6107c7565b610491565b610473565b610322565b9181601f840112156102aa5782359167ffffffffffffffff83116102aa57602083818601950101116102aa57565b600080fd5b6004359073ffffffffffffffffffffffffffffffffffffffff821682036102aa57565b60406003198201126102aa576004359067ffffffffffffffff82116102aa576102fd9160040161027c565b909160243573ffffffffffffffffffffffffffffffffffffffff811681036102aa5790565b346102aa57610330366102d2565b9061033d60418214611f24565b801561046e576103db6103d66103d18561039e7f04000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000006103e399351614611fde565b73ffffffffffffffffffffffffffffffffffffffff946103ca33876103c3848661271a565b1614612069565b369161066b565b6127bf565b6106e3565b9116906136f0565b156103ea57005b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4950546f6b656e5374616b696e673a204f70657261746f7220616c726561647960448201527f20657869737473000000000000000000000000000000000000000000000000006064820152fd5b611faf565b346102aa5760006003193601126102aa576020600354604051908152f35b346102aa5761049f366102d2565b906104ac60418214611f24565b801561046e5761050d6103d66103d18561039e7f04000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000061051599351614611fde565b9116906137f8565b1561051c57005b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4950546f6b656e5374616b696e673a204f70657261746f72206e6f7420666f7560448201527f6e640000000000000000000000000000000000000000000000000000000000006064820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176105eb57604052565b6105a0565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176105eb57604052565b67ffffffffffffffff81116105eb57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b92919261067782610631565b9161068560405193846105f0565b8294818452818301116102aa578281602093846000960137010152565b9080601f830112156102aa578160206106bd9335910161066b565b90565b60005b8381106106d35750506000910152565b81810151838201526020016106c3565b60206106fc9181604051938285809451938492016106c0565b8101600781520301902090565b60206107229181604051938285809451938492016106c0565b8101600681520301902090565b60206107489181604051938285809451938492016106c0565b8101600581520301902090565b602061076e9181604051938285809451938492016106c0565b8101600881520301902090565b60206107949181604051938285809451938492016106c0565b8101600481520301902090565b6020906107bb9282604051948386809551938492016106c0565b82019081520301902090565b346102aa5760406003193601126102aa5767ffffffffffffffff6004358181116102aa576107f99036906004016106a2565b906024359081116102aa5760209161082161081b6108279336906004016106a2565b91610709565b906107a1565b54604051908152f35b346102aa5760006003193601126102aa57602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102aa5760006003193601126102aa576020600154604051908152f35b60206003198201126102aa576004359067ffffffffffffffff82116102aa576108ba9160040161027c565b9091565b6108c73661088f565b906108d460418314611f24565b811561046e576109d69161092c7f04000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000084351614611fde565b6109346128f6565b60405191610941836105cf565b600983527f76616c696461746f72000000000000000000000000000000000000000000000060208401527f0000000000000000000000000000000000000000000000000000000000000000927f0000000000000000000000000000000000000000000000000000000000000000927f000000000000000000000000000000000000000000000000000000000000000092612c3c565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b60406003193601126102aa57610a106102af565b60243567ffffffffffffffff81116102aa57610a309036906004016106a2565b9073ffffffffffffffffffffffffffffffffffffffff91827f000000000000000000000000000000000000000000000000000000000000000016803014908115610bcb575b50610ba1576020600493610a87613254565b604051948580927f52d1902d00000000000000000000000000000000000000000000000000000000825286165afa60009381610b70575b50610b0a576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602490fd5b907f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8303610b3e57610b3c9250613998565b005b6040517faa1d49a400000000000000000000000000000000000000000000000000000000815260048101849052602490fd5b610b9391945060203d602011610b9a575b610b8b81836105f0565b810190612e7d565b9238610abe565b503d610b81565b60046040517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b9050837f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416141538610a75565b346102aa5760006003193601126102aa5773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003610ba15760206040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b600319906020828201126102aa576004359167ffffffffffffffff83116102aa57826080920301126102aa5760040190565b346102aa57610cb136610c71565b610cbb81806120f4565b610cca60418294939414611f24565b1561046e57610d1e7f04000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000008094351614611fde565b610d2b60208201826120f4565b90610d3860218314611f24565b811561046e57610d88610d8f9282610d83610b3c9760ff9535167f02000000000000000000000000000000000000000000000000000000000000008114908115610d94575b50611fde565b612145565b5416612190565b61221b565b7f030000000000000000000000000000000000000000000000000000000000000091501438610d7d565b60206003198201126102aa576004359067ffffffffffffffff82116102aa576106bd916004016106a2565b346102aa576020610827610dfc36610dbe565b61072f565b346102aa5760006003193601126102aa576020600254604051908152f35b60606003198201126102aa5767ffffffffffffffff916004358381116102aa5782610e4c9160040161027c565b939093926024359182116102aa57610e669160040161027c565b909160443590565b346102aa57610e7c36610e1f565b92610e8c60418294939414611f24565b801561046e577fff0000000000000000000000000000000000000000000000000000000000000094610ee27f04000000000000000000000000000000000000000000000000000000000000008783351614611fde565b610f053373ffffffffffffffffffffffffffffffffffffffff6103c3858561271a565b610f1160218514611f24565b831561046e57610f51610b3c968435167f02000000000000000000000000000000000000000000000000000000000000008114908115610d945750611fde565b610f6d610f68610f618686612145565b5460ff1690565b612190565b6122ea565b346102aa5760206003193601126102aa57610f8b613254565b610b3c600435613294565b346102aa5760008060031936011261105e57610fb0613254565b8073ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffff00000000000000000000000000000000000000007f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c008181541690557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080549182169055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b346102aa5761106f366102d2565b9161107c60418314611f24565b811561046e576103d1816110d77f04000000000000000000000000000000000000000000000000000000000000007fff000000000000000000000000000000000000000000000000000000000000006110fc95351614611fde565b73ffffffffffffffffffffffffffffffffffffffff936103ca33866103c3848661271a565b916111068361072f565b541561116f5761116a8361115161114a6111407f9f7f04f688298f474ed4c786abb29e0ca0173d70516d55d9eac515609b45fbca97610755565b5460035490612346565b4211612353565b4261115b82610755565b556040519384931690836123de565b0390a1005b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4950546f6b656e5374616b696e673a2044656c656761746f72206d757374206860448201527f617665207374616b6500000000000000000000000000000000000000000000006064820152fd5b346102aa5760006003193601126102aa573373ffffffffffffffffffffffffffffffffffffffff7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0054160361124b57610b3c33613388565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b346102aa5761128936610c71565b61129381806120f4565b91906112a160418414611f24565b821561046e5761131a9073ffffffffffffffffffffffffffffffffffffffff6103c37fff00000000000000000000000000000000000000000000000000000000000000956113137f04000000000000000000000000000000000000000000000000000000000000008886351614611fde565b339361271a565b61132760208201826120f4565b9061133460218314611f24565b811561046e57610f6161137f9282610d83610b3c97610f689535167f02000000000000000000000000000000000000000000000000000000000000008114908115610d945750611fde565b6123fa565b346102aa5761139b6113953661088f565b9061215e565b60405190819080548084526020809401908192600052846000209060005b868282106114255786866113cf828803836105f0565b604051928392818401908285525180915260408401929160005b8281106113f857505050500390f35b835173ffffffffffffffffffffffffffffffffffffffff16855286955093810193928101926001016113e9565b8354855290930192600192830192016113b9565b60406003198201126102aa5767ffffffffffffffff916004358381116102aa57826114669160040161027c565b939093926024359182116102aa576108ba9160040161027c565b61148936611439565b9161149660418214611f24565b801561046e577fff00000000000000000000000000000000000000000000000000000000000000936114ec7f04000000000000000000000000000000000000000000000000000000000000008683351614611fde565b61150f3373ffffffffffffffffffffffffffffffffffffffff6103c3858561271a565b61151b60218514611f24565b831561046e5761155b610b3c958435167f02000000000000000000000000000000000000000000000000000000000000008114908115610d945750611fde565b61156a60ff610d888686612145565b6124b0565b90600182811c921680156115b8575b602083101461158957565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161157e565b8054600093926115d18261156f565b9182825260209360019160018116908160001461163957506001146115f8575b5050505050565b90939495506000929192528360002092846000945b838610611625575050505001019038808080806115f1565b80548587018301529401938590820161160d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168685015250505090151560051b0101915038808080806115f1565b9061169161168a92604051938480926115c2565b03836105f0565b565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936116cf815180928187528780880191016106c0565b0116010190565b346102aa576116ec6116e736610dbe565b61077b565b60ff8154166040519161170d8361170681600185016115c2565b03846105f0565b6003600282015491015463ffffffff9061173b6040519586951515865260c0602087015260c0860190611693565b9260408501528181166060850152818160201c16608085015260401c1660a08301520390f35b346102aa5760006003193601126102aa57602073ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416604051908152f35b6117bd36611439565b916117ca60418214611f24565b801561046e577fff000000000000000000000000000000000000000000000000000000000000009361150f7f04000000000000000000000000000000000000000000000000000000000000008683351614611fde565b346102aa5760206003193601126102aa57611839613254565b610b3c60043561343c565b346102aa5761185236610e1f565b9261186260218294939414611f24565b801561046e577f0200000000000000000000000000000000000000000000000000000000000000947fff000000000000000000000000000000000000000000000000000000000000006118c282358216888114908115610d945750611fde565b6118ce60218614611f24565b841561046e57610b3c966118ef91853516908114908115610d945750611fde565b6118fe60ff610d888686612145565b6125bb565b346102aa5760006003193601126102aa57611961604051611923816105cf565b600581527f352e302e300000000000000000000000000000000000000000000000000000006020820152604051918291602083526020830190611693565b0390f35b346102aa5760006003193601126102aa57602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346102aa5760006003193601126102aa5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346102aa5760206108276119f436610dbe565b610755565b346102aa5760206003193601126102aa576040611a17600435612616565b82519182526020820152f35b346102aa5760006003193601126102aa57602073ffffffffffffffffffffffffffffffffffffffff7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c005416604051908152f35b346102aa5760206003193601126102aa57611a8f613254565b610b3c600435613530565b346102aa5760206003193601126102aa57611ab3613254565b610b3c60043561361d565b346102aa5760006003193601126102aa576020600054604051908152f35b346102aa5760206003193601126102aa57611af56102af565b611afd613254565b73ffffffffffffffffffffffffffffffffffffffff809116907f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00827fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700600080a3005b346102aa5760a06003193601126102aa57611bc26102af565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549067ffffffffffffffff60ff8360401c1615921680159081611da4575b6001149081611d9a575b159081611d91575b50611d6757611c869082611c6c7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0060017fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000825416179055565b611d0b575b60843590606435906044359060243590612652565b611c8c57005b611cd87ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a007fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff8154169055565b604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290806020810161116a565b611d627ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00680100000000000000007fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff825416179055565b611c71565b60046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b90501538611c13565b303b159150611c0b565b839150611c01565b6044359063ffffffff821682036102aa57565b6064359063ffffffff821682036102aa57565b6084359063ffffffff821682036102aa57565b60a06003193601126102aa5767ffffffffffffffff6004358181116102aa57611e1290369060040161027c565b90916024359081116102aa57611e2c90369060040161027c565b919092611e37611dac565b90611e40611dbf565b92611e49611dd2565b94611e5660418314611f24565b811561046e576109d696611edd91611eb27f04000000000000000000000000000000000000000000000000000000000000007fff0000000000000000000000000000000000000000000000000000000000000087351614611fde565b611ed53373ffffffffffffffffffffffffffffffffffffffff6103c3878961271a565b6103ca6128f6565b91612c3c565b346102aa5760006003193601126102aa57602060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b15611f2b57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579206c60448201527f656e6774680000000000000000000000000000000000000000000000000000006064820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b15611fe557565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579207060448201527f72656669780000000000000000000000000000000000000000000000000000006064820152fd5b1561207057565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4950546f6b656e5374616b696e673a20496e76616c6964207075626b6579206460448201527f65726976656420616464726573730000000000000000000000000000000000006064820152fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156102aa570180359067ffffffffffffffff82116102aa576020019181360383136102aa57565b6020908260405193849283378101600481520301902090565b6020908260405193849283378101600781520301902090565b6020919283604051948593843782019081520301902090565b1561219757565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4950546f6b656e5374616b696e673a2056616c696461746f7220646f6573206e60448201527f6f742065786973740000000000000000000000000000000000000000000000006064820152fd5b6040810161222981836120f4565b929061223760218514611f24565b831561046e5760ff610d886116919583610d837fff000000000000000000000000000000000000000000000000000000000000006122a19635167f02000000000000000000000000000000000000000000000000000000000000008114908115610d945750611fde565b6122b16103d16103ca83806120f4565b6122be6060830135612616565b50926122ca3383612e8c565b6122e26122da60208501856120f4565b9290946120f4565b939092613019565b6103d16122ff9161169196959493369161066b565b613180565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b906001820180921161234157565b612304565b9190820180921161234157565b1561235a57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4950546f6b656e5374616b696e673a205769746864726177616c20616464726560448201527f7373206368616e676520636f6f6c2d646f776e000000000000000000000000006064820152fd5b9291906123f5602091604086526040860190611693565b930152565b6040810161240881836120f4565b929061241660218514611f24565b831561046e5760ff610d886116919583610d837fff000000000000000000000000000000000000000000000000000000000000006124809635167f02000000000000000000000000000000000000000000000000000000000000008114908115610d945750611fde565b61248d6060820135612616565b509161249f6103d16103ca84806120f4565b906122e26122da60208501856120f4565b61258c612570936124e961257e937f6f0ca1c9f1795cb6a6ba44d788bc09dfb45b3a223470ae03e049ee954f0829ed97956103ca6128f6565b936124f334612616565b612504600096929654871015612950565b61255c612510886127bf565b916002604051868882376020818881016004815203019020018881540190556125388361072f565b88815401905561255161254a84610709565b8688612177565b8881540190556138fb565b604051978897608089526080890190611693565b908782036020890152611693565b918583036040870152612b9d565b9060608301520390a160017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b6122ff90611691959493926103ca336125d536848661066b565b612e8c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b9190820391821161234157565b7f0000000000000000000000000000000000000000000000000000000000000000801561264d578106908181039081116123415791565b6125da565b9193929061265e613ab2565b612666613ab2565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055612692613ab2565b61269a613ab2565b6126a2613ab2565b73ffffffffffffffffffffffffffffffffffffffff8316156126e957611691946126da6126df926126d56126e496613388565b613530565b613294565b61343c565b61361d565b60246040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152fd5b816001116102aa5773ffffffffffffffffffffffffffffffffffffffff916127699160017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff369301910161066b565b602081519101201690565b604051906060820182811067ffffffffffffffff8211176105eb5760405260218252604082602036910137565b80511561046e5760200190565b90815181101561046e570160200190565b9060418251036128725760ff6127e081604160218601519501511660011690565b1661284c577f02000000000000000000000000000000000000000000000000000000000000005b61280f612774565b9060001a61281c826127a1565b5360005b6020811061282d57509150565b80846001921a61284561283f83612333565b856127ae565b5301612820565b7f0300000000000000000000000000000000000000000000000000000000000000612807565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f496e76616c696420756e636f6d70726573736564207075626c6963206b65792060448201527f6c656e67746800000000000000000000000000000000000000000000000000006064820152fd5b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0060028154146129265760029055565b60046040517f3ee5aeb5000000000000000000000000000000000000000000000000000000008152fd5b1561295757565b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4950546f6b656e5374616b696e673a205374616b6520616d6f756e7420746f6f60448201527f206c6f77000000000000000000000000000000000000000000000000000000006064820152fd5b91612a12918354907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055565b818110612a21575050565b60008155600101612a16565b9190601f8111612a3c57505050565b611691926000526020600020906020601f840160051c83019310612a68575b601f0160051c0190612a16565b9091508190612a5b565b919091825167ffffffffffffffff81116105eb57612a9a81612a94845461156f565b84612a2d565b602080601f8311600114612af657508190612a12939495600092612aeb575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c19161790565b015190503880612ab9565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0831695612b2a85600052602060002090565b926000905b888210612b8557505083600195969710612b4e575b505050811b019055565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080612b44565b80600185968294968601518155019501930190612b2f565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b96949897939060c09693612bff612c0d92612c1b9560e08c5260e08c0191612b9d565b9089820360208b0152611693565b9087820360408901526115c2565b96606086015263ffffffff928380921660808701521660a085015216910152565b947f86e28854e4d50fe7db57c8bede0c9deb5abf1e451982b19cc58742edef74459f95612e549395949294612e30612c7334612616565b9094612c80861515612950565b612c8e6103d1368b8861066b565b99612c988b61077b565b94612ca4865460ff1690565b86547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001178755918215612e775750612ce160018701611676565b985b612cf1600188019a8b612a72565b60028701612d008a8254612346565b90558215612e6b5750612d536003612d1e8189015463ffffffff1690565b975b0196879063ffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000825416179055565b8115612e6257508454612da39060201c63ffffffff165b86547fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff1660209190911b67ffffffff0000000016178655565b15612e5957508254612df69060401c63ffffffff165b84547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1660409190911b6bffffffff000000000000000016178455565b612dff8961072f565b612e0a868254612346565b9055612e1e612e188a610709565b8a6107a1565b612e29868254612346565b90556138fb565b549163ffffffff93604051978897868660401c1696808760201c1696169489612bdc565b0390a1565b612df690612db9565b612da390612d6a565b6003612d539197612d20565b98612ce3565b908160209103126102aa575190565b9073ffffffffffffffffffffffffffffffffffffffff612eae612ec6936106e3565b91169060019160005201602052604060002054151590565b15612ecd57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4950546f6b656e5374616b696e673a2043616c6c6572206973206e6f7420616e60448201527f206f70657261746f7200000000000000000000000000000000000000000000006064820152fd5b15612f5857565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4950546f6b656e5374616b696e673a20496e73756666696369656e742073746160448201527f6b656420616d6f756e74000000000000000000000000000000000000000000006064820152fd5b96959490606094926123f594612ffd61300b9360808c5260808c0190611693565b918a830360208c0152612b9d565b918783036040890152612b9d565b929194909361303d8261303561302e87610709565b8989612177565b541015612f51565b6002604051878782376020818981016004815203019020018054908382039182116123415755600261306f8285612145565b0192835496838801809811612341577fb025fa2a574dd306182c6ac63bf7b05482b99680c1b38a42d8401a0adfd3775a97612e5495556130b86130b187610709565b8289612177565b6130c3858254612609565b90556130d86130d187610709565b8484612177565b6130e3858254612346565b905560405196879687612fdc565b60036000918281558260018201613108815461156f565b80613119575b505060028201550155565b82601f8211600114613131575050555b82388061310e565b909180825261314f601f60208420940160051c840160018501612a16565b5555613129565b949392916040926131726123f593606089526060890190611693565b918783036020890152612b9d565b90919261319a8161303561319385610709565b8787612177565b60026040518585823760208187810160048152030190200190815494818603958611612341577f0526a04a9b113a046b17e2350e42123a2515b5558b3aea91576ccdb1270c1b5995612e5493556131f08461072f565b6131fb838254612609565b905561321061320985610709565b8287612177565b61321b838254612609565b905560026132298287612145565b01541561323d575b60405194859485613156565b61324f61324a8287612145565b6130f1565b613231565b73ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416330361124b57565b8015613304577f0000000000000000000000000000000000000000000000000000000000000000801561264d5781068103908111612341576001556001546040519081527ff93d77980ae5a1ddd008d6a7f02cbee5af2a4fcea850c4b55828de4f644e589f908060208101612e54565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4950546f6b656e5374616b696e673a206d696e556e7374616b65416d6f756e7460448201527f2063616e6e6f74206265203000000000000000000000000000000000000000006064820152fd5b7fffffffffffffffffffffffff0000000000000000000000000000000000000000907f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c008281541690557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080549073ffffffffffffffffffffffffffffffffffffffff80931680948316179055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b80156134ac577f0000000000000000000000000000000000000000000000000000000000000000801561264d5781068103908111612341576002556002546040519081527ff1e15ded5b5192ec1a89a3d16f49c46c7fa6c876d1f8299cf036f5abf9924d9b908060208101612e54565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4950546f6b656e5374616b696e673a206d696e526564656c6567617465416d6f60448201527f756e742063616e6e6f74206265203000000000000000000000000000000000006064820152fd5b8015613599577f0000000000000000000000000000000000000000000000000000000000000000801561264d5781068103908111612341576020817fea095c2fea861b87f0fd54d0d4453358692a527e120df22b62c71696247dfb9f92600055604051908152a1565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4950546f6b656e5374616b696e673a206d696e5374616b65416d6f756e74206360448201527f616e6e6f742062652030000000000000000000000000000000000000000000006064820152fd5b8015613654576020817fbed33ba1e6aacc702f8e48397b388e43ca92a8898ed8bdb389fd8b18af95d32c92600355604051908152a1565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f4950546f6b656e5374616b696e673a206e65775769746864726177616c41646460448201527f726573734368616e6765496e74657276616c2063616e6e6f74206265203000006064820152fd5b805482101561046e5760005260206000200190600090565b600082815260018201602052604090205461377a57805490680100000000000000008210156105eb578261376361372e8460018096018555846136d8565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b905580549260005201602052604060002055600190565b5050600090565b80549081156137c9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff809201916137b983836136d8565b909182549160031b1b1916905555565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60018101918060005282602052604060002054928315156000146138c2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff92838501908582116123415780549485019485116123415760009585836138799761386a950361387f575b505050613781565b90600052602052604060002090565b55600190565b6138a96138a3916138936138b994876136d8565b90549060031b1c928391876136d8565b906129da565b8590600052602052604060002090565b55388080613862565b50505050600090565b3d156138f6573d906138dc82610631565b916138ea60405193846105f0565b82523d6000602084013e565b606090565b600080808093335af161390c6138cb565b501561391457565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4950546f6b656e5374616b696e673a204661696c656420746f20726566756e6460448201527f2072656d61696e646572000000000000000000000000000000000000000000006064820152fd5b90813b15613a6b5773ffffffffffffffffffffffffffffffffffffffff82167f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a2805115613a3857613a3591613b0b565b50565b505034613a4157565b60046040517fb398979f000000000000000000000000000000000000000000000000000000008152fd5b60248273ffffffffffffffffffffffffffffffffffffffff604051917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352166004820152fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c1615613ae157565b60046040517fd7e6bcf8000000000000000000000000000000000000000000000000000000008152fd5b6000806106bd93602081519101845af4613b236138cb565b9190613b635750805115613b3957805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b81511580613bbb575b613b74575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b15613b6c56fea2646970667358221220d236b81f3069ce3577c4a1a9a1ad257b34513baad29af05cc96c26410c3f1e2864736f6c63430008170033" ) //go:embed iptokenstaking_storage_layout.json diff --git a/contracts/bindings/iptokenstaking_storage_layout.json b/contracts/bindings/iptokenstaking_storage_layout.json index a4a4d789..50a5a289 100644 --- a/contracts/bindings/iptokenstaking_storage_layout.json +++ b/contracts/bindings/iptokenstaking_storage_layout.json @@ -1,7 +1,7 @@ { "storage": [ { - "astId": 2581, + "astId": 42049, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "minStakeAmount", "offset": 0, @@ -9,7 +9,7 @@ "type": "t_uint256" }, { - "astId": 2584, + "astId": 42052, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "minUnstakeAmount", "offset": 0, @@ -17,7 +17,7 @@ "type": "t_uint256" }, { - "astId": 2587, + "astId": 42055, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "minRedelegateAmount", "offset": 0, @@ -25,7 +25,7 @@ "type": "t_uint256" }, { - "astId": 2590, + "astId": 42058, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "withdrawalAddressChangeInterval", "offset": 0, @@ -33,15 +33,15 @@ "type": "t_uint256" }, { - "astId": 2596, + "astId": 42064, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "validatorMetadata", "offset": 0, "slot": "4", - "type": "t_mapping(t_bytes_memory_ptr,t_struct(ValidatorMetadata)2257_storage)" + "type": "t_mapping(t_bytes_memory_ptr,t_struct(ValidatorMetadata)41288_storage)" }, { - "astId": 2601, + "astId": 42069, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "delegatorTotalStakes", "offset": 0, @@ -49,7 +49,7 @@ "type": "t_mapping(t_bytes_memory_ptr,t_uint256)" }, { - "astId": 2608, + "astId": 42076, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "delegatorValidatorStakes", "offset": 0, @@ -57,15 +57,15 @@ "type": "t_mapping(t_bytes_memory_ptr,t_mapping(t_bytes_memory_ptr,t_uint256))" }, { - "astId": 2614, + "astId": 42082, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "delegatorOperators", "offset": 0, "slot": "7", - "type": "t_mapping(t_bytes_memory_ptr,t_struct(AddressSet)1954_storage)" + "type": "t_mapping(t_bytes_memory_ptr,t_struct(AddressSet)2028_storage)" }, { - "astId": 2619, + "astId": 42087, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "withdrawalAddressChange", "offset": 0, @@ -109,19 +109,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_bytes_memory_ptr,t_uint256)" }, - "t_mapping(t_bytes_memory_ptr,t_struct(AddressSet)1954_storage)": { + "t_mapping(t_bytes_memory_ptr,t_struct(AddressSet)2028_storage)": { "encoding": "mapping", "key": "t_bytes_memory_ptr", "label": "mapping(bytes => struct EnumerableSet.AddressSet)", "numberOfBytes": "32", - "value": "t_struct(AddressSet)1954_storage" + "value": "t_struct(AddressSet)2028_storage" }, - "t_mapping(t_bytes_memory_ptr,t_struct(ValidatorMetadata)2257_storage)": { + "t_mapping(t_bytes_memory_ptr,t_struct(ValidatorMetadata)41288_storage)": { "encoding": "mapping", "key": "t_bytes_memory_ptr", "label": "mapping(bytes => struct IIPTokenStaking.ValidatorMetadata)", "numberOfBytes": "32", - "value": "t_struct(ValidatorMetadata)2257_storage" + "value": "t_struct(ValidatorMetadata)41288_storage" }, "t_mapping(t_bytes_memory_ptr,t_uint256)": { "encoding": "mapping", @@ -135,28 +135,28 @@ "label": "string", "numberOfBytes": "32" }, - "t_struct(AddressSet)1954_storage": { + "t_struct(AddressSet)2028_storage": { "encoding": "inplace", "label": "struct EnumerableSet.AddressSet", "numberOfBytes": "64", "members": [ { - "astId": 1953, + "astId": 2027, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Set)1639_storage" + "type": "t_struct(Set)1713_storage" } ] }, - "t_struct(Set)1639_storage": { + "t_struct(Set)1713_storage": { "encoding": "inplace", "label": "struct EnumerableSet.Set", "numberOfBytes": "64", "members": [ { - "astId": 1634, + "astId": 1708, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "_values", "offset": 0, @@ -164,7 +164,7 @@ "type": "t_array(t_bytes32)dyn_storage" }, { - "astId": 1638, + "astId": 1712, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "_positions", "offset": 0, @@ -173,13 +173,13 @@ } ] }, - "t_struct(ValidatorMetadata)2257_storage": { + "t_struct(ValidatorMetadata)41288_storage": { "encoding": "inplace", "label": "struct IIPTokenStaking.ValidatorMetadata", "numberOfBytes": "128", "members": [ { - "astId": 2246, + "astId": 41277, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "exists", "offset": 0, @@ -187,7 +187,7 @@ "type": "t_bool" }, { - "astId": 2248, + "astId": 41279, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "moniker", "offset": 0, @@ -195,7 +195,7 @@ "type": "t_string_storage" }, { - "astId": 2250, + "astId": 41281, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "totalStake", "offset": 0, @@ -203,7 +203,7 @@ "type": "t_uint256" }, { - "astId": 2252, + "astId": 41283, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "commissionRate", "offset": 0, @@ -211,7 +211,7 @@ "type": "t_uint32" }, { - "astId": 2254, + "astId": 41285, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "maxCommissionRate", "offset": 4, @@ -219,7 +219,7 @@ "type": "t_uint32" }, { - "astId": 2256, + "astId": 41287, "contract": "src/protocol/IPTokenStaking.sol:IPTokenStaking", "label": "maxCommissionChangeRate", "offset": 8, diff --git a/contracts/foundry.toml b/contracts/foundry.toml index e7aa4dff..549efd49 100644 --- a/contracts/foundry.toml +++ b/contracts/foundry.toml @@ -1,7 +1,14 @@ [profile.default] src = "src" out = "out" +test = "test" libs = ["node_modules"] +optimizer = true +optimizer_runs = 20000 +solc = "0.8.23" +via_ir = true + +extra_output = ["storageLayout"] remappings = [ "forge-std/=node_modules/forge-std/src", diff --git a/contracts/src/interfaces/IIPTokenStaking.sol b/contracts/src/interfaces/IIPTokenStaking.sol index 9b0cd8f9..fe37684d 100644 --- a/contracts/src/interfaces/IIPTokenStaking.sol +++ b/contracts/src/interfaces/IIPTokenStaking.sol @@ -18,25 +18,27 @@ interface IIPTokenStaking { } /// @param delegatorUncmpPubkey Delegator's 65 bytes uncompressed secp256k1 public key. - /// @param validatorSrcPubkey Source validator's 33 bytes compressed secp256k1 public key. - /// @param validatorDstPubkey Destination validator's 33 bytes compressed secp256k1 public key. + /// @param validatorCmpSrcPubkey Source validator's 33 bytes compressed secp256k1 public key. + /// @param validatorCmpDstPubkey Destination validator's 33 bytes compressed secp256k1 public key. /// @param amount Token amount to redelegate. struct RedelegateParams { bytes delegatorUncmpPubkey; - bytes validatorSrcPubkey; - bytes validatorDstPubkey; + bytes validatorCmpSrcPubkey; + bytes validatorCmpDstPubkey; uint256 amount; } /// @notice Emitted when a new validator is created. - /// @param validatorPubkey 33 bytes compressed secp256k1 public key. + /// @param validatorUncmpPubkey 65 bytes uncompressed secp256k1 public key. + /// @param validatorCmpPubkey 33 bytes compressed secp256k1 public key. /// @param moniker The moniker of the validator. /// @param stakeAmount Token staked to the validator as self-delegation. /// @param commissionRate The commission rate of the validator. /// @param maxCommissionRate The maximum commission rate of the validator. /// @param maxCommissionChangeRate The maximum commission change rate of the validator. event CreateValidator( - bytes validatorPubkey, + bytes validatorUncmpPubkey, + bytes validatorCmpPubkey, string moniker, uint256 stakeAmount, uint32 commissionRate, @@ -45,28 +47,29 @@ interface IIPTokenStaking { ); /// @notice Emitted when the withdrawal address is set/changed. - /// @param depositorPubkey Depositor's 33 bytes compressed secp256k1 public key. + /// @param delegatorCmpPubkey Delegator's 33 bytes compressed secp256k1 public key. /// @param executionAddress Left-padded 32 bytes of the EVM address to receive stake and reward withdrawals. - event SetWithdrawalAddress(bytes depositorPubkey, bytes32 executionAddress); + event SetWithdrawalAddress(bytes delegatorCmpPubkey, bytes32 executionAddress); /// @notice Emitted when a user deposits token into the contract. - /// @param depositorPubkey Depositor's 33 bytes compressed secp256k1 public key. - /// @param validatorPubkey Validator's 33 bytes compressed secp256k1 public key. + /// @param delegatorUncmpPubkey Delegator's 65 bytes uncompressed secp256k1 public key. + /// @param delegatorCmpPubkey Delegator's 33 bytes compressed secp256k1 public key. + /// @param validatorCmpPubkey Validator's 33 bytes compressed secp256k1 public key. /// @param amount Token deposited. - event Deposit(bytes depositorPubkey, bytes validatorPubkey, uint256 amount); + event Deposit(bytes delegatorUncmpPubkey, bytes delegatorCmpPubkey, bytes validatorCmpPubkey, uint256 amount); /// @notice Emitted when a user triggers redelegation of token from source validator to destination validator. - /// @param depositorPubkey Depositor's 33 bytes compressed secp256k1 public key. + /// @param delegatorCmpPubkey Delegator's 33 bytes compressed secp256k1 public key. /// @param validatorSrcPubkey Source validator's 33 bytes compressed secp256k1 public key. /// @param validatorDstPubkey Destination validator's 33 bytes compressed secp256k1 public key. /// @param amount Token redelegated. - event Redelegate(bytes depositorPubkey, bytes validatorSrcPubkey, bytes validatorDstPubkey, uint256 amount); + event Redelegate(bytes delegatorCmpPubkey, bytes validatorSrcPubkey, bytes validatorDstPubkey, uint256 amount); /// @notice Emitted when a user withdraws her stake and starts the unbonding period. - /// @param depositorPubkey Depositor's 33 bytes compressed secp256k1 public key. - /// @param validatorPubkey Validator's 33 bytes compressed secp256k1 public key. + /// @param delegatorCmpPubkey Delegator's 33 bytes compressed secp256k1 public key. + /// @param validatorCmpPubkey Validator's 33 bytes compressed secp256k1 public key. /// @param amount Token deposited. - event Withdraw(bytes depositorPubkey, bytes validatorPubkey, uint256 amount); + event Withdraw(bytes delegatorCmpPubkey, bytes validatorCmpPubkey, uint256 amount); /// @notice Emitted when the minimum stake amount is set. /// @param minStakeAmount The new minimum stake amount. @@ -127,23 +130,23 @@ interface IIPTokenStaking { /// @notice Entry point for creating a new validator with self delegation on behalf of the validator. /// @dev There's no minimum amount required to stake when creating a new validator. - /// @param validatorPubkey 33 bytes compressed secp256k1 public key. - function createValidatorOnBehalf(bytes calldata validatorPubkey) external payable; + /// @param validatorUncmpPubkey 65 bytes uncompressed secp256k1 public key. + function createValidatorOnBehalf(bytes calldata validatorUncmpPubkey) external payable; /// @notice Entry point for staking IP token to stake to the given validator. The consensus chain is notified of /// the deposit and manages the stake accounting and validator onboarding. Payer must be the delegator. /// @dev When staking, consider it as BURNING. Unstaking (withdrawal) will trigger native minting. /// @param delegatorUncmpPubkey Delegator's 65 bytes uncompressed secp256k1 public key. - /// @param validatorPubkey Validator's 33 bytes compressed secp256k1 public key. - function stake(bytes calldata delegatorUncmpPubkey, bytes calldata validatorPubkey) external payable; + /// @param validatorCmpPubkey Validator's 33 bytes compressed secp256k1 public key. + function stake(bytes calldata delegatorUncmpPubkey, bytes calldata validatorCmpPubkey) external payable; /// @notice Entry point for staking IP token to stake to the given validator. The consensus chain is notified of /// the stake and manages the stake accounting and validator onboarding. Payer can stake on behalf of another user, /// who will be the beneficiary of the stake. /// @dev When staking, consider it as BURNING. Unstaking (withdrawal) will trigger native minting. - /// @param delegatorPubkey Delegator's 33 bytes compressed secp256k1 public key. - /// @param validatorPubkey Validator's 33 bytes compressed secp256k1 public key. - function stakeOnBehalf(bytes calldata delegatorPubkey, bytes calldata validatorPubkey) external payable; + /// @param delegatorUncmpPubkey Delegator's 65 bytes uncompressed secp256k1 public key. + /// @param validatorCmpPubkey Validator's 33 bytes compressed secp256k1 public key. + function stakeOnBehalf(bytes calldata delegatorUncmpPubkey, bytes calldata validatorCmpPubkey) external payable; // TODO: Redelegation also requires unbonding period to be executed. Should we separate storage for this for el? /// @notice Entry point for redelegating the staked token. @@ -159,18 +162,18 @@ interface IIPTokenStaking { /// @notice Entry point for unstaking the previously staked token. /// @dev Unstake (withdrawal) will trigger native minting, so token in this contract is considered as burned. /// @param delegatorUncmpPubkey Delegator's 65 bytes uncompressed secp256k1 public key. - /// @param validatorPubkey Validator's 33 bytes compressed secp256k1 public key. + /// @param validatorCmpPubkey Validator's 33 bytes compressed secp256k1 public key. /// @param amount Token amount to unstake. - function unstake(bytes calldata delegatorUncmpPubkey, bytes calldata validatorPubkey, uint256 amount) external; + function unstake(bytes calldata delegatorUncmpPubkey, bytes calldata validatorCmpPubkey, uint256 amount) external; /// @notice Entry point for unstaking the previously staked token on behalf of the delegator. /// @dev Must be an approved operator for the delegator. /// @param delegatorCmpPubkey Delegator's 33 bytes compressed secp256k1 public key. - /// @param validatorPubkey Validator's 33 bytes compressed secp256k1 public key. + /// @param validatorCmpPubkey Validator's 33 bytes compressed secp256k1 public key. /// @param amount Token amount to unstake. function unstakeOnBehalf( bytes calldata delegatorCmpPubkey, - bytes calldata validatorPubkey, + bytes calldata validatorCmpPubkey, uint256 amount ) external; } diff --git a/contracts/src/libraries/Predeploys.sol b/contracts/src/libraries/Predeploys.sol index 1099cb8e..e5be8626 100644 --- a/contracts/src/libraries/Predeploys.sol +++ b/contracts/src/libraries/Predeploys.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity =0.8.24; +pragma solidity ^0.8.23; /** * @title Predeploys diff --git a/contracts/src/protocol/IPTokenStaking.sol b/contracts/src/protocol/IPTokenStaking.sol index 3a81b62c..59457482 100644 --- a/contracts/src/protocol/IPTokenStaking.sol +++ b/contracts/src/protocol/IPTokenStaking.sol @@ -127,10 +127,13 @@ contract IPTokenStaking is IIPTokenStaking, Ownable2StepUpgradeable, ReentrancyG } /// @notice Verifies that the validator with the given pubkey exists. - modifier verifyExistingValidator(bytes calldata validatorPubkey) { - require(validatorPubkey.length == 33, "IPTokenStaking: Invalid pubkey length"); - require(validatorPubkey[0] == 0x02 || validatorPubkey[0] == 0x03, "IPTokenStaking: Invalid pubkey prefix"); - require(validatorMetadata[validatorPubkey].exists, "IPTokenStaking: Validator does not exist"); + modifier verifyExistingValidator(bytes calldata validatorCmpPubkey) { + require(validatorCmpPubkey.length == 33, "IPTokenStaking: Invalid pubkey length"); + require( + validatorCmpPubkey[0] == 0x02 || validatorCmpPubkey[0] == 0x03, + "IPTokenStaking: Invalid pubkey prefix" + ); + require(validatorMetadata[validatorCmpPubkey].exists, "IPTokenStaking: Validator does not exist"); _; } @@ -272,7 +275,7 @@ contract IPTokenStaking is IIPTokenStaking, Ownable2StepUpgradeable, ReentrancyG withdrawalAddressChange[delegatorCmpPubkey] = block.timestamp; emit SetWithdrawalAddress({ - depositorPubkey: delegatorCmpPubkey, + delegatorCmpPubkey: delegatorCmpPubkey, executionAddress: bytes32(uint256(uint160(newWithdrawalAddress))) // left-padded bytes32 of the address }); } @@ -295,18 +298,17 @@ contract IPTokenStaking is IIPTokenStaking, Ownable2StepUpgradeable, ReentrancyG uint32 maxCommissionRate, uint32 maxCommissionChangeRate ) external payable verifyUncmpPubkeyWithExpectedAddress(validatorUncmpPubkey, msg.sender) nonReentrant { - bytes memory validatorCmpPubkey = Secp256k1.compressPublicKey(validatorUncmpPubkey); - _createValidator(validatorCmpPubkey, moniker, commissionRate, maxCommissionRate, maxCommissionChangeRate); + _createValidator(validatorUncmpPubkey, moniker, commissionRate, maxCommissionRate, maxCommissionChangeRate); } /// @notice Entry point for creating a new validator with self delegation on behalf of the validator. /// @dev There's no minimum amount required to stake when creating a new validator. - /// @param validatorPubkey 33 bytes compressed secp256k1 public key. + /// @param validatorUncmpPubkey 65 bytes uncompressed secp256k1 public key. function createValidatorOnBehalf( - bytes calldata validatorPubkey - ) external payable verifyPubkey(validatorPubkey) nonReentrant { + bytes calldata validatorUncmpPubkey + ) external payable verifyUncmpPubkey(validatorUncmpPubkey) nonReentrant { _createValidator( - validatorPubkey, + validatorUncmpPubkey, "validator", DEFAULT_COMMISSION_RATE, DEFAULT_MAX_COMMISSION_RATE, @@ -315,13 +317,13 @@ contract IPTokenStaking is IIPTokenStaking, Ownable2StepUpgradeable, ReentrancyG } /// @dev Validator is the delegator when creating a new validator (self-delegation). - /// @param validatorPubkey 33 bytes compressed secp256k1 public key. + /// @param validatorUncmpPubkey 65 bytes uncompressed secp256k1 public key. /// @param moniker The moniker of the validator. /// @param commissionRate The commission rate of the validator. /// @param maxCommissionRate The maximum commission rate of the validator. /// @param maxCommissionChangeRate The maximum commission change rate of the validator. function _createValidator( - bytes memory validatorPubkey, + bytes calldata validatorUncmpPubkey, string memory moniker, uint32 commissionRate, uint32 maxCommissionRate, @@ -333,15 +335,17 @@ contract IPTokenStaking is IIPTokenStaking, Ownable2StepUpgradeable, ReentrancyG // set, the EL contract will allow for staking but CL will fail because the validator info doesn't exist, thus // the user would lose the fund. Hence, by removing this check, user can and must first call createValidator // again for a removed validator before staking to it. - // require(!validatorMetadata[validatorPubkey].exists, "IPTokenStaking: Validator already exists"); + // require(!validatorMetadata[validatorCmpPubkey].exists, "IPTokenStaking: Validator already exists"); (uint256 stakeAmount, uint256 remainder) = roundedStakeAmount(msg.value); require(stakeAmount > 0, "IPTokenStaking: Stake amount too low"); + bytes memory validatorCmpPubkey = Secp256k1.compressPublicKey(validatorUncmpPubkey); + // Since users can call createValidator multiple times, we need to reuse the existing metadata if it exists. // The only data that monotonically increases is the totalStake. All others are selected based on whether the // validator data already exists or not. - ValidatorMetadata storage vm = validatorMetadata[validatorPubkey]; + ValidatorMetadata storage vm = validatorMetadata[validatorCmpPubkey]; bool exists = vm.exists; // get before updating vm.exists = true; vm.moniker = exists ? vm.moniker : moniker; @@ -350,13 +354,14 @@ contract IPTokenStaking is IIPTokenStaking, Ownable2StepUpgradeable, ReentrancyG vm.maxCommissionRate = exists ? vm.maxCommissionRate : maxCommissionRate; vm.maxCommissionChangeRate = exists ? vm.maxCommissionChangeRate : maxCommissionChangeRate; - delegatorTotalStakes[validatorPubkey] += stakeAmount; - delegatorValidatorStakes[validatorPubkey][validatorPubkey] += stakeAmount; + delegatorTotalStakes[validatorCmpPubkey] += stakeAmount; + delegatorValidatorStakes[validatorCmpPubkey][validatorCmpPubkey] += stakeAmount; _refundRemainder(remainder); emit CreateValidator({ - validatorPubkey: validatorPubkey, + validatorUncmpPubkey: validatorUncmpPubkey, + validatorCmpPubkey: validatorCmpPubkey, moniker: vm.moniker, stakeAmount: stakeAmount, commissionRate: vm.commissionRate, @@ -369,51 +374,58 @@ contract IPTokenStaking is IIPTokenStaking, Ownable2StepUpgradeable, ReentrancyG /// the deposit and manages the stake accounting and validator onboarding. Payer must be the delegator. /// @dev When staking, consider it as BURNING. Unstaking (withdrawal) will trigger native minting. /// @param delegatorUncmpPubkey Delegator's 65 bytes uncompressed secp256k1 public key. - /// @param validatorPubkey Validator's 33 bytes compressed secp256k1 public key. + /// @param validatorCmpPubkey Validator's 33 bytes compressed secp256k1 public key. function stake( bytes calldata delegatorUncmpPubkey, - bytes calldata validatorPubkey + bytes calldata validatorCmpPubkey ) external payable verifyUncmpPubkeyWithExpectedAddress(delegatorUncmpPubkey, msg.sender) - verifyExistingValidator(validatorPubkey) + verifyExistingValidator(validatorCmpPubkey) nonReentrant { - bytes memory delegatorCmpPubkey = Secp256k1.compressPublicKey(delegatorUncmpPubkey); - _stake(delegatorCmpPubkey, validatorPubkey); + _stake(delegatorUncmpPubkey, validatorCmpPubkey); } /// @notice Entry point for staking IP token to stake to the given validator. The consensus chain is notified of /// the stake and manages the stake accounting and validator onboarding. Payer can stake on behalf of another user, /// who will be the beneficiary of the stake. /// @dev When staking, consider it as BURNING. Unstaking (withdrawal) will trigger native minting. - /// @param delegatorPubkey Delegator's 33 bytes compressed secp256k1 public key. - /// @param validatorPubkey Validator's 33 bytes compressed secp256k1 public key. + /// @param delegatorUncmpPubkey Delegator's 33 bytes compressed secp256k1 public key. + /// @param validatorCmpPubkey Validator's 33 bytes compressed secp256k1 public key. function stakeOnBehalf( - bytes calldata delegatorPubkey, - bytes calldata validatorPubkey - ) external payable verifyPubkey(delegatorPubkey) verifyExistingValidator(validatorPubkey) nonReentrant { - _stake(delegatorPubkey, validatorPubkey); + bytes calldata delegatorUncmpPubkey, + bytes calldata validatorCmpPubkey + ) + external + payable + verifyUncmpPubkey(delegatorUncmpPubkey) + verifyExistingValidator(validatorCmpPubkey) + nonReentrant + { + _stake(delegatorUncmpPubkey, validatorCmpPubkey); } /// @dev Creates a validator (x/staking.MsgCreateValidator) if it does not exist. Then delegates the stake to the /// validator (x/staking.MsgDelegate). - /// @param delegatorPubkey Delegator's 33 byte compressed secp256k1 public key (no 0x04 prefix). - /// @param validatorPubkey 33 byte compressed secp256k1 public key (no 0x04 prefix). - function _stake(bytes memory delegatorPubkey, bytes calldata validatorPubkey) internal { + /// @param delegatorUncmpPubkey Delegator's 65 byte uncompressed secp256k1 public key (no 0x04 prefix). + /// @param validatorCmpPubkey 33 byte compressed secp256k1 public key (no 0x04 prefix). + function _stake(bytes memory delegatorUncmpPubkey, bytes calldata validatorCmpPubkey) internal { (uint256 stakeAmount, uint256 remainder) = roundedStakeAmount(msg.value); require(stakeAmount >= minStakeAmount, "IPTokenStaking: Stake amount too low"); + bytes memory delegatorCmpPubkey = Secp256k1.compressPublicKey(delegatorUncmpPubkey); + unchecked { - validatorMetadata[validatorPubkey].totalStake += stakeAmount; - delegatorTotalStakes[delegatorPubkey] += stakeAmount; - delegatorValidatorStakes[delegatorPubkey][validatorPubkey] += stakeAmount; + validatorMetadata[validatorCmpPubkey].totalStake += stakeAmount; + delegatorTotalStakes[delegatorCmpPubkey] += stakeAmount; + delegatorValidatorStakes[delegatorCmpPubkey][validatorCmpPubkey] += stakeAmount; } _refundRemainder(remainder); - emit Deposit(delegatorPubkey, validatorPubkey, stakeAmount); + emit Deposit(delegatorUncmpPubkey, delegatorCmpPubkey, validatorCmpPubkey, stakeAmount); } // TODO: Redelegation also requires unbonding period to be executed. Should we separate storage for this for el? @@ -425,13 +437,13 @@ contract IPTokenStaking is IIPTokenStaking, Ownable2StepUpgradeable, ReentrancyG ) external verifyUncmpPubkeyWithExpectedAddress(p.delegatorUncmpPubkey, msg.sender) - verifyExistingValidator(p.validatorSrcPubkey) - verifyExistingValidator(p.validatorDstPubkey) + verifyExistingValidator(p.validatorCmpSrcPubkey) + verifyExistingValidator(p.validatorCmpDstPubkey) { (uint256 stakeAmount, ) = roundedStakeAmount(p.amount); bytes memory delegatorCmpPubkey = Secp256k1.compressPublicKey(p.delegatorUncmpPubkey); - _redelegate(delegatorCmpPubkey, p.validatorSrcPubkey, p.validatorDstPubkey, stakeAmount); + _redelegate(delegatorCmpPubkey, p.validatorCmpSrcPubkey, p.validatorCmpDstPubkey, stakeAmount); } /// @notice Entry point for redelegating the staked token on behalf of the delegator. @@ -442,93 +454,93 @@ contract IPTokenStaking is IIPTokenStaking, Ownable2StepUpgradeable, ReentrancyG ) external verifyUncmpPubkey(p.delegatorUncmpPubkey) - verifyExistingValidator(p.validatorSrcPubkey) - verifyExistingValidator(p.validatorDstPubkey) + verifyExistingValidator(p.validatorCmpSrcPubkey) + verifyExistingValidator(p.validatorCmpDstPubkey) { bytes memory delegatorCmpPubkey = Secp256k1.compressPublicKey(p.delegatorUncmpPubkey); (uint256 stakeAmount, ) = roundedStakeAmount(p.amount); _verifyCallerIsOperator(delegatorCmpPubkey, msg.sender); - _redelegate(delegatorCmpPubkey, p.validatorSrcPubkey, p.validatorDstPubkey, stakeAmount); + _redelegate(delegatorCmpPubkey, p.validatorCmpSrcPubkey, p.validatorCmpDstPubkey, stakeAmount); } /// @dev Redelegates the given amount from the source validator to the destination validator. - /// @param delegatorPubkey Delegator's 33 bytes compressed secp256k1 public key. + /// @param delegatorCmpPubkey Delegator's 33 bytes compressed secp256k1 public key. /// @param validatorSrcPubkey Source validator's 33 bytes compressed secp256k1 public key. /// @param validatorDstPubkey Destination validator's 33 bytes compressed secp256k1 public key. /// @param amount Token amount to redelegate. function _redelegate( - bytes memory delegatorPubkey, + bytes memory delegatorCmpPubkey, bytes calldata validatorSrcPubkey, bytes calldata validatorDstPubkey, uint256 amount ) internal { require( - delegatorValidatorStakes[delegatorPubkey][validatorSrcPubkey] >= amount, + delegatorValidatorStakes[delegatorCmpPubkey][validatorSrcPubkey] >= amount, "IPTokenStaking: Insufficient staked amount" ); validatorMetadata[validatorSrcPubkey].totalStake -= amount; validatorMetadata[validatorDstPubkey].totalStake += amount; - delegatorValidatorStakes[delegatorPubkey][validatorSrcPubkey] -= amount; - delegatorValidatorStakes[delegatorPubkey][validatorDstPubkey] += amount; + delegatorValidatorStakes[delegatorCmpPubkey][validatorSrcPubkey] -= amount; + delegatorValidatorStakes[delegatorCmpPubkey][validatorDstPubkey] += amount; - emit Redelegate(delegatorPubkey, validatorSrcPubkey, validatorDstPubkey, amount); + emit Redelegate(delegatorCmpPubkey, validatorSrcPubkey, validatorDstPubkey, amount); } /// @notice Entry point for unstaking the previously staked token. /// @dev Unstake (withdrawal) will trigger native minting, so token in this contract is considered as burned. /// @param delegatorUncmpPubkey Delegator's 65 bytes uncompressed secp256k1 public key. - /// @param validatorPubkey Validator's 33 bytes compressed secp256k1 public key. + /// @param validatorCmpPubkey Validator's 33 bytes compressed secp256k1 public key. /// @param amount Token amount to unstake. function unstake( bytes calldata delegatorUncmpPubkey, - bytes calldata validatorPubkey, + bytes calldata validatorCmpPubkey, uint256 amount ) external verifyUncmpPubkeyWithExpectedAddress(delegatorUncmpPubkey, msg.sender) - verifyExistingValidator(validatorPubkey) + verifyExistingValidator(validatorCmpPubkey) { bytes memory delegatorCmpPubkey = Secp256k1.compressPublicKey(delegatorUncmpPubkey); - _unstake(delegatorCmpPubkey, validatorPubkey, amount); + _unstake(delegatorCmpPubkey, validatorCmpPubkey, amount); } /// @notice Entry point for unstaking the previously staked token on behalf of the delegator. /// @dev Must be an approved operator for the delegator. /// @param delegatorCmpPubkey Delegator's 33 bytes compressed secp256k1 public key. - /// @param validatorPubkey Validator's 33 bytes compressed secp256k1 public key. + /// @param validatorCmpPubkey Validator's 33 bytes compressed secp256k1 public key. /// @param amount Token amount to unstake. function unstakeOnBehalf( bytes calldata delegatorCmpPubkey, - bytes calldata validatorPubkey, + bytes calldata validatorCmpPubkey, uint256 amount - ) external verifyPubkey(delegatorCmpPubkey) verifyExistingValidator(validatorPubkey) { + ) external verifyPubkey(delegatorCmpPubkey) verifyExistingValidator(validatorCmpPubkey) { _verifyCallerIsOperator(delegatorCmpPubkey, msg.sender); - _unstake(delegatorCmpPubkey, validatorPubkey, amount); + _unstake(delegatorCmpPubkey, validatorCmpPubkey, amount); } /// @dev Unstakes the given amount from the validator for the delegator, where the amount is deposited to the /// execution address. - function _unstake(bytes memory delegatorPubkey, bytes calldata validatorPubkey, uint256 amount) internal { + function _unstake(bytes memory delegatorCmpPubkey, bytes calldata validatorCmpPubkey, uint256 amount) internal { require( - delegatorValidatorStakes[delegatorPubkey][validatorPubkey] >= amount, + delegatorValidatorStakes[delegatorCmpPubkey][validatorCmpPubkey] >= amount, "IPTokenStaking: Insufficient staked amount" ); - validatorMetadata[validatorPubkey].totalStake -= amount; - delegatorTotalStakes[delegatorPubkey] -= amount; - delegatorValidatorStakes[delegatorPubkey][validatorPubkey] -= amount; + validatorMetadata[validatorCmpPubkey].totalStake -= amount; + delegatorTotalStakes[delegatorCmpPubkey] -= amount; + delegatorValidatorStakes[delegatorCmpPubkey][validatorCmpPubkey] -= amount; // If validator gets slashed and the total staked in CL is less than the total staked in EL, then the validator // might not exist in CL while still existing in EL. - if (validatorMetadata[validatorPubkey].totalStake == 0) { - delete validatorMetadata[validatorPubkey]; + if (validatorMetadata[validatorCmpPubkey].totalStake == 0) { + delete validatorMetadata[validatorCmpPubkey]; } - emit Withdraw(delegatorPubkey, validatorPubkey, amount); + emit Withdraw(delegatorCmpPubkey, validatorCmpPubkey, amount); } /// @dev Refunds the remainder of the stake amount to the msg sender. diff --git a/contracts/test/stake/IPTokenStaking.t.sol b/contracts/test/stake/IPTokenStaking.t.sol index 89a38b09..3a3df3ae 100644 --- a/contracts/test/stake/IPTokenStaking.t.sol +++ b/contracts/test/stake/IPTokenStaking.t.sol @@ -122,12 +122,13 @@ contract IPTokenStakingTest is Test { assertEq(ipTokenStaking.delegatorValidatorStakes(delegatorCmpPubkey, validatorCmpPubkey), 0 ether); // Network shall not allow anyone to create a new validator on behalf if the sender account’s balance is 0. - bytes memory validator1Pubkey = hex"03e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa9111111"; // pragma: allowlist-secret + bytes + memory validator1Pubkey = hex"04e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa988ced195e9327ac89cd362eaa0397f8d7f007c02b2a75642f174e455d339e4a1000000"; // pragma: allowlist-secret stakeAmount = 0 ether; vm.deal(delegatorAddr, stakeAmount); vm.prank(delegatorAddr); vm.expectRevert("IPTokenStaking: Stake amount too low"); - ipTokenStaking.createValidatorOnBehalf{ value: stakeAmount }({ validatorPubkey: validator1Pubkey }); + ipTokenStaking.createValidatorOnBehalf{ value: stakeAmount }({ validatorUncmpPubkey: validator1Pubkey }); // Check that no stakes are put on the validator assertEq(ipTokenStaking.delegatorTotalStakes(validator1Pubkey), 0 ether); assertEq(ipTokenStaking.delegatorValidatorStakes(validator1Pubkey, validator1Pubkey), 0 ether); @@ -137,7 +138,15 @@ contract IPTokenStakingTest is Test { vm.deal(delegatorAddr, stakeAmount); vm.prank(delegatorAddr); vm.expectEmit(address(ipTokenStaking)); - emit IIPTokenStaking.CreateValidator(delegatorCmpPubkey, "delegator's validator", stakeAmount, 1000, 5000, 100); + emit IIPTokenStaking.CreateValidator( + delegatorUncmpPubkey, + delegatorCmpPubkey, + "delegator's validator", + stakeAmount, + 1000, + 5000, + 100 + ); ipTokenStaking.createValidator{ value: stakeAmount }({ validatorUncmpPubkey: delegatorUncmpPubkey, moniker: "delegator's validator", @@ -164,18 +173,28 @@ contract IPTokenStakingTest is Test { // Network shall allow anyone to create a new validator on behalf of a validator. // Note that the operation stakes sender’s tokens to the validator, and the delegator will still be the validator itself. - bytes memory validator2Pubkey = hex"03e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa9222222"; // pragma: allowlist-secret + bytes + memory validator2UncmpPubkey = hex"04e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa988ced195e9327ac89cd362eaa0397f8d7f007c02b2a75642f174e455d339e4a1efe222"; // pragma: allowlist-secret + bytes memory validator2CmpPubkey = Secp256k1.compressPublicKey(validator2UncmpPubkey); stakeAmount = 1000 ether; vm.deal(delegatorAddr, stakeAmount); vm.prank(delegatorAddr); vm.expectEmit(address(ipTokenStaking)); - emit IIPTokenStaking.CreateValidator(validator2Pubkey, "validator", stakeAmount, 1000, 5000, 500); - ipTokenStaking.createValidatorOnBehalf{ value: stakeAmount }({ validatorPubkey: validator2Pubkey }); + emit IIPTokenStaking.CreateValidator( + validator2UncmpPubkey, + validator2CmpPubkey, + "validator", + stakeAmount, + 1000, + 5000, + 500 + ); + ipTokenStaking.createValidatorOnBehalf{ value: stakeAmount }({ validatorUncmpPubkey: validator2UncmpPubkey }); // Check that stakes are correctly put on the validator - assertEq(ipTokenStaking.delegatorTotalStakes(validator2Pubkey), 1000 ether); + assertEq(ipTokenStaking.delegatorTotalStakes(validator2CmpPubkey), 1000 ether); // Check that the delegator is the validator itself - assertEq(ipTokenStaking.delegatorValidatorStakes(validator2Pubkey, validator2Pubkey), 1000 ether); - assertEq(ipTokenStaking.delegatorValidatorStakes(delegatorCmpPubkey, validator2Pubkey), 0 ether); + assertEq(ipTokenStaking.delegatorValidatorStakes(validator2CmpPubkey, validator2CmpPubkey), 1000 ether); + assertEq(ipTokenStaking.delegatorValidatorStakes(delegatorCmpPubkey, validator2CmpPubkey), 0 ether); // NOTE: We have removed the validator existence check in createValidator, thus this test is not valid anymore. // // Network shall not allow anyone to create a new validator with existing validators’ public keys. @@ -184,7 +203,7 @@ contract IPTokenStakingTest is Test { // vm.deal(delegatorAddr, stakeAmount); // vm.prank(delegatorAddr); // vm.expectRevert("IPTokenStaking: Validator already exists"); - // ipTokenStaking.createValidatorOnBehalf{ value: stakeAmount }({ validatorPubkey: validator3Pubkey }); + // ipTokenStaking.createValidatorOnBehalf{ value: stakeAmount }({ validatorCmpPubkey: validator3Pubkey }); // // Check that stakes are changing for the existing validator // assertEq(ipTokenStaking.delegatorTotalStakes(validator3Pubkey), 1000 ether); // assertEq(ipTokenStaking.delegatorValidatorStakes(validator3Pubkey, validator3Pubkey), 1000 ether); @@ -227,7 +246,15 @@ contract IPTokenStakingTest is Test { // Create initially vm.prank(delegatorAddr); vm.expectEmit(address(ipTokenStaking)); - emit IIPTokenStaking.CreateValidator(validatorCmpPubkey, "delegator's validator", stakeAmount, 1000, 5000, 100); + emit IIPTokenStaking.CreateValidator( + validatorUncmpPubkey, + validatorCmpPubkey, + "delegator's validator", + stakeAmount, + 1000, + 5000, + 100 + ); ipTokenStaking.createValidator{ value: stakeAmount }({ validatorUncmpPubkey: validatorUncmpPubkey, moniker: "delegator's validator", @@ -246,7 +273,15 @@ contract IPTokenStakingTest is Test { // Create again vm.prank(delegatorAddr); vm.expectEmit(address(ipTokenStaking)); - emit IIPTokenStaking.CreateValidator(validatorCmpPubkey, "delegator's validator", stakeAmount, 1000, 5000, 100); + emit IIPTokenStaking.CreateValidator( + validatorUncmpPubkey, + validatorCmpPubkey, + "delegator's validator", + stakeAmount, + 1000, + 5000, + 100 + ); ipTokenStaking.createValidator{ value: stakeAmount }({ validatorUncmpPubkey: validatorUncmpPubkey, moniker: "bad name validator", @@ -310,24 +345,26 @@ contract IPTokenStakingTest is Test { // Network shall allow anyone to stake on behalf of another delegator. validatorPubkey = delegatorCmpPubkey; - bytes memory delegator1Pubkey = hex"03e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa9111111"; // pragma: allowlist secret + bytes + memory delegator1UncmpPubkey = hex"04e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa988ced195e9327ac89cd362eaa0397f8d7f007c02b2a75642f174e455d339e4a1000000"; // pragma: allowlist secret + bytes memory delegator1CmpPubkey = Secp256k1.compressPublicKey(delegator1UncmpPubkey); stakeAmount = 1000 ether; vm.deal(delegatorAddr, stakeAmount); - delegatorValidatorBefore = ipTokenStaking.delegatorValidatorStakes(delegator1Pubkey, validatorPubkey); - delegatorTotalBefore = ipTokenStaking.delegatorTotalStakes(delegator1Pubkey); + delegatorValidatorBefore = ipTokenStaking.delegatorValidatorStakes(delegator1CmpPubkey, validatorPubkey); + delegatorTotalBefore = ipTokenStaking.delegatorTotalStakes(delegator1CmpPubkey); (isActive, moniker, totalStake, commissionRate, maxCommissionRate, maxCommissionChangeRate) = ipTokenStaking .validatorMetadata(validatorPubkey); validatorTotalBefore = totalStake; vm.prank(delegatorAddr); - ipTokenStaking.stakeOnBehalf{ value: stakeAmount }(delegator1Pubkey, validatorPubkey); + ipTokenStaking.stakeOnBehalf{ value: stakeAmount }(delegator1UncmpPubkey, validatorPubkey); assertEq( - ipTokenStaking.delegatorValidatorStakes(delegator1Pubkey, validatorPubkey), + ipTokenStaking.delegatorValidatorStakes(delegator1CmpPubkey, validatorPubkey), delegatorValidatorBefore + stakeAmount ); - assertEq(ipTokenStaking.delegatorTotalStakes(delegator1Pubkey), delegatorTotalBefore + stakeAmount); + assertEq(ipTokenStaking.delegatorTotalStakes(delegator1CmpPubkey), delegatorTotalBefore + stakeAmount); (isActive, moniker, totalStake, commissionRate, maxCommissionRate, maxCommissionChangeRate) = ipTokenStaking .validatorMetadata(validatorPubkey); assertEq(totalStake, validatorTotalBefore + stakeAmount); @@ -336,68 +373,77 @@ contract IPTokenStakingTest is Test { // Network shall prevent depositing stake into a validator pubkey that has not been created (stakeOnBehalf). validatorPubkey = hex"03e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa9777777"; // pragma: allowlist secret - delegator1Pubkey = hex"03e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa9111111"; // pragma: allowlist secret + delegator1UncmpPubkey = hex"04e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa988ced195e9327ac89cd362eaa0397f8d7f007c02b2a75642f174e455d339e4a1000000"; // pragma: allowlist secret + delegator1CmpPubkey = Secp256k1.compressPublicKey(delegator1UncmpPubkey); stakeAmount = 1000 ether; vm.deal(delegatorAddr, stakeAmount); - delegatorValidatorBefore = ipTokenStaking.delegatorValidatorStakes(delegator1Pubkey, validatorPubkey); - delegatorTotalBefore = ipTokenStaking.delegatorTotalStakes(delegator1Pubkey); + delegatorValidatorBefore = ipTokenStaking.delegatorValidatorStakes(delegator1CmpPubkey, validatorPubkey); + delegatorTotalBefore = ipTokenStaking.delegatorTotalStakes(delegator1CmpPubkey); (isActive, moniker, totalStake, commissionRate, maxCommissionRate, maxCommissionChangeRate) = ipTokenStaking .validatorMetadata(validatorPubkey); validatorTotalBefore = totalStake; vm.prank(delegatorAddr); vm.expectRevert("IPTokenStaking: Validator does not exist"); - ipTokenStaking.stakeOnBehalf{ value: stakeAmount }(delegator1Pubkey, validatorPubkey); + ipTokenStaking.stakeOnBehalf{ value: stakeAmount }(delegator1UncmpPubkey, validatorPubkey); - assertEq(ipTokenStaking.delegatorValidatorStakes(delegator1Pubkey, validatorPubkey), delegatorValidatorBefore); - assertEq(ipTokenStaking.delegatorTotalStakes(delegator1Pubkey), delegatorTotalBefore); + assertEq( + ipTokenStaking.delegatorValidatorStakes(delegator1CmpPubkey, validatorPubkey), + delegatorValidatorBefore + ); + assertEq(ipTokenStaking.delegatorTotalStakes(delegator1CmpPubkey), delegatorTotalBefore); (isActive, moniker, totalStake, commissionRate, maxCommissionRate, maxCommissionChangeRate) = ipTokenStaking .validatorMetadata(validatorPubkey); assertEq(totalStake, validatorTotalBefore); // Network shall not allow anyone to deposit stake < minimum stake amount validatorPubkey = delegatorCmpPubkey; - delegator1Pubkey = hex"03e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa9111111"; // pragma: allowlist secret + delegator1UncmpPubkey = hex"04e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa988ced195e9327ac89cd362eaa0397f8d7f007c02b2a75642f174e455d339e4a1000000"; // pragma: allowlist secret + delegator1CmpPubkey = Secp256k1.compressPublicKey(delegator1UncmpPubkey); stakeAmount = 100 gwei; vm.deal(delegatorAddr, stakeAmount); - delegatorValidatorBefore = ipTokenStaking.delegatorValidatorStakes(delegator1Pubkey, validatorPubkey); - delegatorTotalBefore = ipTokenStaking.delegatorTotalStakes(delegator1Pubkey); + delegatorValidatorBefore = ipTokenStaking.delegatorValidatorStakes(delegator1CmpPubkey, validatorPubkey); + delegatorTotalBefore = ipTokenStaking.delegatorTotalStakes(delegator1CmpPubkey); (isActive, moniker, totalStake, commissionRate, maxCommissionRate, maxCommissionChangeRate) = ipTokenStaking .validatorMetadata(validatorPubkey); validatorTotalBefore = totalStake; vm.prank(delegatorAddr); vm.expectRevert("IPTokenStaking: Stake amount too low"); - ipTokenStaking.stakeOnBehalf{ value: stakeAmount }(delegator1Pubkey, validatorPubkey); + ipTokenStaking.stakeOnBehalf{ value: stakeAmount }(delegator1UncmpPubkey, validatorPubkey); - assertEq(ipTokenStaking.delegatorValidatorStakes(delegator1Pubkey, validatorPubkey), delegatorValidatorBefore); - assertEq(ipTokenStaking.delegatorTotalStakes(delegator1Pubkey), delegatorTotalBefore); + assertEq( + ipTokenStaking.delegatorValidatorStakes(delegator1CmpPubkey, validatorPubkey), + delegatorValidatorBefore + ); + assertEq(ipTokenStaking.delegatorTotalStakes(delegator1CmpPubkey), delegatorTotalBefore); (isActive, moniker, totalStake, commissionRate, maxCommissionRate, maxCommissionChangeRate) = ipTokenStaking .validatorMetadata(validatorPubkey); assertEq(totalStake, validatorTotalBefore); // Network shall round the input stake amount by 1 gwei and send the remainder back to the sender. validatorPubkey = delegatorCmpPubkey; - delegator1Pubkey = hex"03e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa9111111"; // pragma: allowlist secret + delegator1UncmpPubkey = hex"04e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa988ced195e9327ac89cd362eaa0397f8d7f007c02b2a75642f174e455d339e4a1000000"; // pragma: allowlist secret + delegator1CmpPubkey = Secp256k1.compressPublicKey(delegator1UncmpPubkey); stakeAmount = 1_000_000_000_000_000_001 wei; vm.deal(delegatorAddr, stakeAmount); - delegatorValidatorBefore = ipTokenStaking.delegatorValidatorStakes(delegator1Pubkey, validatorPubkey); - delegatorTotalBefore = ipTokenStaking.delegatorTotalStakes(delegator1Pubkey); + delegatorValidatorBefore = ipTokenStaking.delegatorValidatorStakes(delegator1CmpPubkey, validatorPubkey); + delegatorTotalBefore = ipTokenStaking.delegatorTotalStakes(delegator1CmpPubkey); (isActive, moniker, totalStake, commissionRate, maxCommissionRate, maxCommissionChangeRate) = ipTokenStaking .validatorMetadata(validatorPubkey); validatorTotalBefore = totalStake; vm.prank(delegatorAddr); - ipTokenStaking.stakeOnBehalf{ value: stakeAmount }(delegator1Pubkey, validatorPubkey); + ipTokenStaking.stakeOnBehalf{ value: stakeAmount }(delegator1UncmpPubkey, validatorPubkey); assertEq( - ipTokenStaking.delegatorValidatorStakes(delegator1Pubkey, validatorPubkey), + ipTokenStaking.delegatorValidatorStakes(delegator1CmpPubkey, validatorPubkey), delegatorValidatorBefore + stakeAmount - 1 wei ); - assertEq(ipTokenStaking.delegatorTotalStakes(delegator1Pubkey), delegatorTotalBefore + stakeAmount - 1 wei); + assertEq(ipTokenStaking.delegatorTotalStakes(delegator1CmpPubkey), delegatorTotalBefore + stakeAmount - 1 wei); (isActive, moniker, totalStake, commissionRate, maxCommissionRate, maxCommissionChangeRate) = ipTokenStaking .validatorMetadata(validatorPubkey); assertEq(totalStake, validatorTotalBefore + stakeAmount - 1 wei); @@ -416,11 +462,11 @@ contract IPTokenStakingTest is Test { // last character modified from e => f bytes - memory validatorDstUncmpPubkey = hex"03eb8e065336169de70e591e397b76600a71b356c9c3c629a8d0987e2169588e5b64d5f0c60f03ec8f5b13ba133b0a8e0f03bbaa8e678c0d03bb9dab42626be04f"; // pragma: allowlist-secret + memory validatorDstUncmpPubkey = hex"04e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa988ced195e9327ac89cd362eaa0397f8d7f007c02b2a75642f174e455d339e4a1000000"; // pragma: allowlist-secret bytes memory validatorDstCmpPubkey = Secp256k1.compressPublicKey(validatorDstUncmpPubkey); // Create the new validator - ipTokenStaking.createValidatorOnBehalf{ value: 1 gwei }(validatorDstCmpPubkey); + ipTokenStaking.createValidatorOnBehalf{ value: 1 gwei }(validatorDstUncmpPubkey); uint256 srcValidatorBefore = ipTokenStaking.delegatorValidatorStakes(delegatorCmpPubkey, validatorSrcPubkey); uint256 dstValidatorBefore = ipTokenStaking.delegatorValidatorStakes(delegatorCmpPubkey, validatorDstCmpPubkey); @@ -431,8 +477,8 @@ contract IPTokenStakingTest is Test { ipTokenStaking.redelegate( IIPTokenStaking.RedelegateParams({ delegatorUncmpPubkey: delegatorUncmpPubkey, - validatorSrcPubkey: validatorSrcPubkey, - validatorDstPubkey: validatorDstCmpPubkey, + validatorCmpSrcPubkey: validatorSrcPubkey, + validatorCmpDstPubkey: validatorDstCmpPubkey, amount: stakeAmount }) ); @@ -455,7 +501,7 @@ contract IPTokenStakingTest is Test { vm.prank(delegatorAddr); ipTokenStaking.stake{ value: stakeAmount }(delegatorUncmpPubkey, validatorSrcPubkey); - validatorDstUncmpPubkey = hex"03eb8e065336169de70e591e397b76600a71b356c9c3c629a8d0987e2169588e5b64d5f0c60f03ec8f5b13ba133b0a8e0f03bbaa8e678c0d03bb9dab42626be04f"; // pragma: allowlist-secret + validatorDstUncmpPubkey = hex"04e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa988ced195e9327ac89cd362eaa0397f8d7f007c02b2a75642f174e455d339e4a1000000"; // pragma: allowlist-secret validatorDstCmpPubkey = Secp256k1.compressPublicKey(validatorDstUncmpPubkey); srcValidatorBefore = ipTokenStaking.delegatorValidatorStakes(delegatorCmpPubkey, validatorSrcPubkey); @@ -466,8 +512,8 @@ contract IPTokenStakingTest is Test { ipTokenStaking.redelegateOnBehalf( IIPTokenStaking.RedelegateParams({ delegatorUncmpPubkey: delegatorUncmpPubkey, - validatorSrcPubkey: validatorSrcPubkey, - validatorDstPubkey: validatorDstCmpPubkey, + validatorCmpSrcPubkey: validatorSrcPubkey, + validatorCmpDstPubkey: validatorDstCmpPubkey, amount: stakeAmount }) ); @@ -481,7 +527,7 @@ contract IPTokenStakingTest is Test { vm.prank(delegatorAddr); ipTokenStaking.stake{ value: stakeAmount }(delegatorUncmpPubkey, validatorSrcPubkey); - validatorDstUncmpPubkey = hex"03eb8e065336169de70e591e397b76600a71b356c9c3c629a8d0987e2169588e5b64d5f0c60f03ec8f5b13ba133b0a8e0f03bbaa8e678c0d03bb9dab42626be04f"; // pragma: allowlist-secret + validatorDstUncmpPubkey = hex"04e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa988ced195e9327ac89cd362eaa0397f8d7f007c02b2a75642f174e455d339e4a1000000"; // pragma: allowlist-secret validatorDstCmpPubkey = Secp256k1.compressPublicKey(validatorDstUncmpPubkey); srcValidatorBefore = ipTokenStaking.delegatorValidatorStakes(delegatorCmpPubkey, validatorSrcPubkey); @@ -493,8 +539,8 @@ contract IPTokenStakingTest is Test { ipTokenStaking.redelegateOnBehalf( IIPTokenStaking.RedelegateParams({ delegatorUncmpPubkey: delegatorUncmpPubkey, - validatorSrcPubkey: validatorSrcPubkey, - validatorDstPubkey: validatorDstCmpPubkey, + validatorCmpSrcPubkey: validatorSrcPubkey, + validatorCmpDstPubkey: validatorDstCmpPubkey, amount: stakeAmount }) ); @@ -513,7 +559,7 @@ contract IPTokenStakingTest is Test { validatorSrcPubkey = hex"03e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa9888888"; // pragma: allowlist secret stakeAmount = 5 ether; - validatorDstUncmpPubkey = hex"03eb8e065336169de70e591e397b76600a71b356c9c3c629a8d0987e2169588e5b64d5f0c60f03ec8f5b13ba133b0a8e0f03bbaa8e678c0d03bb9dab42626be04f"; // pragma: allowlist-secret + validatorDstUncmpPubkey = hex"04e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa988ced195e9327ac89cd362eaa0397f8d7f007c02b2a75642f174e455d339e4a1000000"; // pragma: allowlist-secret validatorDstCmpPubkey = Secp256k1.compressPublicKey(validatorDstUncmpPubkey); srcValidatorBefore = ipTokenStaking.delegatorValidatorStakes(delegatorCmpPubkey, validatorSrcPubkey); @@ -524,8 +570,8 @@ contract IPTokenStakingTest is Test { ipTokenStaking.redelegateOnBehalf( IIPTokenStaking.RedelegateParams({ delegatorUncmpPubkey: delegatorUncmpPubkey, - validatorSrcPubkey: validatorSrcPubkey, - validatorDstPubkey: validatorDstCmpPubkey, + validatorCmpSrcPubkey: validatorSrcPubkey, + validatorCmpDstPubkey: validatorDstCmpPubkey, amount: stakeAmount }) ); @@ -537,7 +583,7 @@ contract IPTokenStakingTest is Test { vm.prank(delegatorAddr); ipTokenStaking.stake{ value: stakeAmount }(delegatorUncmpPubkey, validatorSrcPubkey); - validatorDstUncmpPubkey = hex"03eb8e065336169de70e591e397b76600a71b356c9c3c629a8d0987e2169588e5b64d5f0c60f03ec8f5b13ba133b0a8e0f03bbaa8e678c0d03bb9dab4262000000"; // pragma: allowlist-secret + validatorDstUncmpPubkey = hex"04e28d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa988ced195e9327ac89cd362eaa0397f8d7f007c02b2a75642f174e455d339e4a1000000"; // pragma: allowlist-secret validatorDstCmpPubkey = Secp256k1.compressPublicKey(validatorDstUncmpPubkey); vm.prank(operator); @@ -545,8 +591,8 @@ contract IPTokenStakingTest is Test { ipTokenStaking.redelegateOnBehalf( IIPTokenStaking.RedelegateParams({ delegatorUncmpPubkey: delegatorUncmpPubkey, - validatorSrcPubkey: validatorSrcPubkey, - validatorDstPubkey: validatorDstCmpPubkey, + validatorCmpSrcPubkey: validatorSrcPubkey, + validatorCmpDstPubkey: validatorDstCmpPubkey, amount: stakeAmount }) ); @@ -558,7 +604,7 @@ contract IPTokenStakingTest is Test { vm.prank(delegatorAddr); ipTokenStaking.stake{ value: stakeAmount }(delegatorUncmpPubkey, validatorSrcPubkey); - validatorDstUncmpPubkey = hex"03eb8e065336169de70e591e397b76600a71b356c9c3c629a8d0987e2169588e5b64d5f0c60f03ec8f5b13ba133b0a8e0f03bbaa8e678c0d03bb9dab42626be04f"; // pragma: allowlist-secret + validatorDstUncmpPubkey = hex"04e38d15ae6cc5d41cce27a2307903cb12a406cbf463fe5fef215bdf8aa988ced195e9327ac89cd362eaa0397f8d7f007c02b2a75642f174e455d339e4a1000000"; // pragma: allowlist-secret validatorDstCmpPubkey = Secp256k1.compressPublicKey(validatorDstUncmpPubkey); srcValidatorBefore = ipTokenStaking.delegatorValidatorStakes(delegatorCmpPubkey, validatorSrcPubkey); @@ -569,8 +615,8 @@ contract IPTokenStakingTest is Test { ipTokenStaking.redelegateOnBehalf( IIPTokenStaking.RedelegateParams({ delegatorUncmpPubkey: delegatorUncmpPubkey, - validatorSrcPubkey: validatorSrcPubkey, - validatorDstPubkey: validatorDstCmpPubkey, + validatorCmpSrcPubkey: validatorSrcPubkey, + validatorCmpDstPubkey: validatorDstCmpPubkey, amount: stakeAmount + 100 ether }) );