diff --git a/blade-contracts b/blade-contracts index f6f0551eb8..de420a2678 160000 --- a/blade-contracts +++ b/blade-contracts @@ -1 +1 @@ -Subproject commit f6f0551eb86b0c65426617701432ed7db8885152 +Subproject commit de420a2678ef3a4651a0ae39a681894c5af7360e diff --git a/command/bridge/deploy/deploy.go b/command/bridge/deploy/deploy.go index 3a21e2dc1d..20803db4e4 100644 --- a/command/bridge/deploy/deploy.go +++ b/command/bridge/deploy/deploy.go @@ -34,7 +34,6 @@ const ( exitHelperName = "ExitHelper" rootERC20PredicateName = "RootERC20Predicate" childERC20MintablePredicateName = "ChildERC20MintablePredicate" - rootERC20Name = "RootERC20" erc20TemplateName = "ERC20Template" rootERC721PredicateName = "RootERC721Predicate" childERC721MintablePredicateName = "ChildERC721MintablePredicate" @@ -78,9 +77,6 @@ var ( rootchainConfig *polybft.RootchainConfig, addr types.Address) { rootchainConfig.ChildMintableERC20PredicateAddress = addr }, - rootERC20Name: func(rootchainConfig *polybft.RootchainConfig, addr types.Address) { - rootchainConfig.RootNativeERC20Address = addr - }, erc20TemplateName: func(rootchainConfig *polybft.RootchainConfig, addr types.Address) { rootchainConfig.ChildERC20Address = addr }, @@ -133,7 +129,7 @@ var ( NewChildERC20Predicate: contracts.ChildERC20PredicateContract, NewChildTokenTemplate: contracts.ChildERC20Contract, // map root native token address should be non-zero only if native token is non-mintable on a childchain - NewNativeTokenRoot: config.RootNativeERC20Address, + NewNativeTokenRoot: types.ZeroAddress, } return initContract(fmt, relayer, inputParams, @@ -247,13 +243,6 @@ func GetCommand() *cobra.Command { "the JSON RPC rootchain IP address", ) - cmd.Flags().StringVar( - ¶ms.rootERC20TokenAddr, - erc20AddrFlag, - "", - "existing root chain root native token address", - ) - cmd.Flags().BoolVar( ¶ms.isTestMode, helper.TestModeFlag, @@ -419,21 +408,6 @@ func deployContracts(outputter command.OutputFormatter, client *jsonrpc.Client, StakeManagerAddress: types.StringToAddress(params.stakeManagerAddr), } - tokenContracts := []*contractInfo{} - - // deploy root ERC20 token only if non-mintable native token flavor is used on a child chain - if params.rootERC20TokenAddr != "" { - // use existing root chain ERC20 token - if err := populateExistingTokenAddr(client.Eth(), - params.rootERC20TokenAddr, rootERC20Name, rootchainConfig); err != nil { - return deploymentResultInfo{RootchainCfg: nil, CommandResults: nil}, err - } - } else { - // deploy MockERC20 as a root chain root native token - tokenContracts = append(tokenContracts, - &contractInfo{name: rootERC20Name, artifact: contractsapi.RootERC20}) - } - allContracts := []*contractInfo{ { name: stateSenderName, @@ -515,8 +489,6 @@ func deployContracts(outputter command.OutputFormatter, client *jsonrpc.Client, }, } - allContracts = append(tokenContracts, allContracts...) - g, ctx := errgroup.WithContext(cmdCtx) results := make(map[string]*deployContractResult, len(allContracts)) resultsLock := sync.Mutex{} diff --git a/command/bridge/deploy/deploy_test.go b/command/bridge/deploy/deploy_test.go index 4ebe9cbc60..3c899067af 100644 --- a/command/bridge/deploy/deploy_test.go +++ b/command/bridge/deploy/deploy_test.go @@ -53,10 +53,9 @@ func TestDeployContracts_NoPanics(t *testing.T) { params.proxyContractsAdmin = "0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed" consensusCfg = polybft.PolyBFTConfig{ NativeTokenConfig: &polybft.TokenConfig{ - Name: "Test", - Symbol: "TST", - Decimals: 18, - IsMintable: false, + Name: "Test", + Symbol: "TST", + Decimals: 18, }, } diff --git a/command/bridge/deploy/params.go b/command/bridge/deploy/params.go index 33ab529856..8e71ea0408 100644 --- a/command/bridge/deploy/params.go +++ b/command/bridge/deploy/params.go @@ -12,7 +12,6 @@ import ( const ( deployerKeyFlag = "deployer-key" jsonRPCFlag = "json-rpc" - erc20AddrFlag = "erc20-token" ) type deployParams struct { @@ -20,7 +19,6 @@ type deployParams struct { deployerKey string jsonRPCAddress string stakeTokenAddr string - rootERC20TokenAddr string stakeManagerAddr string proxyContractsAdmin string isTestMode bool @@ -42,11 +40,6 @@ func (ip *deployParams) validateFlags() error { return errors.New("native token configuration is undefined") } - // when using mintable native token, child native token on root chain gets mapped automatically - if consensusCfg.NativeTokenConfig.IsMintable && ip.rootERC20TokenAddr != "" { - return errors.New("if child chain native token is mintable, root native token must not pre-exist on root chain") - } - if params.stakeTokenAddr == "" { return errors.New("stake token address is not provided") } diff --git a/command/genesis/genesis.go b/command/genesis/genesis.go index 82eb38602e..ab5fa36f85 100644 --- a/command/genesis/genesis.go +++ b/command/genesis/genesis.go @@ -190,7 +190,7 @@ func setFlags(cmd *cobra.Command) { nativeTokenConfigFlag, "", "native token configuration, provided in the following format: "+ - "", + "", ) cmd.Flags().StringVar( @@ -220,6 +220,13 @@ func setFlags(cmd *cobra.Command) { defaultBlockTrackerPollInterval, "interval (number of seconds) at which block tracker polls for latest block at rootchain", ) + + cmd.Flags().StringVar( + ¶ms.bladeAdmin, + bladeAdminFlag, + "", + "address of owner/admin of NativeERC20 token and StakeManager", + ) } // Access Control Lists diff --git a/command/genesis/params.go b/command/genesis/params.go index 7444b66bb1..78a48f470e 100644 --- a/command/genesis/params.go +++ b/command/genesis/params.go @@ -47,9 +47,7 @@ var ( errBaseFeeEMZero = errors.New("base fee elasticity multiplier must be greater than 0") errBaseFeeZero = errors.New("base fee must be greater than 0") errRewardWalletNotDefined = errors.New("reward wallet address must be defined") - errRewardTokenOnNonMintable = errors.New("a custom reward token must be defined when " + - "native ERC20 token is non-mintable") - errRewardWalletZero = errors.New("reward wallet address must not be zero address") + errRewardWalletZero = errors.New("reward wallet address must not be zero address") ) type genesisParams struct { @@ -113,6 +111,7 @@ type genesisParams struct { blockTrackerPollInterval time.Duration proxyContractsAdmin string + bladeAdmin string } func (p *genesisParams) validateFlags() error { @@ -156,6 +155,10 @@ func (p *genesisParams) validateFlags() error { return err } + if err := p.validateBladeAdminFlag(); err != nil { + return err + } + if err := p.parseStakeInfo(); err != nil { return err } diff --git a/command/genesis/params_test.go b/command/genesis/params_test.go index 9ff5e388fb..c393d2e2b3 100644 --- a/command/genesis/params_test.go +++ b/command/genesis/params_test.go @@ -30,33 +30,31 @@ func Test_extractNativeTokenMetadata(t *testing.T) { }, { name: "not enough params provided", - rawConfig: "Test:TST:18", + rawConfig: "Test:TST", expectErr: true, }, { name: "empty name provided", - rawConfig: ":TST:18:0x123456789", + rawConfig: ":TST:18", expectErr: true, }, { name: "empty symbol provided", - rawConfig: "Test::18:0x123456789", + rawConfig: "Test::18", expectErr: true, }, { name: "invalid decimals number provided", - rawConfig: "Test:TST:9999999999999999999999999999999999999999999999999999999999:false:0x123456789", + rawConfig: "Test:TST:9999999999999999999999999999999999999999999999999999999999:false", expectErr: true, }, { name: "valid config", - rawConfig: "MyToken:MTK:9:0x123456789", + rawConfig: "MyToken:MTK:9", expectedCfg: &polybft.TokenConfig{ - Name: "MyToken", - Symbol: "MTK", - Decimals: 9, - IsMintable: true, - Owner: types.StringToAddress("0x123456789"), + Name: "MyToken", + Symbol: "MTK", + Decimals: 9, }, expectErr: false, }, @@ -185,13 +183,6 @@ func Test_validateRewardWallet(t *testing.T) { isNativeERC20Mintable: true, expectValidateErr: nil, }, - { - name: "valid reward wallet: native ERC20 mintable", - rewardWallet: types.StringToAddress("1").String() + ":0", - epochReward: 0, - isNativeERC20Mintable: false, - expectValidateErr: errRewardTokenOnNonMintable, - }, } for _, c := range cases { c := c @@ -201,7 +192,7 @@ func Test_validateRewardWallet(t *testing.T) { p := &genesisParams{ rewardWallet: c.rewardWallet, epochReward: c.epochReward, - nativeTokenConfig: &polybft.TokenConfig{IsMintable: c.isNativeERC20Mintable}, + nativeTokenConfig: &polybft.TokenConfig{}, } err := p.validateRewardWalletAndToken() require.ErrorIs(t, err, c.expectValidateErr) diff --git a/command/genesis/polybft_params.go b/command/genesis/polybft_params.go index bad4a44fe8..6e7b3eaa2e 100644 --- a/command/genesis/polybft_params.go +++ b/command/genesis/polybft_params.go @@ -49,6 +49,7 @@ const ( bridgeAllowListEnabledFlag = "bridge-allow-list-enabled" bridgeBlockListAdminFlag = "bridge-block-list-admin" bridgeBlockListEnabledFlag = "bridge-block-list-enabled" + bladeAdminFlag = "blade-admin" bootnodePortStart = 30301 @@ -57,9 +58,13 @@ const ( ) var ( - errNoGenesisValidators = errors.New("genesis validators aren't provided") - errNoPremineAllowed = errors.New("native token is not mintable, so no premine is allowed " + - "except for zero address and reward wallet if native token is used as reward token") + errNoGenesisValidators = errors.New("genesis validators aren't provided") + errProxyAdminNotProvided = errors.New("proxy contracts admin address must be set") + errProxyAdminIsZeroAddress = errors.New("proxy contracts admin address must not be zero address") + errProxyAdminIsSystemCaller = errors.New("proxy contracts admin address must not be system caller address") + errBladeAdminNotProvided = errors.New("blade admin address must be set") + errBladeAdminIsZeroAddress = errors.New("blade admin address must not be zero address") + errBladeAdminIsSystemCaller = errors.New("blade admin address must not be system caller address") ) type contractInfo struct { @@ -81,16 +86,6 @@ func (p *genesisParams) generateChainConfig(o command.OutputFormatter) error { return fmt.Errorf("invalid reward wallet configuration provided '%s' : %w", p.rewardWallet, err) } - if !p.nativeTokenConfig.IsMintable { - // validate premine map, no premine is allowed if token is not mintable, - // except for the reward wallet (if native token is used as reward token) and zero address - for a := range premineBalances { - if a != types.ZeroAddress && (p.rewardTokenCode != "" || a != walletPremineInfo.Address) { - return errNoPremineAllowed - } - } - } - var ( rewardTokenByteCode []byte rewardTokenAddr = contracts.NativeERC20TokenContract @@ -151,6 +146,7 @@ func (p *genesisParams) generateChainConfig(o command.OutputFormatter) error { BlockTimeDrift: p.blockTimeDrift, BlockTrackerPollInterval: common.Duration{Duration: p.blockTrackerPollInterval}, ProxyContractsAdmin: types.StringToAddress(p.proxyContractsAdmin), + BladeAdmin: types.StringToAddress(p.bladeAdmin), } enabledForks := chain.AllForksEnabled @@ -339,20 +335,10 @@ func (p *genesisParams) deployContracts( artifact: contractsapi.RootERC20, address: contracts.ERC20Contract, }, - } - - if !params.nativeTokenConfig.IsMintable { - genesisContracts = append(genesisContracts, - &contractInfo{ - artifact: contractsapi.NativeERC20, - address: contracts.NativeERC20TokenContractV1, - }) - } else { - genesisContracts = append(genesisContracts, - &contractInfo{ - artifact: contractsapi.NativeERC20, - address: contracts.NativeERC20TokenContractV1, - }) + { + artifact: contractsapi.NativeERC20, + address: contracts.NativeERC20TokenContractV1, + }, } if len(params.bridgeAllowListAdmin) != 0 || len(params.bridgeBlockListAdmin) != 0 { @@ -510,40 +496,12 @@ func (p *genesisParams) getValidatorAccounts() ([]*validator.GenesisValidator, e return validators, nil } -// validatePolyBFTParams validates params for polybft consensus -func (p *genesisParams) validatePolyBFTParams() error { - if err := p.extractNativeTokenMetadata(); err != nil { - return err - } - - if err := p.validateRewardWalletAndToken(); err != nil { - return err - } - - if err := p.validatePremineInfo(); err != nil { - return err - } - - if p.epochSize < 2 { - // Epoch size must be greater than 1, so new transactions have a chance to be added to a block. - // Otherwise, every block would be an endblock (meaning it will not have any transactions). - // Check is placed here to avoid additional parsing if epochSize < 2 - return errInvalidEpochSize - } - - return p.validateProxyContractsAdmin() -} - // validateRewardWalletAndToken validates reward wallet flag func (p *genesisParams) validateRewardWalletAndToken() error { if p.rewardWallet == "" { return errRewardWalletNotDefined } - if !p.nativeTokenConfig.IsMintable && p.rewardTokenCode == "" { - return errRewardTokenOnNonMintable - } - premineInfo, err := helper.ParsePremineInfo(p.rewardWallet) if err != nil { return err @@ -563,16 +521,41 @@ func (p *genesisParams) validateRewardWalletAndToken() error { func (p *genesisParams) validateProxyContractsAdmin() error { if strings.TrimSpace(p.proxyContractsAdmin) == "" { - return errors.New("proxy contracts admin address must be set") + return errProxyAdminNotProvided + } + + if err := types.IsValidAddress(p.proxyContractsAdmin); err != nil { + return fmt.Errorf("proxy contracts admin address is not a valid address: %w", err) } proxyContractsAdminAddr := types.StringToAddress(p.proxyContractsAdmin) if proxyContractsAdminAddr == types.ZeroAddress { - return errors.New("proxy contracts admin address must not be zero address") + return errProxyAdminIsZeroAddress } if proxyContractsAdminAddr == contracts.SystemCaller { - return errors.New("proxy contracts admin address must not be system caller address") + return errProxyAdminIsSystemCaller + } + + return nil +} + +func (p *genesisParams) validateBladeAdminFlag() error { + if strings.TrimSpace(p.bladeAdmin) == "" { + return errBladeAdminNotProvided + } + + if err := types.IsValidAddress(p.bladeAdmin); err != nil { + return fmt.Errorf("blade admin address is not a valid address: %w", err) + } + + bladeAdminAddr := types.StringToAddress(p.proxyContractsAdmin) + if bladeAdminAddr == types.ZeroAddress { + return errBladeAdminIsZeroAddress + } + + if bladeAdminAddr == contracts.SystemCaller { + return errBladeAdminIsSystemCaller } return nil diff --git a/command/helper/helper.go b/command/helper/helper.go index ef22f4b240..2e1624de57 100644 --- a/command/helper/helper.go +++ b/command/helper/helper.go @@ -267,7 +267,6 @@ func ValidateProxyContractsAdmin(proxyContractsAdmin string) error { type PremineInfo struct { Address types.Address Amount *big.Int - Key string // only used for tests } // parsePremineInfo parses provided premine information and returns premine address and amount @@ -275,7 +274,6 @@ func ParsePremineInfo(premineInfoRaw string) (*PremineInfo, error) { var ( address types.Address amount = command.DefaultPremineBalance - key string err error ) @@ -288,14 +286,10 @@ func ParsePremineInfo(premineInfoRaw string) (*PremineInfo, error) { } address = types.StringToAddress(parts[0]) - - if len(parts) == 3 { // :: - key = parts[2] - } } else { // address = types.StringToAddress(premineInfoRaw) } - return &PremineInfo{Address: address, Amount: amount, Key: key}, nil + return &PremineInfo{Address: address, Amount: amount}, nil } diff --git a/consensus/polybft/contracts_initializer.go b/consensus/polybft/contracts_initializer.go index 1bf92d45df..ab001c8f9f 100644 --- a/consensus/polybft/contracts_initializer.go +++ b/consensus/polybft/contracts_initializer.go @@ -60,6 +60,7 @@ func initStakeManager(polyBFTConfig PolyBFTConfig, transition *state.Transition) NewBls: contracts.BLSContract, EpochManager: contracts.EpochManagerContract, NewDomain: signer.DomainValidatorSetString, + Owner: polyBFTConfig.BladeAdmin, } input, err := initFn.EncodeAbi() @@ -106,7 +107,7 @@ func getInitERC20PredicateInput(config *BridgeConfig, childChainMintable bool) ( NewStateReceiver: contracts.StateReceiverContract, NewRootERC20Predicate: config.RootERC20PredicateAddr, NewChildTokenTemplate: contracts.ChildERC20Contract, - NewNativeTokenRootAddress: config.RootNativeERC20Addr, + NewNativeTokenRootAddress: types.ZeroAddress, } } @@ -133,7 +134,7 @@ func getInitERC20PredicateACLInput(config *BridgeConfig, owner types.Address, NewStateReceiver: contracts.StateReceiverContract, NewRootERC20Predicate: config.RootERC20PredicateAddr, NewChildTokenTemplate: contracts.ChildERC20Contract, - NewNativeTokenRootAddress: config.RootNativeERC20Addr, + NewNativeTokenRootAddress: types.ZeroAddress, NewUseAllowList: useAllowList, NewUseBlockList: useBlockList, NewOwner: owner, diff --git a/consensus/polybft/contractsapi/contractsapi.go b/consensus/polybft/contractsapi/contractsapi.go index e0bc90603e..5afee651b7 100644 --- a/consensus/polybft/contractsapi/contractsapi.go +++ b/consensus/polybft/contractsapi/contractsapi.go @@ -1237,6 +1237,7 @@ type InitializeStakeManagerFn struct { NewStakingToken types.Address `abi:"newStakingToken"` NewBls types.Address `abi:"newBls"` EpochManager types.Address `abi:"epochManager"` + Owner types.Address `abi:"owner"` NewDomain string `abi:"newDomain"` GenesisValidators []*GenesisValidator `abi:"genesisValidators"` } diff --git a/consensus/polybft/contractsapi/gen_sc_data.go b/consensus/polybft/contractsapi/gen_sc_data.go index 407a14088d..5abfd988ea 100644 --- a/consensus/polybft/contractsapi/gen_sc_data.go +++ b/consensus/polybft/contractsapi/gen_sc_data.go @@ -35,7 +35,7 @@ var ChildMintableERC721PredicateArtifact string = `{"_format":"hh-sol-artifact-1 var MockERC1155Artifact string = `{"_format":"hh-sol-artifact-1","contractName":"MockERC1155","sourceName":"contracts/mocks/MockERC1155.sol","abi":[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}],"bytecode":"0x60806040523480156200001157600080fd5b506040805180820190915260058152646c6f72656d60d81b6020820152806200003a81620000b1565b506005805460ff1916905562000052600033620000c3565b6200007e7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633620000c3565b620000aa7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33620000c3565b5062000376565b6004620000bf8282620002aa565b5050565b620000bf8282620000d58282620000f4565b6000828152600160205260409020620000ef908262000194565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000bf576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001503390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620001ab836001600160a01b038416620001b4565b90505b92915050565b6000818152600183016020526040812054620001fd57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001ae565b506000620001ae565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200023157607f821691505b6020821081036200025257634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620000ef57600081815260208120601f850160051c81016020861015620002815750805b601f850160051c820191505b81811015620002a2578281556001016200028d565b505050505050565b81516001600160401b03811115620002c657620002c662000206565b620002de81620002d784546200021c565b8462000258565b602080601f831160018114620003165760008415620002fd5750858301515b600019600386901b1c1916600185901b178555620002a2565b600085815260208120601f198616915b82811015620003475788860151825594840194600190910190840162000326565b5085821015620003665787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6128a080620003866000396000f3fe608060405234801561001057600080fd5b50600436106101625760003560e01c8063731133e9116100ce578063ca15c87311610087578063ca15c873146102fb578063d53913931461030e578063d547741f14610323578063e63ab1e914610336578063e985e9c51461034b578063f242432a14610387578063f5298aca1461039a57600080fd5b8063731133e9146102875780638456cb591461029a5780639010d07c146102a257806391d14854146102cd578063a217fddf146102e0578063a22cb465146102e857600080fd5b80632f2ff15d116101205780632f2ff15d1461021b57806336568abe1461022e5780633f4ba83a146102415780634e1273f4146102495780635c975abb146102695780636b20c4541461027457600080fd5b8062fdd58e1461016757806301ffc9a71461018d5780630e89341c146101b05780631f7fdffa146101d0578063248a9ca3146101e55780632eb2c2d614610208575b600080fd5b61017a610175366004611bd7565b6103ad565b6040519081526020015b60405180910390f35b6101a061019b366004611c17565b610448565b6040519015158152602001610184565b6101c36101be366004611c34565b610453565b6040516101849190611c9d565b6101e36101de366004611df9565b6104e7565b005b61017a6101f3366004611c34565b60009081526020819052604090206001015490565b6101e3610216366004611e91565b61052d565b6101e3610229366004611f3a565b610579565b6101e361023c366004611f3a565b6105a3565b6101e3610621565b61025c610257366004611f66565b6106a3565b604051610184919061206b565b60055460ff166101a0565b6101e361028236600461207e565b6107cc565b6101e36102953660046120f1565b61080f565b6101e361084f565b6102b56102b0366004612145565b6108cb565b6040516001600160a01b039091168152602001610184565b6101a06102db366004611f3a565b6108ea565b61017a600081565b6101e36102f6366004612167565b610913565b61017a610309366004611c34565b61091e565b61017a60008051602061284b83398151915281565b6101e3610331366004611f3a565b610935565b61017a60008051602061282b83398151915281565b6101a06103593660046121a3565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6101e36103953660046121cd565b61095a565b6101e36103a8366004612231565b61099f565b60006001600160a01b03831661041d5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b6000610442826109e2565b60606004805461046290612264565b80601f016020809104026020016040519081016040528092919081815260200182805461048e90612264565b80156104db5780601f106104b0576101008083540402835291602001916104db565b820191906000526020600020905b8154815290600101906020018083116104be57829003601f168201915b50505050509050919050565b6104ff60008051602061284b833981519152336108ea565b61051b5760405162461bcd60e51b81526004016104149061229e565b61052784848484610a22565b50505050565b6001600160a01b03851633148061054957506105498533610359565b6105655760405162461bcd60e51b8152600401610414906122e4565b6105728585858585610b6b565b5050505050565b60008281526020819052604090206001015461059481610d06565b61059e8383610d13565b505050565b6001600160a01b03811633146106135760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610414565b61061d8282610d35565b5050565b61063960008051602061282b833981519152336108ea565b6106995760405162461bcd60e51b815260206004820152603b60248201526000805160206127eb83398151915260448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610414565b6106a1610d57565b565b606081518351146107085760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610414565b600083516001600160401b0381111561072357610723611cb0565b60405190808252806020026020018201604052801561074c578160200160208202803683370190505b50905060005b84518110156107c45761079785828151811061077057610770612332565b602002602001015185838151811061078a5761078a612332565b60200260200101516103ad565b8282815181106107a9576107a9612332565b60209081029190910101526107bd8161235e565b9050610752565b509392505050565b6001600160a01b0383163314806107e857506107e88333610359565b6108045760405162461bcd60e51b8152600401610414906122e4565b61059e838383610da9565b61082760008051602061284b833981519152336108ea565b6108435760405162461bcd60e51b81526004016104149061229e565b61052784848484610f36565b61086760008051602061282b833981519152336108ea565b6108c35760405162461bcd60e51b815260206004820152603960248201526000805160206127eb833981519152604482015278686176652070617573657220726f6c6520746f20706175736560381b6064820152608401610414565b6106a161100f565b60008281526001602052604081206108e3908361104c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61061d338383611058565b600081815260016020526040812061044290611138565b60008281526020819052604090206001015461095081610d06565b61059e8383610d35565b6001600160a01b03851633148061097657506109768533610359565b6109925760405162461bcd60e51b8152600401610414906122e4565b6105728585858585611142565b6001600160a01b0383163314806109bb57506109bb8333610359565b6109d75760405162461bcd60e51b8152600401610414906122e4565b61059e83838361126c565b60006001600160e01b03198216636cdb3d1360e11b1480610a1357506001600160e01b031982166303a24d0760e21b145b80610442575061044282611376565b6001600160a01b038416610a485760405162461bcd60e51b815260040161041490612377565b8151835114610a695760405162461bcd60e51b8152600401610414906123b8565b33610a798160008787878761139b565b60005b8451811015610b1557838181518110610a9757610a97612332565b602002602001015160026000878481518110610ab557610ab5612332565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254610afd9190612400565b90915550819050610b0d8161235e565b915050610a7c565b50846001600160a01b031660006001600160a01b0316826001600160a01b03166000805160206127cb8339815191528787604051610b54929190612413565b60405180910390a4610572816000878787876113a9565b8151835114610b8c5760405162461bcd60e51b8152600401610414906123b8565b6001600160a01b038416610bb25760405162461bcd60e51b815260040161041490612441565b33610bc181878787878761139b565b60005b8451811015610caa576000858281518110610be157610be1612332565b602002602001015190506000858381518110610bff57610bff612332565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610c505760405162461bcd60e51b815260040161041490612486565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610c8f908490612400565b9250508190555050505080610ca39061235e565b9050610bc4565b50846001600160a01b0316866001600160a01b0316826001600160a01b03166000805160206127cb8339815191528787604051610ce8929190612413565b60405180910390a4610cfe8187878787876113a9565b505050505050565b610d108133611504565b50565b610d1d828261155d565b600082815260016020526040902061059e90826115e1565b610d3f82826115f6565b600082815260016020526040902061059e908261165b565b610d5f611670565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038316610dcf5760405162461bcd60e51b8152600401610414906124d0565b8051825114610df05760405162461bcd60e51b8152600401610414906123b8565b6000339050610e138185600086866040518060200160405280600081525061139b565b60005b8351811015610edb576000848281518110610e3357610e33612332565b602002602001015190506000848381518110610e5157610e51612332565b60209081029190910181015160008481526002835260408082206001600160a01b038c168352909352919091205490915081811015610ea25760405162461bcd60e51b815260040161041490612513565b60009283526002602090815260408085206001600160a01b038b1686529091529092209103905580610ed38161235e565b915050610e16565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03166000805160206127cb8339815191528686604051610f1a929190612413565b60405180910390a4604080516020810190915260009052610527565b6001600160a01b038416610f5c5760405162461bcd60e51b815260040161041490612377565b336000610f68856116b9565b90506000610f75856116b9565b9050610f868360008985858961139b565b60008681526002602090815260408083206001600160a01b038b16845290915281208054879290610fb8908490612400565b909155505060408051878152602081018790526001600160a01b03808a16926000929187169160008051602061280b833981519152910160405180910390a461100683600089898989611704565b50505050505050565b6110176117bf565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d8c3390565b60006108e38383611805565b816001600160a01b0316836001600160a01b0316036110cb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610414565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000610442825490565b6001600160a01b0384166111685760405162461bcd60e51b815260040161041490612441565b336000611174856116b9565b90506000611181856116b9565b905061119183898985858961139b565b60008681526002602090815260408083206001600160a01b038c168452909152902054858110156111d45760405162461bcd60e51b815260040161041490612486565b60008781526002602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290611213908490612400565b909155505060408051888152602081018890526001600160a01b03808b16928c8216929188169160008051602061280b833981519152910160405180910390a4611261848a8a8a8a8a611704565b505050505050505050565b6001600160a01b0383166112925760405162461bcd60e51b8152600401610414906124d0565b33600061129e846116b9565b905060006112ab846116b9565b90506112cb8387600085856040518060200160405280600081525061139b565b60008581526002602090815260408083206001600160a01b038a1684529091529020548481101561130e5760405162461bcd60e51b815260040161041490612513565b60008681526002602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a905290929088169160008051602061280b833981519152910160405180910390a4604080516020810190915260009052611006565b60006001600160e01b03198216635a05180f60e01b148061044257506104428261182f565b610cfe868686868686611864565b6001600160a01b0384163b15610cfe5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906113ed9089908990889088908890600401612557565b6020604051808303816000875af1925050508015611428575060408051601f3d908101601f19168201909252611425918101906125b5565b60015b6114d4576114346125d2565b806308c379a00361146d57506114486125ee565b80611453575061146f565b8060405162461bcd60e51b81526004016104149190611c9d565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610414565b6001600160e01b0319811663bc197c8160e01b146110065760405162461bcd60e51b815260040161041490612677565b61150e82826108ea565b61061d5761151b816118cc565b6115268360206118de565b6040516020016115379291906126bf565b60408051601f198184030181529082905262461bcd60e51b825261041491600401611c9d565b61156782826108ea565b61061d576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561159d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006108e3836001600160a01b038416611a79565b61160082826108ea565b1561061d576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006108e3836001600160a01b038416611ac8565b60055460ff166106a15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610414565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106116f3576116f3612332565b602090810291909101015292915050565b6001600160a01b0384163b15610cfe5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611748908990899088908890889060040161272e565b6020604051808303816000875af1925050508015611783575060408051601f3d908101601f19168201909252611780918101906125b5565b60015b61178f576114346125d2565b6001600160e01b0319811663f23a6e6160e01b146110065760405162461bcd60e51b815260040161041490612677565b60055460ff16156106a15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610414565b600082600001828154811061181c5761181c612332565b9060005260206000200154905092915050565b60006001600160e01b03198216637965db0b60e01b148061044257506301ffc9a760e01b6001600160e01b0319831614610442565b60055460ff1615610cfe5760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b6064820152608401610414565b60606104426001600160a01b03831660145b606060006118ed836002612773565b6118f8906002612400565b6001600160401b0381111561190f5761190f611cb0565b6040519080825280601f01601f191660200182016040528015611939576020820181803683370190505b509050600360fc1b8160008151811061195457611954612332565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061198357611983612332565b60200101906001600160f81b031916908160001a90535060006119a7846002612773565b6119b2906001612400565b90505b6001811115611a2a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106119e6576119e6612332565b1a60f81b8282815181106119fc576119fc612332565b60200101906001600160f81b031916908160001a90535060049490941c93611a238161278a565b90506119b5565b5083156108e35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610414565b6000818152600183016020526040812054611ac057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610442565b506000610442565b60008181526001830160205260408120548015611bb1576000611aec6001836127a1565b8554909150600090611b00906001906127a1565b9050818114611b65576000866000018281548110611b2057611b20612332565b9060005260206000200154905080876000018481548110611b4357611b43612332565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611b7657611b766127b4565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610442565b6000915050610442565b80356001600160a01b0381168114611bd257600080fd5b919050565b60008060408385031215611bea57600080fd5b611bf383611bbb565b946020939093013593505050565b6001600160e01b031981168114610d1057600080fd5b600060208284031215611c2957600080fd5b81356108e381611c01565b600060208284031215611c4657600080fd5b5035919050565b60005b83811015611c68578181015183820152602001611c50565b50506000910152565b60008151808452611c89816020860160208601611c4d565b601f01601f19169290920160200192915050565b6020815260006108e36020830184611c71565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715611ceb57611ceb611cb0565b6040525050565b60006001600160401b03821115611d0b57611d0b611cb0565b5060051b60200190565b600082601f830112611d2657600080fd5b81356020611d3382611cf2565b604051611d408282611cc6565b83815260059390931b8501820192828101915086841115611d6057600080fd5b8286015b84811015611d7b5780358352918301918301611d64565b509695505050505050565b600082601f830112611d9757600080fd5b81356001600160401b03811115611db057611db0611cb0565b604051611dc7601f8301601f191660200182611cc6565b818152846020838601011115611ddc57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611e0f57600080fd5b611e1885611bbb565b935060208501356001600160401b0380821115611e3457600080fd5b611e4088838901611d15565b94506040870135915080821115611e5657600080fd5b611e6288838901611d15565b93506060870135915080821115611e7857600080fd5b50611e8587828801611d86565b91505092959194509250565b600080600080600060a08688031215611ea957600080fd5b611eb286611bbb565b9450611ec060208701611bbb565b935060408601356001600160401b0380821115611edc57600080fd5b611ee889838a01611d15565b94506060880135915080821115611efe57600080fd5b611f0a89838a01611d15565b93506080880135915080821115611f2057600080fd5b50611f2d88828901611d86565b9150509295509295909350565b60008060408385031215611f4d57600080fd5b82359150611f5d60208401611bbb565b90509250929050565b60008060408385031215611f7957600080fd5b82356001600160401b0380821115611f9057600080fd5b818501915085601f830112611fa457600080fd5b81356020611fb182611cf2565b604051611fbe8282611cc6565b83815260059390931b8501820192828101915089841115611fde57600080fd5b948201945b8386101561200357611ff486611bbb565b82529482019490820190611fe3565b9650508601359250508082111561201957600080fd5b5061202685828601611d15565b9150509250929050565b600081518084526020808501945080840160005b8381101561206057815187529582019590820190600101612044565b509495945050505050565b6020815260006108e36020830184612030565b60008060006060848603121561209357600080fd5b61209c84611bbb565b925060208401356001600160401b03808211156120b857600080fd5b6120c487838801611d15565b935060408601359150808211156120da57600080fd5b506120e786828701611d15565b9150509250925092565b6000806000806080858703121561210757600080fd5b61211085611bbb565b9350602085013592506040850135915060608501356001600160401b0381111561213957600080fd5b611e8587828801611d86565b6000806040838503121561215857600080fd5b50508035926020909101359150565b6000806040838503121561217a57600080fd5b61218383611bbb565b91506020830135801515811461219857600080fd5b809150509250929050565b600080604083850312156121b657600080fd5b6121bf83611bbb565b9150611f5d60208401611bbb565b600080600080600060a086880312156121e557600080fd5b6121ee86611bbb565b94506121fc60208701611bbb565b9350604086013592506060860135915060808601356001600160401b0381111561222557600080fd5b611f2d88828901611d86565b60008060006060848603121561224657600080fd5b61224f84611bbb565b95602085013595506040909401359392505050565b600181811c9082168061227857607f821691505b60208210810361229857634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526038908201526000805160206127eb8339815191526040820152771a185d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60421b606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161237057612370612348565b5060010190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b8082018082111561044257610442612348565b6040815260006124266040830185612030565b82810360208401526124388185612030565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061258390830186612030565b82810360608401526125958186612030565b905082810360808401526125a98185611c71565b98975050505050505050565b6000602082840312156125c757600080fd5b81516108e381611c01565b600060033d11156125eb5760046000803e5060005160e01c5b90565b600060443d10156125fc5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561262b57505050505090565b82850191508151818111156126435750505050505090565b843d870101602082850101111561265d5750505050505090565b61266c60208286010187611cc6565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516126f1816017850160208801611c4d565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612722816028840160208801611c4d565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061276890830184611c71565b979650505050505050565b808202811582820484141761044257610442612348565b60008161279957612799612348565b506000190190565b8181038181111561044257610442612348565b634e487b7160e01b600052603160045260246000fdfe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb455243313135355072657365744d696e7465725061757365723a206d75737420c3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6265d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a2646970667358221220294efe154e549198ff0c6b7ab7e9846223d9e8fe7ae7de1938f6eb7d0f5e66a664736f6c63430008130033","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106101625760003560e01c8063731133e9116100ce578063ca15c87311610087578063ca15c873146102fb578063d53913931461030e578063d547741f14610323578063e63ab1e914610336578063e985e9c51461034b578063f242432a14610387578063f5298aca1461039a57600080fd5b8063731133e9146102875780638456cb591461029a5780639010d07c146102a257806391d14854146102cd578063a217fddf146102e0578063a22cb465146102e857600080fd5b80632f2ff15d116101205780632f2ff15d1461021b57806336568abe1461022e5780633f4ba83a146102415780634e1273f4146102495780635c975abb146102695780636b20c4541461027457600080fd5b8062fdd58e1461016757806301ffc9a71461018d5780630e89341c146101b05780631f7fdffa146101d0578063248a9ca3146101e55780632eb2c2d614610208575b600080fd5b61017a610175366004611bd7565b6103ad565b6040519081526020015b60405180910390f35b6101a061019b366004611c17565b610448565b6040519015158152602001610184565b6101c36101be366004611c34565b610453565b6040516101849190611c9d565b6101e36101de366004611df9565b6104e7565b005b61017a6101f3366004611c34565b60009081526020819052604090206001015490565b6101e3610216366004611e91565b61052d565b6101e3610229366004611f3a565b610579565b6101e361023c366004611f3a565b6105a3565b6101e3610621565b61025c610257366004611f66565b6106a3565b604051610184919061206b565b60055460ff166101a0565b6101e361028236600461207e565b6107cc565b6101e36102953660046120f1565b61080f565b6101e361084f565b6102b56102b0366004612145565b6108cb565b6040516001600160a01b039091168152602001610184565b6101a06102db366004611f3a565b6108ea565b61017a600081565b6101e36102f6366004612167565b610913565b61017a610309366004611c34565b61091e565b61017a60008051602061284b83398151915281565b6101e3610331366004611f3a565b610935565b61017a60008051602061282b83398151915281565b6101a06103593660046121a3565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6101e36103953660046121cd565b61095a565b6101e36103a8366004612231565b61099f565b60006001600160a01b03831661041d5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b6000610442826109e2565b60606004805461046290612264565b80601f016020809104026020016040519081016040528092919081815260200182805461048e90612264565b80156104db5780601f106104b0576101008083540402835291602001916104db565b820191906000526020600020905b8154815290600101906020018083116104be57829003601f168201915b50505050509050919050565b6104ff60008051602061284b833981519152336108ea565b61051b5760405162461bcd60e51b81526004016104149061229e565b61052784848484610a22565b50505050565b6001600160a01b03851633148061054957506105498533610359565b6105655760405162461bcd60e51b8152600401610414906122e4565b6105728585858585610b6b565b5050505050565b60008281526020819052604090206001015461059481610d06565b61059e8383610d13565b505050565b6001600160a01b03811633146106135760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610414565b61061d8282610d35565b5050565b61063960008051602061282b833981519152336108ea565b6106995760405162461bcd60e51b815260206004820152603b60248201526000805160206127eb83398151915260448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610414565b6106a1610d57565b565b606081518351146107085760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610414565b600083516001600160401b0381111561072357610723611cb0565b60405190808252806020026020018201604052801561074c578160200160208202803683370190505b50905060005b84518110156107c45761079785828151811061077057610770612332565b602002602001015185838151811061078a5761078a612332565b60200260200101516103ad565b8282815181106107a9576107a9612332565b60209081029190910101526107bd8161235e565b9050610752565b509392505050565b6001600160a01b0383163314806107e857506107e88333610359565b6108045760405162461bcd60e51b8152600401610414906122e4565b61059e838383610da9565b61082760008051602061284b833981519152336108ea565b6108435760405162461bcd60e51b81526004016104149061229e565b61052784848484610f36565b61086760008051602061282b833981519152336108ea565b6108c35760405162461bcd60e51b815260206004820152603960248201526000805160206127eb833981519152604482015278686176652070617573657220726f6c6520746f20706175736560381b6064820152608401610414565b6106a161100f565b60008281526001602052604081206108e3908361104c565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61061d338383611058565b600081815260016020526040812061044290611138565b60008281526020819052604090206001015461095081610d06565b61059e8383610d35565b6001600160a01b03851633148061097657506109768533610359565b6109925760405162461bcd60e51b8152600401610414906122e4565b6105728585858585611142565b6001600160a01b0383163314806109bb57506109bb8333610359565b6109d75760405162461bcd60e51b8152600401610414906122e4565b61059e83838361126c565b60006001600160e01b03198216636cdb3d1360e11b1480610a1357506001600160e01b031982166303a24d0760e21b145b80610442575061044282611376565b6001600160a01b038416610a485760405162461bcd60e51b815260040161041490612377565b8151835114610a695760405162461bcd60e51b8152600401610414906123b8565b33610a798160008787878761139b565b60005b8451811015610b1557838181518110610a9757610a97612332565b602002602001015160026000878481518110610ab557610ab5612332565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254610afd9190612400565b90915550819050610b0d8161235e565b915050610a7c565b50846001600160a01b031660006001600160a01b0316826001600160a01b03166000805160206127cb8339815191528787604051610b54929190612413565b60405180910390a4610572816000878787876113a9565b8151835114610b8c5760405162461bcd60e51b8152600401610414906123b8565b6001600160a01b038416610bb25760405162461bcd60e51b815260040161041490612441565b33610bc181878787878761139b565b60005b8451811015610caa576000858281518110610be157610be1612332565b602002602001015190506000858381518110610bff57610bff612332565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610c505760405162461bcd60e51b815260040161041490612486565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610c8f908490612400565b9250508190555050505080610ca39061235e565b9050610bc4565b50846001600160a01b0316866001600160a01b0316826001600160a01b03166000805160206127cb8339815191528787604051610ce8929190612413565b60405180910390a4610cfe8187878787876113a9565b505050505050565b610d108133611504565b50565b610d1d828261155d565b600082815260016020526040902061059e90826115e1565b610d3f82826115f6565b600082815260016020526040902061059e908261165b565b610d5f611670565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038316610dcf5760405162461bcd60e51b8152600401610414906124d0565b8051825114610df05760405162461bcd60e51b8152600401610414906123b8565b6000339050610e138185600086866040518060200160405280600081525061139b565b60005b8351811015610edb576000848281518110610e3357610e33612332565b602002602001015190506000848381518110610e5157610e51612332565b60209081029190910181015160008481526002835260408082206001600160a01b038c168352909352919091205490915081811015610ea25760405162461bcd60e51b815260040161041490612513565b60009283526002602090815260408085206001600160a01b038b1686529091529092209103905580610ed38161235e565b915050610e16565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03166000805160206127cb8339815191528686604051610f1a929190612413565b60405180910390a4604080516020810190915260009052610527565b6001600160a01b038416610f5c5760405162461bcd60e51b815260040161041490612377565b336000610f68856116b9565b90506000610f75856116b9565b9050610f868360008985858961139b565b60008681526002602090815260408083206001600160a01b038b16845290915281208054879290610fb8908490612400565b909155505060408051878152602081018790526001600160a01b03808a16926000929187169160008051602061280b833981519152910160405180910390a461100683600089898989611704565b50505050505050565b6110176117bf565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d8c3390565b60006108e38383611805565b816001600160a01b0316836001600160a01b0316036110cb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610414565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000610442825490565b6001600160a01b0384166111685760405162461bcd60e51b815260040161041490612441565b336000611174856116b9565b90506000611181856116b9565b905061119183898985858961139b565b60008681526002602090815260408083206001600160a01b038c168452909152902054858110156111d45760405162461bcd60e51b815260040161041490612486565b60008781526002602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290611213908490612400565b909155505060408051888152602081018890526001600160a01b03808b16928c8216929188169160008051602061280b833981519152910160405180910390a4611261848a8a8a8a8a611704565b505050505050505050565b6001600160a01b0383166112925760405162461bcd60e51b8152600401610414906124d0565b33600061129e846116b9565b905060006112ab846116b9565b90506112cb8387600085856040518060200160405280600081525061139b565b60008581526002602090815260408083206001600160a01b038a1684529091529020548481101561130e5760405162461bcd60e51b815260040161041490612513565b60008681526002602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a905290929088169160008051602061280b833981519152910160405180910390a4604080516020810190915260009052611006565b60006001600160e01b03198216635a05180f60e01b148061044257506104428261182f565b610cfe868686868686611864565b6001600160a01b0384163b15610cfe5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906113ed9089908990889088908890600401612557565b6020604051808303816000875af1925050508015611428575060408051601f3d908101601f19168201909252611425918101906125b5565b60015b6114d4576114346125d2565b806308c379a00361146d57506114486125ee565b80611453575061146f565b8060405162461bcd60e51b81526004016104149190611c9d565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610414565b6001600160e01b0319811663bc197c8160e01b146110065760405162461bcd60e51b815260040161041490612677565b61150e82826108ea565b61061d5761151b816118cc565b6115268360206118de565b6040516020016115379291906126bf565b60408051601f198184030181529082905262461bcd60e51b825261041491600401611c9d565b61156782826108ea565b61061d576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561159d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006108e3836001600160a01b038416611a79565b61160082826108ea565b1561061d576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006108e3836001600160a01b038416611ac8565b60055460ff166106a15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610414565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106116f3576116f3612332565b602090810291909101015292915050565b6001600160a01b0384163b15610cfe5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611748908990899088908890889060040161272e565b6020604051808303816000875af1925050508015611783575060408051601f3d908101601f19168201909252611780918101906125b5565b60015b61178f576114346125d2565b6001600160e01b0319811663f23a6e6160e01b146110065760405162461bcd60e51b815260040161041490612677565b60055460ff16156106a15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610414565b600082600001828154811061181c5761181c612332565b9060005260206000200154905092915050565b60006001600160e01b03198216637965db0b60e01b148061044257506301ffc9a760e01b6001600160e01b0319831614610442565b60055460ff1615610cfe5760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b6064820152608401610414565b60606104426001600160a01b03831660145b606060006118ed836002612773565b6118f8906002612400565b6001600160401b0381111561190f5761190f611cb0565b6040519080825280601f01601f191660200182016040528015611939576020820181803683370190505b509050600360fc1b8160008151811061195457611954612332565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061198357611983612332565b60200101906001600160f81b031916908160001a90535060006119a7846002612773565b6119b2906001612400565b90505b6001811115611a2a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106119e6576119e6612332565b1a60f81b8282815181106119fc576119fc612332565b60200101906001600160f81b031916908160001a90535060049490941c93611a238161278a565b90506119b5565b5083156108e35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610414565b6000818152600183016020526040812054611ac057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610442565b506000610442565b60008181526001830160205260408120548015611bb1576000611aec6001836127a1565b8554909150600090611b00906001906127a1565b9050818114611b65576000866000018281548110611b2057611b20612332565b9060005260206000200154905080876000018481548110611b4357611b43612332565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611b7657611b766127b4565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610442565b6000915050610442565b80356001600160a01b0381168114611bd257600080fd5b919050565b60008060408385031215611bea57600080fd5b611bf383611bbb565b946020939093013593505050565b6001600160e01b031981168114610d1057600080fd5b600060208284031215611c2957600080fd5b81356108e381611c01565b600060208284031215611c4657600080fd5b5035919050565b60005b83811015611c68578181015183820152602001611c50565b50506000910152565b60008151808452611c89816020860160208601611c4d565b601f01601f19169290920160200192915050565b6020815260006108e36020830184611c71565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715611ceb57611ceb611cb0565b6040525050565b60006001600160401b03821115611d0b57611d0b611cb0565b5060051b60200190565b600082601f830112611d2657600080fd5b81356020611d3382611cf2565b604051611d408282611cc6565b83815260059390931b8501820192828101915086841115611d6057600080fd5b8286015b84811015611d7b5780358352918301918301611d64565b509695505050505050565b600082601f830112611d9757600080fd5b81356001600160401b03811115611db057611db0611cb0565b604051611dc7601f8301601f191660200182611cc6565b818152846020838601011115611ddc57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611e0f57600080fd5b611e1885611bbb565b935060208501356001600160401b0380821115611e3457600080fd5b611e4088838901611d15565b94506040870135915080821115611e5657600080fd5b611e6288838901611d15565b93506060870135915080821115611e7857600080fd5b50611e8587828801611d86565b91505092959194509250565b600080600080600060a08688031215611ea957600080fd5b611eb286611bbb565b9450611ec060208701611bbb565b935060408601356001600160401b0380821115611edc57600080fd5b611ee889838a01611d15565b94506060880135915080821115611efe57600080fd5b611f0a89838a01611d15565b93506080880135915080821115611f2057600080fd5b50611f2d88828901611d86565b9150509295509295909350565b60008060408385031215611f4d57600080fd5b82359150611f5d60208401611bbb565b90509250929050565b60008060408385031215611f7957600080fd5b82356001600160401b0380821115611f9057600080fd5b818501915085601f830112611fa457600080fd5b81356020611fb182611cf2565b604051611fbe8282611cc6565b83815260059390931b8501820192828101915089841115611fde57600080fd5b948201945b8386101561200357611ff486611bbb565b82529482019490820190611fe3565b9650508601359250508082111561201957600080fd5b5061202685828601611d15565b9150509250929050565b600081518084526020808501945080840160005b8381101561206057815187529582019590820190600101612044565b509495945050505050565b6020815260006108e36020830184612030565b60008060006060848603121561209357600080fd5b61209c84611bbb565b925060208401356001600160401b03808211156120b857600080fd5b6120c487838801611d15565b935060408601359150808211156120da57600080fd5b506120e786828701611d15565b9150509250925092565b6000806000806080858703121561210757600080fd5b61211085611bbb565b9350602085013592506040850135915060608501356001600160401b0381111561213957600080fd5b611e8587828801611d86565b6000806040838503121561215857600080fd5b50508035926020909101359150565b6000806040838503121561217a57600080fd5b61218383611bbb565b91506020830135801515811461219857600080fd5b809150509250929050565b600080604083850312156121b657600080fd5b6121bf83611bbb565b9150611f5d60208401611bbb565b600080600080600060a086880312156121e557600080fd5b6121ee86611bbb565b94506121fc60208701611bbb565b9350604086013592506060860135915060808601356001600160401b0381111561222557600080fd5b611f2d88828901611d86565b60008060006060848603121561224657600080fd5b61224f84611bbb565b95602085013595506040909401359392505050565b600181811c9082168061227857607f821691505b60208210810361229857634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526038908201526000805160206127eb8339815191526040820152771a185d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60421b606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161237057612370612348565b5060010190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b8082018082111561044257610442612348565b6040815260006124266040830185612030565b82810360208401526124388185612030565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061258390830186612030565b82810360608401526125958186612030565b905082810360808401526125a98185611c71565b98975050505050505050565b6000602082840312156125c757600080fd5b81516108e381611c01565b600060033d11156125eb5760046000803e5060005160e01c5b90565b600060443d10156125fc5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561262b57505050505090565b82850191508151818111156126435750505050505090565b843d870101602082850101111561265d5750505050505090565b61266c60208286010187611cc6565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516126f1816017850160208801611c4d565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612722816028840160208801611c4d565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061276890830184611c71565b979650505050505050565b808202811582820484141761044257610442612348565b60008161279957612799612348565b506000190190565b8181038181111561044257610442612348565b634e487b7160e01b600052603160045260246000fdfe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb455243313135355072657365744d696e7465725061757365723a206d75737420c3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6265d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a2646970667358221220294efe154e549198ff0c6b7ab7e9846223d9e8fe7ae7de1938f6eb7d0f5e66a664736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` var RootERC1155PredicateArtifact string = `{"_format":"hh-sol-artifact-1","contractName":"RootERC1155Predicate","sourceName":"contracts/bridge/RootERC1155Predicate.sol","abi":[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rootToken","type":"address"},{"indexed":true,"internalType":"address","name":"childToken","type":"address"},{"indexed":false,"internalType":"address","name":"depositor","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC1155Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rootToken","type":"address"},{"indexed":true,"internalType":"address","name":"childToken","type":"address"},{"indexed":true,"internalType":"address","name":"depositor","type":"address"},{"indexed":false,"internalType":"address[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"ERC1155DepositBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rootToken","type":"address"},{"indexed":true,"internalType":"address","name":"childToken","type":"address"},{"indexed":false,"internalType":"address","name":"withdrawer","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC1155Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rootToken","type":"address"},{"indexed":true,"internalType":"address","name":"childToken","type":"address"},{"indexed":true,"internalType":"address","name":"withdrawer","type":"address"},{"indexed":false,"internalType":"address[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"ERC1155WithdrawBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rootToken","type":"address"},{"indexed":true,"internalType":"address","name":"childToken","type":"address"}],"name":"TokenMapped","type":"event"},{"inputs":[],"name":"DEPOSIT_BATCH_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPOSIT_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAP_TOKEN_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_BATCH_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"childERC1155Predicate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"childTokenTemplate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC1155MetadataURI","name":"rootToken","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC1155MetadataURI","name":"rootToken","type":"address"},{"internalType":"address[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"depositBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC1155MetadataURI","name":"rootToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exitHelper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newStateSender","type":"address"},{"internalType":"address","name":"newExitHelper","type":"address"},{"internalType":"address","name":"newChildERC1155Predicate","type":"address"},{"internalType":"address","name":"newChildTokenTemplate","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC1155MetadataURI","name":"rootToken","type":"address"}],"name":"mapToken","outputs":[{"internalType":"address","name":"childToken","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onL2StateReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rootTokenToChildToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stateSender","outputs":[{"internalType":"contract IStateSender","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50611bd2806100206000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c8063bc197c81116100ad578063f23a6e6111610071578063f23a6e61146102fe578063f43cda8b1461031d578063f4a120f714610330578063f645125514610343578063f8c8765e1461036a57600080fd5b8063bc197c8114610238578063c5ac2b1c14610270578063cb10f94c14610297578063d41f1771146102b0578063d7c9e3ec146102d757600080fd5b80637efab4f5116100f45780637efab4f5146101a157806395c7041c146101ca578063a78e111c146101dd578063b1768065146101f0578063b68ad1e41461022557600080fd5b806301ffc9a7146101265780630efe6a8b1461014e5780634c4c45de14610163578063654715e614610176575b600080fd5b610139610134366004611173565b61037d565b60405190151581526020015b60405180910390f35b61016161015c3660046111bc565b6103b4565b005b61016161017136600461123c565b6103c5565b600254610189906001600160a01b031681565b6040516001600160a01b039091168152602001610145565b6101896101af3660046112e8565b6004602052600090815260409020546001600160a01b031681565b600154610189906001600160a01b031681565b6101616101eb366004611305565b610448565b6102177f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e98286981565b604051908152602001610145565b600354610189906001600160a01b031681565b610257610246366004611497565b63bc197c8160e01b95945050505050565b6040516001600160e01b03199091168152602001610145565b6102177faf50c8eab81226bc79eee3a10e3fe25db1a2be7241130e392b0675df839b6d1881565b600054610189906201000090046001600160a01b031681565b6102177f87a7811f4bfedea3d341ad165680ae306b01aaeacc205d227629cf157dd9f82181565b6102177f5fb452c5a8f2b7c7ef2984e2f1063c7ee9b80b110cdc98ccb98f6654e10b5ed281565b61025761030c366004611544565b63f23a6e6160e01b95945050505050565b61016161032b3660046115ac565b61045a565b61018961033e3660046112e8565b610629565b6102177f2cef46a936bdc5b7e6e8c71aa04560c41cf7d88bb26901a7e7f4936ff02accad81565b610161610378366004611634565b610945565b60006001600160e01b03198216630271189760e51b14806103ae57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6103c083338484610b54565b505050565b84831480156103d357508481145b6104305760405162461bcd60e51b8152602060048201526024808201527f526f6f74455243313135355072656469636174653a20494e56414c49445f4c4560448201526309c8ea8960e31b60648201526084015b60405180910390fd5b61043f87878787878787610cec565b50505050505050565b61045484848484610b54565b50505050565b6001546001600160a01b031633146104c35760405162461bcd60e51b815260206004820152602660248201527f526f6f74455243313135355072656469636174653a204f4e4c595f455849545f6044820152652422a62822a960d11b6064820152608401610427565b6002546001600160a01b038481169116146105335760405162461bcd60e51b815260206004820152602a60248201527f526f6f74455243313135355072656469636174653a204f4e4c595f4348494c446044820152695f50524544494341544560b01b6064820152608401610427565b7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e982869610562602060008486611690565b61056b916116ba565b0361058a576105856105808260208186611690565b610ecc565b610454565b7f5fb452c5a8f2b7c7ef2984e2f1063c7ee9b80b110cdc98ccb98f6654e10b5ed26105b9602060008486611690565b6105c2916116ba565b036105d1576105858282610fcb565b60405162461bcd60e51b815260206004820152602760248201527f526f6f74455243313135355072656469636174653a20494e56414c49445f5349604482015266474e415455524560c81b6064820152608401610427565b60006001600160a01b03821661068d5760405162461bcd60e51b815260206004820152602360248201527f526f6f74455243313135355072656469636174653a20494e56414c49445f544f60448201526225a2a760e91b6064820152608401610427565b6001600160a01b0382811660009081526004602052604090205416156107015760405162461bcd60e51b8152602060048201526024808201527f526f6f74455243313135355072656469636174653a20414c52454144595f4d416044820152631414115160e21b6064820152608401610427565b6002546003546040516bffffffffffffffffffffffff19606086901b1660208201526001600160a01b03928316926107ab921690603401604051602081830303815290604052805190602001208360405160388101919091526f5af43d82803e903d91602b57fd5bf3ff60248201526014810192909252733d602d80600a3d3981f3363d3d373d3d3d363d73825260588201526037600c8201206078820152605560439091012090565b6001600160a01b03848116600081815260046020818152604080842080546001600160a01b031916968816969096179095558451908101855282815293516303a24d0760e21b8152908101919091529294509091630e89341c90602401600060405180830381865afa92505050801561084657506040513d6000823e601f3d908101601f1916820160405261084391908101906116fc565b60015b1561084e5790505b600060029054906101000a90046001600160a01b03166001600160a01b03166316f19831837f2cef46a936bdc5b7e6e8c71aa04560c41cf7d88bb26901a7e7f4936ff02accad87856040516020016108a89392919061179e565b6040516020818303038152906040526040518363ffffffff1660e01b81526004016108d49291906117c8565b600060405180830381600087803b1580156108ee57600080fd5b505af1158015610902573d6000803e3d6000fd5b50506040516001600160a01b038087169350871691507f85920d35e6c72f6b2affffa04298b0cecfeba86e4a9f407df661f1cb8ab5e61790600090a35050919050565b600054610100900460ff16158080156109655750600054600160ff909116105b8061097f5750303b15801561097f575060005460ff166001145b6109e25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610427565b6000805460ff191660011790558015610a05576000805461ff0019166101001790555b6001600160a01b03851615801590610a2557506001600160a01b03841615155b8015610a3957506001600160a01b03831615155b8015610a4d57506001600160a01b03821615155b610aaa5760405162461bcd60e51b815260206004820152602860248201527f526f6f74455243313135355072656469636174653a204241445f494e495449416044820152672624ad20aa24a7a760c11b6064820152608401610427565b6000805462010000600160b01b031916620100006001600160a01b038881169190910291909117909155600180546001600160a01b031990811687841617909155600280548216868416179055600380549091169184169190911790558015610b4d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6000610b5f8561112c565b604051637921219560e11b81529091506001600160a01b0386169063f242432a90610b949033903090889088906004016117f4565b600060405180830381600087803b158015610bae57600080fd5b505af1158015610bc2573d6000803e3d6000fd5b5050600054600254604080517f87a7811f4bfedea3d341ad165680ae306b01aaeacc205d227629cf157dd9f82160208201526001600160a01b038b8116828401523360608301528a8116608083015260a082018a905260c08083018a90528351808403909101815260e08301938490526316f1983160e01b90935262010000909404841695506316f198319450610c5f939092169160e4016117c8565b600060405180830381600087803b158015610c7957600080fd5b505af1158015610c8d573d6000803e3d6000fd5b505060408051338152602081018790529081018590526001600160a01b03808816935084811692508816907fbcbdf0c69f975f2a4085544938b054f02e77e87cbd055146d388c0be7120e04f9060600160405180910390a45050505050565b6000610cf78861112c565b905060005b84811015610da357886001600160a01b031663f242432a3330898986818110610d2757610d2761182c565b90506020020135888887818110610d4057610d4061182c565b905060200201356040518563ffffffff1660e01b8152600401610d6694939291906117f4565b600060405180830381600087803b158015610d8057600080fd5b505af1158015610d94573d6000803e3d6000fd5b50505050806001019050610cfc565b506000546002546040516001600160a01b03620100009093048316926316f19831921690610e05907faf50c8eab81226bc79eee3a10e3fe25db1a2be7241130e392b0675df839b6d18908d9033908e908e908e908e908e908e906020016118bd565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401610e319291906117c8565b600060405180830381600087803b158015610e4b57600080fd5b505af1158015610e5f573d6000803e3d6000fd5b50505050336001600160a01b0316816001600160a01b0316896001600160a01b03167f7e8ab6f25cb177d65db49b7a2197bb2a7df5757434857d411e2523b332a913e68a8a8a8a8a8a604051610eba96959493929190611928565b60405180910390a45050505050505050565b600080808080610ede86880188611971565b6001600160a01b03808616600090815260046020526040902054959a50939850919650945092501680610f1357610f136119cc565b604051637921219560e11b81526001600160a01b0387169063f242432a90610f459030908890889088906004016117f4565b600060405180830381600087803b158015610f5f57600080fd5b505af1158015610f73573d6000803e3d6000fd5b5050604080516001600160a01b0389811682526020820188905291810186905281881693508482169250908916907fc42752949ca07109e6f25adcde4a9407be23e084b1d32ca2bce8aa55bf3dd62590606001610eba565b600080808080610fdd868801886119e2565b6001600160a01b03808616600090815260046020526040902054959b509399509197509550935016905080611014576110146119cc565b60005b83518110156110da57866001600160a01b031663f242432a308784815181106110425761104261182c565b602002602001015187858151811061105c5761105c61182c565b60200260200101518786815181106110765761107661182c565b60200260200101516040518563ffffffff1660e01b815260040161109d94939291906117f4565b600060405180830381600087803b1580156110b757600080fd5b505af11580156110cb573d6000803e3d6000fd5b50505050806001019050611017565b50846001600160a01b0316816001600160a01b0316876001600160a01b03167fce612e98b81c726375e7c2395409e74ee0a29b22f7641ea5a8ce8508616448c0878787604051610eba93929190611b27565b6001600160a01b0380821660009081526004602052604090205416806111585761115582610629565b90505b6001600160a01b03811661116e5761116e6119cc565b919050565b60006020828403121561118557600080fd5b81356001600160e01b03198116811461119d57600080fd5b9392505050565b6001600160a01b03811681146111b957600080fd5b50565b6000806000606084860312156111d157600080fd5b83356111dc816111a4565b95602085013595506040909401359392505050565b60008083601f84011261120357600080fd5b5081356001600160401b0381111561121a57600080fd5b6020830191508360208260051b850101111561123557600080fd5b9250929050565b60008060008060008060006080888a03121561125757600080fd5b8735611262816111a4565b965060208801356001600160401b038082111561127e57600080fd5b61128a8b838c016111f1565b909850965060408a01359150808211156112a357600080fd5b6112af8b838c016111f1565b909650945060608a01359150808211156112c857600080fd5b506112d58a828b016111f1565b989b979a50959850939692959293505050565b6000602082840312156112fa57600080fd5b813561119d816111a4565b6000806000806080858703121561131b57600080fd5b8435611326816111a4565b93506020850135611336816111a4565b93969395505050506040820135916060013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156113895761138961134b565b604052919050565b60006001600160401b038211156113aa576113aa61134b565b5060051b60200190565b600082601f8301126113c557600080fd5b813560206113da6113d583611391565b611361565b82815260059290921b840181019181810190868411156113f957600080fd5b8286015b8481101561141457803583529183019183016113fd565b509695505050505050565b60006001600160401b038211156114385761143861134b565b50601f01601f191660200190565b600082601f83011261145757600080fd5b81356114656113d58261141f565b81815284602083860101111561147a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156114af57600080fd5b85356114ba816111a4565b945060208601356114ca816111a4565b935060408601356001600160401b03808211156114e657600080fd5b6114f289838a016113b4565b9450606088013591508082111561150857600080fd5b61151489838a016113b4565b9350608088013591508082111561152a57600080fd5b5061153788828901611446565b9150509295509295909350565b600080600080600060a0868803121561155c57600080fd5b8535611567816111a4565b94506020860135611577816111a4565b9350604086013592506060860135915060808601356001600160401b038111156115a057600080fd5b61153788828901611446565b600080600080606085870312156115c257600080fd5b8435935060208501356115d4816111a4565b925060408501356001600160401b03808211156115f057600080fd5b818701915087601f83011261160457600080fd5b81358181111561161357600080fd5b88602082850101111561162557600080fd5b95989497505060200194505050565b6000806000806080858703121561164a57600080fd5b8435611655816111a4565b93506020850135611665816111a4565b92506040850135611675816111a4565b91506060850135611685816111a4565b939692955090935050565b600080858511156116a057600080fd5b838611156116ad57600080fd5b5050820193919092039150565b803560208310156103ae57600019602084900360031b1b1692915050565b60005b838110156116f35781810151838201526020016116db565b50506000910152565b60006020828403121561170e57600080fd5b81516001600160401b0381111561172457600080fd5b8201601f8101841361173557600080fd5b80516117436113d58261141f565b81815285602083850101111561175857600080fd5b6117698260208301602086016116d8565b95945050505050565b6000815180845261178a8160208601602086016116d8565b601f01601f19169290920160200192915050565b8381526001600160a01b038316602082015260606040820181905260009061176990830184611772565b6001600160a01b03831681526040602082018190526000906117ec90830184611772565b949350505050565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b634e487b7160e01b600052603260045260246000fd5b8183526000602080850194508260005b85811015611880578135611865816111a4565b6001600160a01b031687529582019590820190600101611852565b509495945050505050565b81835260006001600160fb1b038311156118a457600080fd5b8260051b80836020870137939093016020019392505050565b8981526001600160a01b0389811660208301528816604082015260c0606082018190526000906118f0908301888a611842565b828103608084015261190381878961188b565b905082810360a084015261191881858761188b565b9c9b505050505050505050505050565b60608152600061193c60608301888a611842565b828103602084015261194f81878961188b565b9050828103604084015261196481858761188b565b9998505050505050505050565b600080600080600060a0868803121561198957600080fd5b8535611994816111a4565b945060208601356119a4816111a4565b935060408601356119b4816111a4565b94979396509394606081013594506080013592915050565b634e487b7160e01b600052600160045260246000fd5b60008060008060008060c087890312156119fb57600080fd5b86359550602080880135611a0e816111a4565b95506040880135611a1e816111a4565b945060608801356001600160401b0380821115611a3a57600080fd5b818a0191508a601f830112611a4e57600080fd5b8135611a5c6113d582611391565b81815260059190911b8301840190848101908d831115611a7b57600080fd5b938501935b82851015611aa2578435611a93816111a4565b82529385019390850190611a80565b9750505060808a0135925080831115611aba57600080fd5b611ac68b848c016113b4565b945060a08a0135925080831115611adc57600080fd5b5050611aea89828a016113b4565b9150509295509295509295565b600081518084526020808501945080840160005b8381101561188057815187529582019590820190600101611b0b565b606080825284519082018190526000906020906080840190828801845b82811015611b695781516001600160a01b031684529284019290840190600101611b44565b50505083810382850152611b7d8187611af7565b9150508281036040840152611b928185611af7565b969550505050505056fea2646970667358221220a129fa8b67110494523e0cc69d6b9705fd33df554433f902bbdc037049fa3b7b64736f6c63430008130033","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106101215760003560e01c8063bc197c81116100ad578063f23a6e6111610071578063f23a6e61146102fe578063f43cda8b1461031d578063f4a120f714610330578063f645125514610343578063f8c8765e1461036a57600080fd5b8063bc197c8114610238578063c5ac2b1c14610270578063cb10f94c14610297578063d41f1771146102b0578063d7c9e3ec146102d757600080fd5b80637efab4f5116100f45780637efab4f5146101a157806395c7041c146101ca578063a78e111c146101dd578063b1768065146101f0578063b68ad1e41461022557600080fd5b806301ffc9a7146101265780630efe6a8b1461014e5780634c4c45de14610163578063654715e614610176575b600080fd5b610139610134366004611173565b61037d565b60405190151581526020015b60405180910390f35b61016161015c3660046111bc565b6103b4565b005b61016161017136600461123c565b6103c5565b600254610189906001600160a01b031681565b6040516001600160a01b039091168152602001610145565b6101896101af3660046112e8565b6004602052600090815260409020546001600160a01b031681565b600154610189906001600160a01b031681565b6101616101eb366004611305565b610448565b6102177f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e98286981565b604051908152602001610145565b600354610189906001600160a01b031681565b610257610246366004611497565b63bc197c8160e01b95945050505050565b6040516001600160e01b03199091168152602001610145565b6102177faf50c8eab81226bc79eee3a10e3fe25db1a2be7241130e392b0675df839b6d1881565b600054610189906201000090046001600160a01b031681565b6102177f87a7811f4bfedea3d341ad165680ae306b01aaeacc205d227629cf157dd9f82181565b6102177f5fb452c5a8f2b7c7ef2984e2f1063c7ee9b80b110cdc98ccb98f6654e10b5ed281565b61025761030c366004611544565b63f23a6e6160e01b95945050505050565b61016161032b3660046115ac565b61045a565b61018961033e3660046112e8565b610629565b6102177f2cef46a936bdc5b7e6e8c71aa04560c41cf7d88bb26901a7e7f4936ff02accad81565b610161610378366004611634565b610945565b60006001600160e01b03198216630271189760e51b14806103ae57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6103c083338484610b54565b505050565b84831480156103d357508481145b6104305760405162461bcd60e51b8152602060048201526024808201527f526f6f74455243313135355072656469636174653a20494e56414c49445f4c4560448201526309c8ea8960e31b60648201526084015b60405180910390fd5b61043f87878787878787610cec565b50505050505050565b61045484848484610b54565b50505050565b6001546001600160a01b031633146104c35760405162461bcd60e51b815260206004820152602660248201527f526f6f74455243313135355072656469636174653a204f4e4c595f455849545f6044820152652422a62822a960d11b6064820152608401610427565b6002546001600160a01b038481169116146105335760405162461bcd60e51b815260206004820152602a60248201527f526f6f74455243313135355072656469636174653a204f4e4c595f4348494c446044820152695f50524544494341544560b01b6064820152608401610427565b7f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e982869610562602060008486611690565b61056b916116ba565b0361058a576105856105808260208186611690565b610ecc565b610454565b7f5fb452c5a8f2b7c7ef2984e2f1063c7ee9b80b110cdc98ccb98f6654e10b5ed26105b9602060008486611690565b6105c2916116ba565b036105d1576105858282610fcb565b60405162461bcd60e51b815260206004820152602760248201527f526f6f74455243313135355072656469636174653a20494e56414c49445f5349604482015266474e415455524560c81b6064820152608401610427565b60006001600160a01b03821661068d5760405162461bcd60e51b815260206004820152602360248201527f526f6f74455243313135355072656469636174653a20494e56414c49445f544f60448201526225a2a760e91b6064820152608401610427565b6001600160a01b0382811660009081526004602052604090205416156107015760405162461bcd60e51b8152602060048201526024808201527f526f6f74455243313135355072656469636174653a20414c52454144595f4d416044820152631414115160e21b6064820152608401610427565b6002546003546040516bffffffffffffffffffffffff19606086901b1660208201526001600160a01b03928316926107ab921690603401604051602081830303815290604052805190602001208360405160388101919091526f5af43d82803e903d91602b57fd5bf3ff60248201526014810192909252733d602d80600a3d3981f3363d3d373d3d3d363d73825260588201526037600c8201206078820152605560439091012090565b6001600160a01b03848116600081815260046020818152604080842080546001600160a01b031916968816969096179095558451908101855282815293516303a24d0760e21b8152908101919091529294509091630e89341c90602401600060405180830381865afa92505050801561084657506040513d6000823e601f3d908101601f1916820160405261084391908101906116fc565b60015b1561084e5790505b600060029054906101000a90046001600160a01b03166001600160a01b03166316f19831837f2cef46a936bdc5b7e6e8c71aa04560c41cf7d88bb26901a7e7f4936ff02accad87856040516020016108a89392919061179e565b6040516020818303038152906040526040518363ffffffff1660e01b81526004016108d49291906117c8565b600060405180830381600087803b1580156108ee57600080fd5b505af1158015610902573d6000803e3d6000fd5b50506040516001600160a01b038087169350871691507f85920d35e6c72f6b2affffa04298b0cecfeba86e4a9f407df661f1cb8ab5e61790600090a35050919050565b600054610100900460ff16158080156109655750600054600160ff909116105b8061097f5750303b15801561097f575060005460ff166001145b6109e25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610427565b6000805460ff191660011790558015610a05576000805461ff0019166101001790555b6001600160a01b03851615801590610a2557506001600160a01b03841615155b8015610a3957506001600160a01b03831615155b8015610a4d57506001600160a01b03821615155b610aaa5760405162461bcd60e51b815260206004820152602860248201527f526f6f74455243313135355072656469636174653a204241445f494e495449416044820152672624ad20aa24a7a760c11b6064820152608401610427565b6000805462010000600160b01b031916620100006001600160a01b038881169190910291909117909155600180546001600160a01b031990811687841617909155600280548216868416179055600380549091169184169190911790558015610b4d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6000610b5f8561112c565b604051637921219560e11b81529091506001600160a01b0386169063f242432a90610b949033903090889088906004016117f4565b600060405180830381600087803b158015610bae57600080fd5b505af1158015610bc2573d6000803e3d6000fd5b5050600054600254604080517f87a7811f4bfedea3d341ad165680ae306b01aaeacc205d227629cf157dd9f82160208201526001600160a01b038b8116828401523360608301528a8116608083015260a082018a905260c08083018a90528351808403909101815260e08301938490526316f1983160e01b90935262010000909404841695506316f198319450610c5f939092169160e4016117c8565b600060405180830381600087803b158015610c7957600080fd5b505af1158015610c8d573d6000803e3d6000fd5b505060408051338152602081018790529081018590526001600160a01b03808816935084811692508816907fbcbdf0c69f975f2a4085544938b054f02e77e87cbd055146d388c0be7120e04f9060600160405180910390a45050505050565b6000610cf78861112c565b905060005b84811015610da357886001600160a01b031663f242432a3330898986818110610d2757610d2761182c565b90506020020135888887818110610d4057610d4061182c565b905060200201356040518563ffffffff1660e01b8152600401610d6694939291906117f4565b600060405180830381600087803b158015610d8057600080fd5b505af1158015610d94573d6000803e3d6000fd5b50505050806001019050610cfc565b506000546002546040516001600160a01b03620100009093048316926316f19831921690610e05907faf50c8eab81226bc79eee3a10e3fe25db1a2be7241130e392b0675df839b6d18908d9033908e908e908e908e908e908e906020016118bd565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401610e319291906117c8565b600060405180830381600087803b158015610e4b57600080fd5b505af1158015610e5f573d6000803e3d6000fd5b50505050336001600160a01b0316816001600160a01b0316896001600160a01b03167f7e8ab6f25cb177d65db49b7a2197bb2a7df5757434857d411e2523b332a913e68a8a8a8a8a8a604051610eba96959493929190611928565b60405180910390a45050505050505050565b600080808080610ede86880188611971565b6001600160a01b03808616600090815260046020526040902054959a50939850919650945092501680610f1357610f136119cc565b604051637921219560e11b81526001600160a01b0387169063f242432a90610f459030908890889088906004016117f4565b600060405180830381600087803b158015610f5f57600080fd5b505af1158015610f73573d6000803e3d6000fd5b5050604080516001600160a01b0389811682526020820188905291810186905281881693508482169250908916907fc42752949ca07109e6f25adcde4a9407be23e084b1d32ca2bce8aa55bf3dd62590606001610eba565b600080808080610fdd868801886119e2565b6001600160a01b03808616600090815260046020526040902054959b509399509197509550935016905080611014576110146119cc565b60005b83518110156110da57866001600160a01b031663f242432a308784815181106110425761104261182c565b602002602001015187858151811061105c5761105c61182c565b60200260200101518786815181106110765761107661182c565b60200260200101516040518563ffffffff1660e01b815260040161109d94939291906117f4565b600060405180830381600087803b1580156110b757600080fd5b505af11580156110cb573d6000803e3d6000fd5b50505050806001019050611017565b50846001600160a01b0316816001600160a01b0316876001600160a01b03167fce612e98b81c726375e7c2395409e74ee0a29b22f7641ea5a8ce8508616448c0878787604051610eba93929190611b27565b6001600160a01b0380821660009081526004602052604090205416806111585761115582610629565b90505b6001600160a01b03811661116e5761116e6119cc565b919050565b60006020828403121561118557600080fd5b81356001600160e01b03198116811461119d57600080fd5b9392505050565b6001600160a01b03811681146111b957600080fd5b50565b6000806000606084860312156111d157600080fd5b83356111dc816111a4565b95602085013595506040909401359392505050565b60008083601f84011261120357600080fd5b5081356001600160401b0381111561121a57600080fd5b6020830191508360208260051b850101111561123557600080fd5b9250929050565b60008060008060008060006080888a03121561125757600080fd5b8735611262816111a4565b965060208801356001600160401b038082111561127e57600080fd5b61128a8b838c016111f1565b909850965060408a01359150808211156112a357600080fd5b6112af8b838c016111f1565b909650945060608a01359150808211156112c857600080fd5b506112d58a828b016111f1565b989b979a50959850939692959293505050565b6000602082840312156112fa57600080fd5b813561119d816111a4565b6000806000806080858703121561131b57600080fd5b8435611326816111a4565b93506020850135611336816111a4565b93969395505050506040820135916060013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156113895761138961134b565b604052919050565b60006001600160401b038211156113aa576113aa61134b565b5060051b60200190565b600082601f8301126113c557600080fd5b813560206113da6113d583611391565b611361565b82815260059290921b840181019181810190868411156113f957600080fd5b8286015b8481101561141457803583529183019183016113fd565b509695505050505050565b60006001600160401b038211156114385761143861134b565b50601f01601f191660200190565b600082601f83011261145757600080fd5b81356114656113d58261141f565b81815284602083860101111561147a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156114af57600080fd5b85356114ba816111a4565b945060208601356114ca816111a4565b935060408601356001600160401b03808211156114e657600080fd5b6114f289838a016113b4565b9450606088013591508082111561150857600080fd5b61151489838a016113b4565b9350608088013591508082111561152a57600080fd5b5061153788828901611446565b9150509295509295909350565b600080600080600060a0868803121561155c57600080fd5b8535611567816111a4565b94506020860135611577816111a4565b9350604086013592506060860135915060808601356001600160401b038111156115a057600080fd5b61153788828901611446565b600080600080606085870312156115c257600080fd5b8435935060208501356115d4816111a4565b925060408501356001600160401b03808211156115f057600080fd5b818701915087601f83011261160457600080fd5b81358181111561161357600080fd5b88602082850101111561162557600080fd5b95989497505060200194505050565b6000806000806080858703121561164a57600080fd5b8435611655816111a4565b93506020850135611665816111a4565b92506040850135611675816111a4565b91506060850135611685816111a4565b939692955090935050565b600080858511156116a057600080fd5b838611156116ad57600080fd5b5050820193919092039150565b803560208310156103ae57600019602084900360031b1b1692915050565b60005b838110156116f35781810151838201526020016116db565b50506000910152565b60006020828403121561170e57600080fd5b81516001600160401b0381111561172457600080fd5b8201601f8101841361173557600080fd5b80516117436113d58261141f565b81815285602083850101111561175857600080fd5b6117698260208301602086016116d8565b95945050505050565b6000815180845261178a8160208601602086016116d8565b601f01601f19169290920160200192915050565b8381526001600160a01b038316602082015260606040820181905260009061176990830184611772565b6001600160a01b03831681526040602082018190526000906117ec90830184611772565b949350505050565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b634e487b7160e01b600052603260045260246000fd5b8183526000602080850194508260005b85811015611880578135611865816111a4565b6001600160a01b031687529582019590820190600101611852565b509495945050505050565b81835260006001600160fb1b038311156118a457600080fd5b8260051b80836020870137939093016020019392505050565b8981526001600160a01b0389811660208301528816604082015260c0606082018190526000906118f0908301888a611842565b828103608084015261190381878961188b565b905082810360a084015261191881858761188b565b9c9b505050505050505050505050565b60608152600061193c60608301888a611842565b828103602084015261194f81878961188b565b9050828103604084015261196481858761188b565b9998505050505050505050565b600080600080600060a0868803121561198957600080fd5b8535611994816111a4565b945060208601356119a4816111a4565b935060408601356119b4816111a4565b94979396509394606081013594506080013592915050565b634e487b7160e01b600052600160045260246000fd5b60008060008060008060c087890312156119fb57600080fd5b86359550602080880135611a0e816111a4565b95506040880135611a1e816111a4565b945060608801356001600160401b0380821115611a3a57600080fd5b818a0191508a601f830112611a4e57600080fd5b8135611a5c6113d582611391565b81815260059190911b8301840190848101908d831115611a7b57600080fd5b938501935b82851015611aa2578435611a93816111a4565b82529385019390850190611a80565b9750505060808a0135925080831115611aba57600080fd5b611ac68b848c016113b4565b945060a08a0135925080831115611adc57600080fd5b5050611aea89828a016113b4565b9150509295509295509295565b600081518084526020808501945080840160005b8381101561188057815187529582019590820190600101611b0b565b606080825284519082018190526000906020906080840190828801845b82811015611b695781516001600160a01b031684529284019290840190600101611b44565b50505083810382850152611b7d8187611af7565b9150508281036040840152611b928185611af7565b969550505050505056fea2646970667358221220a129fa8b67110494523e0cc69d6b9705fd33df554433f902bbdc037049fa3b7b64736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` var ChildMintableERC1155PredicateArtifact string = `{"_format":"hh-sol-artifact-1","contractName":"ChildMintableERC1155Predicate","sourceName":"contracts/bridge/ChildMintableERC1155Predicate.sol","abi":[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rootToken","type":"address"},{"indexed":true,"internalType":"address","name":"childToken","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MintableERC1155Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rootToken","type":"address"},{"indexed":true,"internalType":"address","name":"childToken","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"MintableERC1155DepositBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rootToken","type":"address"},{"indexed":true,"internalType":"address","name":"childToken","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MintableERC1155Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rootToken","type":"address"},{"indexed":true,"internalType":"address","name":"childToken","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"MintableERC1155WithdrawBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rootToken","type":"address"},{"indexed":true,"internalType":"address","name":"childToken","type":"address"}],"name":"MintableTokenMapped","type":"event"},{"inputs":[],"name":"DEPOSIT_BATCH_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPOSIT_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAP_TOKEN_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_BATCH_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAW_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"childTokenTemplate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exitHelper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newStateSender","type":"address"},{"internalType":"address","name":"newExitHelper","type":"address"},{"internalType":"address","name":"newRootERC1155Predicate","type":"address"},{"internalType":"address","name":"newChildTokenTemplate","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onL2StateReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rootERC1155Predicate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rootTokenToChildToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stateSender","outputs":[{"internalType":"contract IStateSender","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IChildERC1155","name":"childToken","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IChildERC1155","name":"childToken","type":"address"},{"internalType":"address[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"withdrawBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IChildERC1155","name":"childToken","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawTo","outputs":[],"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50611f7c806100206000396000f3fe608060405234801561001057600080fd5b50600436106100d55760003560e01c8063b8cd3ec011610087578063b8cd3ec0146101b6578063c5ac2b1c146101c9578063cb10f94c146101f0578063d41f177114610209578063d7c9e3ec14610230578063f43cda8b14610257578063f64512551461026a578063f8c8765e1461029157600080fd5b8063051eb2e2146100da5780637efab4f51461010a57806386937eb41461013357806395c7041c14610148578063b17680651461015b578063b5c5f67214610190578063b68ad1e4146101a3575b600080fd5b6002546100ed906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100ed610118366004611564565b6004602052600090815260409020546001600160a01b031681565b6101466101413660046115d3565b6102a4565b005b6001546100ed906001600160a01b031681565b6101827f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e98286981565b604051908152602001610101565b61014661019e36600461167f565b6102bc565b6003546100ed906001600160a01b031681565b6101466101c43660046116b4565b6102cd565b6101827faf50c8eab81226bc79eee3a10e3fe25db1a2be7241130e392b0675df839b6d1881565b6000546100ed906201000090046001600160a01b031681565b6101827f87a7811f4bfedea3d341ad165680ae306b01aaeacc205d227629cf157dd9f82181565b6101827f5fb452c5a8f2b7c7ef2984e2f1063c7ee9b80b110cdc98ccb98f6654e10b5ed281565b6101466102653660046116fa565b6102df565b6101827f2cef46a936bdc5b7e6e8c71aa04560c41cf7d88bb26901a7e7f4936ff02accad81565b61014661029f366004611782565b610514565b6102b38787878787878761062d565b50505050505050565b6102c8833384846109ba565b505050565b6102d9848484846109ba565b50505050565b6001546001600160a01b031633146103565760405162461bcd60e51b815260206004820152602f60248201527f4368696c644d696e7461626c65455243313135355072656469636174653a204f60448201526e27262cafa2ac24aa2fa422a62822a960891b60648201526084015b60405180910390fd5b6002546001600160a01b038481169116146103ce5760405162461bcd60e51b815260206004820152603260248201527f4368696c644d696e7461626c65455243313135355072656469636174653a204f6044820152714e4c595f524f4f545f50524544494341544560701b606482015260840161034d565b7f87a7811f4bfedea3d341ad165680ae306b01aaeacc205d227629cf157dd9f8216103fd6020600084866117de565b61040691611808565b036104255761042061041b82602081866117de565b610cd5565b6102d9565b7faf50c8eab81226bc79eee3a10e3fe25db1a2be7241130e392b0675df839b6d186104546020600084866117de565b61045d91611808565b0361046c576104208282610f40565b7f2cef46a936bdc5b7e6e8c71aa04560c41cf7d88bb26901a7e7f4936ff02accad61049b6020600084866117de565b6104a491611808565b036104b35761042082826111ad565b60405162461bcd60e51b815260206004820152603060248201527f4368696c644d696e7461626c65455243313135355072656469636174653a204960448201526f4e56414c49445f5349474e415455524560801b606482015260840161034d565b600054610100900460ff16158080156105345750600054600160ff909116105b8061054e5750303b15801561054e575060005460ff166001145b6105b15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161034d565b6000805460ff1916600117905580156105d4576000805461ff0019166101001790555b6105e085858585611317565b8015610626576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b8661063781611420565b6106535760405162461bcd60e51b815260040161034d90611826565b6000886001600160a01b0316631f2d00656040518163ffffffff1660e01b8152600401602060405180830381865afa158015610693573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b79190611871565b6001600160a01b038181166000908152600460205260409020549192508a81169116146106f65760405162461bcd60e51b815260040161034d9061188e565b6001600160a01b03811661070c5761070c6118db565b306001600160a01b0316896001600160a01b031663e61987056040518163ffffffff1660e01b8152600401602060405180830381865afa158015610754573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107789190611871565b6001600160a01b03161461078e5761078e6118db565b868514801561079c57508483145b6107fe5760405162461bcd60e51b815260206004820152602d60248201527f4368696c644d696e7461626c65455243313135355072656469636174653a204960448201526c09cac82989288be988a9c8ea89609b1b606482015260840161034d565b604051631ac8311560e21b81526001600160a01b038a1690636b20c454906108329033908a908a908a908a90600401611923565b6020604051808303816000875af1158015610851573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108759190611967565b6108915760405162461bcd60e51b815260040161034d90611989565b6000546002546040516001600160a01b03620100009093048316926316f198319216906108f2907f5fb452c5a8f2b7c7ef2984e2f1063c7ee9b80b110cdc98ccb98f6654e10b5ed290869033908f908f908f908f908f908f90602001611a1c565b6040516020818303038152906040526040518363ffffffff1660e01b815260040161091e929190611acd565b600060405180830381600087803b15801561093857600080fd5b505af115801561094c573d6000803e3d6000fd5b50505050336001600160a01b0316896001600160a01b0316826001600160a01b03167fdd47868997765508c515e1f8ca079846dafbdfd8f98f6e76bca0891810b9f9d18b8b8b8b8b8b6040516109a796959493929190611af9565b60405180910390a4505050505050505050565b836109c481611420565b6109e05760405162461bcd60e51b815260040161034d90611826565b6000856001600160a01b0316631f2d00656040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a449190611871565b6001600160a01b03818116600090815260046020526040902054919250878116911614610a835760405162461bcd60e51b815260040161034d9061188e565b6001600160a01b038116610a9957610a996118db565b306001600160a01b0316866001600160a01b031663e61987056040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b059190611871565b6001600160a01b031614610b1b57610b1b6118db565b604051637a94c56560e11b81526001600160a01b0387169063f5298aca90610b4b90339088908890600401611b42565b6020604051808303816000875af1158015610b6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8e9190611967565b610baa5760405162461bcd60e51b815260040161034d90611989565b600054600254604080517f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e98286960208201526001600160a01b0385811682840152336060830152898116608083015260a0820189905260c08083018990528351808403909101815260e08301938490526316f1983160e01b909352620100009094048416936316f1983193610c429391169160e401611acd565b600060405180830381600087803b158015610c5c57600080fd5b505af1158015610c70573d6000803e3d6000fd5b50505050846001600160a01b0316866001600160a01b0316826001600160a01b03167fda58d73e08ba3c7767de904e68d208be8291494a9faaf70a6d4f736d24ec1f0f338888604051610cc593929190611b42565b60405180910390a4505050505050565b600080808080610ce786880188611b63565b6001600160a01b03808616600090815260046020526040902054959a50939850919650945092501680610d2c5760405162461bcd60e51b815260040161034d9061188e565b610d3581611420565b610d4157610d416118db565b6000816001600160a01b0316631f2d00656040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da59190611871565b9050866001600160a01b0316816001600160a01b031614610dc857610dc86118db565b6001600160a01b038116610dde57610dde6118db565b306001600160a01b0316826001600160a01b031663e61987056040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4a9190611871565b6001600160a01b031614610e6057610e606118db565b604051630ab714fb60e11b81526001600160a01b0383169063156e29f690610e9090889088908890600401611b42565b6020604051808303816000875af1158015610eaf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed39190611967565b610eef5760405162461bcd60e51b815260040161034d90611bbe565b846001600160a01b0316826001600160a01b0316886001600160a01b03167f76a4cd47013e7e58abe817eedbb692d1614d71080b527412ebfb3f91a085a6de8988886040516109a793929190611b42565b600080808080610f5286880188611cdc565b6001600160a01b03808616600090815260046020526040902054959b509399509197509550935016905080610f995760405162461bcd60e51b815260040161034d9061188e565b610fa281611420565b610fae57610fae6118db565b6000816001600160a01b0316631f2d00656040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110129190611871565b9050866001600160a01b0316816001600160a01b031614611035576110356118db565b6001600160a01b03811661104b5761104b6118db565b306001600160a01b0316826001600160a01b031663e61987056040518163ffffffff1660e01b8152600401602060405180830381865afa158015611093573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b79190611871565b6001600160a01b0316146110cd576110cd6118db565b604051635712868360e01b81526001600160a01b038316906357128683906110fd90889088908890600401611e21565b6020604051808303816000875af115801561111c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111409190611967565b61115c5760405162461bcd60e51b815260040161034d90611bbe565b856001600160a01b0316826001600160a01b0316886001600160a01b03167fc244cac13e0edc863dc5a2c3bd2b935f605b2ed225fb052eaef869bc24b76fde8888886040516109a793929190611e21565b6000806111bc83850185611e96565b9093509150506001600160a01b0382166111d8576111d86118db565b6001600160a01b038281166000908152600460205260409020541615611200576112006118db565b6003546040516bffffffffffffffffffffffff19606085901b166020820152600091611250916001600160a01b0390911690603401604051602081830303815290604052805190602001206114b5565b6001600160a01b0384811660009081526004602081905260409182902080546001600160a01b031916938516938417905590516379ccf11760e11b8152929350909163f399e22e916112a6918791879101611acd565b600060405180830381600087803b1580156112c057600080fd5b505af11580156112d4573d6000803e3d6000fd5b50506040516001600160a01b038085169350861691507f0a1eaf9aa124c3f84c9dd77f7016af0f16f67639abb913af1697387db01f5ca590600090a35050505050565b6001600160a01b0384161580159061133757506001600160a01b03831615155b801561134b57506001600160a01b03821615155b801561135f57506001600160a01b03811615155b6113c55760405162461bcd60e51b815260206004820152603160248201527f4368696c644d696e7461626c65455243313135355072656469636174653a204260448201527020a22fa4a724aa24a0a624ad20aa24a7a760791b606482015260840161034d565b600080546001600160a01b03958616620100000262010000600160b01b0319909116179055600180549385166001600160a01b0319948516179055600280549285169284169290921790915560038054919093169116179055565b6000816001600160a01b03163b60000361143c57506000919050565b6040516301ffc9a760e01b8152636cdb3d1360e11b60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa9250505080156114a3575060408051601f3d908101601f191682019092526114a091810190611967565b60015b6114af57506000919050565b92915050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b0381166114af5760405162461bcd60e51b8152602060048201526017602482015276115490cc4c4d8dce8818dc99585d194c8819985a5b1959604a1b604482015260640161034d565b6001600160a01b038116811461156157600080fd5b50565b60006020828403121561157657600080fd5b81356115818161154c565b9392505050565b60008083601f84011261159a57600080fd5b5081356001600160401b038111156115b157600080fd5b6020830191508360208260051b85010111156115cc57600080fd5b9250929050565b60008060008060008060006080888a0312156115ee57600080fd5b87356115f98161154c565b965060208801356001600160401b038082111561161557600080fd5b6116218b838c01611588565b909850965060408a013591508082111561163a57600080fd5b6116468b838c01611588565b909650945060608a013591508082111561165f57600080fd5b5061166c8a828b01611588565b989b979a50959850939692959293505050565b60008060006060848603121561169457600080fd5b833561169f8161154c565b95602085013595506040909401359392505050565b600080600080608085870312156116ca57600080fd5b84356116d58161154c565b935060208501356116e58161154c565b93969395505050506040820135916060013590565b6000806000806060858703121561171057600080fd5b8435935060208501356117228161154c565b925060408501356001600160401b038082111561173e57600080fd5b818701915087601f83011261175257600080fd5b81358181111561176157600080fd5b88602082850101111561177357600080fd5b95989497505060200194505050565b6000806000806080858703121561179857600080fd5b84356117a38161154c565b935060208501356117b38161154c565b925060408501356117c38161154c565b915060608501356117d38161154c565b939692955090935050565b600080858511156117ee57600080fd5b838611156117fb57600080fd5b5050820193919092039150565b803560208310156114af57600019602084900360031b1b1692915050565b6020808252602b908201527f4368696c644d696e7461626c65455243313135355072656469636174653a204e60408201526a13d517d0d3d395149050d560aa1b606082015260800190565b60006020828403121561188357600080fd5b81516115818161154c565b6020808252602d908201527f4368696c644d696e7461626c65455243313135355072656469636174653a205560408201526c2726a0a82822a22faa27a5a2a760991b606082015260800190565b634e487b7160e01b600052600160045260246000fd5b81835260006001600160fb1b0383111561190a57600080fd5b8260051b80836020870137939093016020019392505050565b6001600160a01b038616815260606020820181905260009061194890830186886118f1565b828103604084015261195b8185876118f1565b98975050505050505050565b60006020828403121561197957600080fd5b8151801515811461158157600080fd5b6020808252602a908201527f4368696c644d696e7461626c65455243313135355072656469636174653a204260408201526915549397d1905253115160b21b606082015260800190565b8183526000602080850194508260005b85811015611a115781356119f68161154c565b6001600160a01b0316875295820195908201906001016119e3565b509495945050505050565b8981526001600160a01b0389811660208301528816604082015260c060608201819052600090611a4f908301888a6119d3565b8281036080840152611a628187896118f1565b905082810360a0840152611a778185876118f1565b9c9b505050505050505050505050565b6000815180845260005b81811015611aad57602081850181015186830182015201611a91565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b0383168152604060208201819052600090611af190830184611a87565b949350505050565b606081526000611b0d60608301888a6119d3565b8281036020840152611b208187896118f1565b90508281036040840152611b358185876118f1565b9998505050505050505050565b6001600160a01b039390931683526020830191909152604082015260600190565b600080600080600060a08688031215611b7b57600080fd5b8535611b868161154c565b94506020860135611b968161154c565b93506040860135611ba68161154c565b94979396509394606081013594506080013592915050565b6020808252602a908201527f4368696c644d696e7461626c65455243313135355072656469636174653a204d60408201526912539517d1905253115160b21b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611c4657611c46611c08565b604052919050565b60006001600160401b03821115611c6757611c67611c08565b5060051b60200190565b600082601f830112611c8257600080fd5b81356020611c97611c9283611c4e565b611c1e565b82815260059290921b84018101918181019086841115611cb657600080fd5b8286015b84811015611cd15780358352918301918301611cba565b509695505050505050565b60008060008060008060c08789031215611cf557600080fd5b86359550602080880135611d088161154c565b95506040880135611d188161154c565b945060608801356001600160401b0380821115611d3457600080fd5b818a0191508a601f830112611d4857600080fd5b8135611d56611c9282611c4e565b81815260059190911b8301840190848101908d831115611d7557600080fd5b938501935b82851015611d9c578435611d8d8161154c565b82529385019390850190611d7a565b9750505060808a0135925080831115611db457600080fd5b611dc08b848c01611c71565b945060a08a0135925080831115611dd657600080fd5b5050611de489828a01611c71565b9150509295509295509295565b600081518084526020808501945080840160005b83811015611a1157815187529582019590820190600101611e05565b606080825284519082018190526000906020906080840190828801845b82811015611e635781516001600160a01b031684529284019290840190600101611e3e565b50505083810382850152611e778187611df1565b9150508281036040840152611e8c8185611df1565b9695505050505050565b600080600060608486031215611eab57600080fd5b83359250602080850135611ebe8161154c565b925060408501356001600160401b0380821115611eda57600080fd5b818701915087601f830112611eee57600080fd5b813581811115611f0057611f00611c08565b611f12601f8201601f19168501611c1e565b91508082528884828501011115611f2857600080fd5b8084840185840137600084828401015250809350505050925092509256fea264697066735822122026b932a566e002e8c27e3e0f463c0498a2cad19becb4b82dde2b9525a3ca034464736f6c63430008130033","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106100d55760003560e01c8063b8cd3ec011610087578063b8cd3ec0146101b6578063c5ac2b1c146101c9578063cb10f94c146101f0578063d41f177114610209578063d7c9e3ec14610230578063f43cda8b14610257578063f64512551461026a578063f8c8765e1461029157600080fd5b8063051eb2e2146100da5780637efab4f51461010a57806386937eb41461013357806395c7041c14610148578063b17680651461015b578063b5c5f67214610190578063b68ad1e4146101a3575b600080fd5b6002546100ed906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100ed610118366004611564565b6004602052600090815260409020546001600160a01b031681565b6101466101413660046115d3565b6102a4565b005b6001546100ed906001600160a01b031681565b6101827f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e98286981565b604051908152602001610101565b61014661019e36600461167f565b6102bc565b6003546100ed906001600160a01b031681565b6101466101c43660046116b4565b6102cd565b6101827faf50c8eab81226bc79eee3a10e3fe25db1a2be7241130e392b0675df839b6d1881565b6000546100ed906201000090046001600160a01b031681565b6101827f87a7811f4bfedea3d341ad165680ae306b01aaeacc205d227629cf157dd9f82181565b6101827f5fb452c5a8f2b7c7ef2984e2f1063c7ee9b80b110cdc98ccb98f6654e10b5ed281565b6101466102653660046116fa565b6102df565b6101827f2cef46a936bdc5b7e6e8c71aa04560c41cf7d88bb26901a7e7f4936ff02accad81565b61014661029f366004611782565b610514565b6102b38787878787878761062d565b50505050505050565b6102c8833384846109ba565b505050565b6102d9848484846109ba565b50505050565b6001546001600160a01b031633146103565760405162461bcd60e51b815260206004820152602f60248201527f4368696c644d696e7461626c65455243313135355072656469636174653a204f60448201526e27262cafa2ac24aa2fa422a62822a960891b60648201526084015b60405180910390fd5b6002546001600160a01b038481169116146103ce5760405162461bcd60e51b815260206004820152603260248201527f4368696c644d696e7461626c65455243313135355072656469636174653a204f6044820152714e4c595f524f4f545f50524544494341544560701b606482015260840161034d565b7f87a7811f4bfedea3d341ad165680ae306b01aaeacc205d227629cf157dd9f8216103fd6020600084866117de565b61040691611808565b036104255761042061041b82602081866117de565b610cd5565b6102d9565b7faf50c8eab81226bc79eee3a10e3fe25db1a2be7241130e392b0675df839b6d186104546020600084866117de565b61045d91611808565b0361046c576104208282610f40565b7f2cef46a936bdc5b7e6e8c71aa04560c41cf7d88bb26901a7e7f4936ff02accad61049b6020600084866117de565b6104a491611808565b036104b35761042082826111ad565b60405162461bcd60e51b815260206004820152603060248201527f4368696c644d696e7461626c65455243313135355072656469636174653a204960448201526f4e56414c49445f5349474e415455524560801b606482015260840161034d565b600054610100900460ff16158080156105345750600054600160ff909116105b8061054e5750303b15801561054e575060005460ff166001145b6105b15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161034d565b6000805460ff1916600117905580156105d4576000805461ff0019166101001790555b6105e085858585611317565b8015610626576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b8661063781611420565b6106535760405162461bcd60e51b815260040161034d90611826565b6000886001600160a01b0316631f2d00656040518163ffffffff1660e01b8152600401602060405180830381865afa158015610693573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b79190611871565b6001600160a01b038181166000908152600460205260409020549192508a81169116146106f65760405162461bcd60e51b815260040161034d9061188e565b6001600160a01b03811661070c5761070c6118db565b306001600160a01b0316896001600160a01b031663e61987056040518163ffffffff1660e01b8152600401602060405180830381865afa158015610754573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107789190611871565b6001600160a01b03161461078e5761078e6118db565b868514801561079c57508483145b6107fe5760405162461bcd60e51b815260206004820152602d60248201527f4368696c644d696e7461626c65455243313135355072656469636174653a204960448201526c09cac82989288be988a9c8ea89609b1b606482015260840161034d565b604051631ac8311560e21b81526001600160a01b038a1690636b20c454906108329033908a908a908a908a90600401611923565b6020604051808303816000875af1158015610851573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108759190611967565b6108915760405162461bcd60e51b815260040161034d90611989565b6000546002546040516001600160a01b03620100009093048316926316f198319216906108f2907f5fb452c5a8f2b7c7ef2984e2f1063c7ee9b80b110cdc98ccb98f6654e10b5ed290869033908f908f908f908f908f908f90602001611a1c565b6040516020818303038152906040526040518363ffffffff1660e01b815260040161091e929190611acd565b600060405180830381600087803b15801561093857600080fd5b505af115801561094c573d6000803e3d6000fd5b50505050336001600160a01b0316896001600160a01b0316826001600160a01b03167fdd47868997765508c515e1f8ca079846dafbdfd8f98f6e76bca0891810b9f9d18b8b8b8b8b8b6040516109a796959493929190611af9565b60405180910390a4505050505050505050565b836109c481611420565b6109e05760405162461bcd60e51b815260040161034d90611826565b6000856001600160a01b0316631f2d00656040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a449190611871565b6001600160a01b03818116600090815260046020526040902054919250878116911614610a835760405162461bcd60e51b815260040161034d9061188e565b6001600160a01b038116610a9957610a996118db565b306001600160a01b0316866001600160a01b031663e61987056040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b059190611871565b6001600160a01b031614610b1b57610b1b6118db565b604051637a94c56560e11b81526001600160a01b0387169063f5298aca90610b4b90339088908890600401611b42565b6020604051808303816000875af1158015610b6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8e9190611967565b610baa5760405162461bcd60e51b815260040161034d90611989565b600054600254604080517f7a8dc26796a1e50e6e190b70259f58f6a4edd5b22280ceecc82b687b8e98286960208201526001600160a01b0385811682840152336060830152898116608083015260a0820189905260c08083018990528351808403909101815260e08301938490526316f1983160e01b909352620100009094048416936316f1983193610c429391169160e401611acd565b600060405180830381600087803b158015610c5c57600080fd5b505af1158015610c70573d6000803e3d6000fd5b50505050846001600160a01b0316866001600160a01b0316826001600160a01b03167fda58d73e08ba3c7767de904e68d208be8291494a9faaf70a6d4f736d24ec1f0f338888604051610cc593929190611b42565b60405180910390a4505050505050565b600080808080610ce786880188611b63565b6001600160a01b03808616600090815260046020526040902054959a50939850919650945092501680610d2c5760405162461bcd60e51b815260040161034d9061188e565b610d3581611420565b610d4157610d416118db565b6000816001600160a01b0316631f2d00656040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da59190611871565b9050866001600160a01b0316816001600160a01b031614610dc857610dc86118db565b6001600160a01b038116610dde57610dde6118db565b306001600160a01b0316826001600160a01b031663e61987056040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4a9190611871565b6001600160a01b031614610e6057610e606118db565b604051630ab714fb60e11b81526001600160a01b0383169063156e29f690610e9090889088908890600401611b42565b6020604051808303816000875af1158015610eaf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed39190611967565b610eef5760405162461bcd60e51b815260040161034d90611bbe565b846001600160a01b0316826001600160a01b0316886001600160a01b03167f76a4cd47013e7e58abe817eedbb692d1614d71080b527412ebfb3f91a085a6de8988886040516109a793929190611b42565b600080808080610f5286880188611cdc565b6001600160a01b03808616600090815260046020526040902054959b509399509197509550935016905080610f995760405162461bcd60e51b815260040161034d9061188e565b610fa281611420565b610fae57610fae6118db565b6000816001600160a01b0316631f2d00656040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110129190611871565b9050866001600160a01b0316816001600160a01b031614611035576110356118db565b6001600160a01b03811661104b5761104b6118db565b306001600160a01b0316826001600160a01b031663e61987056040518163ffffffff1660e01b8152600401602060405180830381865afa158015611093573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b79190611871565b6001600160a01b0316146110cd576110cd6118db565b604051635712868360e01b81526001600160a01b038316906357128683906110fd90889088908890600401611e21565b6020604051808303816000875af115801561111c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111409190611967565b61115c5760405162461bcd60e51b815260040161034d90611bbe565b856001600160a01b0316826001600160a01b0316886001600160a01b03167fc244cac13e0edc863dc5a2c3bd2b935f605b2ed225fb052eaef869bc24b76fde8888886040516109a793929190611e21565b6000806111bc83850185611e96565b9093509150506001600160a01b0382166111d8576111d86118db565b6001600160a01b038281166000908152600460205260409020541615611200576112006118db565b6003546040516bffffffffffffffffffffffff19606085901b166020820152600091611250916001600160a01b0390911690603401604051602081830303815290604052805190602001206114b5565b6001600160a01b0384811660009081526004602081905260409182902080546001600160a01b031916938516938417905590516379ccf11760e11b8152929350909163f399e22e916112a6918791879101611acd565b600060405180830381600087803b1580156112c057600080fd5b505af11580156112d4573d6000803e3d6000fd5b50506040516001600160a01b038085169350861691507f0a1eaf9aa124c3f84c9dd77f7016af0f16f67639abb913af1697387db01f5ca590600090a35050505050565b6001600160a01b0384161580159061133757506001600160a01b03831615155b801561134b57506001600160a01b03821615155b801561135f57506001600160a01b03811615155b6113c55760405162461bcd60e51b815260206004820152603160248201527f4368696c644d696e7461626c65455243313135355072656469636174653a204260448201527020a22fa4a724aa24a0a624ad20aa24a7a760791b606482015260840161034d565b600080546001600160a01b03958616620100000262010000600160b01b0319909116179055600180549385166001600160a01b0319948516179055600280549285169284169290921790915560038054919093169116179055565b6000816001600160a01b03163b60000361143c57506000919050565b6040516301ffc9a760e01b8152636cdb3d1360e11b60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa9250505080156114a3575060408051601f3d908101601f191682019092526114a091810190611967565b60015b6114af57506000919050565b92915050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b0381166114af5760405162461bcd60e51b8152602060048201526017602482015276115490cc4c4d8dce8818dc99585d194c8819985a5b1959604a1b604482015260640161034d565b6001600160a01b038116811461156157600080fd5b50565b60006020828403121561157657600080fd5b81356115818161154c565b9392505050565b60008083601f84011261159a57600080fd5b5081356001600160401b038111156115b157600080fd5b6020830191508360208260051b85010111156115cc57600080fd5b9250929050565b60008060008060008060006080888a0312156115ee57600080fd5b87356115f98161154c565b965060208801356001600160401b038082111561161557600080fd5b6116218b838c01611588565b909850965060408a013591508082111561163a57600080fd5b6116468b838c01611588565b909650945060608a013591508082111561165f57600080fd5b5061166c8a828b01611588565b989b979a50959850939692959293505050565b60008060006060848603121561169457600080fd5b833561169f8161154c565b95602085013595506040909401359392505050565b600080600080608085870312156116ca57600080fd5b84356116d58161154c565b935060208501356116e58161154c565b93969395505050506040820135916060013590565b6000806000806060858703121561171057600080fd5b8435935060208501356117228161154c565b925060408501356001600160401b038082111561173e57600080fd5b818701915087601f83011261175257600080fd5b81358181111561176157600080fd5b88602082850101111561177357600080fd5b95989497505060200194505050565b6000806000806080858703121561179857600080fd5b84356117a38161154c565b935060208501356117b38161154c565b925060408501356117c38161154c565b915060608501356117d38161154c565b939692955090935050565b600080858511156117ee57600080fd5b838611156117fb57600080fd5b5050820193919092039150565b803560208310156114af57600019602084900360031b1b1692915050565b6020808252602b908201527f4368696c644d696e7461626c65455243313135355072656469636174653a204e60408201526a13d517d0d3d395149050d560aa1b606082015260800190565b60006020828403121561188357600080fd5b81516115818161154c565b6020808252602d908201527f4368696c644d696e7461626c65455243313135355072656469636174653a205560408201526c2726a0a82822a22faa27a5a2a760991b606082015260800190565b634e487b7160e01b600052600160045260246000fd5b81835260006001600160fb1b0383111561190a57600080fd5b8260051b80836020870137939093016020019392505050565b6001600160a01b038616815260606020820181905260009061194890830186886118f1565b828103604084015261195b8185876118f1565b98975050505050505050565b60006020828403121561197957600080fd5b8151801515811461158157600080fd5b6020808252602a908201527f4368696c644d696e7461626c65455243313135355072656469636174653a204260408201526915549397d1905253115160b21b606082015260800190565b8183526000602080850194508260005b85811015611a115781356119f68161154c565b6001600160a01b0316875295820195908201906001016119e3565b509495945050505050565b8981526001600160a01b0389811660208301528816604082015260c060608201819052600090611a4f908301888a6119d3565b8281036080840152611a628187896118f1565b905082810360a0840152611a778185876118f1565b9c9b505050505050505050505050565b6000815180845260005b81811015611aad57602081850181015186830182015201611a91565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b0383168152604060208201819052600090611af190830184611a87565b949350505050565b606081526000611b0d60608301888a6119d3565b8281036020840152611b208187896118f1565b90508281036040840152611b358185876118f1565b9998505050505050505050565b6001600160a01b039390931683526020830191909152604082015260600190565b600080600080600060a08688031215611b7b57600080fd5b8535611b868161154c565b94506020860135611b968161154c565b93506040860135611ba68161154c565b94979396509394606081013594506080013592915050565b6020808252602a908201527f4368696c644d696e7461626c65455243313135355072656469636174653a204d60408201526912539517d1905253115160b21b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611c4657611c46611c08565b604052919050565b60006001600160401b03821115611c6757611c67611c08565b5060051b60200190565b600082601f830112611c8257600080fd5b81356020611c97611c9283611c4e565b611c1e565b82815260059290921b84018101918181019086841115611cb657600080fd5b8286015b84811015611cd15780358352918301918301611cba565b509695505050505050565b60008060008060008060c08789031215611cf557600080fd5b86359550602080880135611d088161154c565b95506040880135611d188161154c565b945060608801356001600160401b0380821115611d3457600080fd5b818a0191508a601f830112611d4857600080fd5b8135611d56611c9282611c4e565b81815260059190911b8301840190848101908d831115611d7557600080fd5b938501935b82851015611d9c578435611d8d8161154c565b82529385019390850190611d7a565b9750505060808a0135925080831115611db457600080fd5b611dc08b848c01611c71565b945060a08a0135925080831115611dd657600080fd5b5050611de489828a01611c71565b9150509295509295509295565b600081518084526020808501945080840160005b83811015611a1157815187529582019590820190600101611e05565b606080825284519082018190526000906020906080840190828801845b82811015611e635781516001600160a01b031684529284019290840190600101611e3e565b50505083810382850152611e778187611df1565b9150508281036040840152611e8c8185611df1565b9695505050505050565b600080600060608486031215611eab57600080fd5b83359250602080850135611ebe8161154c565b925060408501356001600160401b0380821115611eda57600080fd5b818701915087601f830112611eee57600080fd5b813581811115611f0057611f00611c08565b611f12601f8201601f19168501611c1e565b91508082528884828501011115611f2857600080fd5b8084840185840137600084828401015250809350505050925092509256fea264697066735822122026b932a566e002e8c27e3e0f463c0498a2cad19becb4b82dde2b9525a3ca034464736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` -var StakeManagerArtifact string = `{"_format":"hh-sol-artifact-1","contractName":"StakeManager","sourceName":"contracts/blade/staking/StakeManager.sol","abi":[{"inputs":[{"internalType":"address","name":"validator","type":"address"}],"name":"InvalidSignature","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"}],"name":"AddedToWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"}],"name":"RemovedFromWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Snapshot","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakeRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakeWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"}],"name":"ValidatorDeactivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"},{"indexed":false,"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"}],"name":"ValidatorRegistered","type":"event"},{"inputs":[],"name":"WITHDRAWAL_WAIT_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"epochNumber","type":"uint256"}],"name":"balanceOfAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"domain","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"validator_","type":"address"}],"name":"getValidator","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"bool","name":"isWhitelisted","type":"bool"},{"internalType":"bool","name":"isActive","type":"bool"}],"internalType":"struct Validator","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newStakingToken","type":"address"},{"internalType":"address","name":"newBls","type":"address"},{"internalType":"address","name":"epochManager","type":"address"},{"internalType":"string","name":"newDomain","type":"string"},{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"stake","type":"uint256"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"}],"internalType":"struct GenesisValidator[]","name":"genesisValidators","type":"tuple[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"pendingWithdrawals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"uint256[4]","name":"pubkey","type":"uint256[4]"}],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"validator","type":"address"}],"name":"stakeOf","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStake","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"epochNumber","type":"uint256"}],"name":"totalSupplyAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"validators","outputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"isWhitelisted","type":"bool"},{"internalType":"bool","name":"isActive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"validators_","type":"address[]"}],"name":"whitelistValidators","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"withdrawable","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50612ca5806100206000396000f3fe608060405234801561001057600080fd5b50600436106101b05760003560e01c80638b0e9f3f116100ef578063c2fb26a611610092578063c2fb26a61461037d578063ce513b6f14610386578063dd62ed3e14610399578063e30c3978146103ac578063ea0fee4f146103bd578063f2fde38b146103c5578063f3f43703146103d8578063fa52c7d8146103eb57600080fd5b80638b0e9f3f146102e95780638da5cb5b146102f157806395d89b41146103165780639786da131461031e578063981b24d014610331578063a457c2d714610344578063a694fc3a14610357578063a9059cbb1461036a57600080fd5b8063395093511161015757806339509351146102725780633ccfd60b14610285578063426233601461028d5780634ee2cd7e146102a0578063542c85f2146102b357806370a08231146102c6578063715018a6146102d957806379ba5097146102e157600080fd5b806306fdde03146101b5578063095ea7b3146101d357806318160ddd146101f65780631904bb2e146102085780631f6590b81461022857806323b872dd1461023d5780632e17de7814610250578063313ce56714610263575b600080fd5b6101bd610452565b6040516101ca91906123f6565b60405180910390f35b6101e66101e1366004612420565b6104e4565b60405190151581526020016101ca565b6099545b6040519081526020016101ca565b61021b61021636600461244a565b6104fe565b6040516101ca9190612465565b61023b6102363660046124c2565b610591565b005b6101e661024b366004612504565b610676565b61023b61025e366004612540565b61069a565b604051601281526020016101ca565b6101e6610280366004612420565b6106e1565b61023b610703565b6101fa61029b36600461244a565b6107e8565b6101fa6102ae366004612420565b6107f3565b61023b6102c1366004612559565b610806565b6101fa6102d436600461244a565b610861565b61023b61087c565b61023b610890565b6101fa61090a565b6033546001600160a01b03165b6040516001600160a01b0390911681526020016101ca565b6101bd61091a565b61023b61032c366004612758565b610929565b6101fa61033f366004612540565b610bdd565b6101e6610352366004612420565b610be8565b61023b610365366004612540565b610c63565b6101e6610378366004612420565b610ca6565b6101fa60fe5481565b6101fa61039436600461244a565b610cb4565b6101fa6103a7366004612840565b610d5c565b6065546001600160a01b03166102fe565b6101fa600181565b61023b6103d336600461244a565b610d87565b6101fa6103e636600461244a565b610df8565b61042b6103f936600461244a565b60ff60208190526000918252604090912080546005909101546001600160a01b03909116918181169161010090041683565b604080516001600160a01b03909416845291151560208401521515908201526060016101ca565b6060609a805461046190612873565b80601f016020809104026020016040519081016040528092919081815260200182805461048d90612873565b80156104da5780601f106104af576101008083540402835291602001916104da565b820191906000526020600020905b8154815290600101906020018083116104bd57829003601f168201915b5050505050905090565b6000336104f2818585610e93565b60019150505b92915050565b6105066122b2565b6001600160a01b03828116600090815260ff60209081526040918290208251608080820185528254909516815283519485019384905293909291840191600184019060049082845b81548152602001906001019080831161054e5750505091835250506005919091015460ff8082161515602084015261010090910416151560409091015292915050565b33600090815260ff6020819052604090912060058101549091166105e95760405163973d02cb60e01b815260206004820152600960248201526815d2125511531254d560ba1b60448201526064015b60405180910390fd5b6105f4338484610fb7565b60058101805461ff001916610100179055610614600182018360046122e9565b5080546001600160a01b031916339081178255610630906110af565b336001600160a01b03167f110ae3ae039a4632f836a35dc9b1282df88780883fb28779f22c2f7ccde8dd0a8360405161066991906128ad565b60405180910390a2505050565b6000336106848582856110fb565b61068f85858561116f565b506001949350505050565b33600081815260ff60208190526040909120600501546101009004166106d35760405163973d02cb60e01b81526004016105e0906128bc565b6106dd3383611313565b5050565b6000336104f28185856106f48383610d5c565b6106fe91906128f5565b610e93565b3360009081526101006020908152604080832060fd54825163eacdc5ff60e01b81529251919493849361078f936001600160a01b039093169263eacdc5ff926004808401939192918290030181865afa158015610764573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107889190612908565b8490611373565b808555604051828152919350915033907f8108595eb6bad3acefa9da467d90cc2217686d5c5ac85460f8b7849c840645fc9060200160405180910390a260fc546107e3906001600160a01b031633846113e5565b505050565b60006104f882611448565b60006107ff8383611453565b9392505050565b61080e61149c565b8060005b8181101561085b5761084984848381811061082f5761082f612921565b9050602002016020810190610844919061244a565b6114f6565b8061085381612937565b915050610812565b50505050565b6001600160a01b031660009081526097602052604090205490565b61088461149c565b61088e6000611545565b565b60655433906001600160a01b031681146108fe5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084016105e0565b61090781611545565b50565b600061091560995490565b905090565b6060609b805461046190612873565b600054610100900460ff16158080156109495750600054600160ff909116105b806109635750303b158015610963575060005460ff166001145b6109c65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105e0565b6000805460ff1916600117905580156109e9576000805461ff0019166101001790555b610a346040518060400160405280600c81526020016b29ba30b5b2a6b0b730b3b2b960a11b815250604051806040016040528060058152602001645354414b4560d81b81525061155e565b60fc80546001600160a01b038089166001600160a01b03199283161790925560fb805488841690831617905560fd805492871692909116919091179055604051610a82908490602001612950565b60408051601f19818403018152919052805160209091012060fe5560005b8251811015610b8e576000838281518110610abd57610abd612921565b6020908102919091018101516040805160808101825282516001600160a01b0390811682528284015182860190815260018385018190526060840181905285518316600090815260ff90975293909520825181546001600160a01b031916921691909117815593519294509291610b38918301906004612327565b5060408201516005909101805460609093015115156101000261ff00199215159290921661ffff199093169290921717905580516020820151610b7b919061158f565b5080610b8681612937565b915050610aa0565b508015610bd5576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b60006104f8826115f8565b60003381610bf68286610d5c565b905083811015610c565760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105e0565b61068f8286868403610e93565b33600081815260ff6020819052604090912060050154610100900416610c9c5760405163973d02cb60e01b81526004016105e0906128bc565b6106dd338361158f565b6000336104f281858561116f565b60008060fd60009054906101000a90046001600160a01b03166001600160a01b031663eacdc5ff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2e9190612908565b6001600160a01b038416600090815261010060205260409020909150610d549082611373565b509392505050565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205490565b610d8f61149c565b606580546001600160a01b0383166001600160a01b03199091168117909155610dc06033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60006104f860fd60009054906101000a90046001600160a01b03166001600160a01b031663eacdc5ff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e749190612908565b6001600160a01b03841660009081526101006020526040902090611623565b6001600160a01b038316610ef55760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e0565b6001600160a01b038216610f565760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e0565b6001600160a01b0383811660008181526098602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b8135158015610fc857506020820135155b15610ff157604051633615713d60e21b81526001600160a01b03841660048201526024016105e0565b60fb5460009081906001600160a01b031663ebbdac918585611012896116c1565b6040518463ffffffff1660e01b81526004016110309392919061296c565b6040805180830381865afa15801561104c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107091906129c0565b9150915080158061107f575081155b156110a857604051633615713d60e21b81526001600160a01b03861660048201526024016105e0565b5050505050565b6001600160a01b038116600081815260ff6020526040808220600501805460ff19169055517fcdd2e9b91a56913d370075169cefa1602ba36be5301664f752192bb1709df7579190a250565b60006111078484610d5c565b9050600019811461085b57818110156111625760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105e0565b61085b8484848403610e93565b6001600160a01b0383166111d35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e0565b6001600160a01b0382166112355760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e0565b61124083838361177d565b6001600160a01b038316600090815260976020526040902054818110156112b85760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105e0565b6001600160a01b038085166000818152609760205260408082208686039055928616808252908390208054860190559151600080516020612c50833981519152906113069086815260200190565b60405180910390a361085b565b61131d33826117e6565b816001600160a01b03167fa018dcbc822f59fb0d0c3e7a86c8e4259b9676cdea9e5fc26279b9c4c5d86eef8260405161135891815260200190565b60405180910390a261136a3382611914565b6106dd826119bb565b81546000905b83600101548110156113de576000818152600285016020908152604091829020825180840190935280548352600101549082018190528410156113bc57506113de565b80516113c890846128f5565b92505080806113d690612937565b915050611379565b9250929050565b6040516001600160a01b0383166024820152604481018290526107e390849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611a18565b60006104f882610861565b6001600160a01b038216600090815260c9602052604081208190819061147a908590611aed565b91509150816114915761148c85610861565b611493565b805b95945050505050565b6033546001600160a01b0316331461088e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e0565b6001600160a01b038116600081815260ff6020526040808220600501805460ff19166001179055517fa850ae9193f515cbae8d35e8925bd2be26627fc91bce650b8652ed254e9cab039190a250565b606580546001600160a01b031916905561090781611be0565b600054610100900460ff166115855760405162461bcd60e51b81526004016105e0906129ea565b6106dd8282611c32565b6115998282611c72565b60fc546115b1906001600160a01b0316833084611d2d565b816001600160a01b03167f7c717985ac273e663b7f3050f5b15a4388ff6ed952338954f650e2093e13937f826040516115ec91815260200190565b60405180910390a25050565b60008060006116088460ca611aed565b91509150816116195760995461161b565b805b949350505050565b600182015460009080820361163c5760009150506104f8565b6000611649600183612a35565b90505b845481106116b957600081815260028601602090815260409182902082518084019093528054835260010154908201819052851061168a57506116b9565b805161169690856128f5565b9350816000036116a657506116b9565b50806116b181612a48565b91505061164c565b505092915050565b6116c9612355565b60fb5460fe546040516bffffffffffffffffffffffff19606086811b8216602084015230901b1660348201524660488201526001600160a01b039092169163a850a90991906068016040516020818303038152906040526040518363ffffffff1660e01b815260040161173d929190612a5f565b6040805180830381865afa158015611759573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f89190612a78565b6001600160a01b038316158061179a57506001600160a01b038216155b6117db5760405162461bcd60e51b81526020600482015260126024820152712a2920a729a322a92fa327a92124a22222a760711b60448201526064016105e0565b6107e3838383611d65565b6001600160a01b0382166118465760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105e0565b6118528260008361177d565b6001600160a01b038216600090815260976020526040902054818110156118c65760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105e0565b6001600160a01b0383166000818152609760209081526040808320868603905560998054879003905551858152919291600080516020612c50833981519152910160405180910390a3505050565b6106dd81600160fd60009054906101000a90046001600160a01b03166001600160a01b031663eacdc5ff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561196d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119919190612908565b61199b91906128f5565b6001600160a01b0385166000908152610100602052604090209190611dad565b6119c481611448565b600003610907576001600160a01b038116600081815260ff6020526040808220600501805461ff0019169055517f23d934bfe7f1275bc6fd70432159c9cc1c0075d069f89da6a40f43bfe7a94ed39190a250565b6000611a6d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611f239092919063ffffffff16565b9050805160001480611a8e575080806020019051810190611a8e9190612af7565b6107e35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105e0565b60008060008411611b395760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b60448201526064016105e0565b611b41611f32565b841115611b905760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e7420696400000060448201526064016105e0565b6000611b9c8486611fa0565b84549091508103611bb45760008092509250506113de565b6001846001018281548110611bcb57611bcb612921565b906000526020600020015492509250506113de565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16611c595760405162461bcd60e51b81526004016105e0906129ea565b609a611c658382612b58565b50609b6107e38282612b58565b6001600160a01b038216611cc85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105e0565b611cd46000838361177d565b8060996000828254611ce691906128f5565b90915550506001600160a01b038216600081815260976020908152604080832080548601905551848152600080516020612c50833981519152910160405180910390a35050565b6040516001600160a01b038085166024830152831660448201526064810182905261085b9085906323b872dd60e01b90608401611411565b6001600160a01b038316611d8457611d7c8261204d565b6107e3612077565b6001600160a01b038216611d9b57611d7c8361204d565b611da48361204d565b6107e38261204d565b81600003611e085760405162461bcd60e51b815260206004820152602260248201527f5769746864726177616c51756575654c69623a20494e56414c49445f414d4f55604482015261139560f21b60648201526084016105e0565b82546001840154818103611e5f576040805180820182528581526020808201868152600085815260028a019092529281209151825591516001918201558601805491611e5383612937565b91905055505050505050565b60006002860181611e71600185612a35565b815260200190815260200160002060010154905080841015611e9557611e95612c17565b83811015611ee4576040805180820182528681526020808201878152600086815260028b019092529281209151825591516001918201558701805491611eda83612937565b9190505550610bd5565b84600287016000611ef6600186612a35565b81526020019081526020016000206000016000828254611f1691906128f5565b9091555050505050505050565b606061161b8484600085612085565b60fd546040805163eacdc5ff60e01b815290516000926001600160a01b03169163eacdc5ff9160048083019260209291908290030181865afa158015611f7c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109159190612908565b81546000908103611fb3575060006104f8565b82546000905b80821015612000576000611fcd8383612160565b60008781526020902090915085908201541115611fec57809150611ffa565b611ff78160016128f5565b92505b50611fb9565b60008211801561202c5750836120298661201b600186612a35565b600091825260209091200190565b54145b156120455761203c600183612a35565b925050506104f8565b5090506104f8565b6001600160a01b038116600090815260c9602052604090206109079061207283610861565b61217b565b61088e60ca61207260995490565b6060824710156120e65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105e0565b600080866001600160a01b031685876040516121029190612950565b60006040518083038185875af1925050503d806000811461213f576040519150601f19603f3d011682016040523d82523d6000602084013e612144565b606091505b5091509150612155878383876121c5565b979650505050505050565b600061216f6002848418612c2d565b6107ff908484166128f5565b6000612185611f32565b9050806121918461223e565b10156107e3578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b6060831561223457825160000361222d576001600160a01b0385163b61222d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105e0565b508161161b565b61161b8383612288565b8054600090810361225157506000919050565b8154829061226190600190612a35565b8154811061227157612271612921565b90600052602060002001549050919050565b919050565b8151156122985781518083602001fd5b8060405162461bcd60e51b81526004016105e091906123f6565b604051806080016040528060006001600160a01b031681526020016122d5612373565b815260006020820181905260409091015290565b8260048101928215612317579160200282015b828111156123175782358255916020019190600101906122fc565b50612323929150612391565b5090565b8260048101928215612317579160200282015b8281111561231757825182559160200191906001019061233a565b60405180604001604052806002906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b5b808211156123235760008155600101612392565b60005b838110156123c15781810151838201526020016123a9565b50506000910152565b600081518084526123e28160208601602086016123a6565b601f01601f19169290920160200192915050565b6020815260006107ff60208301846123ca565b80356001600160a01b038116811461228357600080fd5b6000806040838503121561243357600080fd5b61243c83612409565b946020939093013593505050565b60006020828403121561245c57600080fd5b6107ff82612409565b81516001600160a01b0316815260208083015160e08301919081840160005b60048110156124a157825182529183019190830190600101612484565b505050506040830151151560a0830152606090920151151560c09091015290565b60008060c083850312156124d557600080fd5b60408301848111156124e657600080fd5b8392508460c0850111156124f957600080fd5b809150509250929050565b60008060006060848603121561251957600080fd5b61252284612409565b925061253060208501612409565b9150604084013590509250925092565b60006020828403121561255257600080fd5b5035919050565b6000806020838503121561256c57600080fd5b82356001600160401b038082111561258357600080fd5b818501915085601f83011261259757600080fd5b8135818111156125a657600080fd5b8660208260051b85010111156125bb57600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715612605576126056125cd565b60405290565b604051608081016001600160401b0381118282101715612605576126056125cd565b604051601f8201601f191681016001600160401b0381118282101715612655576126556125cd565b604052919050565b600082601f83011261266e57600080fd5b813560206001600160401b03821115612689576126896125cd565b612697818360051b0161262d565b82815260c092830285018201928282019190878511156126b657600080fd5b8387015b8581101561274b5781818a0312156126d25760008081fd5b6126da6125e3565b6126e382612409565b8152858201358682015260408a605f8401126126ff5760008081fd5b61270761260b565b808585018d8111156127195760008081fd5b8386015b818110156127345780358452928a01928a0161271d565b5050918301919091525084529284019281016126ba565b5090979650505050505050565b600080600080600060a0868803121561277057600080fd5b61277986612409565b94506020612788818801612409565b945061279660408801612409565b935060608701356001600160401b03808211156127b257600080fd5b818901915089601f8301126127c657600080fd5b8135818111156127d8576127d86125cd565b6127ea601f8201601f1916850161262d565b8181528b858386010111156127fe57600080fd5b81858501868301376000918101909401529193506080880135918083111561282557600080fd5b50506128338882890161265d565b9150509295509295909350565b6000806040838503121561285357600080fd5b61285c83612409565b915061286a60208401612409565b90509250929050565b600181811c9082168061288757607f821691505b6020821081036128a757634e487b7160e01b600052602260045260246000fd5b50919050565b60808181019083833792915050565b6020808252600990820152682b20a624a220aa27a960b91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b808201808211156104f8576104f86128df565b60006020828403121561291a57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600060018201612949576129496128df565b5060010190565b600082516129628184602087016123a6565b9190910192915050565b61010081016040858337608084604084013760c082018360005b60028110156129a5578151835260209283019290910190600101612986565b505050949350505050565b8051801515811461228357600080fd5b600080604083850312156129d357600080fd5b6129dc836129b0565b915061286a602084016129b0565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b818103818111156104f8576104f86128df565b600081612a5757612a576128df565b506000190190565b82815260406020820152600061161b60408301846123ca565b600060408284031215612a8a57600080fd5b82601f830112612a9957600080fd5b604051604081018181106001600160401b0382111715612abb57612abb6125cd565b8060405250806040840185811115612ad257600080fd5b845b81811015612aec578051835260209283019201612ad4565b509195945050505050565b600060208284031215612b0957600080fd5b6107ff826129b0565b601f8211156107e357600081815260208120601f850160051c81016020861015612b395750805b601f850160051c820191505b81811015610bd557828155600101612b45565b81516001600160401b03811115612b7157612b716125cd565b612b8581612b7f8454612873565b84612b12565b602080601f831160018114612bba5760008415612ba25750858301515b600019600386901b1c1916600185901b178555610bd5565b600085815260208120601f198616915b82811015612be957888601518255948401946001909101908401612bca565b5085821015612c075787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052600160045260246000fd5b600082612c4a57634e487b7160e01b600052601260045260246000fd5b50049056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212207a58271bfe34f92bc797470e6939c786f1b7741a37a4fe89e7630c1569ebdb1d64736f6c63430008130033","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106101b05760003560e01c80638b0e9f3f116100ef578063c2fb26a611610092578063c2fb26a61461037d578063ce513b6f14610386578063dd62ed3e14610399578063e30c3978146103ac578063ea0fee4f146103bd578063f2fde38b146103c5578063f3f43703146103d8578063fa52c7d8146103eb57600080fd5b80638b0e9f3f146102e95780638da5cb5b146102f157806395d89b41146103165780639786da131461031e578063981b24d014610331578063a457c2d714610344578063a694fc3a14610357578063a9059cbb1461036a57600080fd5b8063395093511161015757806339509351146102725780633ccfd60b14610285578063426233601461028d5780634ee2cd7e146102a0578063542c85f2146102b357806370a08231146102c6578063715018a6146102d957806379ba5097146102e157600080fd5b806306fdde03146101b5578063095ea7b3146101d357806318160ddd146101f65780631904bb2e146102085780631f6590b81461022857806323b872dd1461023d5780632e17de7814610250578063313ce56714610263575b600080fd5b6101bd610452565b6040516101ca91906123f6565b60405180910390f35b6101e66101e1366004612420565b6104e4565b60405190151581526020016101ca565b6099545b6040519081526020016101ca565b61021b61021636600461244a565b6104fe565b6040516101ca9190612465565b61023b6102363660046124c2565b610591565b005b6101e661024b366004612504565b610676565b61023b61025e366004612540565b61069a565b604051601281526020016101ca565b6101e6610280366004612420565b6106e1565b61023b610703565b6101fa61029b36600461244a565b6107e8565b6101fa6102ae366004612420565b6107f3565b61023b6102c1366004612559565b610806565b6101fa6102d436600461244a565b610861565b61023b61087c565b61023b610890565b6101fa61090a565b6033546001600160a01b03165b6040516001600160a01b0390911681526020016101ca565b6101bd61091a565b61023b61032c366004612758565b610929565b6101fa61033f366004612540565b610bdd565b6101e6610352366004612420565b610be8565b61023b610365366004612540565b610c63565b6101e6610378366004612420565b610ca6565b6101fa60fe5481565b6101fa61039436600461244a565b610cb4565b6101fa6103a7366004612840565b610d5c565b6065546001600160a01b03166102fe565b6101fa600181565b61023b6103d336600461244a565b610d87565b6101fa6103e636600461244a565b610df8565b61042b6103f936600461244a565b60ff60208190526000918252604090912080546005909101546001600160a01b03909116918181169161010090041683565b604080516001600160a01b03909416845291151560208401521515908201526060016101ca565b6060609a805461046190612873565b80601f016020809104026020016040519081016040528092919081815260200182805461048d90612873565b80156104da5780601f106104af576101008083540402835291602001916104da565b820191906000526020600020905b8154815290600101906020018083116104bd57829003601f168201915b5050505050905090565b6000336104f2818585610e93565b60019150505b92915050565b6105066122b2565b6001600160a01b03828116600090815260ff60209081526040918290208251608080820185528254909516815283519485019384905293909291840191600184019060049082845b81548152602001906001019080831161054e5750505091835250506005919091015460ff8082161515602084015261010090910416151560409091015292915050565b33600090815260ff6020819052604090912060058101549091166105e95760405163973d02cb60e01b815260206004820152600960248201526815d2125511531254d560ba1b60448201526064015b60405180910390fd5b6105f4338484610fb7565b60058101805461ff001916610100179055610614600182018360046122e9565b5080546001600160a01b031916339081178255610630906110af565b336001600160a01b03167f110ae3ae039a4632f836a35dc9b1282df88780883fb28779f22c2f7ccde8dd0a8360405161066991906128ad565b60405180910390a2505050565b6000336106848582856110fb565b61068f85858561116f565b506001949350505050565b33600081815260ff60208190526040909120600501546101009004166106d35760405163973d02cb60e01b81526004016105e0906128bc565b6106dd3383611313565b5050565b6000336104f28185856106f48383610d5c565b6106fe91906128f5565b610e93565b3360009081526101006020908152604080832060fd54825163eacdc5ff60e01b81529251919493849361078f936001600160a01b039093169263eacdc5ff926004808401939192918290030181865afa158015610764573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107889190612908565b8490611373565b808555604051828152919350915033907f8108595eb6bad3acefa9da467d90cc2217686d5c5ac85460f8b7849c840645fc9060200160405180910390a260fc546107e3906001600160a01b031633846113e5565b505050565b60006104f882611448565b60006107ff8383611453565b9392505050565b61080e61149c565b8060005b8181101561085b5761084984848381811061082f5761082f612921565b9050602002016020810190610844919061244a565b6114f6565b8061085381612937565b915050610812565b50505050565b6001600160a01b031660009081526097602052604090205490565b61088461149c565b61088e6000611545565b565b60655433906001600160a01b031681146108fe5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084016105e0565b61090781611545565b50565b600061091560995490565b905090565b6060609b805461046190612873565b600054610100900460ff16158080156109495750600054600160ff909116105b806109635750303b158015610963575060005460ff166001145b6109c65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105e0565b6000805460ff1916600117905580156109e9576000805461ff0019166101001790555b610a346040518060400160405280600c81526020016b29ba30b5b2a6b0b730b3b2b960a11b815250604051806040016040528060058152602001645354414b4560d81b81525061155e565b60fc80546001600160a01b038089166001600160a01b03199283161790925560fb805488841690831617905560fd805492871692909116919091179055604051610a82908490602001612950565b60408051601f19818403018152919052805160209091012060fe5560005b8251811015610b8e576000838281518110610abd57610abd612921565b6020908102919091018101516040805160808101825282516001600160a01b0390811682528284015182860190815260018385018190526060840181905285518316600090815260ff90975293909520825181546001600160a01b031916921691909117815593519294509291610b38918301906004612327565b5060408201516005909101805460609093015115156101000261ff00199215159290921661ffff199093169290921717905580516020820151610b7b919061158f565b5080610b8681612937565b915050610aa0565b508015610bd5576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b60006104f8826115f8565b60003381610bf68286610d5c565b905083811015610c565760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105e0565b61068f8286868403610e93565b33600081815260ff6020819052604090912060050154610100900416610c9c5760405163973d02cb60e01b81526004016105e0906128bc565b6106dd338361158f565b6000336104f281858561116f565b60008060fd60009054906101000a90046001600160a01b03166001600160a01b031663eacdc5ff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2e9190612908565b6001600160a01b038416600090815261010060205260409020909150610d549082611373565b509392505050565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205490565b610d8f61149c565b606580546001600160a01b0383166001600160a01b03199091168117909155610dc06033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60006104f860fd60009054906101000a90046001600160a01b03166001600160a01b031663eacdc5ff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e749190612908565b6001600160a01b03841660009081526101006020526040902090611623565b6001600160a01b038316610ef55760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e0565b6001600160a01b038216610f565760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e0565b6001600160a01b0383811660008181526098602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b8135158015610fc857506020820135155b15610ff157604051633615713d60e21b81526001600160a01b03841660048201526024016105e0565b60fb5460009081906001600160a01b031663ebbdac918585611012896116c1565b6040518463ffffffff1660e01b81526004016110309392919061296c565b6040805180830381865afa15801561104c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107091906129c0565b9150915080158061107f575081155b156110a857604051633615713d60e21b81526001600160a01b03861660048201526024016105e0565b5050505050565b6001600160a01b038116600081815260ff6020526040808220600501805460ff19169055517fcdd2e9b91a56913d370075169cefa1602ba36be5301664f752192bb1709df7579190a250565b60006111078484610d5c565b9050600019811461085b57818110156111625760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105e0565b61085b8484848403610e93565b6001600160a01b0383166111d35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e0565b6001600160a01b0382166112355760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e0565b61124083838361177d565b6001600160a01b038316600090815260976020526040902054818110156112b85760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105e0565b6001600160a01b038085166000818152609760205260408082208686039055928616808252908390208054860190559151600080516020612c50833981519152906113069086815260200190565b60405180910390a361085b565b61131d33826117e6565b816001600160a01b03167fa018dcbc822f59fb0d0c3e7a86c8e4259b9676cdea9e5fc26279b9c4c5d86eef8260405161135891815260200190565b60405180910390a261136a3382611914565b6106dd826119bb565b81546000905b83600101548110156113de576000818152600285016020908152604091829020825180840190935280548352600101549082018190528410156113bc57506113de565b80516113c890846128f5565b92505080806113d690612937565b915050611379565b9250929050565b6040516001600160a01b0383166024820152604481018290526107e390849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611a18565b60006104f882610861565b6001600160a01b038216600090815260c9602052604081208190819061147a908590611aed565b91509150816114915761148c85610861565b611493565b805b95945050505050565b6033546001600160a01b0316331461088e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e0565b6001600160a01b038116600081815260ff6020526040808220600501805460ff19166001179055517fa850ae9193f515cbae8d35e8925bd2be26627fc91bce650b8652ed254e9cab039190a250565b606580546001600160a01b031916905561090781611be0565b600054610100900460ff166115855760405162461bcd60e51b81526004016105e0906129ea565b6106dd8282611c32565b6115998282611c72565b60fc546115b1906001600160a01b0316833084611d2d565b816001600160a01b03167f7c717985ac273e663b7f3050f5b15a4388ff6ed952338954f650e2093e13937f826040516115ec91815260200190565b60405180910390a25050565b60008060006116088460ca611aed565b91509150816116195760995461161b565b805b949350505050565b600182015460009080820361163c5760009150506104f8565b6000611649600183612a35565b90505b845481106116b957600081815260028601602090815260409182902082518084019093528054835260010154908201819052851061168a57506116b9565b805161169690856128f5565b9350816000036116a657506116b9565b50806116b181612a48565b91505061164c565b505092915050565b6116c9612355565b60fb5460fe546040516bffffffffffffffffffffffff19606086811b8216602084015230901b1660348201524660488201526001600160a01b039092169163a850a90991906068016040516020818303038152906040526040518363ffffffff1660e01b815260040161173d929190612a5f565b6040805180830381865afa158015611759573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f89190612a78565b6001600160a01b038316158061179a57506001600160a01b038216155b6117db5760405162461bcd60e51b81526020600482015260126024820152712a2920a729a322a92fa327a92124a22222a760711b60448201526064016105e0565b6107e3838383611d65565b6001600160a01b0382166118465760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105e0565b6118528260008361177d565b6001600160a01b038216600090815260976020526040902054818110156118c65760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105e0565b6001600160a01b0383166000818152609760209081526040808320868603905560998054879003905551858152919291600080516020612c50833981519152910160405180910390a3505050565b6106dd81600160fd60009054906101000a90046001600160a01b03166001600160a01b031663eacdc5ff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561196d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119919190612908565b61199b91906128f5565b6001600160a01b0385166000908152610100602052604090209190611dad565b6119c481611448565b600003610907576001600160a01b038116600081815260ff6020526040808220600501805461ff0019169055517f23d934bfe7f1275bc6fd70432159c9cc1c0075d069f89da6a40f43bfe7a94ed39190a250565b6000611a6d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611f239092919063ffffffff16565b9050805160001480611a8e575080806020019051810190611a8e9190612af7565b6107e35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105e0565b60008060008411611b395760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b60448201526064016105e0565b611b41611f32565b841115611b905760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e7420696400000060448201526064016105e0565b6000611b9c8486611fa0565b84549091508103611bb45760008092509250506113de565b6001846001018281548110611bcb57611bcb612921565b906000526020600020015492509250506113de565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16611c595760405162461bcd60e51b81526004016105e0906129ea565b609a611c658382612b58565b50609b6107e38282612b58565b6001600160a01b038216611cc85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105e0565b611cd46000838361177d565b8060996000828254611ce691906128f5565b90915550506001600160a01b038216600081815260976020908152604080832080548601905551848152600080516020612c50833981519152910160405180910390a35050565b6040516001600160a01b038085166024830152831660448201526064810182905261085b9085906323b872dd60e01b90608401611411565b6001600160a01b038316611d8457611d7c8261204d565b6107e3612077565b6001600160a01b038216611d9b57611d7c8361204d565b611da48361204d565b6107e38261204d565b81600003611e085760405162461bcd60e51b815260206004820152602260248201527f5769746864726177616c51756575654c69623a20494e56414c49445f414d4f55604482015261139560f21b60648201526084016105e0565b82546001840154818103611e5f576040805180820182528581526020808201868152600085815260028a019092529281209151825591516001918201558601805491611e5383612937565b91905055505050505050565b60006002860181611e71600185612a35565b815260200190815260200160002060010154905080841015611e9557611e95612c17565b83811015611ee4576040805180820182528681526020808201878152600086815260028b019092529281209151825591516001918201558701805491611eda83612937565b9190505550610bd5565b84600287016000611ef6600186612a35565b81526020019081526020016000206000016000828254611f1691906128f5565b9091555050505050505050565b606061161b8484600085612085565b60fd546040805163eacdc5ff60e01b815290516000926001600160a01b03169163eacdc5ff9160048083019260209291908290030181865afa158015611f7c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109159190612908565b81546000908103611fb3575060006104f8565b82546000905b80821015612000576000611fcd8383612160565b60008781526020902090915085908201541115611fec57809150611ffa565b611ff78160016128f5565b92505b50611fb9565b60008211801561202c5750836120298661201b600186612a35565b600091825260209091200190565b54145b156120455761203c600183612a35565b925050506104f8565b5090506104f8565b6001600160a01b038116600090815260c9602052604090206109079061207283610861565b61217b565b61088e60ca61207260995490565b6060824710156120e65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105e0565b600080866001600160a01b031685876040516121029190612950565b60006040518083038185875af1925050503d806000811461213f576040519150601f19603f3d011682016040523d82523d6000602084013e612144565b606091505b5091509150612155878383876121c5565b979650505050505050565b600061216f6002848418612c2d565b6107ff908484166128f5565b6000612185611f32565b9050806121918461223e565b10156107e3578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b6060831561223457825160000361222d576001600160a01b0385163b61222d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105e0565b508161161b565b61161b8383612288565b8054600090810361225157506000919050565b8154829061226190600190612a35565b8154811061227157612271612921565b90600052602060002001549050919050565b919050565b8151156122985781518083602001fd5b8060405162461bcd60e51b81526004016105e091906123f6565b604051806080016040528060006001600160a01b031681526020016122d5612373565b815260006020820181905260409091015290565b8260048101928215612317579160200282015b828111156123175782358255916020019190600101906122fc565b50612323929150612391565b5090565b8260048101928215612317579160200282015b8281111561231757825182559160200191906001019061233a565b60405180604001604052806002906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b5b808211156123235760008155600101612392565b60005b838110156123c15781810151838201526020016123a9565b50506000910152565b600081518084526123e28160208601602086016123a6565b601f01601f19169290920160200192915050565b6020815260006107ff60208301846123ca565b80356001600160a01b038116811461228357600080fd5b6000806040838503121561243357600080fd5b61243c83612409565b946020939093013593505050565b60006020828403121561245c57600080fd5b6107ff82612409565b81516001600160a01b0316815260208083015160e08301919081840160005b60048110156124a157825182529183019190830190600101612484565b505050506040830151151560a0830152606090920151151560c09091015290565b60008060c083850312156124d557600080fd5b60408301848111156124e657600080fd5b8392508460c0850111156124f957600080fd5b809150509250929050565b60008060006060848603121561251957600080fd5b61252284612409565b925061253060208501612409565b9150604084013590509250925092565b60006020828403121561255257600080fd5b5035919050565b6000806020838503121561256c57600080fd5b82356001600160401b038082111561258357600080fd5b818501915085601f83011261259757600080fd5b8135818111156125a657600080fd5b8660208260051b85010111156125bb57600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715612605576126056125cd565b60405290565b604051608081016001600160401b0381118282101715612605576126056125cd565b604051601f8201601f191681016001600160401b0381118282101715612655576126556125cd565b604052919050565b600082601f83011261266e57600080fd5b813560206001600160401b03821115612689576126896125cd565b612697818360051b0161262d565b82815260c092830285018201928282019190878511156126b657600080fd5b8387015b8581101561274b5781818a0312156126d25760008081fd5b6126da6125e3565b6126e382612409565b8152858201358682015260408a605f8401126126ff5760008081fd5b61270761260b565b808585018d8111156127195760008081fd5b8386015b818110156127345780358452928a01928a0161271d565b5050918301919091525084529284019281016126ba565b5090979650505050505050565b600080600080600060a0868803121561277057600080fd5b61277986612409565b94506020612788818801612409565b945061279660408801612409565b935060608701356001600160401b03808211156127b257600080fd5b818901915089601f8301126127c657600080fd5b8135818111156127d8576127d86125cd565b6127ea601f8201601f1916850161262d565b8181528b858386010111156127fe57600080fd5b81858501868301376000918101909401529193506080880135918083111561282557600080fd5b50506128338882890161265d565b9150509295509295909350565b6000806040838503121561285357600080fd5b61285c83612409565b915061286a60208401612409565b90509250929050565b600181811c9082168061288757607f821691505b6020821081036128a757634e487b7160e01b600052602260045260246000fd5b50919050565b60808181019083833792915050565b6020808252600990820152682b20a624a220aa27a960b91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b808201808211156104f8576104f86128df565b60006020828403121561291a57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600060018201612949576129496128df565b5060010190565b600082516129628184602087016123a6565b9190910192915050565b61010081016040858337608084604084013760c082018360005b60028110156129a5578151835260209283019290910190600101612986565b505050949350505050565b8051801515811461228357600080fd5b600080604083850312156129d357600080fd5b6129dc836129b0565b915061286a602084016129b0565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b818103818111156104f8576104f86128df565b600081612a5757612a576128df565b506000190190565b82815260406020820152600061161b60408301846123ca565b600060408284031215612a8a57600080fd5b82601f830112612a9957600080fd5b604051604081018181106001600160401b0382111715612abb57612abb6125cd565b8060405250806040840185811115612ad257600080fd5b845b81811015612aec578051835260209283019201612ad4565b509195945050505050565b600060208284031215612b0957600080fd5b6107ff826129b0565b601f8211156107e357600081815260208120601f850160051c81016020861015612b395750805b601f850160051c820191505b81811015610bd557828155600101612b45565b81516001600160401b03811115612b7157612b716125cd565b612b8581612b7f8454612873565b84612b12565b602080601f831160018114612bba5760008415612ba25750858301515b600019600386901b1c1916600185901b178555610bd5565b600085815260208120601f198616915b82811015612be957888601518255948401946001909101908401612bca565b5085821015612c075787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052600160045260246000fd5b600082612c4a57634e487b7160e01b600052601260045260246000fd5b50049056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212207a58271bfe34f92bc797470e6939c786f1b7741a37a4fe89e7630c1569ebdb1d64736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` +var StakeManagerArtifact string = `{"_format":"hh-sol-artifact-1","contractName":"StakeManager","sourceName":"contracts/blade/staking/StakeManager.sol","abi":[{"inputs":[{"internalType":"address","name":"validator","type":"address"}],"name":"InvalidSignature","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"}],"name":"AddedToWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"}],"name":"RemovedFromWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Snapshot","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakeRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakeWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"}],"name":"ValidatorDeactivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"},{"indexed":false,"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"}],"name":"ValidatorRegistered","type":"event"},{"inputs":[],"name":"WITHDRAWAL_WAIT_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"epochNumber","type":"uint256"}],"name":"balanceOfAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"domain","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"validator_","type":"address"}],"name":"getValidator","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"bool","name":"isWhitelisted","type":"bool"},{"internalType":"bool","name":"isActive","type":"bool"}],"internalType":"struct Validator","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newStakingToken","type":"address"},{"internalType":"address","name":"newBls","type":"address"},{"internalType":"address","name":"epochManager","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"string","name":"newDomain","type":"string"},{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"stake","type":"uint256"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"}],"internalType":"struct GenesisValidator[]","name":"genesisValidators","type":"tuple[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"pendingWithdrawals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"uint256[4]","name":"pubkey","type":"uint256[4]"}],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"validator","type":"address"}],"name":"stakeOf","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStake","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"epochNumber","type":"uint256"}],"name":"totalSupplyAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"validators","outputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"isWhitelisted","type":"bool"},{"internalType":"bool","name":"isActive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"validators_","type":"address[]"}],"name":"whitelistValidators","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"withdrawable","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50612cbf806100206000396000f3fe608060405234801561001057600080fd5b50600436106101b05760003560e01c80637b60f539116100ef578063c2fb26a611610092578063c2fb26a61461037d578063ce513b6f14610386578063dd62ed3e14610399578063e30c3978146103ac578063ea0fee4f146103bd578063f2fde38b146103c5578063f3f43703146103d8578063fa52c7d8146103eb57600080fd5b80637b60f539146102e95780638b0e9f3f146102fc5780638da5cb5b1461030457806395d89b4114610329578063981b24d014610331578063a457c2d714610344578063a694fc3a14610357578063a9059cbb1461036a57600080fd5b8063395093511161015757806339509351146102725780633ccfd60b14610285578063426233601461028d5780634ee2cd7e146102a0578063542c85f2146102b357806370a08231146102c6578063715018a6146102d957806379ba5097146102e157600080fd5b806306fdde03146101b5578063095ea7b3146101d357806318160ddd146101f65780631904bb2e146102085780631f6590b81461022857806323b872dd1461023d5780632e17de7814610250578063313ce56714610263575b600080fd5b6101bd610452565b6040516101ca9190612401565b60405180910390f35b6101e66101e136600461242b565b6104e4565b60405190151581526020016101ca565b6099545b6040519081526020016101ca565b61021b610216366004612455565b6104fe565b6040516101ca9190612470565b61023b6102363660046124cd565b610591565b005b6101e661024b36600461250f565b610676565b61023b61025e36600461254b565b61069a565b604051601281526020016101ca565b6101e661028036600461242b565b6106e1565b61023b610703565b6101fa61029b366004612455565b6107e8565b6101fa6102ae36600461242b565b6107f3565b61023b6102c1366004612564565b610806565b6101fa6102d4366004612455565b610861565b61023b61087c565b61023b610890565b61023b6102f7366004612763565b61090a565b6101fa610bc8565b6033546001600160a01b03165b6040516001600160a01b0390911681526020016101ca565b6101bd610bd8565b6101fa61033f36600461254b565b610be7565b6101e661035236600461242b565b610bf2565b61023b61036536600461254b565b610c6d565b6101e661037836600461242b565b610cb0565b6101fa60fe5481565b6101fa610394366004612455565b610cbe565b6101fa6103a736600461285a565b610d66565b6065546001600160a01b0316610311565b6101fa600181565b61023b6103d3366004612455565b610d91565b6101fa6103e6366004612455565b610e02565b61042b6103f9366004612455565b60ff60208190526000918252604090912080546005909101546001600160a01b03909116918181169161010090041683565b604080516001600160a01b03909416845291151560208401521515908201526060016101ca565b6060609a80546104619061288d565b80601f016020809104026020016040519081016040528092919081815260200182805461048d9061288d565b80156104da5780601f106104af576101008083540402835291602001916104da565b820191906000526020600020905b8154815290600101906020018083116104bd57829003601f168201915b5050505050905090565b6000336104f2818585610e9d565b60019150505b92915050565b6105066122bd565b6001600160a01b03828116600090815260ff60209081526040918290208251608080820185528254909516815283519485019384905293909291840191600184019060049082845b81548152602001906001019080831161054e5750505091835250506005919091015460ff8082161515602084015261010090910416151560409091015292915050565b33600090815260ff6020819052604090912060058101549091166105e95760405163973d02cb60e01b815260206004820152600960248201526815d2125511531254d560ba1b60448201526064015b60405180910390fd5b6105f4338484610fc1565b60058101805461ff001916610100179055610614600182018360046122f4565b5080546001600160a01b031916339081178255610630906110b9565b336001600160a01b03167f110ae3ae039a4632f836a35dc9b1282df88780883fb28779f22c2f7ccde8dd0a8360405161066991906128c7565b60405180910390a2505050565b600033610684858285611105565b61068f858585611179565b506001949350505050565b33600081815260ff60208190526040909120600501546101009004166106d35760405163973d02cb60e01b81526004016105e0906128d6565b6106dd338361131d565b5050565b6000336104f28185856106f48383610d66565b6106fe919061290f565b610e9d565b3360009081526101006020908152604080832060fd54825163eacdc5ff60e01b81529251919493849361078f936001600160a01b039093169263eacdc5ff926004808401939192918290030181865afa158015610764573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107889190612922565b849061137d565b808555604051828152919350915033907f8108595eb6bad3acefa9da467d90cc2217686d5c5ac85460f8b7849c840645fc9060200160405180910390a260fc546107e3906001600160a01b031633846113ef565b505050565b60006104f882611452565b60006107ff838361145d565b9392505050565b61080e6114a6565b8060005b8181101561085b5761084984848381811061082f5761082f61293b565b90506020020160208101906108449190612455565b611500565b8061085381612951565b915050610812565b50505050565b6001600160a01b031660009081526097602052604090205490565b6108846114a6565b61088e600061154f565b565b60655433906001600160a01b031681146108fe5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084016105e0565b6109078161154f565b50565b600054610100900460ff161580801561092a5750600054600160ff909116105b806109445750303b158015610944575060005460ff166001145b6109a75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105e0565b6000805460ff1916600117905580156109ca576000805461ff0019166101001790555b610a156040518060400160405280600c81526020016b29ba30b5b2a6b0b730b3b2b960a11b815250604051806040016040528060058152602001645354414b4560d81b815250611568565b60fc80546001600160a01b03808a166001600160a01b03199283161790925560fb805489841690831617905560fd805492881692909116919091179055604051610a6390849060200161296a565b60408051601f19818403018152919052805160209091012060fe5560005b8251811015610b6f576000838281518110610a9e57610a9e61293b565b6020908102919091018101516040805160808101825282516001600160a01b0390811682528284015182860190815260018385018190526060840181905285518316600090815260ff90975293909520825181546001600160a01b031916921691909117815593519294509291610b19918301906004612332565b5060408201516005909101805460609093015115156101000261ff00199215159290921661ffff199093169290921717905580516020820151610b5c9190611599565b5080610b6781612951565b915050610a81565b50610b798461154f565b8015610bbf576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6000610bd360995490565b905090565b6060609b80546104619061288d565b60006104f882611602565b60003381610c008286610d66565b905083811015610c605760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105e0565b61068f8286868403610e9d565b33600081815260ff6020819052604090912060050154610100900416610ca65760405163973d02cb60e01b81526004016105e0906128d6565b6106dd3383611599565b6000336104f2818585611179565b60008060fd60009054906101000a90046001600160a01b03166001600160a01b031663eacdc5ff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d389190612922565b6001600160a01b038416600090815261010060205260409020909150610d5e908261137d565b509392505050565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205490565b610d996114a6565b606580546001600160a01b0383166001600160a01b03199091168117909155610dca6033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60006104f860fd60009054906101000a90046001600160a01b03166001600160a01b031663eacdc5ff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7e9190612922565b6001600160a01b0384166000908152610100602052604090209061162d565b6001600160a01b038316610eff5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e0565b6001600160a01b038216610f605760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e0565b6001600160a01b0383811660008181526098602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b8135158015610fd257506020820135155b15610ffb57604051633615713d60e21b81526001600160a01b03841660048201526024016105e0565b60fb5460009081906001600160a01b031663ebbdac91858561101c896116cb565b6040518463ffffffff1660e01b815260040161103a93929190612986565b6040805180830381865afa158015611056573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107a91906129da565b91509150801580611089575081155b156110b257604051633615713d60e21b81526001600160a01b03861660048201526024016105e0565b5050505050565b6001600160a01b038116600081815260ff6020526040808220600501805460ff19169055517fcdd2e9b91a56913d370075169cefa1602ba36be5301664f752192bb1709df7579190a250565b60006111118484610d66565b9050600019811461085b578181101561116c5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105e0565b61085b8484848403610e9d565b6001600160a01b0383166111dd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e0565b6001600160a01b03821661123f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e0565b61124a838383611787565b6001600160a01b038316600090815260976020526040902054818110156112c25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105e0565b6001600160a01b038085166000818152609760205260408082208686039055928616808252908390208054860190559151600080516020612c6a833981519152906113109086815260200190565b60405180910390a361085b565b61132733826117f0565b816001600160a01b03167fa018dcbc822f59fb0d0c3e7a86c8e4259b9676cdea9e5fc26279b9c4c5d86eef8260405161136291815260200190565b60405180910390a2611374338261191e565b6106dd826119c5565b81546000905b83600101548110156113e8576000818152600285016020908152604091829020825180840190935280548352600101549082018190528410156113c657506113e8565b80516113d2908461290f565b92505080806113e090612951565b915050611383565b9250929050565b6040516001600160a01b0383166024820152604481018290526107e390849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611a22565b60006104f882610861565b6001600160a01b038216600090815260c96020526040812081908190611484908590611af7565b915091508161149b5761149685610861565b61149d565b805b95945050505050565b6033546001600160a01b0316331461088e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e0565b6001600160a01b038116600081815260ff6020526040808220600501805460ff19166001179055517fa850ae9193f515cbae8d35e8925bd2be26627fc91bce650b8652ed254e9cab039190a250565b606580546001600160a01b031916905561090781611bea565b600054610100900460ff1661158f5760405162461bcd60e51b81526004016105e090612a04565b6106dd8282611c3c565b6115a38282611c7c565b60fc546115bb906001600160a01b0316833084611d37565b816001600160a01b03167f7c717985ac273e663b7f3050f5b15a4388ff6ed952338954f650e2093e13937f826040516115f691815260200190565b60405180910390a25050565b60008060006116128460ca611af7565b915091508161162357609954611625565b805b949350505050565b60018201546000908082036116465760009150506104f8565b6000611653600183612a4f565b90505b845481106116c357600081815260028601602090815260409182902082518084019093528054835260010154908201819052851061169457506116c3565b80516116a0908561290f565b9350816000036116b057506116c3565b50806116bb81612a62565b915050611656565b505092915050565b6116d3612360565b60fb5460fe546040516bffffffffffffffffffffffff19606086811b8216602084015230901b1660348201524660488201526001600160a01b039092169163a850a90991906068016040516020818303038152906040526040518363ffffffff1660e01b8152600401611747929190612a79565b6040805180830381865afa158015611763573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f89190612a92565b6001600160a01b03831615806117a457506001600160a01b038216155b6117e55760405162461bcd60e51b81526020600482015260126024820152712a2920a729a322a92fa327a92124a22222a760711b60448201526064016105e0565b6107e3838383611d6f565b6001600160a01b0382166118505760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105e0565b61185c82600083611787565b6001600160a01b038216600090815260976020526040902054818110156118d05760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105e0565b6001600160a01b0383166000818152609760209081526040808320868603905560998054879003905551858152919291600080516020612c6a833981519152910160405180910390a3505050565b6106dd81600160fd60009054906101000a90046001600160a01b03166001600160a01b031663eacdc5ff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611977573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061199b9190612922565b6119a5919061290f565b6001600160a01b0385166000908152610100602052604090209190611db7565b6119ce81611452565b600003610907576001600160a01b038116600081815260ff6020526040808220600501805461ff0019169055517f23d934bfe7f1275bc6fd70432159c9cc1c0075d069f89da6a40f43bfe7a94ed39190a250565b6000611a77826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611f2e9092919063ffffffff16565b9050805160001480611a98575080806020019051810190611a989190612b11565b6107e35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105e0565b60008060008411611b435760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b60448201526064016105e0565b611b4b611f3d565b841115611b9a5760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e7420696400000060448201526064016105e0565b6000611ba68486611fab565b84549091508103611bbe5760008092509250506113e8565b6001846001018281548110611bd557611bd561293b565b906000526020600020015492509250506113e8565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16611c635760405162461bcd60e51b81526004016105e090612a04565b609a611c6f8382612b72565b50609b6107e38282612b72565b6001600160a01b038216611cd25760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105e0565b611cde60008383611787565b8060996000828254611cf0919061290f565b90915550506001600160a01b038216600081815260976020908152604080832080548601905551848152600080516020612c6a833981519152910160405180910390a35050565b6040516001600160a01b038085166024830152831660448201526064810182905261085b9085906323b872dd60e01b9060840161141b565b6001600160a01b038316611d8e57611d8682612058565b6107e3612082565b6001600160a01b038216611da557611d8683612058565b611dae83612058565b6107e382612058565b81600003611e125760405162461bcd60e51b815260206004820152602260248201527f5769746864726177616c51756575654c69623a20494e56414c49445f414d4f55604482015261139560f21b60648201526084016105e0565b82546001840154818103611e69576040805180820182528581526020808201868152600085815260028a019092529281209151825591516001918201558601805491611e5d83612951565b91905055505050505050565b60006002860181611e7b600185612a4f565b815260200190815260200160002060010154905080841015611e9f57611e9f612c31565b83811015611eee576040805180820182528681526020808201878152600086815260028b019092529281209151825591516001918201558701805491611ee483612951565b9190505550611f26565b84600287016000611f00600186612a4f565b81526020019081526020016000206000016000828254611f20919061290f565b90915550505b505050505050565b60606116258484600085612090565b60fd546040805163eacdc5ff60e01b815290516000926001600160a01b03169163eacdc5ff9160048083019260209291908290030181865afa158015611f87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190612922565b81546000908103611fbe575060006104f8565b82546000905b8082101561200b576000611fd8838361216b565b60008781526020902090915085908201541115611ff757809150612005565b61200281600161290f565b92505b50611fc4565b60008211801561203757508361203486612026600186612a4f565b600091825260209091200190565b54145b1561205057612047600183612a4f565b925050506104f8565b5090506104f8565b6001600160a01b038116600090815260c9602052604090206109079061207d83610861565b612186565b61088e60ca61207d60995490565b6060824710156120f15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105e0565b600080866001600160a01b0316858760405161210d919061296a565b60006040518083038185875af1925050503d806000811461214a576040519150601f19603f3d011682016040523d82523d6000602084013e61214f565b606091505b5091509150612160878383876121d0565b979650505050505050565b600061217a6002848418612c47565b6107ff9084841661290f565b6000612190611f3d565b90508061219c84612249565b10156107e3578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b6060831561223f578251600003612238576001600160a01b0385163b6122385760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105e0565b5081611625565b6116258383612293565b8054600090810361225c57506000919050565b8154829061226c90600190612a4f565b8154811061227c5761227c61293b565b90600052602060002001549050919050565b919050565b8151156122a35781518083602001fd5b8060405162461bcd60e51b81526004016105e09190612401565b604051806080016040528060006001600160a01b031681526020016122e061237e565b815260006020820181905260409091015290565b8260048101928215612322579160200282015b82811115612322578235825591602001919060010190612307565b5061232e92915061239c565b5090565b8260048101928215612322579160200282015b82811115612322578251825591602001919060010190612345565b60405180604001604052806002906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b5b8082111561232e576000815560010161239d565b60005b838110156123cc5781810151838201526020016123b4565b50506000910152565b600081518084526123ed8160208601602086016123b1565b601f01601f19169290920160200192915050565b6020815260006107ff60208301846123d5565b80356001600160a01b038116811461228e57600080fd5b6000806040838503121561243e57600080fd5b61244783612414565b946020939093013593505050565b60006020828403121561246757600080fd5b6107ff82612414565b81516001600160a01b0316815260208083015160e08301919081840160005b60048110156124ac5782518252918301919083019060010161248f565b505050506040830151151560a0830152606090920151151560c09091015290565b60008060c083850312156124e057600080fd5b60408301848111156124f157600080fd5b8392508460c08501111561250457600080fd5b809150509250929050565b60008060006060848603121561252457600080fd5b61252d84612414565b925061253b60208501612414565b9150604084013590509250925092565b60006020828403121561255d57600080fd5b5035919050565b6000806020838503121561257757600080fd5b82356001600160401b038082111561258e57600080fd5b818501915085601f8301126125a257600080fd5b8135818111156125b157600080fd5b8660208260051b85010111156125c657600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715612610576126106125d8565b60405290565b604051608081016001600160401b0381118282101715612610576126106125d8565b604051601f8201601f191681016001600160401b0381118282101715612660576126606125d8565b604052919050565b600082601f83011261267957600080fd5b813560206001600160401b03821115612694576126946125d8565b6126a2818360051b01612638565b82815260c092830285018201928282019190878511156126c157600080fd5b8387015b858110156127565781818a0312156126dd5760008081fd5b6126e56125ee565b6126ee82612414565b8152858201358682015260408a605f84011261270a5760008081fd5b612712612616565b808585018d8111156127245760008081fd5b8386015b8181101561273f5780358452928a01928a01612728565b5050918301919091525084529284019281016126c5565b5090979650505050505050565b60008060008060008060c0878903121561277c57600080fd5b61278587612414565b95506020612794818901612414565b95506127a260408901612414565b94506127b060608901612414565b935060808801356001600160401b03808211156127cc57600080fd5b818a0191508a601f8301126127e057600080fd5b8135818111156127f2576127f26125d8565b612804601f8201601f19168501612638565b8181528c8583860101111561281857600080fd5b818585018683013760009181019094015291935060a0890135918083111561283f57600080fd5b505061284d89828a01612668565b9150509295509295509295565b6000806040838503121561286d57600080fd5b61287683612414565b915061288460208401612414565b90509250929050565b600181811c908216806128a157607f821691505b6020821081036128c157634e487b7160e01b600052602260045260246000fd5b50919050565b60808181019083833792915050565b6020808252600990820152682b20a624a220aa27a960b91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b808201808211156104f8576104f86128f9565b60006020828403121561293457600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600060018201612963576129636128f9565b5060010190565b6000825161297c8184602087016123b1565b9190910192915050565b61010081016040858337608084604084013760c082018360005b60028110156129bf5781518352602092830192909101906001016129a0565b505050949350505050565b8051801515811461228e57600080fd5b600080604083850312156129ed57600080fd5b6129f6836129ca565b9150612884602084016129ca565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b818103818111156104f8576104f86128f9565b600081612a7157612a716128f9565b506000190190565b82815260406020820152600061162560408301846123d5565b600060408284031215612aa457600080fd5b82601f830112612ab357600080fd5b604051604081018181106001600160401b0382111715612ad557612ad56125d8565b8060405250806040840185811115612aec57600080fd5b845b81811015612b06578051835260209283019201612aee565b509195945050505050565b600060208284031215612b2357600080fd5b6107ff826129ca565b601f8211156107e357600081815260208120601f850160051c81016020861015612b535750805b601f850160051c820191505b81811015611f2657828155600101612b5f565b81516001600160401b03811115612b8b57612b8b6125d8565b612b9f81612b99845461288d565b84612b2c565b602080601f831160018114612bd45760008415612bbc5750858301515b600019600386901b1c1916600185901b178555611f26565b600085815260208120601f198616915b82811015612c0357888601518255948401946001909101908401612be4565b5085821015612c215787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052600160045260246000fd5b600082612c6457634e487b7160e01b600052601260045260246000fd5b50049056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122036f49d156164c122ed5eba55f5178d52fc1b8a3ceb06f21542e8592f30b3bfa964736f6c63430008130033","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106101b05760003560e01c80637b60f539116100ef578063c2fb26a611610092578063c2fb26a61461037d578063ce513b6f14610386578063dd62ed3e14610399578063e30c3978146103ac578063ea0fee4f146103bd578063f2fde38b146103c5578063f3f43703146103d8578063fa52c7d8146103eb57600080fd5b80637b60f539146102e95780638b0e9f3f146102fc5780638da5cb5b1461030457806395d89b4114610329578063981b24d014610331578063a457c2d714610344578063a694fc3a14610357578063a9059cbb1461036a57600080fd5b8063395093511161015757806339509351146102725780633ccfd60b14610285578063426233601461028d5780634ee2cd7e146102a0578063542c85f2146102b357806370a08231146102c6578063715018a6146102d957806379ba5097146102e157600080fd5b806306fdde03146101b5578063095ea7b3146101d357806318160ddd146101f65780631904bb2e146102085780631f6590b81461022857806323b872dd1461023d5780632e17de7814610250578063313ce56714610263575b600080fd5b6101bd610452565b6040516101ca9190612401565b60405180910390f35b6101e66101e136600461242b565b6104e4565b60405190151581526020016101ca565b6099545b6040519081526020016101ca565b61021b610216366004612455565b6104fe565b6040516101ca9190612470565b61023b6102363660046124cd565b610591565b005b6101e661024b36600461250f565b610676565b61023b61025e36600461254b565b61069a565b604051601281526020016101ca565b6101e661028036600461242b565b6106e1565b61023b610703565b6101fa61029b366004612455565b6107e8565b6101fa6102ae36600461242b565b6107f3565b61023b6102c1366004612564565b610806565b6101fa6102d4366004612455565b610861565b61023b61087c565b61023b610890565b61023b6102f7366004612763565b61090a565b6101fa610bc8565b6033546001600160a01b03165b6040516001600160a01b0390911681526020016101ca565b6101bd610bd8565b6101fa61033f36600461254b565b610be7565b6101e661035236600461242b565b610bf2565b61023b61036536600461254b565b610c6d565b6101e661037836600461242b565b610cb0565b6101fa60fe5481565b6101fa610394366004612455565b610cbe565b6101fa6103a736600461285a565b610d66565b6065546001600160a01b0316610311565b6101fa600181565b61023b6103d3366004612455565b610d91565b6101fa6103e6366004612455565b610e02565b61042b6103f9366004612455565b60ff60208190526000918252604090912080546005909101546001600160a01b03909116918181169161010090041683565b604080516001600160a01b03909416845291151560208401521515908201526060016101ca565b6060609a80546104619061288d565b80601f016020809104026020016040519081016040528092919081815260200182805461048d9061288d565b80156104da5780601f106104af576101008083540402835291602001916104da565b820191906000526020600020905b8154815290600101906020018083116104bd57829003601f168201915b5050505050905090565b6000336104f2818585610e9d565b60019150505b92915050565b6105066122bd565b6001600160a01b03828116600090815260ff60209081526040918290208251608080820185528254909516815283519485019384905293909291840191600184019060049082845b81548152602001906001019080831161054e5750505091835250506005919091015460ff8082161515602084015261010090910416151560409091015292915050565b33600090815260ff6020819052604090912060058101549091166105e95760405163973d02cb60e01b815260206004820152600960248201526815d2125511531254d560ba1b60448201526064015b60405180910390fd5b6105f4338484610fc1565b60058101805461ff001916610100179055610614600182018360046122f4565b5080546001600160a01b031916339081178255610630906110b9565b336001600160a01b03167f110ae3ae039a4632f836a35dc9b1282df88780883fb28779f22c2f7ccde8dd0a8360405161066991906128c7565b60405180910390a2505050565b600033610684858285611105565b61068f858585611179565b506001949350505050565b33600081815260ff60208190526040909120600501546101009004166106d35760405163973d02cb60e01b81526004016105e0906128d6565b6106dd338361131d565b5050565b6000336104f28185856106f48383610d66565b6106fe919061290f565b610e9d565b3360009081526101006020908152604080832060fd54825163eacdc5ff60e01b81529251919493849361078f936001600160a01b039093169263eacdc5ff926004808401939192918290030181865afa158015610764573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107889190612922565b849061137d565b808555604051828152919350915033907f8108595eb6bad3acefa9da467d90cc2217686d5c5ac85460f8b7849c840645fc9060200160405180910390a260fc546107e3906001600160a01b031633846113ef565b505050565b60006104f882611452565b60006107ff838361145d565b9392505050565b61080e6114a6565b8060005b8181101561085b5761084984848381811061082f5761082f61293b565b90506020020160208101906108449190612455565b611500565b8061085381612951565b915050610812565b50505050565b6001600160a01b031660009081526097602052604090205490565b6108846114a6565b61088e600061154f565b565b60655433906001600160a01b031681146108fe5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084016105e0565b6109078161154f565b50565b600054610100900460ff161580801561092a5750600054600160ff909116105b806109445750303b158015610944575060005460ff166001145b6109a75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105e0565b6000805460ff1916600117905580156109ca576000805461ff0019166101001790555b610a156040518060400160405280600c81526020016b29ba30b5b2a6b0b730b3b2b960a11b815250604051806040016040528060058152602001645354414b4560d81b815250611568565b60fc80546001600160a01b03808a166001600160a01b03199283161790925560fb805489841690831617905560fd805492881692909116919091179055604051610a6390849060200161296a565b60408051601f19818403018152919052805160209091012060fe5560005b8251811015610b6f576000838281518110610a9e57610a9e61293b565b6020908102919091018101516040805160808101825282516001600160a01b0390811682528284015182860190815260018385018190526060840181905285518316600090815260ff90975293909520825181546001600160a01b031916921691909117815593519294509291610b19918301906004612332565b5060408201516005909101805460609093015115156101000261ff00199215159290921661ffff199093169290921717905580516020820151610b5c9190611599565b5080610b6781612951565b915050610a81565b50610b798461154f565b8015610bbf576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6000610bd360995490565b905090565b6060609b80546104619061288d565b60006104f882611602565b60003381610c008286610d66565b905083811015610c605760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105e0565b61068f8286868403610e9d565b33600081815260ff6020819052604090912060050154610100900416610ca65760405163973d02cb60e01b81526004016105e0906128d6565b6106dd3383611599565b6000336104f2818585611179565b60008060fd60009054906101000a90046001600160a01b03166001600160a01b031663eacdc5ff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d389190612922565b6001600160a01b038416600090815261010060205260409020909150610d5e908261137d565b509392505050565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205490565b610d996114a6565b606580546001600160a01b0383166001600160a01b03199091168117909155610dca6033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60006104f860fd60009054906101000a90046001600160a01b03166001600160a01b031663eacdc5ff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7e9190612922565b6001600160a01b0384166000908152610100602052604090209061162d565b6001600160a01b038316610eff5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105e0565b6001600160a01b038216610f605760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105e0565b6001600160a01b0383811660008181526098602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b8135158015610fd257506020820135155b15610ffb57604051633615713d60e21b81526001600160a01b03841660048201526024016105e0565b60fb5460009081906001600160a01b031663ebbdac91858561101c896116cb565b6040518463ffffffff1660e01b815260040161103a93929190612986565b6040805180830381865afa158015611056573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107a91906129da565b91509150801580611089575081155b156110b257604051633615713d60e21b81526001600160a01b03861660048201526024016105e0565b5050505050565b6001600160a01b038116600081815260ff6020526040808220600501805460ff19169055517fcdd2e9b91a56913d370075169cefa1602ba36be5301664f752192bb1709df7579190a250565b60006111118484610d66565b9050600019811461085b578181101561116c5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105e0565b61085b8484848403610e9d565b6001600160a01b0383166111dd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105e0565b6001600160a01b03821661123f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105e0565b61124a838383611787565b6001600160a01b038316600090815260976020526040902054818110156112c25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105e0565b6001600160a01b038085166000818152609760205260408082208686039055928616808252908390208054860190559151600080516020612c6a833981519152906113109086815260200190565b60405180910390a361085b565b61132733826117f0565b816001600160a01b03167fa018dcbc822f59fb0d0c3e7a86c8e4259b9676cdea9e5fc26279b9c4c5d86eef8260405161136291815260200190565b60405180910390a2611374338261191e565b6106dd826119c5565b81546000905b83600101548110156113e8576000818152600285016020908152604091829020825180840190935280548352600101549082018190528410156113c657506113e8565b80516113d2908461290f565b92505080806113e090612951565b915050611383565b9250929050565b6040516001600160a01b0383166024820152604481018290526107e390849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611a22565b60006104f882610861565b6001600160a01b038216600090815260c96020526040812081908190611484908590611af7565b915091508161149b5761149685610861565b61149d565b805b95945050505050565b6033546001600160a01b0316331461088e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105e0565b6001600160a01b038116600081815260ff6020526040808220600501805460ff19166001179055517fa850ae9193f515cbae8d35e8925bd2be26627fc91bce650b8652ed254e9cab039190a250565b606580546001600160a01b031916905561090781611bea565b600054610100900460ff1661158f5760405162461bcd60e51b81526004016105e090612a04565b6106dd8282611c3c565b6115a38282611c7c565b60fc546115bb906001600160a01b0316833084611d37565b816001600160a01b03167f7c717985ac273e663b7f3050f5b15a4388ff6ed952338954f650e2093e13937f826040516115f691815260200190565b60405180910390a25050565b60008060006116128460ca611af7565b915091508161162357609954611625565b805b949350505050565b60018201546000908082036116465760009150506104f8565b6000611653600183612a4f565b90505b845481106116c357600081815260028601602090815260409182902082518084019093528054835260010154908201819052851061169457506116c3565b80516116a0908561290f565b9350816000036116b057506116c3565b50806116bb81612a62565b915050611656565b505092915050565b6116d3612360565b60fb5460fe546040516bffffffffffffffffffffffff19606086811b8216602084015230901b1660348201524660488201526001600160a01b039092169163a850a90991906068016040516020818303038152906040526040518363ffffffff1660e01b8152600401611747929190612a79565b6040805180830381865afa158015611763573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f89190612a92565b6001600160a01b03831615806117a457506001600160a01b038216155b6117e55760405162461bcd60e51b81526020600482015260126024820152712a2920a729a322a92fa327a92124a22222a760711b60448201526064016105e0565b6107e3838383611d6f565b6001600160a01b0382166118505760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105e0565b61185c82600083611787565b6001600160a01b038216600090815260976020526040902054818110156118d05760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105e0565b6001600160a01b0383166000818152609760209081526040808320868603905560998054879003905551858152919291600080516020612c6a833981519152910160405180910390a3505050565b6106dd81600160fd60009054906101000a90046001600160a01b03166001600160a01b031663eacdc5ff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611977573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061199b9190612922565b6119a5919061290f565b6001600160a01b0385166000908152610100602052604090209190611db7565b6119ce81611452565b600003610907576001600160a01b038116600081815260ff6020526040808220600501805461ff0019169055517f23d934bfe7f1275bc6fd70432159c9cc1c0075d069f89da6a40f43bfe7a94ed39190a250565b6000611a77826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611f2e9092919063ffffffff16565b9050805160001480611a98575080806020019051810190611a989190612b11565b6107e35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105e0565b60008060008411611b435760405162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b60448201526064016105e0565b611b4b611f3d565b841115611b9a5760405162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e7420696400000060448201526064016105e0565b6000611ba68486611fab565b84549091508103611bbe5760008092509250506113e8565b6001846001018281548110611bd557611bd561293b565b906000526020600020015492509250506113e8565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16611c635760405162461bcd60e51b81526004016105e090612a04565b609a611c6f8382612b72565b50609b6107e38282612b72565b6001600160a01b038216611cd25760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105e0565b611cde60008383611787565b8060996000828254611cf0919061290f565b90915550506001600160a01b038216600081815260976020908152604080832080548601905551848152600080516020612c6a833981519152910160405180910390a35050565b6040516001600160a01b038085166024830152831660448201526064810182905261085b9085906323b872dd60e01b9060840161141b565b6001600160a01b038316611d8e57611d8682612058565b6107e3612082565b6001600160a01b038216611da557611d8683612058565b611dae83612058565b6107e382612058565b81600003611e125760405162461bcd60e51b815260206004820152602260248201527f5769746864726177616c51756575654c69623a20494e56414c49445f414d4f55604482015261139560f21b60648201526084016105e0565b82546001840154818103611e69576040805180820182528581526020808201868152600085815260028a019092529281209151825591516001918201558601805491611e5d83612951565b91905055505050505050565b60006002860181611e7b600185612a4f565b815260200190815260200160002060010154905080841015611e9f57611e9f612c31565b83811015611eee576040805180820182528681526020808201878152600086815260028b019092529281209151825591516001918201558701805491611ee483612951565b9190505550611f26565b84600287016000611f00600186612a4f565b81526020019081526020016000206000016000828254611f20919061290f565b90915550505b505050505050565b60606116258484600085612090565b60fd546040805163eacdc5ff60e01b815290516000926001600160a01b03169163eacdc5ff9160048083019260209291908290030181865afa158015611f87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd39190612922565b81546000908103611fbe575060006104f8565b82546000905b8082101561200b576000611fd8838361216b565b60008781526020902090915085908201541115611ff757809150612005565b61200281600161290f565b92505b50611fc4565b60008211801561203757508361203486612026600186612a4f565b600091825260209091200190565b54145b1561205057612047600183612a4f565b925050506104f8565b5090506104f8565b6001600160a01b038116600090815260c9602052604090206109079061207d83610861565b612186565b61088e60ca61207d60995490565b6060824710156120f15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105e0565b600080866001600160a01b0316858760405161210d919061296a565b60006040518083038185875af1925050503d806000811461214a576040519150601f19603f3d011682016040523d82523d6000602084013e61214f565b606091505b5091509150612160878383876121d0565b979650505050505050565b600061217a6002848418612c47565b6107ff9084841661290f565b6000612190611f3d565b90508061219c84612249565b10156107e3578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b6060831561223f578251600003612238576001600160a01b0385163b6122385760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105e0565b5081611625565b6116258383612293565b8054600090810361225c57506000919050565b8154829061226c90600190612a4f565b8154811061227c5761227c61293b565b90600052602060002001549050919050565b919050565b8151156122a35781518083602001fd5b8060405162461bcd60e51b81526004016105e09190612401565b604051806080016040528060006001600160a01b031681526020016122e061237e565b815260006020820181905260409091015290565b8260048101928215612322579160200282015b82811115612322578235825591602001919060010190612307565b5061232e92915061239c565b5090565b8260048101928215612322579160200282015b82811115612322578251825591602001919060010190612345565b60405180604001604052806002906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b5b8082111561232e576000815560010161239d565b60005b838110156123cc5781810151838201526020016123b4565b50506000910152565b600081518084526123ed8160208601602086016123b1565b601f01601f19169290920160200192915050565b6020815260006107ff60208301846123d5565b80356001600160a01b038116811461228e57600080fd5b6000806040838503121561243e57600080fd5b61244783612414565b946020939093013593505050565b60006020828403121561246757600080fd5b6107ff82612414565b81516001600160a01b0316815260208083015160e08301919081840160005b60048110156124ac5782518252918301919083019060010161248f565b505050506040830151151560a0830152606090920151151560c09091015290565b60008060c083850312156124e057600080fd5b60408301848111156124f157600080fd5b8392508460c08501111561250457600080fd5b809150509250929050565b60008060006060848603121561252457600080fd5b61252d84612414565b925061253b60208501612414565b9150604084013590509250925092565b60006020828403121561255d57600080fd5b5035919050565b6000806020838503121561257757600080fd5b82356001600160401b038082111561258e57600080fd5b818501915085601f8301126125a257600080fd5b8135818111156125b157600080fd5b8660208260051b85010111156125c657600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715612610576126106125d8565b60405290565b604051608081016001600160401b0381118282101715612610576126106125d8565b604051601f8201601f191681016001600160401b0381118282101715612660576126606125d8565b604052919050565b600082601f83011261267957600080fd5b813560206001600160401b03821115612694576126946125d8565b6126a2818360051b01612638565b82815260c092830285018201928282019190878511156126c157600080fd5b8387015b858110156127565781818a0312156126dd5760008081fd5b6126e56125ee565b6126ee82612414565b8152858201358682015260408a605f84011261270a5760008081fd5b612712612616565b808585018d8111156127245760008081fd5b8386015b8181101561273f5780358452928a01928a01612728565b5050918301919091525084529284019281016126c5565b5090979650505050505050565b60008060008060008060c0878903121561277c57600080fd5b61278587612414565b95506020612794818901612414565b95506127a260408901612414565b94506127b060608901612414565b935060808801356001600160401b03808211156127cc57600080fd5b818a0191508a601f8301126127e057600080fd5b8135818111156127f2576127f26125d8565b612804601f8201601f19168501612638565b8181528c8583860101111561281857600080fd5b818585018683013760009181019094015291935060a0890135918083111561283f57600080fd5b505061284d89828a01612668565b9150509295509295509295565b6000806040838503121561286d57600080fd5b61287683612414565b915061288460208401612414565b90509250929050565b600181811c908216806128a157607f821691505b6020821081036128c157634e487b7160e01b600052602260045260246000fd5b50919050565b60808181019083833792915050565b6020808252600990820152682b20a624a220aa27a960b91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b808201808211156104f8576104f86128f9565b60006020828403121561293457600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600060018201612963576129636128f9565b5060010190565b6000825161297c8184602087016123b1565b9190910192915050565b61010081016040858337608084604084013760c082018360005b60028110156129bf5781518352602092830192909101906001016129a0565b505050949350505050565b8051801515811461228e57600080fd5b600080604083850312156129ed57600080fd5b6129f6836129ca565b9150612884602084016129ca565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b818103818111156104f8576104f86128f9565b600081612a7157612a716128f9565b506000190190565b82815260406020820152600061162560408301846123d5565b600060408284031215612aa457600080fd5b82601f830112612ab357600080fd5b604051604081018181106001600160401b0382111715612ad557612ad56125d8565b8060405250806040840185811115612aec57600080fd5b845b81811015612b06578051835260209283019201612aee565b509195945050505050565b600060208284031215612b2357600080fd5b6107ff826129ca565b601f8211156107e357600081815260208120601f850160051c81016020861015612b535750805b601f850160051c820191505b81811015611f2657828155600101612b5f565b81516001600160401b03811115612b8b57612b8b6125d8565b612b9f81612b99845461288d565b84612b2c565b602080601f831160018114612bd45760008415612bbc5750858301515b600019600386901b1c1916600185901b178555611f26565b600085815260208120601f198616915b82811015612c0357888601518255948401946001909101908401612be4565b5085821015612c215787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052600160045260246000fd5b600082612c6457634e487b7160e01b600052601260045260246000fd5b50049056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122036f49d156164c122ed5eba55f5178d52fc1b8a3ceb06f21542e8592f30b3bfa964736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` var EpochManagerArtifact string = `{"_format":"hh-sol-artifact-1","contractName":"EpochManager","sourceName":"contracts/blade/validator/EpochManager.sol","abi":[{"inputs":[{"internalType":"string","name":"only","type":"string"}],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"startBlock","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"endBlock","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"epochRoot","type":"bytes32"}],"name":"NewEpoch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epochId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalReward","type":"uint256"}],"name":"RewardDistributed","type":"event"},{"inputs":[],"name":"ALLOWLIST_PRECOMPILE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BLOCKLIST_PRECOMPILE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NATIVE_TOKEN_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NATIVE_TRANSFER_PRECOMPILE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NATIVE_TRANSFER_PRECOMPILE_GAS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"READ_ADDRESSLIST_GAS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SYSTEM","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VALIDATOR_PKCHECK_PRECOMPILE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VALIDATOR_PKCHECK_PRECOMPILE_GAS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"uint256","name":"startBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"},{"internalType":"bytes32","name":"epochRoot","type":"bytes32"}],"internalType":"struct Epoch","name":"epoch","type":"tuple"}],"name":"commitEpoch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentEpochId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"epochId","type":"uint256"},{"components":[{"internalType":"address","name":"validator","type":"address"},{"internalType":"uint256","name":"signedBlocks","type":"uint256"}],"internalType":"struct Uptime[]","name":"uptime","type":"tuple[]"}],"name":"distributeRewardFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"epochSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"epochs","outputs":[{"internalType":"uint256","name":"startBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"},{"internalType":"bytes32","name":"epochRoot","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newStakeManager","type":"address"},{"internalType":"address","name":"newRewardToken","type":"address"},{"internalType":"address","name":"newRewardWallet","type":"address"},{"internalType":"uint256","name":"newBaseReward","type":"uint256"},{"internalType":"uint256","name":"newEpochSize","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"paidRewardPerEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakeManager","outputs":[{"internalType":"contract ERC20SnapshotUpgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawReward","outputs":[],"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b506112af806100206000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806376ad03bc116100b8578063c6b61e4c1161007c578063c6b61e4c14610270578063c885bc58146102ba578063e0563ab1146102c2578063eacdc5ff146102cb578063f7c618c1146102d4578063fb75b2c7146102e757600080fd5b806376ad03bc1461022e5780638a9cd82d14610237578063947287cf1461024a57806397e5230d14610253578063a6b63eb81461025d57600080fd5b80633b878c221161010a5780633b878c22146101de57806351351d53146101e757806355b01e4d146101f5578063572d356e146102035780635ea5df791461020c5780637542ff951461021557600080fd5b806307358b991461014757806307b3e2521461017a5780630f50287c146101a0578063284017f5146101b557806331d7a262146101be575b600080fd5b610167610155366004610f20565b60396020526000908152604090205481565b6040519081526020015b60405180910390f35b6101886004600360981b0181565b6040516001600160a01b039091168152602001610171565b6101b36101ae366004610f39565b6102fa565b005b61018861202081565b6101676101cc366004610f8d565b603a6020526000908152604090205481565b61018861101081565b6101886002600160a01b0381565b6101886004600160991b0181565b61016760365481565b61016761138881565b603254610188906201000090046001600160a01b031681565b61016760355481565b6101b3610245366004610fa8565b610545565b61016761520881565b610167620249f081565b6101b361026b366004611027565b6108a5565b61029f61027e366004610f20565b60386020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610171565b6101b3610b7c565b61018861203081565b61016760375481565b603354610188906001600160a01b031681565b603454610188906001600160a01b031681565b336002600160a01b031461032a5760405163973d02cb60e01b81526004016103219061107c565b60405180910390fd5b603780546000918261033b836110b6565b9190505590508083146103865760405162461bcd60e51b815260206004820152601360248201527215539156141150d5115117d15413d0d217d251606a1b6044820152606401610321565b81356020830135116103d05760405162461bcd60e51b81526020600482015260136024820152721393d7d09313d0d2d4d7d0d3d3535255151151606a1b6044820152606401610321565b6036546103e2833560208501356110cf565b6103ed9060016110e8565b6103f79190611111565b156104525760405162461bcd60e51b815260206004820152602560248201527f45504f43485f4d5553545f42455f444956495349424c455f42595f45504f43486044820152645f53495a4560d81b6064820152608401610321565b8135603860006104636001856110cf565b815260200190815260200160002060010154600161048191906110e8565b146104c45760405162461bcd60e51b8152602060048201526013602482015272494e56414c49445f53544152545f424c4f434b60681b6044820152606401610321565b600081815260386020526040902082906104f582828135815560208201356001820155604082013560028201555050565b90505081602001358260000135847f0ce8712c4dee4bd5a691f0bc1c39594671591e77395f8ebf6a3fb5f63fbea66a856040013560405161053891815260200190565b60405180910390a4505050565b336002600160a01b031461056c5760405163973d02cb60e01b81526004016103219061107c565b600083815260396020526040902054156105c85760405162461bcd60e51b815260206004820152601a60248201527f5245574152445f414c52454144595f44495354524942555445440000000000006044820152606401610321565b60006105d384610bac565b90508060000361061b5760405162461bcd60e51b8152602060048201526013602482015272115413d0d217d393d517d0d3d3535255151151606a1b6044820152606401610321565b60006036548260355461062e9190611125565b610638919061113c565b603254604051630981b24d60e41b815260048101889052919250600091620100009091046001600160a01b03169063981b24d090602401602060405180830381865afa15801561068c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b09190611150565b9050836000805b828110156108465760008888838181106106d3576106d3611169565b9050604002018036038101906106e9919061117f565b9050868160200151111561073f5760405162461bcd60e51b815260206004820152601b60248201527f5349474e45445f424c4f434b535f455843454544535f544f54414c00000000006044820152606401610321565b603254815160405163277166bf60e11b81526001600160a01b039182166004820152602481018d905260009262010000900490911690634ee2cd7e90604401602060405180830381865afa15801561079b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bf9190611150565b905060006107cd8988611125565b60208401516107dc848b611125565b6107e69190611125565b6107f0919061113c565b83516001600160a01b03166000908152603a602052604081208054929350839290919061081e9084906110e8565b9091555061082e905081866110e8565b9450505050808061083e906110b6565b9150506106b7565b50600088815260396020526040902081905561086181610bf7565b877feaf3d57629d9b1ce95715ccd98d6f5bf48023be1d5a06e09f64ab7f6d8be01d58260405161089391815260200190565b60405180910390a25050505050505050565b603254610100900460ff16158080156108c55750603254600160ff909116105b806108df5750303b1580156108df575060325460ff166001145b6109425760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610321565b6032805460ff191660011790558015610965576032805461ff0019166101001790555b6001600160a01b0386166109c75760405162461bcd60e51b815260206004820152602360248201527f45706f63684d616e616765723a20494e56414c49445f5354414b455f4d414e4160448201526223a2a960e91b6064820152608401610321565b6001600160a01b038516610a285760405162461bcd60e51b815260206004820152602260248201527f45706f63684d616e616765723a20494e56414c49445f5245574152445f544f4b60448201526122a760f11b6064820152608401610321565b6001600160a01b038416610a7e5760405162461bcd60e51b815260206004820152601a60248201527f45706f63684d616e616765723a205a45524f5f414444524553530000000000006044820152606401610321565b60008211610ace5760405162461bcd60e51b815260206004820181905260248201527f45706f63684d616e616765723a20494e56414c49445f45504f43485f53495a456044820152606401610321565b603280546001600160a01b03808916620100000262010000600160b01b031990921691909117909155603380548783166001600160a01b03199182161790915560348054928716929091169190911790556035839055603682905560016037558015610b74576032805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b336000818152603a6020526040812080549190556033549091610ba9916001600160a01b03169083610c15565b50565b6000818152603860205260408120600101548015610bed57600083815260386020526040902054610bdd90826110cf565b610be89060016110e8565b610bf0565b60005b9392505050565b603454603354610ba9916001600160a01b0391821691163084610c7d565b6040516001600160a01b038316602482015260448101829052610c7890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610cbb565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610cb59085906323b872dd60e01b90608401610c41565b50505050565b6000610d10826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d909092919063ffffffff16565b9050805160001480610d31575080806020019051810190610d3191906111e4565b610c785760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610321565b6060610d9f8484600085610da7565b949350505050565b606082471015610e085760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610321565b600080866001600160a01b03168587604051610e24919061122a565b60006040518083038185875af1925050503d8060008114610e61576040519150601f19603f3d011682016040523d82523d6000602084013e610e66565b606091505b5091509150610e7787838387610e82565b979650505050505050565b60608315610ef1578251600003610eea576001600160a01b0385163b610eea5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610321565b5081610d9f565b610d9f8383815115610f065781518083602001fd5b8060405162461bcd60e51b81526004016103219190611246565b600060208284031215610f3257600080fd5b5035919050565b6000808284036080811215610f4d57600080fd5b833592506060601f1982011215610f6357600080fd5b506020830190509250929050565b80356001600160a01b0381168114610f8857600080fd5b919050565b600060208284031215610f9f57600080fd5b610bf082610f71565b600080600060408486031215610fbd57600080fd5b83359250602084013567ffffffffffffffff80821115610fdc57600080fd5b818601915086601f830112610ff057600080fd5b813581811115610fff57600080fd5b8760208260061b850101111561101457600080fd5b6020830194508093505050509250925092565b600080600080600060a0868803121561103f57600080fd5b61104886610f71565b945061105660208701610f71565b935061106460408701610f71565b94979396509394606081013594506080013592915050565b6020808252600a908201526914d654d5115350d0531360b21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000600182016110c8576110c86110a0565b5060010190565b818103818111156110e2576110e26110a0565b92915050565b808201808211156110e2576110e26110a0565b634e487b7160e01b600052601260045260246000fd5b600082611120576111206110fb565b500690565b80820281158282048414176110e2576110e26110a0565b60008261114b5761114b6110fb565b500490565b60006020828403121561116257600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b60006040828403121561119157600080fd5b6040516040810181811067ffffffffffffffff821117156111c257634e487b7160e01b600052604160045260246000fd5b6040526111ce83610f71565b8152602083013560208201528091505092915050565b6000602082840312156111f657600080fd5b81518015158114610bf057600080fd5b60005b83811015611221578181015183820152602001611209565b50506000910152565b6000825161123c818460208701611206565b9190910192915050565b6020815260008251806020840152611265816040850160208701611206565b601f01601f1916919091016040019291505056fea264697066735822122025299ac478733bb0b0bf2ed3e64e335b5f38efaa3eba0d9dbc1c83fce65116d364736f6c63430008130033","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106101425760003560e01c806376ad03bc116100b8578063c6b61e4c1161007c578063c6b61e4c14610270578063c885bc58146102ba578063e0563ab1146102c2578063eacdc5ff146102cb578063f7c618c1146102d4578063fb75b2c7146102e757600080fd5b806376ad03bc1461022e5780638a9cd82d14610237578063947287cf1461024a57806397e5230d14610253578063a6b63eb81461025d57600080fd5b80633b878c221161010a5780633b878c22146101de57806351351d53146101e757806355b01e4d146101f5578063572d356e146102035780635ea5df791461020c5780637542ff951461021557600080fd5b806307358b991461014757806307b3e2521461017a5780630f50287c146101a0578063284017f5146101b557806331d7a262146101be575b600080fd5b610167610155366004610f20565b60396020526000908152604090205481565b6040519081526020015b60405180910390f35b6101886004600360981b0181565b6040516001600160a01b039091168152602001610171565b6101b36101ae366004610f39565b6102fa565b005b61018861202081565b6101676101cc366004610f8d565b603a6020526000908152604090205481565b61018861101081565b6101886002600160a01b0381565b6101886004600160991b0181565b61016760365481565b61016761138881565b603254610188906201000090046001600160a01b031681565b61016760355481565b6101b3610245366004610fa8565b610545565b61016761520881565b610167620249f081565b6101b361026b366004611027565b6108a5565b61029f61027e366004610f20565b60386020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610171565b6101b3610b7c565b61018861203081565b61016760375481565b603354610188906001600160a01b031681565b603454610188906001600160a01b031681565b336002600160a01b031461032a5760405163973d02cb60e01b81526004016103219061107c565b60405180910390fd5b603780546000918261033b836110b6565b9190505590508083146103865760405162461bcd60e51b815260206004820152601360248201527215539156141150d5115117d15413d0d217d251606a1b6044820152606401610321565b81356020830135116103d05760405162461bcd60e51b81526020600482015260136024820152721393d7d09313d0d2d4d7d0d3d3535255151151606a1b6044820152606401610321565b6036546103e2833560208501356110cf565b6103ed9060016110e8565b6103f79190611111565b156104525760405162461bcd60e51b815260206004820152602560248201527f45504f43485f4d5553545f42455f444956495349424c455f42595f45504f43486044820152645f53495a4560d81b6064820152608401610321565b8135603860006104636001856110cf565b815260200190815260200160002060010154600161048191906110e8565b146104c45760405162461bcd60e51b8152602060048201526013602482015272494e56414c49445f53544152545f424c4f434b60681b6044820152606401610321565b600081815260386020526040902082906104f582828135815560208201356001820155604082013560028201555050565b90505081602001358260000135847f0ce8712c4dee4bd5a691f0bc1c39594671591e77395f8ebf6a3fb5f63fbea66a856040013560405161053891815260200190565b60405180910390a4505050565b336002600160a01b031461056c5760405163973d02cb60e01b81526004016103219061107c565b600083815260396020526040902054156105c85760405162461bcd60e51b815260206004820152601a60248201527f5245574152445f414c52454144595f44495354524942555445440000000000006044820152606401610321565b60006105d384610bac565b90508060000361061b5760405162461bcd60e51b8152602060048201526013602482015272115413d0d217d393d517d0d3d3535255151151606a1b6044820152606401610321565b60006036548260355461062e9190611125565b610638919061113c565b603254604051630981b24d60e41b815260048101889052919250600091620100009091046001600160a01b03169063981b24d090602401602060405180830381865afa15801561068c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b09190611150565b9050836000805b828110156108465760008888838181106106d3576106d3611169565b9050604002018036038101906106e9919061117f565b9050868160200151111561073f5760405162461bcd60e51b815260206004820152601b60248201527f5349474e45445f424c4f434b535f455843454544535f544f54414c00000000006044820152606401610321565b603254815160405163277166bf60e11b81526001600160a01b039182166004820152602481018d905260009262010000900490911690634ee2cd7e90604401602060405180830381865afa15801561079b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bf9190611150565b905060006107cd8988611125565b60208401516107dc848b611125565b6107e69190611125565b6107f0919061113c565b83516001600160a01b03166000908152603a602052604081208054929350839290919061081e9084906110e8565b9091555061082e905081866110e8565b9450505050808061083e906110b6565b9150506106b7565b50600088815260396020526040902081905561086181610bf7565b877feaf3d57629d9b1ce95715ccd98d6f5bf48023be1d5a06e09f64ab7f6d8be01d58260405161089391815260200190565b60405180910390a25050505050505050565b603254610100900460ff16158080156108c55750603254600160ff909116105b806108df5750303b1580156108df575060325460ff166001145b6109425760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610321565b6032805460ff191660011790558015610965576032805461ff0019166101001790555b6001600160a01b0386166109c75760405162461bcd60e51b815260206004820152602360248201527f45706f63684d616e616765723a20494e56414c49445f5354414b455f4d414e4160448201526223a2a960e91b6064820152608401610321565b6001600160a01b038516610a285760405162461bcd60e51b815260206004820152602260248201527f45706f63684d616e616765723a20494e56414c49445f5245574152445f544f4b60448201526122a760f11b6064820152608401610321565b6001600160a01b038416610a7e5760405162461bcd60e51b815260206004820152601a60248201527f45706f63684d616e616765723a205a45524f5f414444524553530000000000006044820152606401610321565b60008211610ace5760405162461bcd60e51b815260206004820181905260248201527f45706f63684d616e616765723a20494e56414c49445f45504f43485f53495a456044820152606401610321565b603280546001600160a01b03808916620100000262010000600160b01b031990921691909117909155603380548783166001600160a01b03199182161790915560348054928716929091169190911790556035839055603682905560016037558015610b74576032805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b336000818152603a6020526040812080549190556033549091610ba9916001600160a01b03169083610c15565b50565b6000818152603860205260408120600101548015610bed57600083815260386020526040902054610bdd90826110cf565b610be89060016110e8565b610bf0565b60005b9392505050565b603454603354610ba9916001600160a01b0391821691163084610c7d565b6040516001600160a01b038316602482015260448101829052610c7890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610cbb565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610cb59085906323b872dd60e01b90608401610c41565b50505050565b6000610d10826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d909092919063ffffffff16565b9050805160001480610d31575080806020019051810190610d3191906111e4565b610c785760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610321565b6060610d9f8484600085610da7565b949350505050565b606082471015610e085760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610321565b600080866001600160a01b03168587604051610e24919061122a565b60006040518083038185875af1925050503d8060008114610e61576040519150601f19603f3d011682016040523d82523d6000602084013e610e66565b606091505b5091509150610e7787838387610e82565b979650505050505050565b60608315610ef1578251600003610eea576001600160a01b0385163b610eea5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610321565b5081610d9f565b610d9f8383815115610f065781518083602001fd5b8060405162461bcd60e51b81526004016103219190611246565b600060208284031215610f3257600080fd5b5035919050565b6000808284036080811215610f4d57600080fd5b833592506060601f1982011215610f6357600080fd5b506020830190509250929050565b80356001600160a01b0381168114610f8857600080fd5b919050565b600060208284031215610f9f57600080fd5b610bf082610f71565b600080600060408486031215610fbd57600080fd5b83359250602084013567ffffffffffffffff80821115610fdc57600080fd5b818601915086601f830112610ff057600080fd5b813581811115610fff57600080fd5b8760208260061b850101111561101457600080fd5b6020830194508093505050509250925092565b600080600080600060a0868803121561103f57600080fd5b61104886610f71565b945061105660208701610f71565b935061106460408701610f71565b94979396509394606081013594506080013592915050565b6020808252600a908201526914d654d5115350d0531360b21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000600182016110c8576110c86110a0565b5060010190565b818103818111156110e2576110e26110a0565b92915050565b808201808211156110e2576110e26110a0565b634e487b7160e01b600052601260045260246000fd5b600082611120576111206110fb565b500690565b80820281158282048414176110e2576110e26110a0565b60008261114b5761114b6110fb565b500490565b60006020828403121561116257600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b60006040828403121561119157600080fd5b6040516040810181811067ffffffffffffffff821117156111c257634e487b7160e01b600052604160045260246000fd5b6040526111ce83610f71565b8152602083013560208201528091505092915050565b6000602082840312156111f657600080fd5b81518015158114610bf057600080fd5b60005b83811015611221578181015183820152602001611209565b50506000910152565b6000825161123c818460208701611206565b9190910192915050565b6020815260008251806020840152611265816040850160208701611206565b601f01601f1916919091016040019291505056fea264697066735822122025299ac478733bb0b0bf2ed3e64e335b5f38efaa3eba0d9dbc1c83fce65116d364736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` var GenesisProxyArtifact string = `{"_format":"hh-sol-artifact-1","contractName":"GenesisProxy","sourceName":"contracts/lib/GenesisProxy.sol","abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"initiator","type":"address"}],"name":"protectSetUpProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"logic","type":"address"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setUpProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}],"bytecode":"0x60806040523480156200001157600080fd5b506000806040518060200160405280600081525082816200003b828260006200004e60201b60201c565b506200004990508262000080565b600080fd5b6200005983620000f2565b600082511180620000675750805b156200007b5762000079838362000134565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c260008051602062000446833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000ef8162000163565b50565b620000fd8162000201565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200015c8383604051806060016040528060278152602001620004666027913962000298565b9392505050565b6001600160a01b038116620001ce5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80600080516020620004468339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b620002705760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001c5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001e0565b6060600080856001600160a01b031685604051620002b79190620003f2565b600060405180830381855af49150503d8060008114620002f4576040519150601f19603f3d011682016040523d82523d6000602084013e620002f9565b606091505b5090925090506200030d8683838762000317565b9695505050505050565b606083156200038b57825160000362000383576001600160a01b0385163b620003835760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001c5565b508162000397565b6200039783836200039f565b949350505050565b815115620003b05781518083602001fd5b8060405162461bcd60e51b8152600401620001c5919062000410565b60005b83811015620003e9578181015183820152602001620003cf565b50506000910152565b6000825162000406818460208701620003cc565b9190910192915050565b602081526000825180602084015262000431816040850160208701620003cc565b601f01601f1916919091016040019291505056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564","deployedBytecode":"0x60806040526004361061002d5760003560e01c806317cf3e3414610044578063da2655db146100645761003c565b3661003c5761003a610084565b005b61003a610084565b34801561005057600080fd5b5061003a61005f3660046108d2565b6101d6565b34801561007057600080fd5b5061003a61007f366004610934565b6102a5565b61008c610300565b6001600160a01b031633036101cc5760606001600160e01b0319600035166364d3180d60e11b81016100c7576100c0610333565b91506101c4565b63587086bd60e11b6001600160e01b03198216016100e7576100c061038a565b63070d7c6960e41b6001600160e01b0319821601610107576100c06103d0565b621eb96f60e61b6001600160e01b0319821601610126576100c0610401565b63a39f25e560e01b6001600160e01b0319821601610146576100c0610441565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101d4610455565b565b600080516020610a3f833981519152546000196001600160a01b038216016102315760405162461bcd60e51b815260206004820152600e60248201526d0416c7265616479207365742d75760941b60448201526064016101bb565b336001600160a01b038216146102785760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064016101bb565b61028183610465565b61028d848360006104bc565b6001600080516020610a3f8339815191525550505050565b600080516020610a3f83398151915280549082905580156102fc5760405162461bcd60e51b8152602060048201526011602482015270105b1c9958591e481c1c9bdd1958dd1959607a1b60448201526064016101bb565b5050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b606061033d6104e8565b600061034c3660048184610951565b8101906103599190610934565b9050610376816040518060200160405280600081525060006104bc565b505060408051602081019091526000815290565b606060008061039c3660048184610951565b8101906103a9919061097b565b915091506103b9828260016104bc565b604051806020016040528060008152509250505090565b60606103da6104e8565b60006103e93660048184610951565b8101906103f69190610934565b905061037681610465565b606061040b6104e8565b6000610415610300565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b606061044b6104e8565b60006104156104f3565b6101d46104606104f3565b610502565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61048e610300565b604080516001600160a01b03928316815291841660208301520160405180910390a16104b981610526565b50565b6104c5836105cf565b6000825111806104d25750805b156104e3576104e1838361060f565b505b505050565b34156101d457600080fd5b60006104fd61063b565b905090565b3660008037600080366000845af43d6000803e808015610521573d6000f35b3d6000fd5b6001600160a01b03811661058b5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016101bb565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6105d881610663565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606106348383604051806060016040528060278152602001610a5f602791396106f7565b9392505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610324565b6001600160a01b0381163b6106d05760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016101bb565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ae565b6060600080856001600160a01b03168560405161071491906109ef565b600060405180830381855af49150503d806000811461074f576040519150601f19603f3d011682016040523d82523d6000602084013e610754565b606091505b50915091506107658683838761076f565b9695505050505050565b606083156107de5782516000036107d7576001600160a01b0385163b6107d75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101bb565b50816107e8565b6107e883836107f0565b949350505050565b8151156108005781518083602001fd5b8060405162461bcd60e51b81526004016101bb9190610a0b565b6001600160a01b03811681146104b957600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f83011261085657600080fd5b813567ffffffffffffffff808211156108715761087161082f565b604051601f8301601f19908116603f011681019082821181831017156108995761089961082f565b816040528381528660208588010111156108b257600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000606084860312156108e757600080fd5b83356108f28161081a565b925060208401356109028161081a565b9150604084013567ffffffffffffffff81111561091e57600080fd5b61092a86828701610845565b9150509250925092565b60006020828403121561094657600080fd5b81356106348161081a565b6000808585111561096157600080fd5b8386111561096e57600080fd5b5050820193919092039150565b6000806040838503121561098e57600080fd5b82356109998161081a565b9150602083013567ffffffffffffffff8111156109b557600080fd5b6109c185828601610845565b9150509250929050565b60005b838110156109e65781810151838201526020016109ce565b50506000910152565b60008251610a018184602087016109cb565b9190910192915050565b6020815260008251806020840152610a2a8160408501602087016109cb565b601f01601f1916919091016040019291505056fe16561015e0650c143c10fb1907c52a56b654e2f0922ca3245bde5beff81a333d416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220abb148ad739bda14bfde881802dab93d2ab651041781eed877949635c7179ba364736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` var TransparentUpgradeableProxyArtifact string = `{"_format":"hh-sol-artifact-1","contractName":"TransparentUpgradeableProxy","sourceName":"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol","abi":[{"inputs":[{"internalType":"address","name":"_logic","type":"address"},{"internalType":"address","name":"admin_","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}],"bytecode":"0x608060405260405162000e3a38038062000e3a833981016040819052620000269162000424565b828162000036828260006200004d565b50620000449050826200007f565b50505062000557565b6200005883620000f1565b600082511180620000665750805b156200007a5762000078838362000133565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000c160008051602062000df3833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000ee8162000162565b50565b620000fc8162000200565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200015b838360405180606001604052806027815260200162000e136027913962000297565b9392505050565b6001600160a01b038116620001cd5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b8060008051602062000df38339815191525b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b6200026f5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001c4565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc620001df565b6060600080856001600160a01b031685604051620002b6919062000504565b600060405180830381855af49150503d8060008114620002f3576040519150601f19603f3d011682016040523d82523d6000602084013e620002f8565b606091505b5090925090506200030c8683838762000316565b9695505050505050565b606083156200038a57825160000362000382576001600160a01b0385163b620003825760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001c4565b508162000396565b6200039683836200039e565b949350505050565b815115620003af5781518083602001fd5b8060405162461bcd60e51b8152600401620001c4919062000522565b80516001600160a01b0381168114620003e357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200041b57818101518382015260200162000401565b50506000910152565b6000806000606084860312156200043a57600080fd5b6200044584620003cb565b92506200045560208501620003cb565b60408501519092506001600160401b03808211156200047357600080fd5b818601915086601f8301126200048857600080fd5b8151818111156200049d576200049d620003e8565b604051601f8201601f19908116603f01168101908382118183101715620004c857620004c8620003e8565b81604052828152896020848701011115620004e257600080fd5b620004f5836020830160208801620003fe565b80955050505050509250925092565b6000825162000518818460208701620003fe565b9190910192915050565b602081526000825180602084015262000543816040850160208701620003fe565b601f01601f19169190910160400192915050565b61088c80620005676000396000f3fe60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083060279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e0565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e91906107fc565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff8082111561073357600080fd5b818501915085601f83011261074757600080fd5b813581811115610759576107596106e4565b604051601f8201601f19908116603f01168101908382118183101715610781576107816106e4565b8160405282815288602084870101111561079a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156107d75781810151838201526020016107bf565b50506000910152565b600082516107f28184602087016107bc565b9190910192915050565b602081526000825180602084015261081b8160408501602087016107bc565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220e47bdad79754770e5755a6f8224b03af73f674035cf42b93fa6fc0731c0dbb6864736f6c63430008130033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564","deployedBytecode":"0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083060279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e0565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e91906107fc565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff8082111561073357600080fd5b818501915085601f83011261074757600080fd5b813581811115610759576107596106e4565b604051601f8201601f19908116603f01168101908382118183101715610781576107816106e4565b8160405282815288602084870101111561079a57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156107d75781810151838201526020016107bf565b50506000910152565b600082516107f28184602087016107bc565b9190910192915050565b602081526000825180602084015261081b8160408501602087016107bc565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220e47bdad79754770e5755a6f8224b03af73f674035cf42b93fa6fc0731c0dbb6864736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` diff --git a/consensus/polybft/helpers_test.go b/consensus/polybft/helpers_test.go index c3b0fcc596..f224eb39a0 100644 --- a/consensus/polybft/helpers_test.go +++ b/consensus/polybft/helpers_test.go @@ -184,7 +184,6 @@ func createTestBridgeConfig() *BridgeConfig { ExitHelperAddr: types.StringToAddress("3"), RootERC20PredicateAddr: types.StringToAddress("4"), ChildMintableERC20PredicateAddr: types.StringToAddress("5"), - RootNativeERC20Addr: types.StringToAddress("6"), RootERC721PredicateAddr: types.StringToAddress("8"), ChildMintableERC721PredicateAddr: types.StringToAddress("9"), RootERC1155PredicateAddr: types.StringToAddress("11"), diff --git a/consensus/polybft/polybft.go b/consensus/polybft/polybft.go index 7ad6adef5c..4f352b5640 100644 --- a/consensus/polybft/polybft.go +++ b/consensus/polybft/polybft.go @@ -343,47 +343,25 @@ func GenesisPostHookFactory(config *chain.Chain, engineName string) func(txn *st } } - if polyBFTConfig.NativeTokenConfig.IsMintable { - // initialize NativeERC20Mintable SC - params := &contractsapi.InitializeNativeERC20Fn{ - Predicate_: contracts.ChildERC20PredicateContract, - Owner_: polyBFTConfig.NativeTokenConfig.Owner, - RootToken_: types.ZeroAddress, // in case native mintable token is used, it is always root token - Name_: polyBFTConfig.NativeTokenConfig.Name, - Symbol_: polyBFTConfig.NativeTokenConfig.Symbol, - Decimals_: polyBFTConfig.NativeTokenConfig.Decimals, - TokenSupply_: initialTotalSupply, - } - - input, err := params.EncodeAbi() - if err != nil { - return err - } - - if err = callContract(contracts.SystemCaller, - contracts.NativeERC20TokenContract, input, "NativeERC20Mintable", transition); err != nil { - return err - } - } else { - // initialize NativeERC20 SC - params := &contractsapi.InitializeNativeERC20Fn{ - Name_: polyBFTConfig.NativeTokenConfig.Name, - Symbol_: polyBFTConfig.NativeTokenConfig.Symbol, - Decimals_: polyBFTConfig.NativeTokenConfig.Decimals, - RootToken_: polyBFTConfig.Bridge.RootNativeERC20Addr, - Predicate_: contracts.ChildERC20PredicateContract, - TokenSupply_: initialTotalSupply, - } + // initialize NativeERC20 SC + params := &contractsapi.InitializeNativeERC20Fn{ + Predicate_: contracts.ChildERC20PredicateContract, + Owner_: polyBFTConfig.BladeAdmin, + RootToken_: types.ZeroAddress, // in case native mintable token is used, it is always root token + Name_: polyBFTConfig.NativeTokenConfig.Name, + Symbol_: polyBFTConfig.NativeTokenConfig.Symbol, + Decimals_: polyBFTConfig.NativeTokenConfig.Decimals, + TokenSupply_: initialTotalSupply, + } - input, err := params.EncodeAbi() - if err != nil { - return err - } + input, err := params.EncodeAbi() + if err != nil { + return err + } - if err = callContract(contracts.SystemCaller, - contracts.NativeERC20TokenContract, input, "NativeERC20", transition); err != nil { - return err - } + if err = callContract(contracts.SystemCaller, + contracts.NativeERC20TokenContract, input, "NativeERC20", transition); err != nil { + return err } } diff --git a/consensus/polybft/polybft_config.go b/consensus/polybft/polybft_config.go index f4c3a8ad95..821fc7b35e 100644 --- a/consensus/polybft/polybft_config.go +++ b/consensus/polybft/polybft_config.go @@ -16,7 +16,7 @@ import ( const ( ConsensusName = "polybft" - minNativeTokenParamsNumber = 4 + minNativeTokenParamsNumber = 3 defaultNativeTokenName = "Polygon" defaultNativeTokenSymbol = "MATIC" @@ -25,15 +25,13 @@ const ( var ( DefaultTokenConfig = &TokenConfig{ - Name: defaultNativeTokenName, - Symbol: defaultNativeTokenSymbol, - Decimals: defaultNativeTokenDecimals, - Owner: types.ZeroAddress, - IsMintable: true, + Name: defaultNativeTokenName, + Symbol: defaultNativeTokenSymbol, + Decimals: defaultNativeTokenDecimals, } errInvalidTokenParams = errors.New("native token params were not submitted in proper format " + - "()") + "()") ) // PolyBFTConfig is the configuration file for the Polybft consensus protocol. @@ -78,11 +76,15 @@ type PolyBFTConfig struct { // BlockTrackerPollInterval specifies interval // at which block tracker polls for blocks on a rootchain - BlockTrackerPollInterval common.Duration `json:"blockTrackerPollInterval,omitempty"` + BlockTrackerPollInterval common.Duration `json:"blockTrackerPollInterval"` // ProxyContractsAdmin is the address that will have the privilege to change both the proxy // implementation address and the admin - ProxyContractsAdmin types.Address `json:"proxyContractsAdmin,omitempty"` + ProxyContractsAdmin types.Address `json:"proxyContractsAdmin"` + + // BladeAdmin is the address that will be the owner of the NativeERC20 mintable token, + // and StakeManager contract which manages validators + BladeAdmin types.Address `json:"bladeAdmin"` } // LoadPolyBFTConfig loads chain config from provided path and unmarshals PolyBFTConfig @@ -122,7 +124,6 @@ type BridgeConfig struct { ExitHelperAddr types.Address `json:"exitHelperAddress"` RootERC20PredicateAddr types.Address `json:"erc20PredicateAddress"` ChildMintableERC20PredicateAddr types.Address `json:"erc20ChildMintablePredicateAddress"` - RootNativeERC20Addr types.Address `json:"nativeERC20Address"` RootERC721PredicateAddr types.Address `json:"erc721PredicateAddress"` ChildMintableERC721PredicateAddr types.Address `json:"erc721ChildMintablePredicateAddress"` RootERC1155PredicateAddr types.Address `json:"erc1155PredicateAddress"` @@ -156,7 +157,6 @@ type RootchainConfig struct { ExitHelperAddress types.Address RootERC20PredicateAddress types.Address ChildMintableERC20PredicateAddress types.Address - RootNativeERC20Address types.Address ChildERC20Address types.Address RootERC721PredicateAddress types.Address ChildMintableERC721PredicateAddress types.Address @@ -179,7 +179,6 @@ func (r *RootchainConfig) ToBridgeConfig() *BridgeConfig { ExitHelperAddr: r.ExitHelperAddress, RootERC20PredicateAddr: r.RootERC20PredicateAddress, ChildMintableERC20PredicateAddr: r.ChildMintableERC20PredicateAddress, - RootNativeERC20Addr: r.RootNativeERC20Address, RootERC721PredicateAddr: r.RootERC721PredicateAddress, ChildMintableERC721PredicateAddr: r.ChildMintableERC721PredicateAddress, RootERC1155PredicateAddr: r.RootERC1155PredicateAddress, @@ -196,11 +195,9 @@ func (r *RootchainConfig) ToBridgeConfig() *BridgeConfig { // TokenConfig is the configuration of native token used by edge network type TokenConfig struct { - Name string `json:"name"` - Symbol string `json:"symbol"` - Decimals uint8 `json:"decimals"` - IsMintable bool `json:"isMintable"` - Owner types.Address `json:"owner"` + Name string `json:"name"` + Symbol string `json:"symbol"` + Decimals uint8 `json:"decimals"` } func ParseRawTokenConfig(rawConfig string) (*TokenConfig, error) { @@ -231,15 +228,10 @@ func ParseRawTokenConfig(rawConfig string) (*TokenConfig, error) { return nil, errInvalidTokenParams } - // owner address - owner := types.StringToAddress(strings.TrimSpace(params[3])) - return &TokenConfig{ - Name: name, - Symbol: symbol, - Decimals: uint8(decimals), - IsMintable: true, // native token on blade is always mintable - Owner: owner, + Name: name, + Symbol: symbol, + Decimals: uint8(decimals), }, nil } diff --git a/consensus/polybft/polybft_test.go b/consensus/polybft/polybft_test.go index 93a7f178e4..d64b4dc72e 100644 --- a/consensus/polybft/polybft_test.go +++ b/consensus/polybft/polybft_test.go @@ -315,7 +315,7 @@ func Test_GenesisPostHookFactory(t *testing.T) { Bridge: bridgeCfg, EpochSize: epochSize, RewardConfig: &RewardsConfig{WalletAmount: ethgo.Ether(1000)}, - NativeTokenConfig: &TokenConfig{Name: "Test Mintable", Symbol: "TEST_MNT", Decimals: 18, IsMintable: true}, + NativeTokenConfig: &TokenConfig{Name: "Test Mintable", Symbol: "TEST_MNT", Decimals: 18}, MaxValidatorSetSize: maxValidators, }, bridgeAllowList: &chain.AddressListConfig{ diff --git a/e2e-polybft/e2e/acls_test.go b/e2e-polybft/e2e/acls_test.go index 5e841e1fb8..8e2204c44c 100644 --- a/e2e-polybft/e2e/acls_test.go +++ b/e2e-polybft/e2e/acls_test.go @@ -1,7 +1,6 @@ package e2e import ( - "fmt" "math/big" "testing" @@ -44,7 +43,6 @@ func TestE2E_AllowList_ContractDeployment(t *testing.T) { otherAddr := types.Address{0x1} cluster := framework.NewTestCluster(t, 5, - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, adminAddr)), framework.WithPremine(adminAddr, targetAddr), framework.WithContractDeployerAllowListAdmin(adminAddr), framework.WithContractDeployerAllowListEnabled(otherAddr), @@ -143,7 +141,6 @@ func TestE2E_BlockList_ContractDeployment(t *testing.T) { otherAddr := types.Address{0x1} cluster := framework.NewTestCluster(t, 5, - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, adminAddr)), framework.WithPremine(adminAddr, targetAddr), framework.WithContractDeployerBlockListAdmin(adminAddr), framework.WithContractDeployerBlockListEnabled(otherAddr), @@ -227,7 +224,6 @@ func TestE2E_AllowList_Transactions(t *testing.T) { otherAddr := types.Address(other.Address()) cluster := framework.NewTestCluster(t, 5, - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, adminAddr)), framework.WithPremine(adminAddr, targetAddr, otherAddr), framework.WithTransactionsAllowListAdmin(adminAddr), framework.WithTransactionsAllowListEnabled(otherAddr), @@ -321,7 +317,6 @@ func TestE2E_BlockList_Transactions(t *testing.T) { otherAddr := types.Address(other.Address()) cluster := framework.NewTestCluster(t, 5, - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, adminAddr)), framework.WithPremine(adminAddr, targetAddr, otherAddr), framework.WithTransactionsBlockListAdmin(adminAddr), framework.WithTransactionsBlockListEnabled(otherAddr), @@ -392,7 +387,6 @@ func TestE2E_AddressLists_Bridge(t *testing.T) { otherAddr := types.Address(other.Address()) cluster := framework.NewTestCluster(t, 5, - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, adminAddr)), framework.WithPremine(adminAddr, targetAddr, otherAddr), framework.WithBridgeAllowListAdmin(adminAddr), framework.WithBridgeAllowListEnabled(otherAddr), diff --git a/e2e-polybft/e2e/bridge_test.go b/e2e-polybft/e2e/bridge_test.go index b339a5e23f..5f19c85260 100644 --- a/e2e-polybft/e2e/bridge_test.go +++ b/e2e-polybft/e2e/bridge_test.go @@ -84,9 +84,14 @@ func TestE2E_Bridge_Transfers(t *testing.T) { // bridge some tokens for first validator to child chain tokensToDeposit := ethgo.Ether(10) + erc20Txn := cluster.Deploy(t, senderAccount.Ecdsa, contractsapi.RootERC20.Bytecode) + require.NoError(t, erc20Txn.Wait()) + require.True(t, erc20Txn.Succeed()) + rootERC20Token := types.Address(erc20Txn.Receipt().ContractAddress) + require.NoError(t, cluster.Bridge.Deposit( common.ERC20, - polybftCfg.Bridge.RootNativeERC20Addr, + rootERC20Token, polybftCfg.Bridge.RootERC20PredicateAddr, bridgeHelper.TestAccountPrivKey, senderAccount.Address().String(), @@ -122,7 +127,7 @@ func TestE2E_Bridge_Transfers(t *testing.T) { // send a few transactions to the bridge require.NoError(t, cluster.Bridge.Deposit( common.ERC20, - polybftCfg.Bridge.RootNativeERC20Addr, + rootERC20Token, polybftCfg.Bridge.RootERC20PredicateAddr, bridgeHelper.TestAccountPrivKey, strings.Join(receivers[:], ","), @@ -233,7 +238,7 @@ func TestE2E_Bridge_Transfers(t *testing.T) { // assert that receiver's balances on RootERC20 smart contract are expected for _, receiver := range receivers { balance := erc20BalanceOf(t, types.StringToAddress(receiver), - polybftCfg.Bridge.RootNativeERC20Addr, rootchainTxRelayer) + rootERC20Token, rootchainTxRelayer) require.Equal(t, big.NewInt(amount), balance) } }) @@ -268,7 +273,7 @@ func TestE2E_Bridge_Transfers(t *testing.T) { // send two transactions to the bridge so that we have a minimal commitment require.NoError(t, cluster.Bridge.Deposit( common.ERC20, - polybftCfg.Bridge.RootNativeERC20Addr, + rootERC20Token, polybftCfg.Bridge.RootERC20PredicateAddr, bridgeHelper.TestAccountPrivKey, strings.Join(receivers[:depositsSubset], ","), @@ -295,7 +300,7 @@ func TestE2E_Bridge_Transfers(t *testing.T) { // send some more transactions to the bridge to build another commitment in epoch require.NoError(t, cluster.Bridge.Deposit( common.ERC20, - polybftCfg.Bridge.RootNativeERC20Addr, + rootERC20Token, polybftCfg.Bridge.RootERC20PredicateAddr, bridgeHelper.TestAccountPrivKey, strings.Join(receivers[depositsSubset:], ","), @@ -467,9 +472,6 @@ func TestE2E_Bridge_ERC721Transfer(t *testing.T) { stateSyncedLogsCount = 2 ) - minter, err := wallet.GenerateKey() - require.NoError(t, err) - receiverKeys := make([]string, transfersCount) receivers := make([]string, transfersCount) receiversAddrs := make([]types.Address, transfersCount) @@ -492,8 +494,6 @@ func TestE2E_Bridge_ERC721Transfer(t *testing.T) { cluster := framework.NewTestCluster(t, 5, framework.WithEpochSize(epochSize), - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, minter.Address())), - framework.WithPremine(types.Address(minter.Address())), framework.WithPremine(receiversAddrs...)) defer cluster.Stop() @@ -629,9 +629,6 @@ func TestE2E_Bridge_ERC1155Transfer(t *testing.T) { stateSyncedLogsCount = 2 ) - minter, err := wallet.GenerateKey() - require.NoError(t, err) - receiverKeys := make([]string, transfersCount) receivers := make([]string, transfersCount) receiversAddrs := make([]types.Address, transfersCount) @@ -657,8 +654,6 @@ func TestE2E_Bridge_ERC1155Transfer(t *testing.T) { cluster := framework.NewTestCluster(t, 5, framework.WithNumBlockConfirmations(0), framework.WithEpochSize(epochSize), - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, minter.Address())), - framework.WithPremine(types.Address(minter.Address())), framework.WithPremine(receiversAddrs...)) defer cluster.Stop() @@ -857,7 +852,6 @@ func TestE2E_Bridge_ChildChainMintableTokensTransfer(t *testing.T) { cluster := framework.NewTestCluster(t, 5, framework.WithNumBlockConfirmations(0), framework.WithEpochSize(epochSize), - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, adminAddr)), framework.WithBridgeBlockListAdmin(adminAddr), framework.WithPremine(append(depositors, adminAddr)...)) //nolint:makezero defer cluster.Stop() @@ -1209,14 +1203,9 @@ func TestE2E_Bridge_ChangeVotingPower(t *testing.T) { epochSize = 5 ) - minter, err := wallet.GenerateKey() - require.NoError(t, err) - cluster := framework.NewTestCluster(t, 5, framework.WithEpochSize(epochSize), framework.WithEpochReward(1000000), - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, minter.Address())), - framework.WithPremine(types.Address(minter.Address())), ) defer cluster.Stop() @@ -1341,6 +1330,7 @@ func TestE2E_Bridge_Transfers_AccessLists(t *testing.T) { framework.WithNumBlockConfirmations(0), framework.WithEpochSize(epochSize), framework.WithTestRewardToken(), + framework.WithRootTrackerPollInterval(3*time.Second), framework.WithBridgeAllowListAdmin(adminAddr), framework.WithBridgeBlockListAdmin(adminAddr), framework.WithSecretsCallback(func(a []types.Address, tcc *framework.TestClusterConfig) { @@ -1371,11 +1361,16 @@ func TestE2E_Bridge_Transfers_AccessLists(t *testing.T) { adminBalanceOnChild := ethgo.Ether(5) + erc20Txn := cluster.Deploy(t, admin, contractsapi.RootERC20.Bytecode) + require.NoError(t, erc20Txn.Wait()) + require.True(t, erc20Txn.Succeed()) + rootERC20Token := types.Address(erc20Txn.Receipt().ContractAddress) + // bridge some tokens for admin to child chain require.NoError( t, cluster.Bridge.Deposit( common.ERC20, - polybftCfg.Bridge.RootNativeERC20Addr, + rootERC20Token, polybftCfg.Bridge.RootERC20PredicateAddr, bridgeHelper.TestAccountPrivKey, adminAddr.String(), @@ -1402,14 +1397,14 @@ func TestE2E_Bridge_Transfers_AccessLists(t *testing.T) { require.NoError(t, err) require.Equal(t, adminBalanceOnChild, balance) - t.Run("bridge native (ERC 20) tokens", func(t *testing.T) { + t.Run("bridge ERC 20 tokens", func(t *testing.T) { // DEPOSIT ERC20 TOKENS // send a few transactions to the bridge require.NoError( t, cluster.Bridge.Deposit( common.ERC20, - polybftCfg.Bridge.RootNativeERC20Addr, + rootERC20Token, polybftCfg.Bridge.RootERC20PredicateAddr, bridgeHelper.TestAccountPrivKey, strings.Join(receivers[:], ","), @@ -1522,7 +1517,7 @@ func TestE2E_Bridge_Transfers_AccessLists(t *testing.T) { oldBalances := map[types.Address]*big.Int{} for _, receiver := range receivers { - balance := erc20BalanceOf(t, types.StringToAddress(receiver), polybftCfg.Bridge.RootNativeERC20Addr, rootchainTxRelayer) + balance := erc20BalanceOf(t, types.StringToAddress(receiver), rootERC20Token, rootchainTxRelayer) oldBalances[types.StringToAddress(receiver)] = balance } @@ -1534,299 +1529,9 @@ func TestE2E_Bridge_Transfers_AccessLists(t *testing.T) { // assert that receiver's balances on RootERC20 smart contract are expected for _, receiver := range receivers { - balance := erc20BalanceOf(t, types.StringToAddress(receiver), polybftCfg.Bridge.RootNativeERC20Addr, rootchainTxRelayer) + balance := erc20BalanceOf(t, types.StringToAddress(receiver), rootERC20Token, rootchainTxRelayer) require.Equal(t, oldBalances[types.StringToAddress(receiver)].Add( oldBalances[types.StringToAddress(receiver)], withdrawAmount), balance) } }) } - -func TestE2E_Bridge_Transfers_WithRootTrackerPollInterval(t *testing.T) { - var ( - numBlockConfirmations = uint64(2) - epochSize = 30 - sprintSize = uint64(5) - rootPollInterval = 5 * time.Second - numberOfAttempts = uint64(4) - stateSyncedLogsCount = 1 - ) - - cluster := framework.NewTestCluster(t, 5, - framework.WithEpochSize(epochSize), - framework.WithNumBlockConfirmations(numBlockConfirmations), - framework.WithRootTrackerPollInterval(rootPollInterval), - framework.WithTestRewardToken(), - ) - defer cluster.Stop() - - cluster.WaitForReady(t) - - polybftCfg, err := polybft.LoadPolyBFTConfig(path.Join(cluster.Config.TmpDir, chainConfigFileName)) - require.NoError(t, err) - - validatorSrv := cluster.Servers[0] - senderAccount, err := validatorHelper.GetAccountFromDir(validatorSrv.DataDir()) - require.NoError(t, err) - - childEthEndpoint := validatorSrv.JSONRPC().Eth() - - // bridge some tokens for first validator to child chain - tokensToDeposit := ethgo.Ether(10) - - require.NoError(t, cluster.Bridge.Deposit( - common.ERC20, - polybftCfg.Bridge.RootNativeERC20Addr, - polybftCfg.Bridge.RootERC20PredicateAddr, - bridgeHelper.TestAccountPrivKey, - senderAccount.Address().String(), - tokensToDeposit.String(), - "", - cluster.Bridge.JSONRPCAddr(), - bridgeHelper.TestAccountPrivKey, - false), - ) - - // wait for a couple of sprints - finalBlockNum := 5 * sprintSize - - // the transaction is processed and there should be a success event - var stateSyncedResult contractsapi.StateSyncResultEvent - - for i := uint64(0); i < numberOfAttempts; i++ { - logs, err := getFilteredLogs(stateSyncedResult.Sig(), 0, finalBlockNum+i*sprintSize, childEthEndpoint) - require.NoError(t, err) - - if len(logs) == stateSyncedLogsCount || i == numberOfAttempts-1 { - // assert that all deposits are executed successfully - checkStateSyncResultLogs(t, logs, stateSyncedLogsCount) - - break - } - - require.NoError(t, cluster.WaitForBlock(finalBlockNum+(i+1)*sprintSize, 2*time.Minute)) - } - - // check validator balance got increased by deposited amount - balance, err := childEthEndpoint.GetBalance(ethgo.Address(senderAccount.Address()), ethgo.Latest) - require.NoError(t, err) - - // because we premined the validators - expectedBalance := new(big.Int).Add(command.DefaultPremineBalance, tokensToDeposit) - require.Equal(t, expectedBalance, balance) -} - -func TestE2E_Bridge_NonMintableERC20Token_WithPremine(t *testing.T) { - var ( - numBlockConfirmations = uint64(2) - epochSize = 10 - sprintSize = uint64(5) - numberOfAttempts = uint64(4) - stateSyncedLogsCount = 2 - exitEventsCount = uint64(2) - tokensToTransfer = ethgo.Gwei(10) - bigZero = big.NewInt(0) - ) - - nonValidatorKey, err := wallet.GenerateKey() - require.NoError(t, err) - - nonValidatorKeyRaw, err := nonValidatorKey.MarshallPrivateKey() - require.NoError(t, err) - - // start cluster with default, non-mintable native erc20 root token - // with london fork enabled - cluster := framework.NewTestCluster(t, 5, - framework.WithEpochSize(epochSize), - framework.WithNumBlockConfirmations(numBlockConfirmations), - framework.WithTestRewardToken(), - framework.WithSecretsCallback(func(_ []types.Address, tcc *framework.TestClusterConfig) { - nonValidatorKeyString := hex.EncodeToString(nonValidatorKeyRaw) - - // do premine to a non validator address - tcc.Premine = append(tcc.Premine, - fmt.Sprintf("%s:%s:%s", - nonValidatorKey.Address(), - command.DefaultPremineBalance.String(), - nonValidatorKeyString)) - }), - ) - - rootchainTxRelayer, err := txrelayer.NewTxRelayer(txrelayer.WithIPAddress(cluster.Bridge.JSONRPCAddr())) - require.NoError(t, err) - - childEthEndpoint := cluster.Servers[0].JSONRPC().Eth() - - defer cluster.Stop() - - cluster.WaitForReady(t) - - polybftCfg, err := polybft.LoadPolyBFTConfig(path.Join(cluster.Config.TmpDir, chainConfigFileName)) - require.NoError(t, err) - - checkBalancesFn := func(address types.Address, rootExpected, childExpected *big.Int) { - t.Log("Checking balance of native ERC20 token on root and child", "Address", address, - "Root expected", rootExpected, "Child Expected", childExpected) - - balance := erc20BalanceOf(t, address, - polybftCfg.Bridge.RootNativeERC20Addr, rootchainTxRelayer) - t.Log("Balance of native ERC20 token on root", balance, "Address", address) - require.Equal(t, rootExpected, balance) - - balance, err = childEthEndpoint.GetBalance(ethgo.Address(address), ethgo.Latest) - require.NoError(t, err) - t.Log("Balance of native ERC20 token on child", balance, "Address", address) - require.True(t, balance.Cmp(childExpected) >= 0) // because of London fork - } - - t.Run("check the balances at the beginning", func(t *testing.T) { - // check the balances on root and child at the beginning to see if they are as expected - checkBalancesFn(types.Address(nonValidatorKey.Address()), bigZero, command.DefaultPremineBalance) - - for _, server := range cluster.Servers { - validatorAccount, err := validatorHelper.GetAccountFromDir(server.DataDir()) - require.NoError(t, err) - - checkBalancesFn(validatorAccount.Address(), bigZero, command.DefaultPremineBalance) - } - }) - - // this test case will check first if they can withdraw some of the premined amount of non-mintable token - t.Run("Do a withdraw for premined validator address and premined non-validator address", func(t *testing.T) { - validatorSrv := cluster.Servers[1] - validatorAcc, err := validatorHelper.GetAccountFromDir(validatorSrv.DataDir()) - require.NoError(t, err) - - validatorRawKey, err := validatorAcc.Ecdsa.MarshallPrivateKey() - require.NoError(t, err) - - err = cluster.Bridge.Withdraw( - common.ERC20, - hex.EncodeToString(validatorRawKey), - validatorAcc.Address().String(), - tokensToTransfer.String(), - "", - validatorSrv.JSONRPCAddr(), - contracts.ChildERC20PredicateContract, - contracts.NativeERC20TokenContract, - false) - require.NoError(t, err) - - validatorBalanceAfterWithdraw, err := childEthEndpoint.GetBalance( - ethgo.Address(validatorAcc.Address()), ethgo.Latest) - require.NoError(t, err) - - err = cluster.Bridge.Withdraw( - common.ERC20, - hex.EncodeToString(nonValidatorKeyRaw), - nonValidatorKey.Address().String(), - tokensToTransfer.String(), - "", - validatorSrv.JSONRPCAddr(), - contracts.ChildERC20PredicateContract, - contracts.NativeERC20TokenContract, - false) - require.NoError(t, err) - - nonValidatorBalanceAfterWithdraw, err := childEthEndpoint.GetBalance( - nonValidatorKey.Address(), ethgo.Latest) - require.NoError(t, err) - - currentBlock, err := childEthEndpoint.GetBlockByNumber(ethgo.Latest, false) - require.NoError(t, err) - - currentExtra, err := polybft.GetIbftExtra(currentBlock.ExtraData) - require.NoError(t, err) - - t.Logf("Latest block number: %d, epoch number: %d\n", currentBlock.Number, currentExtra.Checkpoint.EpochNumber) - - currentEpoch := currentExtra.Checkpoint.EpochNumber - - exitHelper := polybftCfg.Bridge.ExitHelperAddr - childJSONRPC := validatorSrv.JSONRPCAddr() - - successfulExitTransactions := make([]bool, exitEventsCount) - - for i := uint64(0); i < numberOfAttempts; i++ { - t.Log("Number of attempts: ", i+1) - - require.NoError(t, waitForRootchainEpoch(currentEpoch+i, 3*time.Minute, - rootchainTxRelayer, polybftCfg.Bridge.CheckpointManagerAddr)) - - for exitEventID := uint64(1); exitEventID <= exitEventsCount; exitEventID++ { - if successfulExitTransactions[exitEventID-1] { - continue - } - - // send exit transaction to exit helper - if err = cluster.Bridge.SendExitTransaction(exitHelper, exitEventID, childJSONRPC); err == nil { - successfulExitTransactions[exitEventID-1] = true - - continue - } - - if i == numberOfAttempts-1 { - require.NoError(t, err) - } - } - - allExitsSuccessfull := true - for _, isSuccessfull := range successfulExitTransactions { - if !isSuccessfull { - allExitsSuccessfull = false - - break - } - } - - if allExitsSuccessfull { - break - } - } - - // assert that receiver's balances on RootERC20 smart contract are expected - checkBalancesFn(validatorAcc.Address(), tokensToTransfer, validatorBalanceAfterWithdraw) - checkBalancesFn(types.Address(nonValidatorKey.Address()), tokensToTransfer, nonValidatorBalanceAfterWithdraw) - }) - - t.Run("Do a deposit to some validator and non-validator address", func(t *testing.T) { - validatorSrv := cluster.Servers[4] - validatorAcc, err := validatorHelper.GetAccountFromDir(validatorSrv.DataDir()) - require.NoError(t, err) - - require.NoError(t, cluster.Bridge.Deposit( - common.ERC20, - polybftCfg.Bridge.RootNativeERC20Addr, - polybftCfg.Bridge.RootERC20PredicateAddr, - bridgeHelper.TestAccountPrivKey, - strings.Join([]string{validatorAcc.Address().String(), nonValidatorKey.Address().String()}, ","), - strings.Join([]string{tokensToTransfer.String(), tokensToTransfer.String()}, ","), - "", - cluster.Bridge.JSONRPCAddr(), - bridgeHelper.TestAccountPrivKey, - false), - ) - - currentBlock, err := childEthEndpoint.GetBlockByNumber(ethgo.Latest, false) - require.NoError(t, err) - - // wait for a couple of sprints - finalBlockNum := currentBlock.Number + 5*sprintSize - - // the transaction is processed and there should be a success event - var stateSyncedResult contractsapi.StateSyncResultEvent - - for i := uint64(0); i < numberOfAttempts; i++ { - logs, err := getFilteredLogs(stateSyncedResult.Sig(), 0, finalBlockNum+i*sprintSize, childEthEndpoint) - require.NoError(t, err) - - if len(logs) == stateSyncedLogsCount || i == numberOfAttempts-1 { - // assert that all deposits are executed successfully - checkStateSyncResultLogs(t, logs, stateSyncedLogsCount) - - break - } - - require.NoError(t, cluster.WaitForBlock(finalBlockNum+(i+1)*sprintSize, 2*time.Minute)) - } - }) -} diff --git a/e2e-polybft/e2e/consensus_test.go b/e2e-polybft/e2e/consensus_test.go index c43340a201..53f9677e90 100644 --- a/e2e-polybft/e2e/consensus_test.go +++ b/e2e-polybft/e2e/consensus_test.go @@ -35,18 +35,12 @@ func TestE2E_Consensus_Basic(t *testing.T) { ) var ( - initMinterBalance = ethgo.Ether(4) - premineBalance = ethgo.Ether(2) + premineBalance = ethgo.Ether(2) ) - minter, err := wallet.GenerateKey() - require.NoError(t, err) - cluster := framework.NewTestCluster(t, 5, framework.WithEpochSize(epochSize), framework.WithTestRewardToken(), - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, minter.Address())), framework.WithSecretsCallback(func(addresses []types.Address, config *framework.TestClusterConfig) { - config.Premine = append(config.Premine, fmt.Sprintf("%s:%s", minter.Address(), initMinterBalance)) for _, a := range addresses { config.Premine = append(config.Premine, fmt.Sprintf("%s:%s", a, premineBalance)) } @@ -143,20 +137,14 @@ func TestE2E_Consensus_RegisterValidator(t *testing.T) { firstValidatorDataDir = fmt.Sprintf("test-chain-%d", validatorSetSize+1) // directory where the first validator secrets will be stored secondValidatorDataDir = fmt.Sprintf("test-chain-%d", validatorSetSize+2) // directory where the second validator secrets will be stored - initMinterBalance = ethgo.Ether(4e6) - premineBalance = ethgo.Ether(2e6) // 2M native tokens (so that we have enough balance to fund new validator) + premineBalance = ethgo.Ether(2e6) // 2M native tokens (so that we have enough balance to fund new validator) ) - minter, err := wallet.GenerateKey() - require.NoError(t, err) - // start cluster with 'validatorSize' validators cluster := framework.NewTestCluster(t, validatorSetSize, framework.WithEpochSize(epochSize), framework.WithEpochReward(int(ethgo.Ether(1).Uint64())), - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, minter.Address())), framework.WithSecretsCallback(func(addresses []types.Address, config *framework.TestClusterConfig) { - config.Premine = append(config.Premine, fmt.Sprintf("%s:%s", minter.Address(), initMinterBalance)) for _, a := range addresses { config.Premine = append(config.Premine, fmt.Sprintf("%s:%s", a, premineBalance)) } @@ -326,18 +314,12 @@ func TestE2E_Consensus_RegisterValidator(t *testing.T) { func TestE2E_Consensus_Validator_Unstake(t *testing.T) { var ( premineAmount = ethgo.Ether(10) - minterBalance = ethgo.Ether(1e6) ) - minter, err := wallet.GenerateKey() - require.NoError(t, err) - cluster := framework.NewTestCluster(t, 5, framework.WithEpochReward(int(ethgo.Ether(1).Uint64())), framework.WithEpochSize(5), - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, minter.Address())), framework.WithSecretsCallback(func(addresses []types.Address, config *framework.TestClusterConfig) { - config.Premine = append(config.Premine, fmt.Sprintf("%s:%d", minter.Address(), minterBalance)) for _, a := range addresses { config.Premine = append(config.Premine, fmt.Sprintf("%s:%d", a, premineAmount)) config.StakeAmounts = append(config.StakeAmounts, new(big.Int).Set(premineAmount)) @@ -468,10 +450,6 @@ func TestE2E_Consensus_MintableERC20NativeToken(t *testing.T) { validatorsAddrs := make([]types.Address, validatorCount) initValidatorsBalance := ethgo.Ether(1) - initMinterBalance := ethgo.Ether(100000) - - minter, err := wallet.GenerateKey() - require.NoError(t, err) // because we are using native token as reward wallet, and it has default premine balance initialTotalSupply := new(big.Int).Set(command.DefaultPremineBalance) @@ -479,12 +457,9 @@ func TestE2E_Consensus_MintableERC20NativeToken(t *testing.T) { cluster := framework.NewTestCluster(t, validatorCount, framework.WithNativeTokenConfig( - fmt.Sprintf("%s:%s:%d:true:%s", tokenName, tokenSymbol, decimals, minter.Address())), + fmt.Sprintf("%s:%s:%d", tokenName, tokenSymbol, decimals)), framework.WithEpochSize(epochSize), framework.WithSecretsCallback(func(addrs []types.Address, config *framework.TestClusterConfig) { - config.Premine = append(config.Premine, fmt.Sprintf("%s:%d", minter.Address(), initMinterBalance)) - initialTotalSupply.Add(initialTotalSupply, initMinterBalance) - for i, addr := range addrs { config.Premine = append(config.Premine, fmt.Sprintf("%s:%d", addr, initValidatorsBalance)) config.StakeAmounts = append(config.StakeAmounts, new(big.Int).Set(initValidatorsBalance)) @@ -498,6 +473,9 @@ func TestE2E_Consensus_MintableERC20NativeToken(t *testing.T) { cluster.WaitForReady(t) + nativeTokenAdmin, err := validatorHelper.GetAccountFromDir(cluster.Servers[0].DataDir()) + require.NoError(t, err) + // initialize tx relayer relayer, err := txrelayer.NewTxRelayer(txrelayer.WithClient(targetJSONRPC)) require.NoError(t, err) @@ -523,7 +501,7 @@ func TestE2E_Consensus_MintableERC20NativeToken(t *testing.T) { mintFn, exists := contractsapi.NativeERC20.Abi.Methods["mint"] require.True(t, exists) - mintAmount := ethgo.Ether(10) + mintAmount := ethgo.Gwei(1) nativeTokenAddr := ethgo.Address(contracts.NativeERC20TokenContract) // make sure minter account can mint tokens @@ -540,7 +518,7 @@ func TestE2E_Consensus_MintableERC20NativeToken(t *testing.T) { To: &nativeTokenAddr, Input: mintInput, Type: ethgo.TransactionDynamicFee, - }, minter) + }, nativeTokenAdmin.Ecdsa) require.NoError(t, err) require.Equal(t, uint64(types.ReceiptSuccess), receipt.Status) @@ -552,9 +530,9 @@ func TestE2E_Consensus_MintableERC20NativeToken(t *testing.T) { } // assert that minter balance remained the same - minterBalance, err := targetJSONRPC.Eth().GetBalance(minter.Address(), ethgo.Latest) + minterBalance, err := targetJSONRPC.Eth().GetBalance(ethgo.Address(nativeTokenAdmin.Address()), ethgo.Latest) require.NoError(t, err) - require.Equal(t, initMinterBalance, minterBalance) + require.Equal(t, initValidatorsBalance, minterBalance) // try sending mint transaction from non minter account and make sure it would fail nonMinterAcc, err := validatorHelper.GetAccountFromDir(cluster.Servers[1].DataDir()) diff --git a/e2e-polybft/e2e/jsonrpc_test.go b/e2e-polybft/e2e/jsonrpc_test.go index a8382eff36..e6b5064c86 100644 --- a/e2e-polybft/e2e/jsonrpc_test.go +++ b/e2e-polybft/e2e/jsonrpc_test.go @@ -1,7 +1,6 @@ package e2e import ( - "fmt" "math/big" "testing" @@ -26,7 +25,6 @@ func TestE2E_JsonRPC(t *testing.T) { require.NoError(t, err) cluster := framework.NewTestCluster(t, 4, - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, acct.Address())), framework.WithPremine(types.Address(acct.Address())), ) defer cluster.Stop() diff --git a/e2e-polybft/e2e/txpool_test.go b/e2e-polybft/e2e/txpool_test.go index 068be71f0d..52fd058247 100644 --- a/e2e-polybft/e2e/txpool_test.go +++ b/e2e-polybft/e2e/txpool_test.go @@ -1,7 +1,6 @@ package e2e import ( - "fmt" "math/big" "sync" "testing" @@ -25,7 +24,6 @@ func TestE2E_TxPool_Transfer(t *testing.T) { require.NoError(t, err) cluster := framework.NewTestCluster(t, 5, - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, sender.Address())), framework.WithPremine(types.Address(sender.Address()))) defer cluster.Stop() @@ -100,7 +98,6 @@ func TestE2E_TxPool_Transfer_Linear(t *testing.T) { // first account should have some matics premined cluster := framework.NewTestCluster(t, 5, - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, premine.Address())), framework.WithPremine(types.Address(premine.Address())), ) defer cluster.Stop() @@ -188,7 +185,6 @@ func TestE2E_TxPool_TransactionWithHeaderInstructions(t *testing.T) { require.NoError(t, err) cluster := framework.NewTestCluster(t, 4, - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, sidechainKey.Address())), framework.WithPremine(types.Address(sidechainKey.Address())), ) defer cluster.Stop() @@ -234,7 +230,6 @@ func TestE2E_TxPool_BroadcastTransactions(t *testing.T) { // First account should have some matics premined cluster := framework.NewTestCluster(t, 5, - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, sender.Address())), framework.WithPremine(types.Address(sender.Address())), ) defer cluster.Stop() diff --git a/e2e-polybft/framework/test-bridge.go b/e2e-polybft/framework/test-bridge.go index 51e6f32117..d2a1f957ea 100644 --- a/e2e-polybft/framework/test-bridge.go +++ b/e2e-polybft/framework/test-bridge.go @@ -352,16 +352,13 @@ func (t *TestBridge) fundAddressesOnRoot(tokenConfig *polybft.TokenConfig, polyb // then fund all other addresses if token is non-mintable // so that they can do premine on SupernetMAnager - if tokenConfig.IsMintable || len(t.clusterConfig.Premine) == 0 { + if len(t.clusterConfig.Premine) == 0 { return nil } // non-validator addresses don't need to mint stake token, // they only need to be funded with root token - args := []string{ - "bridge", - "fund", - } + args := []string{"bridge", "fund"} for _, premineRaw := range t.clusterConfig.Premine { premineInfo, err := cmdHelper.ParsePremineInfo(premineRaw) @@ -521,123 +518,3 @@ func (t *TestBridge) FundValidators(tokenAddress types.Address, secretsPaths []s return nil } - -func (t *TestBridge) mintNativeRootToken(validatorAddresses []types.Address, tokenConfig *polybft.TokenConfig, - polybftConfig polybft.PolyBFTConfig) error { - if tokenConfig.IsMintable { - // if token is mintable, it is premined in genesis command, - // so we just return here - return nil - } - - // if token is non-mintable, then to do premine we first need to mint those tokens - // to validators and other provided addresses - args := []string{ - "bridge", - "mint-erc20", - "--jsonrpc", t.JSONRPCAddr(), - "--erc20-token", polybftConfig.Bridge.RootNativeERC20Addr.String(), - } - - // mint something for every validator - for _, addr := range validatorAddresses { - args = append(args, "--addresses", addr.String()) - args = append(args, "--amounts", command.DefaultPremineBalance.String()) - } - - // mint something to others as well - for _, premineRaw := range t.clusterConfig.Premine { - premineInfo, err := cmdHelper.ParsePremineInfo(premineRaw) - if err != nil { - return err - } - - args = append(args, "--addresses", premineInfo.Address.String()) - args = append(args, "--amounts", premineInfo.Amount.String()) - } - - return t.cmdRun(args...) -} - -func (t *TestBridge) premineNativeRootToken(tokenConfig *polybft.TokenConfig, - polybftConfig polybft.PolyBFTConfig) error { - if tokenConfig.IsMintable { - // if token is mintable, it is premined in genesis command, - // so we just return here - return nil - } - - validatorSecrets, err := genesis.GetValidatorKeyFiles(t.clusterConfig.TmpDir, t.clusterConfig.ValidatorPrefix) - if err != nil { - return fmt.Errorf("could not get validator secrets on premining native root"+ - " token for genesis validators: %w", err) - } - - premineCmdArgs := func(secret, key string, amount *big.Int) error { - args := []string{ - "bridge", - "premine", - "--jsonrpc", t.JSONRPCAddr(), - "--supernet-manager", polybftConfig.Bridge.CustomSupernetManagerAddr.String(), - "--amount", amount.String(), - "--erc20-token", polybftConfig.Bridge.RootNativeERC20Addr.String(), - "--root-erc20-predicate", polybftConfig.Bridge.RootERC20PredicateAddr.String(), - } - - if secret != "" { - args = append(args, "--"+polybftsecrets.AccountDirFlag, path.Join(t.clusterConfig.TmpDir, secret)) - } else { - args = append(args, "--private-key", key) - } - - return t.cmdRun(args...) - } - - g, ctx := errgroup.WithContext(context.Background()) - - // premine validators - for _, secret := range validatorSecrets { - secret := secret - - g.Go(func() error { - select { - case <-ctx.Done(): - return ctx.Err() - default: - if err := premineCmdArgs(secret, "", command.DefaultPremineBalance); err != nil { - return fmt.Errorf("failed to do premine of native root token for genesis validator: %w", - err) - } - - return nil - } - }) - } - - // now premine for other addresses - for _, premineRaw := range t.clusterConfig.Premine { - premineRaw := premineRaw - - g.Go(func() error { - select { - case <-ctx.Done(): - return ctx.Err() - default: - premineInfo, err := cmdHelper.ParsePremineInfo(premineRaw) - if err != nil { - return fmt.Errorf("failed to do premine of native root token for non-validator"+ - " account: %w. premine raw: %s", err, premineRaw) - } - - if err := premineCmdArgs("", premineInfo.Key, premineInfo.Amount); err != nil { - return fmt.Errorf("failed to do premine of native root token for "+ - "non-validator account: %w. premine raw: %s", err, premineRaw) - } - - return nil - } - }) - } - - return g.Wait() -} diff --git a/e2e-polybft/framework/test-cluster.go b/e2e-polybft/framework/test-cluster.go index be447ecc5c..8bb8cd3b68 100644 --- a/e2e-polybft/framework/test-cluster.go +++ b/e2e-polybft/framework/test-cluster.go @@ -50,7 +50,7 @@ const ( nonValidatorPrefix = "test-non-validator-" // NativeTokenMintableTestCfg is the test native token config for Supernets originated native tokens - NativeTokenMintableTestCfg = "Mintable Edge Coin:MEC:18:true:%s" //nolint:gosec + NativeTokenMintableTestCfg = "Mintable Edge Coin:MEC:18" //nolint:gosec ) type NodeType int @@ -494,6 +494,7 @@ func NewTestCluster(t *testing.T, validatorsCount int, opts ...ClusterOption) *T "--premine", "0x0000000000000000000000000000000000000000", "--reward-wallet", testRewardWalletAddr.String(), "--trieroot", cluster.Config.InitialStateRoot.String(), + "--blade-admin", addresses[0].String(), // we put first validator as owner by default } if cluster.Config.BlockTime != 0 { @@ -515,10 +516,7 @@ func NewTestCluster(t *testing.T, validatorsCount int, opts ...ClusterOption) *T args = append(args, "--native-token-config", cluster.Config.NativeTokenConfigRaw) } - tokenConfig, err := polybft.ParseRawTokenConfig(cluster.Config.NativeTokenConfigRaw) - require.NoError(t, err) - - if len(cluster.Config.Premine) != 0 && tokenConfig.IsMintable { + if len(cluster.Config.Premine) != 0 { // only add premine flags in genesis if token is mintable for _, premine := range cluster.Config.Premine { args = append(args, "--premine", premine) diff --git a/e2e-polybft/property/property_test.go b/e2e-polybft/property/property_test.go index 1feb7bd3dc..28c518c7e1 100644 --- a/e2e-polybft/property/property_test.go +++ b/e2e-polybft/property/property_test.go @@ -9,7 +9,6 @@ import ( "time" "github.com/stretchr/testify/require" - "github.com/umbracle/ethgo/wallet" "pgregory.net/rapid" "github.com/0xPolygon/polygon-edge/e2e-polybft/framework" @@ -22,9 +21,6 @@ func TestProperty_DifferentVotingPower(t *testing.T) { maxStake = 20 ) - minter, err := wallet.GenerateKey() - require.NoError(t, err) - rapid.Check(t, func(tt *rapid.T) { var ( numNodes = rapid.Uint64Range(5, 8).Draw(tt, "number of cluster nodes") @@ -44,7 +40,6 @@ func TestProperty_DifferentVotingPower(t *testing.T) { cluster := framework.NewPropertyTestCluster(t, int(numNodes), framework.WithEpochSize(epochSize), framework.WithBlockTime(blockTime), - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, minter.Address())), framework.WithSecretsCallback(func(adresses []types.Address, config *framework.TestClusterConfig) { for i := range adresses { config.StakeAmounts = append(config.StakeAmounts, stakes[i]) @@ -65,9 +60,6 @@ func TestProperty_DropValidators(t *testing.T) { blockTime = time.Second * 4 ) - minter, err := wallet.GenerateKey() - require.NoError(t, err) - rapid.Check(t, func(tt *rapid.T) { var ( numNodes = rapid.Uint64Range(5, 8).Draw(tt, "number of cluster nodes") @@ -77,7 +69,6 @@ func TestProperty_DropValidators(t *testing.T) { cluster := framework.NewPropertyTestCluster(t, int(numNodes), framework.WithEpochSize(epochSize), framework.WithBlockTime(blockTime), - framework.WithNativeTokenConfig(fmt.Sprintf(framework.NativeTokenMintableTestCfg, minter.Address())), framework.WithSecretsCallback(func(adresses []types.Address, config *framework.TestClusterConfig) { for range adresses { config.StakeAmounts = append(config.StakeAmounts, big.NewInt(20))