diff --git a/blade-contracts b/blade-contracts index de28a0459..f924dc223 160000 --- a/blade-contracts +++ b/blade-contracts @@ -1 +1 @@ -Subproject commit de28a0459a0c218b5696a452b5751db2b19790f6 +Subproject commit f924dc223a74e93be7b39ae7f6fa280705d0718b diff --git a/bridge-relayer/helper.go b/bridge-relayer/helper.go new file mode 100644 index 000000000..136412b21 --- /dev/null +++ b/bridge-relayer/helper.go @@ -0,0 +1,191 @@ +package bridgerelayer + +import ( + "fmt" + "math/big" + + "github.com/0xPolygon/polygon-edge/consensus/polybft/contractsapi" + "github.com/0xPolygon/polygon-edge/contracts" + "github.com/0xPolygon/polygon-edge/helper/hex" + "github.com/0xPolygon/polygon-edge/txrelayer" + "github.com/0xPolygon/polygon-edge/types" + "github.com/Ethernal-Tech/ethgo" +) + +func GetBridgeBatchesFromNumber(batchID *big.Int, + internalRelayer txrelayer.TxRelayer) ([]contractsapi.SignedBridgeMessageBatch, error) { + funcName := "getCommittedBatches" + + getCommittedBatchFn := contractsapi.BridgeStorage.Abi.GetMethod(funcName) + if getCommittedBatchFn == nil { + return nil, fmt.Errorf("failed to resolve %s function", funcName) + } + + encode, err := getCommittedBatchFn.Encode([]interface{}{batchID}) + if err != nil { + return nil, err + } + + response, err := internalRelayer.Call(types.ZeroAddress, contracts.BridgeStorageContract, encode) + if err != nil { + return nil, err + } + + byteResponse, err := hex.DecodeHex(response) + if err != nil { + return nil, fmt.Errorf("unable to decode hex response, %w", err) + } + + decoded, err := getCommittedBatchFn.Outputs.Decode(byteResponse) + if err != nil { + return nil, err + } + + decodedSlice, ok := decoded.(map[string]interface{})["0"].([]map[string]interface{}) + if !ok { + return nil, fmt.Errorf("could not convert decoded output to slice") + } + + signedBridgeBatches := make([]contractsapi.SignedBridgeMessageBatch, len(decodedSlice)) + + for i, v := range decodedSlice { + decodeRootHash, ok := v["rootHash"].([32]uint8) + if !ok { + return nil, fmt.Errorf("invalid format of the root hash") + } + + decodedStartID, ok := v["startId"].(*big.Int) + if !ok { + return nil, fmt.Errorf("invalid format of the start ID") + } + + decodedEndID, ok := v["endId"].(*big.Int) + if !ok { + return nil, fmt.Errorf("invalid format of the end ID") + } + + decodedSourceChainID, ok := v["sourceChainId"].(*big.Int) + if !ok { + return nil, fmt.Errorf("invalid format of the source chain ID") + } + + decodedDestinationChainID, ok := v["destinationChainId"].(*big.Int) + if !ok { + return nil, fmt.Errorf("invalid format of the destination chain ID") + } + + decodedBitmap, ok := v["bitmap"].([]byte) + if !ok { + return nil, fmt.Errorf("invalid format of the bitmap") + } + + decodedThreshold, ok := v["threshold"].(*big.Int) + if !ok { + return nil, fmt.Errorf("invalid format of the threshold") + } + + decodedIsRollback, ok := v["isRollback"].(bool) + if !ok { + return nil, fmt.Errorf("invalid format of the rollback flag") + } + + decodedSignature, ok := v["signature"].([2]*big.Int) + if !ok { + return nil, fmt.Errorf("invalid format of the signature") + } + + signedBridgeBatches[i] = contractsapi.SignedBridgeMessageBatch{ + RootHash: decodeRootHash, + StartID: decodedStartID, + EndID: decodedEndID, + SourceChainID: decodedSourceChainID, + DestinationChainID: decodedDestinationChainID, + Signature: decodedSignature, + Bitmap: decodedBitmap, + Threshold: decodedThreshold, + IsRollback: decodedIsRollback, + } + } + + return signedBridgeBatches, nil +} + +func GetBridgeMessagesInRange(startID, endID *big.Int, txrelayer txrelayer.TxRelayer, + gatewayContract types.Address) ([]*contractsapi.BridgeMessage, error) { + funcName := "getMessagesInRange" + + getCommittedBatchFn := contractsapi.Gateway.Abi.GetMethod(funcName) + if getCommittedBatchFn == nil { + return nil, fmt.Errorf("failed to resolve %s function", funcName) + } + + encode, err := getCommittedBatchFn.Encode([]interface{}{startID, endID}) + if err != nil { + return nil, err + } + + response, err := txrelayer.Call(types.ZeroAddress, gatewayContract, encode) + if err != nil { + return nil, err + } + + byteResponse, err := hex.DecodeHex(response) + if err != nil { + return nil, fmt.Errorf("unable to decode hex response, %w", err) + } + + decoded, err := getCommittedBatchFn.Outputs.Decode(byteResponse) + if err != nil { + return nil, err + } + + decodedSlice, ok := decoded.(map[string]interface{})["0"].([]map[string]interface{}) + if !ok { + return nil, fmt.Errorf("could not convert decoded output to slice") + } + + bridgeMessages := make([]*contractsapi.BridgeMessage, len(decodedSlice)) + + for i, v := range decodedSlice { + decodedID, ok := v["id"].(*big.Int) + if !ok { + return nil, fmt.Errorf("invalid format of the root hash") + } + + decodedSourceChainID, ok := v["sourceChainId"].(*big.Int) + if !ok { + return nil, fmt.Errorf("invalid format of the source chain ID") + } + + decodedDestinationChainID, ok := v["destinationChainId"].(*big.Int) + if !ok { + return nil, fmt.Errorf("invalid format of the destination chain ID") + } + + decodedSender, ok := v["sender"].(ethgo.Address) + if !ok { + return nil, fmt.Errorf("invalid format of the sender") + } + + decodedReceiver, ok := v["receiver"].(ethgo.Address) + if !ok { + return nil, fmt.Errorf("invalid format of the receiver") + } + + decodedPayload, ok := v["payload"].([]byte) + if !ok { + return nil, fmt.Errorf("invalid format of the payload") + } + + bridgeMessages[i] = &contractsapi.BridgeMessage{ + ID: decodedID, + SourceChainID: decodedSourceChainID, + DestinationChainID: decodedDestinationChainID, + Sender: types.Address(decodedSender), + Receiver: types.Address(decodedReceiver), + Payload: decodedPayload, + } + } + + return bridgeMessages, nil +} diff --git a/bridge-relayer/relayer.go b/bridge-relayer/relayer.go new file mode 100644 index 000000000..4b34e6bd0 --- /dev/null +++ b/bridge-relayer/relayer.go @@ -0,0 +1,587 @@ +package bridgerelayer + +import ( + "crypto/ecdsa" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "math/big" + "net/url" + "os" + "time" + + bolt "go.etcd.io/bbolt" + + "github.com/0xPolygon/polygon-edge/chain" + "github.com/0xPolygon/polygon-edge/consensus/polybft/config" + "github.com/0xPolygon/polygon-edge/consensus/polybft/contractsapi" + "github.com/0xPolygon/polygon-edge/contracts" + "github.com/0xPolygon/polygon-edge/crypto" + "github.com/0xPolygon/polygon-edge/txrelayer" + "github.com/btcsuite/btcd/btcec/v2" + "github.com/hashicorp/go-hclog" + + "github.com/0xPolygon/polygon-edge/types" +) + +// BridgeRelayer represents a relayer instance responsible for managing +// the token transfer process between an internal (Blade) and an EVM-based +// external blockchain network. It operates bidirectionaly and exclusively +// for one internal-external chain relation. +type BridgeRelayer struct { + // internalChainRPC denotes the RPC endpoint of the internal blockchain + // network (Blade). + internalRPCAddr string + + // internalClient is a transaction relayer instance used for interacting + // with the internal blockchain network (Blade). It manages transaction + // submissions and queries, facilitating communication with the internal + // network. + internalClient txrelayer.TxRelayer + + // externalRPCAddr denotes the RPC endpoint of the external EVM-based + // blockchain network. + externalRPCAddr string + + // externalClient is a transaction relayer instance used for interacting + // with the external EVM-based blockchain network. It manages transaction + // submissions and queries, facilitating communication with the external + // network. + externalClient txrelayer.TxRelayer + + // externalChainID represents the unique ID of the external network. + externalChainID *big.Int + + // bridgeStorageAddr contains the address of the Bridge Storage contract. + bridgeStorageAddr types.Address + + // internalGatewayAddr contains the address of the Gateway contract on + // the internal blockchain network. + internalGatewayAddr types.Address + + // externalGatewayAddr contains the address of the Gateway contract on + // the external blockchain network. + externalGatewayAddr types.Address + + // pollInterval specifies the frequency at which the relayer polls for + // new token-transfer events and processes them if any are found. + pollInterval time.Duration + + // privateKey denotes the relayer's private key used to sign transactions. + // The address derived from it represents the one to which the relayer + // will receive the reward for successfully completed transfers. + privateKey *crypto.ECDSAKey + + // db is a BoltDB instance used for (persistent) local storage. + db *bolt.DB + + // he logger is an instance of the hclog logging library. + // used to handle application logging. + logger hclog.Logger +} + +type BridgeRelayerOption func(*options) error + +// options encapsulates all the configuration settings that can be used when +// creating a new bridge relayer. All fields are pointers, thus it is easy to +// make a difference between client-provided and default values. If a field +// is non-nil, it indicates that the client provided a value; otherwise, the +// default value should be used. +// +// An alternative would be to use non-pointer fields with prepopulated default +// values, but this approach is less suitable in our case due to the complexity +// of some defaults. For example, determining the RPC address of an external +// chain would require fetching (from the internal chain or local storage) and +// parsing genesis data, which can be resource-intensive. Out approach ensures +// that unnecessary computations are avoided when client-provided values are +// available. +// +// Additionally, a hybrid approach could mix pointer and non-pointer fields. +// However, for consistency, we keep all fields as pointers in our design. +type options struct { + externalRPCAddr *string + externalChainID *uint64 + genesisPath *string + bridgeStorageAddr *types.Address + internalGatewayAddr *types.Address + externalGatewayAddr *types.Address + pollInterval *time.Duration + privateKey *string + dbPath *string + logLevel hclog.Level + jsonLogFormat bool + logDir string +} + +// WithExternalRPCAddr configures the relayer to use the specified RPC address +// for communication with an external blockchain network. The address must be +// a valid URL with scheme and host. +func WithExternalRPCAddr(address string) BridgeRelayerOption { + return func(o *options) error { + if address == "" { + return fmt.Errorf("external RPC address cannot be empty") + } + + if _, err := url.Parse(address); err != nil { + return fmt.Errorf("invalid external RPC address format: %w", err) + } + + o.externalRPCAddr = &address + + return nil + } +} + +// WithExternalChainID configures the relayer to use the specified chain ID +// for an external blockchain network. The chain ID must be a positive integer +// and is used to identify the network (e.g., 1 for Ethereum mainnet). +func WithExternalChainID(chainID uint64) BridgeRelayerOption { + return func(o *options) error { + if chainID <= 0 { + return fmt.Errorf("external chain ID must be a positive number") + } + + o.externalChainID = &chainID + + return nil + } +} + +// WithGenesisPath configures the relayer to use the specified path to read the +// genesis of the internal chain from local storage and obtain all the necessary +// information. Path must be specified as a relative to the executable's location. +// The genesis file must exist and be readable at the specified path. +func WithGenesisPath(path string) BridgeRelayerOption { + return func(o *options) error { + if path == "" { + return fmt.Errorf("genesis file path cannot be empty") + } + + fileInfo, err := os.Stat(path) + if err != nil { + if os.IsNotExist(err) { + return fmt.Errorf("genesis file not found at path: %s", path) + } + + return fmt.Errorf("error accessing genesis file: %w", err) + } + + if fileInfo.IsDir() { + return fmt.Errorf("specified path is a directory, expected a file: %s", path) + } + + file, err := os.Open(path) + if err != nil { + return fmt.Errorf("genesis file is not readable: %w", err) + } + + file.Close() + + o.genesisPath = &path + + return nil + } +} + +// WithBridgeStorageAddr configures the relayer to use the specified address +// as an address of the Bridge Storage smart contract. +func WithBridgeStorageAddr(address types.Address) BridgeRelayerOption { + return func(o *options) error { + o.bridgeStorageAddr = &address + + return nil + } +} + +// WithInternalGatewayCAddr configures the relayer to use the specified address +// as an address of the Gateway smart contract on the internal (Blade) chain. +func WithInternalGatewayCAddr(address types.Address) BridgeRelayerOption { + return func(o *options) error { + o.internalGatewayAddr = &address + + return nil + } +} + +// WithExternalGatewayAddr configures the relayer to use the specified address +// as an address of the Gateway smart contract on the external chain. +func WithExternalGatewayAddr(address types.Address) BridgeRelayerOption { + return func(o *options) error { + o.externalGatewayAddr = &address + + return nil + } +} + +// WithPollInterval configures the relayer to use the specified time interval +// as the frequency at which the relayer polls for new token-transfer events +// and processes them if any are found. The interval must be between 1 second +// and 10 minutes to prevent both excessive polling and unreasonably delays. +func WithPollInterval(interval time.Duration) BridgeRelayerOption { + return func(o *options) error { + const ( + minInterval = 1 * time.Second + maxInterval = 10 * time.Minute + ) + + if interval < minInterval { + return fmt.Errorf("poll interval too short, it must be at least 1 second") + } + + if interval > maxInterval { + return fmt.Errorf("poll interval too long, it must be less than 10 minutes") + } + + o.pollInterval = &interval + + return nil + } +} + +// WithDBPath configures the relayer to use the Bolt DB at the specified path +// as persistent storage for token cross-chain transfer information. In case +// Bolt DB already exists, it will be used; otherwise, a new database at the +// specified path will be created. Path must be specified as a relative to the +// executable's location. +func WithDBPath(path string) BridgeRelayerOption { + return func(o *options) error { + if path == "" { + return fmt.Errorf("database path cannot be empty") + } + + o.dbPath = &path + + return nil + } +} + +func WithLogLevel(level hclog.Level) BridgeRelayerOption { + return func(options *options) error { + options.logLevel = level + + return nil + } +} + +func WithLogJsonFormat(jsonFormat bool) BridgeRelayerOption { + return func(options *options) error { + options.jsonLogFormat = jsonFormat + + return nil + } +} + +func WithLogDir(logDir string) BridgeRelayerOption { + return func(options *options) error { + options.logDir = logDir + + return nil + } +} + +func NewBridgeRelayer(internalRPCAddr string, privateKey string, opts ...BridgeRelayerOption) (*BridgeRelayer, error) { + errFunc := func(err error) error { + return fmt.Errorf("cannot create a new bridge relayer: %w", err) + } + + relayer := &BridgeRelayer{} + + txRelayer, err := txrelayer.NewTxRelayer(txrelayer.WithIPAddress(internalRPCAddr)) + if err != nil { + return nil, errFunc(err) + } + + relayer.internalRPCAddr = internalRPCAddr + relayer.internalClient = txRelayer + + //default options + sopts := &options{ + logDir: "", + logLevel: hclog.Info, + jsonLogFormat: false, + } + + for _, option := range opts { + err := option(sopts) + + if err != nil { + return nil, errFunc(err) + } + } + + chainConfig, err := chain.ImportFromFile(*sopts.genesisPath) + if err != nil { + return nil, errFunc(err) + } + + consensusConfig, err := config.GetPolyBFTConfig(chainConfig.Params) + if err != nil { + return nil, errFunc(err) + } + + bridgeConfig := consensusConfig.Bridge[*sopts.externalChainID] + + txRelayer, err = txrelayer.NewTxRelayer(txrelayer.WithIPAddress(bridgeConfig.JSONRPCEndpoint)) + if err != nil { + return nil, errFunc(err) + } + + relayer.externalRPCAddr = bridgeConfig.JSONRPCEndpoint + relayer.externalClient = txRelayer + + relayer.externalChainID = big.NewInt(int64(*sopts.externalChainID)) + + // address of the bridge storage should also be read from the genesis + relayer.bridgeStorageAddr = contracts.BridgeStorageContract + relayer.internalGatewayAddr = bridgeConfig.InternalGatewayAddr + relayer.externalGatewayAddr = bridgeConfig.ExternalGatewayAddr + + relayer.pollInterval = time.Second * 5 + + pkBytes, err := hex.DecodeString(privateKey) + if err != nil { + return nil, errFunc(err) + } + + x, y := btcec.S256().ScalarBaseMult(pkBytes) + + pk := &ecdsa.PrivateKey{ + D: new(big.Int).SetBytes(pkBytes), + PublicKey: ecdsa.PublicKey{ + Curve: btcec.S256(), + X: x, + Y: y, + }, + } + + logger, err := newLoggerFromConfig(sopts) + if err != nil { + return nil, err + } + + relayer.logger = logger + + relayer.privateKey = crypto.NewECDSAKey(pk) + + if sopts.dbPath == nil { + relayer.db, err = bolt.Open("bridge-relayer.db", 0600, nil) + } else { + relayer.db, err = bolt.Open(*sopts.dbPath, 0600, nil) + } + + if err != nil { + return nil, errFunc(err) + } + + err = relayer.db.Update(func(tx *bolt.Tx) error { + _, err := tx.CreateBucketIfNotExists([]byte("lastBridgedBucket")) + if err != nil { + return err + } + + return nil + }) + + if err != nil { + return nil, errFunc(err) + } + + return relayer, nil +} + +func (r *BridgeRelayer) Start() { + var lastBridged = big.NewInt(-1) + + key := []byte{'l', 'a', 's', 't'} + + err := r.db.Update(func(tx *bolt.Tx) error { + bucket := tx.Bucket([]byte("lastBridgedBucket")) + + if bucket == nil { + return errors.New("cannot find a bucket with the `lastBridgedBucket` name") + } + + value := bucket.Get(key) + + if value != nil { + var temp string + if err := json.Unmarshal(value, &temp); err != nil { + return err + } + + if _, ok := lastBridged.SetString(temp, 10); !ok { + return errors.New("cannot set lastBridge correctly") + } + } + + return nil + }) + + if err != nil { + fmt.Println(err) + + return + } + + t := time.NewTicker(r.pollInterval) + + r.logger.Info("Starting the bridge relayer", "start batch id", lastBridged.String()) + + for { + select { + case <-t.C: + r.logger.Info("Trying to get a batches", "the id higher than", lastBridged.String()) + batches, err := GetBridgeBatchesFromNumber(big.NewInt(0).Add(lastBridged, big.NewInt(1)), r.internalClient) + if err != nil { + r.logger.Error("failed to get batches from BridgeStorage contract", "err", err) + + continue + } else if len(batches) == 0 { + r.logger.Info("Cannot find a new batches") + + continue + } else { + r.logger.Info("Found", len(batches), "new batches") + } + + for i, batch := range batches { + r.logger.Info("Found batch with id", big.NewInt(0).Add(lastBridged, big.NewInt(int64(1))), "events start-id", + batch.StartID.String(), "events end-id", + batch.EndID.String(), "is rollback batch", batch.IsRollback) + + var ( + sourceRelayer txrelayer.TxRelayer + sourceGateway types.Address + destinationRelayer txrelayer.TxRelayer + destinationGateway types.Address + ) + + if batch.SourceChainID.Cmp(r.externalChainID) == 0 { + sourceGateway = r.externalGatewayAddr + sourceRelayer = r.externalClient + + destinationGateway = r.internalGatewayAddr + destinationRelayer = r.internalClient + + if batch.IsRollback { + destinationGateway = r.externalGatewayAddr + destinationRelayer = r.externalClient + } + } else { + sourceGateway = r.internalGatewayAddr + sourceRelayer = r.internalClient + + destinationGateway = r.externalGatewayAddr + destinationRelayer = r.externalClient + + if batch.IsRollback { + destinationGateway = r.internalGatewayAddr + destinationRelayer = r.internalClient + } + } + + messages, err := GetBridgeMessagesInRange(batches[i].StartID, batches[i].EndID, sourceRelayer, sourceGateway) + if err != nil { + r.logger.Error("failed to get messages from source gateway contract", "err", err) + + continue + } + + input, err := (&contractsapi.ReceiveBatchGatewayFn{ + BatchMessages: messages, + SignedBridgeBatch: &batches[i], + }).EncodeAbi() + if err != nil { + r.logger.Error("failed to encode abi", "err", err) + + continue + } + + tx := types.NewTx(types.NewLegacyTx( + types.WithFrom(r.privateKey.Address()), + types.WithTo(&destinationGateway), + types.WithInput(input), + )) + + _, err = destinationRelayer.SendTransaction(tx, r.privateKey) + if err != nil { + r.logger.Error("id-ed batch has already been processed or cannot be procesed", "err", err) + } else { + r.logger.Info("id-ed batch", + "has been successfully processed/transferred", + big.NewInt(0).Add(lastBridged, big.NewInt(int64(1)))) + } + + lastBridged.Add(lastBridged, big.NewInt(1)) + + err = r.db.Update(func(tx *bolt.Tx) error { + bucket := tx.Bucket([]byte("lastBridgedBucket")) + + if bucket == nil { + return errors.New("cannot find a bucket with the `lastBridgedBucket` name") + } + + if value, err := json.Marshal(lastBridged.String()); err != nil { + return err + } else { + if err = bucket.Put(key, value); err != nil { + return err + } + } + + return nil + }) + + if err != nil { + fmt.Println(err) + + return + } + + r.logger.Info("batch id has been successfully stored into bolt DB", "bridge id", lastBridged.String()) + } + } + } +} + +// newFileLogger returns logger instance that writes all logs to a specified file. +// If log file can't be created, it returns an error +func newFileLogger(options *options) (hclog.Logger, error) { + logFileWriter, err := os.Create(options.logDir) + if err != nil { + return nil, fmt.Errorf("could not create log file, %w", err) + } + + return hclog.New(&hclog.LoggerOptions{ + Name: "bridge-relayer", + Level: options.logLevel, + Output: logFileWriter, + JSONFormat: options.jsonLogFormat, + }), nil +} + +// newCLILogger returns minimal logger instance that sends all logs to standard output +func newCLILogger(options *options) hclog.Logger { + return hclog.New(&hclog.LoggerOptions{ + Name: "bridge-relayer", + Level: options.logLevel, + JSONFormat: options.jsonLogFormat, + }) +} + +// newLoggerFromConfig creates a new logger which logs to a specified file. +// If log file is not set it outputs to standard output ( console ). +// If log file is specified, and it can't be created the server command will error out +func newLoggerFromConfig(options *options) (hclog.Logger, error) { + if options.logDir != "" { + fileLoggerInstance, err := newFileLogger(options) + if err != nil { + return nil, err + } + + return fileLoggerInstance, nil + } + + return newCLILogger(options), nil +} diff --git a/command/bridge-relayer/params.go b/command/bridge-relayer/params.go new file mode 100644 index 000000000..9ee8cc682 --- /dev/null +++ b/command/bridge-relayer/params.go @@ -0,0 +1,39 @@ +package relayer + +// commandParams defines all the existing parameters for `bridge-relayer` command +// that can be used for configuring bridge relayer. +type commandParams struct { + // internalChainRPC represents the RPC endpoint of the internal blockchain + // network (Blade). + internalChainRPC string + + // genesisPath denotes the path to the genesis file of the internal blockchain + // network (Blade). + genesisPath string + + // externalChainID represents the unique identifier of the external blockchain + // network to which the bridge relayer will connect and relay transactions. + externalChainID int + + // pollInterval specifies the interval (in seconds) at which the relayer checks + // for new cross-chain transactions to process. + pollInterval int + + // relayerPrivateKey contains the cryptographic private key utilized by the + // relayer to sign and send transactions. + // SECURITY WARNING: This key must be kept strictly confidential and never + // exposed or committed to any public service or version control system. + relayerPrivateKey string + + // this parameter enables JSON-formatted logs by setting its value to true. + jsonFormatOuttputter bool + + // determine the verbosity of log messages. + logLevel string + + // path to log file. + logFilePath string + + // path to bolt db + boltDbPath string +} diff --git a/command/bridge-relayer/relayer.go b/command/bridge-relayer/relayer.go new file mode 100644 index 000000000..16e3ab4c4 --- /dev/null +++ b/command/bridge-relayer/relayer.go @@ -0,0 +1,123 @@ +package relayer + +import ( + "fmt" + + bridgerelayer "github.com/0xPolygon/polygon-edge/bridge-relayer" + "github.com/0xPolygon/polygon-edge/command/server/config" + "github.com/hashicorp/go-hclog" + "github.com/spf13/cobra" +) + +var params commandParams + +// GetCommand returns a new bridge relayer command of type [*cobra.Command]. +func GetCommand() *cobra.Command { + relayerCmd := &cobra.Command{ + Use: "bridge-relayer", + Short: "Bridge Relayer command starts new bridge relayer responsible for cross-chain asset transfers.", + Run: runCommand, + } + + setFlags(relayerCmd) + + return relayerCmd +} + +func runCommand(*cobra.Command, []string) { + relayer, err := bridgerelayer.NewBridgeRelayer(params.internalChainRPC, params.relayerPrivateKey, + bridgerelayer.WithExternalChainID(uint64(params.externalChainID)), + bridgerelayer.WithGenesisPath(params.genesisPath), + bridgerelayer.WithLogLevel(hclog.LevelFromString(params.logLevel)), + bridgerelayer.WithLogJsonFormat(params.jsonFormatOuttputter), + bridgerelayer.WithDBPath(params.boltDbPath), + ) + + if err != nil { + fmt.Println(err) + + return + } + + relayer.Start() +} + +func setFlags(cmd *cobra.Command) { + defaultConfig := config.DefaultConfig() + + cmd.Flags().StringVarP( + ¶ms.internalChainRPC, + "internal-chain-rpc", + "i", + "", + "internal chain rpc endpoint", + ) + + _ = cmd.MarkFlagRequired("internal-chain-rpc") + + cmd.Flags().StringVarP( + ¶ms.genesisPath, + "genesis-path", + "g", + "./genesis.json", + "internal chain genesis path", + ) + + cmd.Flags().IntVarP( + ¶ms.externalChainID, + "external-chain-id", + "c", + 1, + "external chain id", + ) + + _ = cmd.MarkFlagRequired("external-chain-id") + + cmd.Flags().IntVarP( + ¶ms.pollInterval, + "poll-interval", + "p", + 10, + "poll interval", + ) + + cmd.Flags().StringVarP( + ¶ms.relayerPrivateKey, + "private-key", + "k", + "", + "relayer's private key", + ) + + cmd.Flags().BoolVarP( + ¶ms.jsonFormatOuttputter, + "json", + "j", + defaultConfig.JSONLogFormat, + "logger json format", + ) + + cmd.Flags().StringVarP( + ¶ms.logLevel, + "log-level", + "l", + defaultConfig.LogLevel, + "logger level", + ) + + cmd.Flags().StringVar( + ¶ms.logFilePath, + "log-path", + defaultConfig.LogFilePath, + "write all logs to the file at specified location instead of writing them to console", + ) + + cmd.Flags().StringVar( + ¶ms.boltDbPath, + "database-path", + "", + "path to bolt database", + ) + + _ = cmd.MarkFlagRequired("private-key") +} diff --git a/command/root/root.go b/command/root/root.go index f7fbf1ab0..8f03b567e 100644 --- a/command/root/root.go +++ b/command/root/root.go @@ -9,6 +9,7 @@ import ( "github.com/0xPolygon/polygon-edge/command/accounts" "github.com/0xPolygon/polygon-edge/command/backup" "github.com/0xPolygon/polygon-edge/command/bridge" + bridgerelayer "github.com/0xPolygon/polygon-edge/command/bridge-relayer" "github.com/0xPolygon/polygon-edge/command/genesis" "github.com/0xPolygon/polygon-edge/command/helper" "github.com/0xPolygon/polygon-edge/command/loadtest" @@ -55,6 +56,7 @@ func (rc *RootCommand) registerSubCommands() { backup.GetCommand(), genesis.GetCommand(), server.GetCommand(), + bridgerelayer.GetCommand(), polybftsecrets.GetCommand(), bridge.GetCommand(), regenesis.GetCommand(), diff --git a/command/server/params.go b/command/server/params.go index ced6dbb5c..7a950e79e 100644 --- a/command/server/params.go +++ b/command/server/params.go @@ -194,7 +194,6 @@ func (p *serverParams) generateConfig() *server.Config { TLSCertFile: p.rawConfig.TLSCertFile, TLSKeyFile: p.rawConfig.TLSKeyFile, - Relayer: p.relayer, MetricsInterval: p.rawConfig.MetricsInterval, EventTracker: &server.EventTracker{ SyncBatchSize: p.rawConfig.EventTracker.SyncBatchSize, diff --git a/consensus/polybft/bridge/bridge.go b/consensus/polybft/bridge/bridge.go index fa12dff6d..774be4517 100644 --- a/consensus/polybft/bridge/bridge.go +++ b/consensus/polybft/bridge/bridge.go @@ -47,7 +47,6 @@ type bridge struct { bridgeManagers map[uint64]BridgeManager state *BridgeManagerStore internalChainID uint64 - relayer BridgeEventRelayer logger hclog.Logger } @@ -125,17 +124,6 @@ func NewBridge(runtime Runtime, eventProvider.Subscribe(bridgeManager) } - relayer, err := newBridgeEventRelayer(blockchain, runtimeConfig, logger, store) - if err != nil { - return nil, err - } - - bridge.relayer = relayer - - if err := relayer.Start(runtimeConfig, eventProvider); err != nil { - return nil, fmt.Errorf("error starting bridge event relayer, err: %w", err) - } - return bridge, nil } @@ -144,8 +132,6 @@ func (b *bridge) Close() { for _, bridgeManager := range b.bridgeManagers { bridgeManager.Close() } - - b.relayer.Close() } // PostBlock is a function executed on every block finalization (either by consensus or syncer) diff --git a/consensus/polybft/contractsapi/gen_sc_data.go b/consensus/polybft/contractsapi/gen_sc_data.go index e72fa2c1e..b0822d482 100644 --- a/consensus/polybft/contractsapi/gen_sc_data.go +++ b/consensus/polybft/contractsapi/gen_sc_data.go @@ -34,5 +34,5 @@ var NetworkParamsArtifact string = `{"_format":"hh-sol-artifact-1","contractName var ForkParamsArtifact string = `{"_format":"hh-sol-artifact-1","contractName":"ForkParams","sourceName":"contracts/blade/ForkParams.sol","abi":[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"feature","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"block","type":"uint256"}],"name":"NewFeature","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":"bytes32","name":"feature","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"block","type":"uint256"}],"name":"UpdatedFeature","type":"event"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"string","name":"feature","type":"string"}],"name":"addNewFeature","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"featureToBlockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"feature","type":"string"}],"name":"isFeatureActivated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newBlockNumber","type":"uint256"},{"internalType":"string","name":"feature","type":"string"}],"name":"updateFeatureBlock","outputs":[],"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107e58061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100785760003560e01c80632428e2341461007d57806336c60d6d146100a5578063715018a6146100d35780638da5cb5b146100dd578063c4d66de8146100f8578063c92f5d511461010b578063cd6598bd1461011e578063f2fde38b14610131575b600080fd5b61009061008b36600461063f565b610144565b60405190151581526020015b60405180910390f35b6100c56100b3366004610681565b60016020526000908152604090205481565b60405190815260200161009c565b6100db6101cb565b005b6000546040516001600160a01b03909116815260200161009c565b6100db61010636600461069a565b6101df565b6100db6101193660046106ca565b61030d565b6100db61012c3660046106ca565b6103e0565b6100db61013f36600461069a565b6104d3565b60008060016000858560405160200161015e929190610716565b604051602081830303815290604052805190602001208152602001908152602001600020549050806000036101ae5760405162461bcd60e51b81526004016101a590610745565b60405180910390fd5b8043106101bf5760019150506101c5565b60009150505b92915050565b6101d361054c565b6101dd60006105a6565b565b600054600160a81b900460ff161580801561020757506000546001600160a01b90910460ff16105b806102285750303b1580156102285750600054600160a01b900460ff166001145b61028b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016101a5565b6000805460ff60a01b1916600160a01b17905580156102b8576000805460ff60a81b1916600160a81b1790555b6102c1826105a6565b8015610309576000805460ff60a81b19169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b61031561054c565b6000828260405160200161032a929190610716565b60408051601f1981840301815291815281516020928301206000818152600190935290822054909250908190036103735760405162461bcd60e51b81526004016101a590610745565b43851015801561038257508043105b61039e5760405162461bcd60e51b81526004016101a59061077c565b60008281526001602052604080822087905551869184917f28b9e86011a989b0d149881df01509a5cbd0d3d927d6d454d50d510b62d014cf9190a35050505050565b6103e861054c565b438310156104085760405162461bcd60e51b81526004016101a59061077c565b6000828260405160200161041d929190610716565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156104925760405162461bcd60e51b815260206004820152601a60248201527f466f726b506172616d733a20464541545552455f45584953545300000000000060448201526064016101a5565b60008181526001602052604080822086905551859183917f94a50b56ef6d6480cb07a85c57d6eb031618fdbcd17ccedd6001efcd3278669b9190a350505050565b6104db61054c565b6001600160a01b0381166105405760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101a5565b610549816105a6565b50565b6000546001600160a01b031633146101dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101a5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008083601f84011261060857600080fd5b50813567ffffffffffffffff81111561062057600080fd5b60208301915083602082850101111561063857600080fd5b9250929050565b6000806020838503121561065257600080fd5b823567ffffffffffffffff81111561066957600080fd5b610675858286016105f6565b90969095509350505050565b60006020828403121561069357600080fd5b5035919050565b6000602082840312156106ac57600080fd5b81356001600160a01b03811681146106c357600080fd5b9392505050565b6000806000604084860312156106df57600080fd5b83359250602084013567ffffffffffffffff8111156106fd57600080fd5b610709868287016105f6565b9497909650939450505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6020808252601f908201527f466f726b506172616d733a204e4f4e4558495354454e545f4645415455524500604082015260600190565b602080825260199082015278466f726b506172616d733a20494e56414c49445f424c4f434b60381b60408201526060019056fea264697066735822122004939f0bbf37f7fc7e28609570663e00713d5076eb9b09ea5833c2639853dfa764736f6c63430008130033","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106100785760003560e01c80632428e2341461007d57806336c60d6d146100a5578063715018a6146100d35780638da5cb5b146100dd578063c4d66de8146100f8578063c92f5d511461010b578063cd6598bd1461011e578063f2fde38b14610131575b600080fd5b61009061008b36600461063f565b610144565b60405190151581526020015b60405180910390f35b6100c56100b3366004610681565b60016020526000908152604090205481565b60405190815260200161009c565b6100db6101cb565b005b6000546040516001600160a01b03909116815260200161009c565b6100db61010636600461069a565b6101df565b6100db6101193660046106ca565b61030d565b6100db61012c3660046106ca565b6103e0565b6100db61013f36600461069a565b6104d3565b60008060016000858560405160200161015e929190610716565b604051602081830303815290604052805190602001208152602001908152602001600020549050806000036101ae5760405162461bcd60e51b81526004016101a590610745565b60405180910390fd5b8043106101bf5760019150506101c5565b60009150505b92915050565b6101d361054c565b6101dd60006105a6565b565b600054600160a81b900460ff161580801561020757506000546001600160a01b90910460ff16105b806102285750303b1580156102285750600054600160a01b900460ff166001145b61028b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016101a5565b6000805460ff60a01b1916600160a01b17905580156102b8576000805460ff60a81b1916600160a81b1790555b6102c1826105a6565b8015610309576000805460ff60a81b19169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b61031561054c565b6000828260405160200161032a929190610716565b60408051601f1981840301815291815281516020928301206000818152600190935290822054909250908190036103735760405162461bcd60e51b81526004016101a590610745565b43851015801561038257508043105b61039e5760405162461bcd60e51b81526004016101a59061077c565b60008281526001602052604080822087905551869184917f28b9e86011a989b0d149881df01509a5cbd0d3d927d6d454d50d510b62d014cf9190a35050505050565b6103e861054c565b438310156104085760405162461bcd60e51b81526004016101a59061077c565b6000828260405160200161041d929190610716565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156104925760405162461bcd60e51b815260206004820152601a60248201527f466f726b506172616d733a20464541545552455f45584953545300000000000060448201526064016101a5565b60008181526001602052604080822086905551859183917f94a50b56ef6d6480cb07a85c57d6eb031618fdbcd17ccedd6001efcd3278669b9190a350505050565b6104db61054c565b6001600160a01b0381166105405760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101a5565b610549816105a6565b50565b6000546001600160a01b031633146101dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101a5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008083601f84011261060857600080fd5b50813567ffffffffffffffff81111561062057600080fd5b60208301915083602082850101111561063857600080fd5b9250929050565b6000806020838503121561065257600080fd5b823567ffffffffffffffff81111561066957600080fd5b610675858286016105f6565b90969095509350505050565b60006020828403121561069357600080fd5b5035919050565b6000602082840312156106ac57600080fd5b81356001600160a01b03811681146106c357600080fd5b9392505050565b6000806000604084860312156106df57600080fd5b83359250602084013567ffffffffffffffff8111156106fd57600080fd5b610709868287016105f6565b9497909650939450505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6020808252601f908201527f466f726b506172616d733a204e4f4e4558495354454e545f4645415455524500604082015260600190565b602080825260199082015278466f726b506172616d733a20494e56414c49445f424c4f434b60381b60408201526060019056fea264697066735822122004939f0bbf37f7fc7e28609570663e00713d5076eb9b09ea5833c2639853dfa764736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` var ChildGovernorArtifact string = `{"_format":"hh-sol-artifact-1","contractName":"ChildGovernor","sourceName":"contracts/blade/governance/ChildGovernor.sol","abi":[{"inputs":[],"name":"Empty","type":"error"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"ProposalCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"address","name":"proposer","type":"address"},{"indexed":false,"internalType":"address[]","name":"targets","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"},{"indexed":false,"internalType":"string[]","name":"signatures","type":"string[]"},{"indexed":false,"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"indexed":false,"internalType":"uint256","name":"voteStart","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"voteEnd","type":"uint256"},{"indexed":false,"internalType":"string","name":"description","type":"string"}],"name":"ProposalCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"ProposalExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"eta","type":"uint256"}],"name":"ProposalQueued","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldQuorumNumerator","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newQuorumNumerator","type":"uint256"}],"name":"QuorumNumeratorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldTimelock","type":"address"},{"indexed":false,"internalType":"address","name":"newTimelock","type":"address"}],"name":"TimelockChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"support","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"weight","type":"uint256"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"VoteCast","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"support","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"weight","type":"uint256"},{"indexed":false,"internalType":"string","name":"reason","type":"string"},{"indexed":false,"internalType":"bytes","name":"params","type":"bytes"}],"name":"VoteCastWithParams","type":"event"},{"inputs":[],"name":"BALLOT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CLOCK_MODE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COUNTING_MODE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"EXTENDED_BALLOT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"descriptionHash","type":"bytes32"}],"name":"cancel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"}],"name":"castVote","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"castVoteBySig","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"string","name":"reason","type":"string"}],"name":"castVoteWithReason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"string","name":"reason","type":"string"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"castVoteWithReasonAndParams","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"string","name":"reason","type":"string"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"castVoteWithReasonAndParamsBySig","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"clock","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"descriptionHash","type":"bytes32"}],"name":"execute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"getActions","outputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"string[]","name":"signatures","type":"string[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"address","name":"voter","type":"address"}],"name":"getReceipt","outputs":[{"components":[{"internalType":"bool","name":"hasVoted","type":"bool"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"uint96","name":"votes","type":"uint96"}],"internalType":"struct IGovernorCompatibilityBravoUpgradeable.Receipt","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"timepoint","type":"uint256"}],"name":"getVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"timepoint","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"getVotesWithParams","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"hasVoted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"descriptionHash","type":"bytes32"}],"name":"hashProposal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract IVotesUpgradeable","name":"token_","type":"address"},{"internalType":"contract TimelockControllerUpgradeable","name":"timelock_","type":"address"},{"internalType":"uint256","name":"quorumNumerator_","type":"uint256"},{"internalType":"address","name":"networkParams","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalDeadline","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalEta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalProposer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalSnapshot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposalThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposals","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"proposer","type":"address"},{"internalType":"uint256","name":"eta","type":"uint256"},{"internalType":"uint256","name":"startBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"},{"internalType":"uint256","name":"forVotes","type":"uint256"},{"internalType":"uint256","name":"againstVotes","type":"uint256"},{"internalType":"uint256","name":"abstainVotes","type":"uint256"},{"internalType":"bool","name":"canceled","type":"bool"},{"internalType":"bool","name":"executed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"string","name":"description","type":"string"}],"name":"propose","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"string[]","name":"signatures","type":"string[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"string","name":"description","type":"string"}],"name":"propose","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"descriptionHash","type":"bytes32"}],"name":"queue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"queue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"timepoint","type":"uint256"}],"name":"quorum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quorumDenominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"timepoint","type":"uint256"}],"name":"quorumNumerator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quorumNumerator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quorumVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"relay","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"state","outputs":[{"internalType":"enum IGovernorUpgradeable.ProposalState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timelock","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC5805Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newQuorumNumerator","type":"uint256"}],"name":"updateQuorumNumerator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract TimelockControllerUpgradeable","name":"newTimelock","type":"address"}],"name":"updateTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"votingDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"votingPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}],"bytecode":"0x608060405234801561001057600080fd5b5061579b80620000216000396000f3fe6080604052600436106102b85760003560e01c80637b3c71d311610170578063c28bc2fa116100cc578063deaaa7cc11610085578063deaaa7cc146109dc578063e23a9a5214610a10578063eb9019d414610adb578063f23a6e6114610afb578063f8ce560a14610b27578063fc0c546a14610b47578063fe0d94c114610b6857600080fd5b8063c28bc2fa14610904578063c59057e414610917578063d33219b414610937578063da95691a14610956578063dd4e2ba514610976578063ddf0b009146109bc57600080fd5b8063a7713a7011610129578063a7713a7014610814578063a890c91014610829578063ab58fb8e14610849578063b58131b014610869578063bc197c811461087e578063be203094146108aa578063c01f9e37146108ca57600080fd5b80637b3c71d31461074c5780637d5e81e21461076c57806384b0196e1461078c57806391ddadf4146107b457806397c3d334146107e05780639a802a6d146107f457600080fd5b80632fe3e2611161021f57806343859632116101d85780634385963214610657578063452115d6146106a25780634bf5d7e9146106c257806354fd4d50146106d757806356781388146106ec5780635f398a141461070c57806360c4247f1461072c57600080fd5b80632fe3e26114610571578063328dd982146105a55780633932abb1146105d55780633bccf4fd146105ea5780633e4f49e61461060a57806340e58ee51461063757600080fd5b8063143489d011610271578063143489d014610458578063150b7a02146104ae578063160cbed7146104f257806324bc1a64146105125780632656227d146105275780632d63f6931461053a57600080fd5b8063013cf08b1461032857806301ffc9a7146103a357806302a251a3146103d357806303420181146103f657806306f3f9e61461041657806306fdde031461043657600080fd5b3661032357306102c6610b7b565b6001600160a01b0316146103215760405162461bcd60e51b815260206004820152601f60248201527f476f7665726e6f723a206d7573742073656e6420746f206578656375746f720060448201526064015b60405180910390fd5b005b600080fd5b34801561033457600080fd5b50610348610343366004614501565b610b95565b604080519a8b526001600160a01b0390991660208b0152978901969096526060880194909452608087019290925260a086015260c085015260e084015215156101008301521515610120820152610140015b60405180910390f35b3480156103af57600080fd5b506103c36103be36600461451a565b610c64565b604051901515815260200161039a565b3480156103df57600080fd5b506103e8610c75565b60405190815260200161039a565b34801561040257600080fd5b506103e8610411366004614660565b610ce4565b34801561042257600080fd5b50610321610431366004614501565b610ddc565b34801561044257600080fd5b5061044b610e67565b60405161039a9190614756565b34801561046457600080fd5b50610496610473366004614501565b60009081526101306020526040902054600160401b90046001600160a01b031690565b6040516001600160a01b03909116815260200161039a565b3480156104ba57600080fd5b506104d96104c936600461477e565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200161039a565b3480156104fe57600080fd5b506103e861050d366004614955565b610efa565b34801561051e57600080fd5b506103e86110ff565b6103e8610535366004614955565b611125565b34801561054657600080fd5b506103e8610555366004614501565b600090815261013060205260409020546001600160401b031690565b34801561057d57600080fd5b506103e87fb3b3f3b703cd84ce352197dcff232b1b5d3cfb2025ce47cf04742d0651f1af8881565b3480156105b157600080fd5b506105c56105c0366004614501565b611218565b60405161039a9493929190614aad565b3480156105e157600080fd5b506103e86114aa565b3480156105f657600080fd5b506103e8610605366004614afa565b6114f5565b34801561061657600080fd5b5061062a610625366004614501565b61156b565b60405161039a9190614b5e565b34801561064357600080fd5b50610321610652366004614501565b611576565b34801561066357600080fd5b506103c3610672366004614b86565b6000828152610161602090815260408083206001600160a01b038516845260080190915290205460ff1692915050565b3480156106ae57600080fd5b506103e86106bd366004614955565b6115a1565b3480156106ce57600080fd5b5061044b6115b8565b3480156106e357600080fd5b5061044b611665565b3480156106f857600080fd5b506103e8610707366004614bb6565b611680565b34801561071857600080fd5b506103e8610727366004614be2565b6116a9565b34801561073857600080fd5b506103e8610747366004614501565b6116f3565b34801561075857600080fd5b506103e8610767366004614c65565b6117a8565b34801561077857600080fd5b506103e8610787366004614cbe565b6117fa565b34801561079857600080fd5b506107a1611808565b60405161039a9796959493929190614d5e565b3480156107c057600080fd5b506107c96118a6565b60405165ffffffffffff909116815260200161039a565b3480156107ec57600080fd5b5060646103e8565b34801561080057600080fd5b506103e861080f366004614dc0565b61191a565b34801561082057600080fd5b506103e8611931565b34801561083557600080fd5b50610321610844366004614e18565b61195e565b34801561085557600080fd5b506103e8610864366004614501565b6119e6565b34801561087557600080fd5b506103e8611a82565b34801561088a57600080fd5b506104d9610899366004614e35565b63bc197c8160e01b95945050505050565b3480156108b657600080fd5b506103216108c5366004614ec8565b611acd565b3480156108d657600080fd5b506103e86108e5366004614501565b600090815261013060205260409020600101546001600160401b031690565b610321610912366004614f1b565b611c3f565b34801561092357600080fd5b506103e8610932366004614955565b611d4f565b34801561094357600080fd5b506101f8546001600160a01b0316610496565b34801561096257600080fd5b506103e8610971366004614fdd565b611d89565b34801561098257600080fd5b5060408051808201909152601a81527f737570706f72743d627261766f2671756f72756d3d627261766f000000000000602082015261044b565b3480156109c857600080fd5b506103216109d7366004614501565b611e10565b3480156109e857600080fd5b506103e87f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f81565b348015610a1c57600080fd5b50610aab610a2b366004614b86565b6040805160608101825260008082526020820181905291810191909152506000918252610161602090815260408084206001600160a01b0393909316845260089092018152918190208151606081018352905460ff8082161515835261010082041693820193909352620100009092046001600160601b03169082015290565b6040805182511515815260208084015160ff1690820152918101516001600160601b03169082015260600161039a565b348015610ae757600080fd5b506103e8610af636600461507e565b611e33565b348015610b0757600080fd5b506104d9610b163660046150aa565b63f23a6e6160e01b95945050505050565b348015610b3357600080fd5b506103e8610b42366004614501565b611e54565b348015610b5357600080fd5b5061019354610496906001600160a01b031681565b610321610b76366004614501565b611ee3565b6000610b906101f8546001600160a01b031690565b905090565b8060008080808080808080610ba98a6119e6565b60008c815261013060205260409020549098506001600160401b031660008c815261013060205260409020600101549097506001600160401b031660008c81526101616020526040812080546005820154600683015460078401546001600160a01b039093169e50949a509850929650919450610c258d61156b565b90506002816007811115610c3b57610c3b614b48565b1493506007816007811115610c5257610c52614b48565b14925050509193959799509193959799565b6000610c6f82611f06565b92915050565b61022a54604080516302a251a360e01b815290516000926001600160a01b0316916302a251a39160048083019260209291908290030181865afa158015610cc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b909190615112565b600080610d88610d807fb3b3f3b703cd84ce352197dcff232b1b5d3cfb2025ce47cf04742d0651f1af888c8c8c8c604051610d2092919061512b565b60405180910390208b80519060200120604051602001610d65959493929190948552602085019390935260ff9190911660408401526060830152608082015260a00190565b60405160208183030381529060405280519060200120611f2b565b868686611f58565b9050610dce8a828b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611f76915050565b9a9950505050505050505050565b610de4610b7b565b6001600160a01b0316336001600160a01b031614610e145760405162461bcd60e51b81526004016103189061513b565b30610e1d610b7b565b6001600160a01b031614610e5b5760008036604051610e3d92919061512b565b604051809103902090505b80610e546101316120cc565b03610e4857505b610e6481612142565b50565b606061012f8054610e779061516d565b80601f0160208091040260200160405190810160405280929190818152602001828054610ea39061516d565b8015610ef05780601f10610ec557610100808354040283529160200191610ef0565b820191906000526020600020905b815481529060010190602001808311610ed357829003601f168201915b5050505050905090565b600080610f0986868686611d4f565b90506004610f168261156b565b6007811115610f2757610f27614b48565b14610f445760405162461bcd60e51b8152600401610318906151a7565b6101f8546040805163793d064960e11b815290516000926001600160a01b03169163f27a0c929160048083019260209291908290030181865afa158015610f8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb39190615112565b6101f85460405163b1c5f42760e01b81529192506001600160a01b03169063b1c5f42790610fee908a908a908a906000908b906004016151e8565b602060405180830381865afa15801561100b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102f9190615112565b60008381526101f96020526040808220929092556101f85491516308f2a0bb60e41b81526001600160a01b0390921691638f2a0bb09161107c918b918b918b91908b908990600401615236565b600060405180830381600087803b15801561109657600080fd5b505af11580156110aa573d6000803e3d6000fd5b505050507f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda28928282426110dc91906152a4565b604080519283526020830191909152015b60405180910390a15095945050505050565b6000610b90600161110e6118a6565b61111891906152b7565b65ffffffffffff16611e54565b60008061113486868686611d4f565b905060006111418261156b565b9050600481600781111561115757611157614b48565b14806111745750600581600781111561117257611172614b48565b145b6111905760405162461bcd60e51b8152600401610318906151a7565b6000828152610130602052604090819020600201805460ff19166001179055517f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f906111df9084815260200190565b60405180910390a16111f482888888886122b3565b611201828888888861234d565b61120e828888888861235a565b5095945050505050565b606080606080600061016160008781526020019081526020016000209050806001018160020182600301836004018380548060200260200160405190810160405280929190818152602001828054801561129b57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161127d575b50505050509350828054806020026020016040519081016040528092919081815260200182805480156112ed57602002820191906000526020600020905b8154815260200190600101908083116112d9575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b828210156113c15783829060005260206000200180546113349061516d565b80601f01602080910402602001604051908101604052809291908181526020018280546113609061516d565b80156113ad5780601f10611382576101008083540402835291602001916113ad565b820191906000526020600020905b81548152906001019060200180831161139057829003601f168201915b505050505081526020019060010190611315565b50505050915080805480602002602001604051908101604052809291908181526020016000905b828210156114945783829060005260206000200180546114079061516d565b80601f01602080910402602001604051908101604052809291908181526020018280546114339061516d565b80156114805780601f1061145557610100808354040283529160200191611480565b820191906000526020600020905b81548152906001019060200180831161146357829003601f168201915b5050505050815260200190600101906113e8565b5050505090509450945094509450509193509193565b61022a5460408051633932abb160e01b815290516000926001600160a01b031691633932abb19160048083019260209291908290030181865afa158015610cc0573d6000803e3d6000fd5b604080517f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f602082015290810186905260ff85166060820152600090819061154390610d8090608001610d65565b905061156087828860405180602001604052806000815250612395565b979650505050505050565b6000610c6f826123b8565b60008060008061158585612505565b9350935093509350611599848484846115a1565b505050505050565b60006115af85858585612796565b95945050505050565b6101935460408051634bf5d7e960e01b815290516060926001600160a01b031691634bf5d7e99160048083019260009291908290030181865afa92505050801561162457506040513d6000823e601f3d908101601f1916820160405261162191908101906152dd565b60015b611660575060408051808201909152601d81527f6d6f64653d626c6f636b6e756d6265722666726f6d3d64656661756c74000000602082015290565b919050565b6040805180820190915260018152603160f81b602082015290565b6000803390506116a184828560405180602001604052806000815250612395565b949350505050565b60008033905061156087828888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250611f76915050565b6101c75460009080820361170c5750506101c654919050565b60006101c761171c60018461534a565b8154811061172c5761172c61535d565b60009182526020918290206040805180820190915291015463ffffffff8116808352600160201b9091046001600160e01b0316928201929092529150841061178257602001516001600160e01b03169392505050565b61179761178e85612861565b6101c7906128ca565b6001600160e01b0316949350505050565b6000803390506117f086828787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061239592505050565b9695505050505050565b60006115af8585858561297d565b6000606080600080600060606065546000801b1480156118285750606654155b61186c5760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610318565b6118746129e5565b61187c6129f4565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61019354604080516324776b7d60e21b815290516000926001600160a01b0316916391ddadf49160048083019260209291908290030181865afa92505050801561190d575060408051601f3d908101601f1916820190925261190a91810190615373565b60015b61166057610b9043612a03565b6000611927848484612a6a565b90505b9392505050565b6101c75460009015611956576119486101c7612ae1565b6001600160e01b0316905090565b506101c65490565b611966610b7b565b6001600160a01b0316336001600160a01b0316146119965760405162461bcd60e51b81526004016103189061513b565b3061199f610b7b565b6001600160a01b0316146119dd57600080366040516119bf92919061512b565b604051809103902090505b806119d66101316120cc565b036119ca57505b610e6481612b11565b6101f85460008281526101f9602052604080822054905163d45c443560e01b81526004810191909152909182916001600160a01b039091169063d45c443590602401602060405180830381865afa158015611a45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a699190615112565b905080600114611a79578061192a565b60009392505050565b61022a5460408051630b58131b60e41b815290516000926001600160a01b03169163b58131b09160048083019260209291908290030181865afa158015610cc0573d6000803e3d6000fd5b600054610100900460ff1615808015611aed5750600054600160ff909116105b80611b075750303b158015611b07575060005460ff166001145b611b6a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610318565b6000805460ff191660011790558015611b8d576000805461ff0019166101001790555b611bbb6040518060400160405280600d81526020016c21b434b63223b7bb32b93737b960991b815250612b7c565b611bc484612bbd565b611bcd85612bed565b611bd683612c1d565b61022a80546001600160a01b0319166001600160a01b0384161790558015611c38576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b611c47610b7b565b6001600160a01b0316336001600160a01b031614611c775760405162461bcd60e51b81526004016103189061513b565b30611c80610b7b565b6001600160a01b031614611cbe5760008036604051611ca092919061512b565b604051809103902090505b80611cb76101316120cc565b03611cab57505b600080856001600160a01b0316858585604051611cdc92919061512b565b60006040518083038185875af1925050503d8060008114611d19576040519150601f19603f3d011682016040523d82523d6000602084013e611d1e565b606091505b5091509150611d46828260405180606001604052806028815260200161573e60289139612c4d565b50505050505050565b600084848484604051602001611d68949392919061539b565b60408051601f19818403018152919052805160209091012095945050505050565b60008251845114611ded5760405162461bcd60e51b815260206004820152602860248201527f476f7665726e6f72427261766f3a20696e76616c6964207369676e61747572656044820152670e640d8cadccee8d60c31b6064820152608401610318565b611dfb338787878787612c66565b6117f08686611e0a8787612d24565b856117fa565b600080600080611e1f85612505565b935093509350935061159984848484610efa565b600061192a8383611e4f60408051602081019091526000815290565b612a6a565b60006064611e61836116f3565b61019354604051632394e7a360e21b8152600481018690526001600160a01b0390911690638e539e8c90602401602060405180830381865afa158015611eab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ecf9190615112565b611ed991906153e6565b610c6f9190615413565b600080600080611ef285612505565b935093509350935061159984848484611125565b60006001600160e01b03198216636e665ced60e01b1480610c6f5750610c6f82612e56565b6000610c6f611f38612ef2565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000611f6987878787612efc565b9150915061120e81612fb6565b6000858152610130602052604081206001611f908861156b565b6007811115611fa157611fa1614b48565b14611ffa5760405162461bcd60e51b815260206004820152602360248201527f476f7665726e6f723a20766f7465206e6f742063757272656e746c792061637460448201526269766560e81b6064820152608401610318565b80546000906120149088906001600160401b031686612a6a565b905061202388888884886130fb565b835160000361207857866001600160a01b03167fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda48988848960405161206b9493929190615435565b60405180910390a2611560565b866001600160a01b03167fe2babfbac5889a709b63bb7f598b324e08bc5a4fb9ec647fb3cbc9ec07eb871289888489896040516120b995949392919061545d565b60405180910390a2979650505050505050565b60006120e78254600f81810b600160801b909204900b131590565b1561210557604051631ed9509560e11b815260040160405180910390fd5b508054600f0b6000818152600180840160205260408220805492905583546001600160801b03191692016001600160801b03169190911790915590565b60648111156121c55760405162461bcd60e51b815260206004820152604360248201527f476f7665726e6f72566f74657351756f72756d4672616374696f6e3a2071756f60448201527f72756d4e756d657261746f72206f7665722071756f72756d44656e6f6d696e616064820152623a37b960e91b608482015260a401610318565b60006121cf611931565b905080158015906121e157506101c754155b156122465760408051808201909152600081526101c7906020810161220584613299565b6001600160e01b039081169091528254600181018455600093845260209384902083519490930151909116600160201b0263ffffffff909316929092179101555b6122746122616122546118a6565b65ffffffffffff16612861565b61226a84613299565b6101c79190613302565b505060408051828152602081018490527f0553476bf02ef2726e8ce5ced78d63e26e602e4a2257b1f559418e24b4633997910160405180910390a15050565b306122bc610b7b565b6001600160a01b031614611c385760005b845181101561159957306001600160a01b03168582815181106122f2576122f261535d565b60200260200101516001600160a01b03160361233d5761233d83828151811061231d5761231d61535d565b60200260200101518051906020012061013161331d90919063ffffffff16565b612346816154a3565b90506122cd565b611c388585858585613359565b30612363610b7b565b6001600160a01b031614611c385761013154600f81810b600160801b909204900b1315611c3857600061013155611c38565b60006115af858585856123b360408051602081019091526000815290565b611f76565b6000806123c4836133ce565b905060048160078111156123da576123da614b48565b146123e55792915050565b60008381526101f9602052604090205480612401575092915050565b6101f854604051632ab0f52960e01b8152600481018390526001600160a01b0390911690632ab0f52990602401602060405180830381865afa15801561244b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246f91906154bc565b1561247e575060079392505050565b6101f854604051632c258a9f60e11b8152600481018390526001600160a01b039091169063584b153e90602401602060405180830381865afa1580156124c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ec91906154bc565b156124fb575060059392505050565b5060029392505050565b60608060606000806101616000878152602001908152602001600020905080600101816002016126d783600301805480602002602001604051908101604052809291908181526020016000905b828210156125fe5783829060005260206000200180546125719061516d565b80601f016020809104026020016040519081016040528092919081815260200182805461259d9061516d565b80156125ea5780601f106125bf576101008083540402835291602001916125ea565b820191906000526020600020905b8154815290600101906020018083116125cd57829003601f168201915b505050505081526020019060010190612552565b50505060048601805460408051602080840282018101909252828152935060009084015b828210156126ce5783829060005260206000200180546126419061516d565b80601f016020809104026020016040519081016040528092919081815260200182805461266d9061516d565b80156126ba5780601f1061268f576101008083540402835291602001916126ba565b820191906000526020600020905b81548152906001019060200180831161269d57829003601f168201915b505050505081526020019060010190612622565b50505050612d24565b600984015483546040805160208084028201810190925282815291869183018282801561272d57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161270f575b505050505093508280548060200260200160405190810160405280929190818152602001828054801561277f57602002820191906000526020600020905b81548152602001906001019080831161276b575b505050505092509450945094509450509193509193565b6000806127a586868686611d4f565b600081815261016160205260409020549091506001600160a01b0316338114806127f957506127d2611a82565b6127f78260016127e06118a6565b6127ea91906152b7565b65ffffffffffff16611e33565b105b6128555760405162461bcd60e51b815260206004820152602760248201527f476f7665726e6f72427261766f3a2070726f706f7365722061626f76652074686044820152661c995cda1bdb1960ca1b6064820152608401610318565b61156087878787613515565b600063ffffffff8211156128c65760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610318565b5090565b8154600090818160058111156129275760006128e584613523565b6128ef908561534a565b60008881526020902090915081015463ffffffff908116908716101561291757809150612925565b6129228160016152a4565b92505b505b60006129358787858561360b565b905080156129705761295a8761294c60018461534a565b600091825260209091200190565b54600160201b90046001600160e01b0316611560565b6000979650505050505050565b60006129d933868686516001600160401b0381111561299e5761299e61459d565b6040519080825280602002602001820160405280156129d157816020015b60608152602001906001900390816129bc5790505b508787612c66565b6115af85858585613661565b606060678054610e779061516d565b606060688054610e779061516d565b600065ffffffffffff8211156128c65760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203460448201526538206269747360d01b6064820152608401610318565b61019354604051630748d63560e31b81526001600160a01b038581166004830152602482018590526000921690633a46b1a890604401602060405180830381865afa158015612abd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119279190615112565b80546000908015611a7957612afb8361294c60018461534a565b54600160201b90046001600160e01b031661192a565b6101f854604080516001600160a01b03928316815291831660208301527f08f74ea46ef7894f65eabfb5e6e695de773a000b47c529ab559178069b226401910160405180910390a16101f880546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16612ba35760405162461bcd60e51b8152600401610318906154de565b612bb481612baf611665565b613a37565b610e6481613a86565b600054610100900460ff16612be45760405162461bcd60e51b8152600401610318906154de565b610e6481613abe565b600054610100900460ff16612c145760405162461bcd60e51b8152600401610318906154de565b610e6481613ae5565b600054610100900460ff16612c445760405162461bcd60e51b8152600401610318906154de565b610e6481613b2f565b60608315612c5c57508161192a565b61192a8383613b56565b805160208201206000612c848787612c7e8888612d24565b85611d4f565b600081815261016160205260409020600981015491925090612d195780546001600160a01b0319166001600160a01b038a161781558751612cce90600183019060208b0190614338565b508651612ce490600283019060208a0190614399565b508551612cfa90600383019060208901906143d4565b508451612d109060048301906020880190614426565b50600981018390555b505050505050505050565b6060600082516001600160401b03811115612d4157612d4161459d565b604051908082528060200260200182016040528015612d7457816020015b6060815260200190600190039081612d5f5790505b50905060005b8151811015612e4e57848181518110612d9557612d9561535d565b602002602001015151600014612e0557848181518110612db757612db761535d565b602002602001015180519060200120848281518110612dd857612dd861535d565b6020026020010151604051602001612df1929190615529565b604051602081830303815290604052612e20565b838181518110612e1757612e1761535d565b60200260200101515b828281518110612e3257612e3261535d565b602002602001018190525080612e47906154a3565b9050612d7a565b509392505050565b600063288ace0360e11b6318df743f60e31b63bf26d89760e01b6379dd796f60e01b6001600160e01b03198616821480612e9c57506001600160e01b0319868116908216145b80612eb357506001600160e01b0319868116908516145b80612ece57506001600160e01b03198616630271189760e51b145b806117f057506301ffc9a760e01b6001600160e01b03198716149695505050505050565b6000610b90613b80565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03831115612f295750600090506003612fad565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612f7d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612fa657600060019250925050612fad565b9150600090505b94509492505050565b6000816004811115612fca57612fca614b48565b03612fd25750565b6001816004811115612fe657612fe6614b48565b0361302e5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610318565b600281600481111561304257613042614b48565b0361308f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610318565b60038160048111156130a3576130a3614b48565b03610e645760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610318565b6000858152610161602090815260408083206001600160a01b038816845260088101909252909120805460ff161561318b5760405162461bcd60e51b815260206004820152602d60248201527f476f7665726e6f72436f6d7061746962696c697479427261766f3a20766f746560448201526c08185b1c9958591e4818d85cdd609a1b6064820152608401610318565b805460ff86166101000261ffff199091161760011781556131ab84613bf4565b81546001600160601b039190911662010000026dffffffffffffffffffffffff00001990911617815560ff85166131fb57838260060160008282546131f091906152a4565b90915550611d469050565b60001960ff86160161321b57838260050160008282546131f091906152a4565b60011960ff86160161323b57838260070160008282546131f091906152a4565b60405162461bcd60e51b815260206004820152602d60248201527f476f7665726e6f72436f6d7061746962696c697479427261766f3a20696e766160448201526c6c696420766f7465207479706560981b6064820152608401610318565b60006001600160e01b038211156128c65760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610318565b600080613310858585613c5c565b915091505b935093915050565b8154600160801b90819004600f0b6000818152600180860160205260409091209390935583546001600160801b03908116939091011602179055565b6101f85460405163e38335e560e01b81526001600160a01b039091169063e38335e59034906133959088908890889060009089906004016151e8565b6000604051808303818588803b1580156133ae57600080fd5b505af11580156133c2573d6000803e3d6000fd5b50505050505050505050565b600081815261013060205260408120600281015460ff16156133f35750600792915050565b6002810154610100900460ff161561340e5750600292915050565b600083815261013060205260408120546001600160401b0316908190036134775760405162461bcd60e51b815260206004820152601d60248201527f476f7665726e6f723a20756e6b6e6f776e2070726f706f73616c2069640000006044820152606401610318565b60006134816118a6565b65ffffffffffff16905080821061349d57506000949350505050565b600085815261013060205260409020600101546001600160401b03168181106134cc5750600195945050505050565b6134d586613dfb565b80156134f857506000868152610161602052604090206006810154600590910154115b156135095750600495945050505050565b50600395945050505050565b60006115af85858585613e3b565b60008160000361353557506000919050565b6000600161354284613ef1565b901c6001901b9050600181848161355b5761355b6153fd565b048201901c90506001818481613573576135736153fd565b048201901c9050600181848161358b5761358b6153fd565b048201901c905060018184816135a3576135a36153fd565b048201901c905060018184816135bb576135bb6153fd565b048201901c905060018184816135d3576135d36153fd565b048201901c905060018184816135eb576135eb6153fd565b048201901c905061192a81828581613605576136056153fd565b04613f85565b60005b81831015612e4e5760006136228484613f9b565b60008781526020902090915063ffffffff86169082015463ffffffff16111561364d5780925061365b565b6136588160016152a4565b93505b5061360e565b60003361366e8184613fb6565b6136ba5760405162461bcd60e51b815260206004820152601d60248201527f476f7665726e6f723a2070726f706f73657220726573747269637465640000006044820152606401610318565b60006136c46118a6565b65ffffffffffff1690506136d6611a82565b6136e583610af660018561534a565b101561374d5760405162461bcd60e51b815260206004820152603160248201527f476f7665726e6f723a2070726f706f73657220766f7465732062656c6f7720706044820152701c9bdc1bdcd85b081d1a1c995cda1bdb19607a1b6064820152608401610318565b60006137628888888880519060200120611d4f565b905086518851146137855760405162461bcd60e51b81526004016103189061555a565b85518851146137a65760405162461bcd60e51b81526004016103189061555a565b60008851116137f25760405162461bcd60e51b815260206004820152601860248201527711dbdd995c9b9bdc8e88195b5c1d1e481c1c9bdc1bdcd85b60421b6044820152606401610318565b600081815261013060205260409020546001600160401b0316156138625760405162461bcd60e51b815260206004820152602160248201527f476f7665726e6f723a2070726f706f73616c20616c72656164792065786973746044820152607360f81b6064820152608401610318565b600061386c6114aa565b61387690846152a4565b90506000613882610c75565b61388c90836152a4565b90506040518060e001604052806138a2846140a7565b6001600160401b031681526001600160a01b0387166020820152600060408201526060016138cf836140a7565b6001600160401b03908116825260006020808401829052604080850183905260609485018390528883526101308252918290208551815492870151878501519186166001600160e01b031990941693909317600160401b6001600160a01b039094168402176001600160e01b0316600160e01b60e09290921c91909102178155938501516080860151908416921c0217600183015560a08301516002909201805460c09094015161ffff1990941692151561ff00191692909217610100931515939093029290921790558a517f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e091859188918e918e918111156139d4576139d461459d565b604051908082528060200260200182016040528015613a0757816020015b60608152602001906001900390816139f25790505b508d88888f604051613a219998979695949392919061559b565b60405180910390a1509098975050505050505050565b600054610100900460ff16613a5e5760405162461bcd60e51b8152600401610318906154de565b6067613a6a838261567e565b506068613a77828261567e565b50506000606581905560665550565b600054610100900460ff16613aad5760405162461bcd60e51b8152600401610318906154de565b61012f613aba828261567e565b5050565b600054610100900460ff166119dd5760405162461bcd60e51b8152600401610318906154de565b600054610100900460ff16613b0c5760405162461bcd60e51b8152600401610318906154de565b61019380546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16610e5b5760405162461bcd60e51b8152600401610318906154de565b815115613b665781518083602001fd5b8060405162461bcd60e51b81526004016103189190614756565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f613bab61410f565b613bb3614168565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60006001600160601b038211156128c65760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201526536206269747360d01b6064820152608401610318565b825460009081908015613da2576000613c7a8761294c60018561534a565b60408051808201909152905463ffffffff808216808452600160201b9092046001600160e01b031660208401529192509087161015613cfb5760405162461bcd60e51b815260206004820152601b60248201527f436865636b706f696e743a2064656372656173696e67206b65797300000000006044820152606401610318565b805163ffffffff808816911603613d435784613d1c8861294c60018661534a565b80546001600160e01b0392909216600160201b0263ffffffff909216919091179055613d92565b6040805180820190915263ffffffff80881682526001600160e01b0380881660208085019182528b54600181018d5560008d81529190912094519151909216600160201b029216919091179101555b6020015192508391506133159050565b50506040805180820190915263ffffffff80851682526001600160e01b0380851660208085019182528854600181018a5560008a815291822095519251909316600160201b029190931617920191909155905081613315565b6000818152610161602052604081206005810154613e32610b4285600090815261013060205260409020546001600160401b031690565b11159392505050565b600080613e4a86868686614199565b60008181526101f96020526040902054909150156115af576101f85460008281526101f960205260409081902054905163c4d252f560e01b81526001600160a01b039092169163c4d252f591613ea69160040190815260200190565b600060405180830381600087803b158015613ec057600080fd5b505af1158015613ed4573d6000803e3d6000fd5b50505060008281526101f960205260408120555095945050505050565b600080608083901c15613f0657608092831c92015b604083901c15613f1857604092831c92015b602083901c15613f2a57602092831c92015b601083901c15613f3c57601092831c92015b600883901c15613f4e57600892831c92015b600483901c15613f6057600492831c92015b600283901c15613f7257600292831c92015b600183901c15610c6f5760010192915050565b6000818310613f94578161192a565b5090919050565b6000613faa6002848418615413565b61192a908484166152a4565b80516000906034811015613fce576001915050610c6f565b82810160131901516001600160a01b031981166b046e0e4dee0dee6cae47a60f60a31b1461400157600192505050610c6f565b60008061400f60288561534a565b90505b83811015614086576000806140468884815181106140325761403261535d565b01602001516001600160f81b0319166142a6565b915091508161405e5760019650505050505050610c6f565b8060ff166004856001600160a01b0316901b17935050508061407f906154a3565b9050614012565b50856001600160a01b0316816001600160a01b031614935050505092915050565b60006001600160401b038211156128c65760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201526534206269747360d01b6064820152608401610318565b60008061411a6129e5565b805190915015614131578051602090910120919050565b60655480156141405792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b6000806141736129f4565b80519091501561418a578051602090910120919050565b60665480156141405792915050565b6000806141a886868686611d4f565b905060006141b58261156b565b905060028160078111156141cb576141cb614b48565b141580156141eb575060068160078111156141e8576141e8614b48565b14155b80156142095750600781600781111561420657614206614b48565b14155b6142555760405162461bcd60e51b815260206004820152601d60248201527f476f7665726e6f723a2070726f706f73616c206e6f74206163746976650000006044820152606401610318565b6000828152610130602052604090819020600201805461ff001916610100179055517f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c906110ed9084815260200190565b60008060f883901c602f811180156142c15750603a8160ff16105b156142d657600194602f199091019350915050565b8060ff1660401080156142ec575060478160ff16105b15614301576001946036199091019350915050565b8060ff166060108015614317575060678160ff16105b1561432c576001946056199091019350915050565b50600093849350915050565b82805482825590600052602060002090810192821561438d579160200282015b8281111561438d57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614358565b506128c6929150614478565b82805482825590600052602060002090810192821561438d579160200282015b8281111561438d5782518255916020019190600101906143b9565b82805482825590600052602060002090810192821561441a579160200282015b8281111561441a578251829061440a908261567e565b50916020019190600101906143f4565b506128c692915061448d565b82805482825590600052602060002090810192821561446c579160200282015b8281111561446c578251829061445c908261567e565b5091602001919060010190614446565b506128c69291506144aa565b5b808211156128c65760008155600101614479565b808211156128c65760006144a182826144c7565b5060010161448d565b808211156128c65760006144be82826144c7565b506001016144aa565b5080546144d39061516d565b6000825580601f106144e3575050565b601f016020900490600052602060002090810190610e649190614478565b60006020828403121561451357600080fd5b5035919050565b60006020828403121561452c57600080fd5b81356001600160e01b03198116811461192a57600080fd5b803560ff8116811461166057600080fd5b60008083601f84011261456757600080fd5b5081356001600160401b0381111561457e57600080fd5b60208301915083602082850101111561459657600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156145db576145db61459d565b604052919050565b60006001600160401b038211156145fc576145fc61459d565b50601f01601f191660200190565b600082601f83011261461b57600080fd5b813561462e614629826145e3565b6145b3565b81815284602083860101111561464357600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060008060e0898b03121561467c57600080fd5b8835975061468c60208a01614544565b965060408901356001600160401b03808211156146a857600080fd5b6146b48c838d01614555565b909850965060608b01359150808211156146cd57600080fd5b506146da8b828c0161460a565b9450506146e960808a01614544565b925060a0890135915060c089013590509295985092959890939650565b60005b83811015614721578181015183820152602001614709565b50506000910152565b60008151808452614742816020860160208601614706565b601f01601f19169290920160200192915050565b60208152600061192a602083018461472a565b6001600160a01b0381168114610e6457600080fd5b6000806000806080858703121561479457600080fd5b843561479f81614769565b935060208501356147af81614769565b92506040850135915060608501356001600160401b038111156147d157600080fd5b6147dd8782880161460a565b91505092959194509250565b60006001600160401b038211156148025761480261459d565b5060051b60200190565b600082601f83011261481d57600080fd5b8135602061482d614629836147e9565b82815260059290921b8401810191818101908684111561484c57600080fd5b8286015b8481101561487057803561486381614769565b8352918301918301614850565b509695505050505050565b600082601f83011261488c57600080fd5b8135602061489c614629836147e9565b82815260059290921b840181019181810190868411156148bb57600080fd5b8286015b8481101561487057803583529183019183016148bf565b600082601f8301126148e757600080fd5b813560206148f7614629836147e9565b82815260059290921b8401810191818101908684111561491657600080fd5b8286015b848110156148705780356001600160401b038111156149395760008081fd5b6149478986838b010161460a565b84525091830191830161491a565b6000806000806080858703121561496b57600080fd5b84356001600160401b038082111561498257600080fd5b61498e8883890161480c565b955060208701359150808211156149a457600080fd5b6149b08883890161487b565b945060408701359150808211156149c657600080fd5b506149d3878288016148d6565b949793965093946060013593505050565b600081518084526020808501945080840160005b83811015614a1d5781516001600160a01b0316875295820195908201906001016149f8565b509495945050505050565b600081518084526020808501945080840160005b83811015614a1d57815187529582019590820190600101614a3c565b600081518084526020808501808196508360051b8101915082860160005b85811015614aa0578284038952614a8e84835161472a565b98850198935090840190600101614a76565b5091979650505050505050565b608081526000614ac060808301876149e4565b8281036020840152614ad28187614a28565b90508281036040840152614ae68186614a58565b905082810360608401526115608185614a58565b600080600080600060a08688031215614b1257600080fd5b85359450614b2260208701614544565b9350614b3060408701614544565b94979396509394606081013594506080013592915050565b634e487b7160e01b600052602160045260246000fd5b6020810160088310614b8057634e487b7160e01b600052602160045260246000fd5b91905290565b60008060408385031215614b9957600080fd5b823591506020830135614bab81614769565b809150509250929050565b60008060408385031215614bc957600080fd5b82359150614bd960208401614544565b90509250929050565b600080600080600060808688031215614bfa57600080fd5b85359450614c0a60208701614544565b935060408601356001600160401b0380821115614c2657600080fd5b614c3289838a01614555565b90955093506060880135915080821115614c4b57600080fd5b50614c588882890161460a565b9150509295509295909350565b60008060008060608587031215614c7b57600080fd5b84359350614c8b60208601614544565b925060408501356001600160401b03811115614ca657600080fd5b614cb287828801614555565b95989497509550505050565b60008060008060808587031215614cd457600080fd5b84356001600160401b0380821115614ceb57600080fd5b614cf78883890161480c565b95506020870135915080821115614d0d57600080fd5b614d198883890161487b565b94506040870135915080821115614d2f57600080fd5b614d3b888389016148d6565b93506060870135915080821115614d5157600080fd5b506147dd8782880161460a565b60ff60f81b8816815260e060208201526000614d7d60e083018961472a565b8281036040840152614d8f818961472a565b606084018890526001600160a01b038716608085015260a0840186905283810360c08501529050610dce8185614a28565b600080600060608486031215614dd557600080fd5b8335614de081614769565b92506020840135915060408401356001600160401b03811115614e0257600080fd5b614e0e8682870161460a565b9150509250925092565b600060208284031215614e2a57600080fd5b813561192a81614769565b600080600080600060a08688031215614e4d57600080fd5b8535614e5881614769565b94506020860135614e6881614769565b935060408601356001600160401b0380821115614e8457600080fd5b614e9089838a0161487b565b94506060880135915080821115614ea657600080fd5b614eb289838a0161487b565b93506080880135915080821115614c4b57600080fd5b60008060008060808587031215614ede57600080fd5b8435614ee981614769565b93506020850135614ef981614769565b9250604085013591506060850135614f1081614769565b939692955090935050565b60008060008060608587031215614f3157600080fd5b8435614f3c81614769565b93506020850135925060408501356001600160401b03811115614ca657600080fd5b600082601f830112614f6f57600080fd5b81356020614f7f614629836147e9565b82815260059290921b84018101918181019086841115614f9e57600080fd5b8286015b848110156148705780356001600160401b03811115614fc15760008081fd5b614fcf8986838b010161460a565b845250918301918301614fa2565b600080600080600060a08688031215614ff557600080fd5b85356001600160401b038082111561500c57600080fd5b61501889838a0161480c565b9650602088013591508082111561502e57600080fd5b61503a89838a0161487b565b9550604088013591508082111561505057600080fd5b61505c89838a01614f5e565b9450606088013591508082111561507257600080fd5b614eb289838a016148d6565b6000806040838503121561509157600080fd5b823561509c81614769565b946020939093013593505050565b600080600080600060a086880312156150c257600080fd5b85356150cd81614769565b945060208601356150dd81614769565b9350604086013592506060860135915060808601356001600160401b0381111561510657600080fd5b614c588882890161460a565b60006020828403121561512457600080fd5b5051919050565b8183823760009101908152919050565b602080825260189082015277476f7665726e6f723a206f6e6c79476f7665726e616e636560401b604082015260600190565b600181811c9082168061518157607f821691505b6020821081036151a157634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526021908201527f476f7665726e6f723a2070726f706f73616c206e6f74207375636365737366756040820152601b60fa1b606082015260800190565b60a0815260006151fb60a08301886149e4565b828103602084015261520d8188614a28565b905082810360408401526152218187614a58565b60608401959095525050608001529392505050565b60c08152600061524960c08301896149e4565b828103602084015261525b8189614a28565b9050828103604084015261526f8188614a58565b60608401969096525050608081019290925260a0909101529392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610c6f57610c6f61528e565b65ffffffffffff8281168282160390808211156152d6576152d661528e565b5092915050565b6000602082840312156152ef57600080fd5b81516001600160401b0381111561530557600080fd5b8201601f8101841361531657600080fd5b8051615324614629826145e3565b81815285602083850101111561533957600080fd5b6115af826020830160208601614706565b81810381811115610c6f57610c6f61528e565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561538557600080fd5b815165ffffffffffff8116811461192a57600080fd5b6080815260006153ae60808301876149e4565b82810360208401526153c08187614a28565b905082810360408401526153d48186614a58565b91505082606083015295945050505050565b8082028115828204841417610c6f57610c6f61528e565b634e487b7160e01b600052601260045260246000fd5b60008261543057634e487b7160e01b600052601260045260246000fd5b500490565b84815260ff841660208201528260408201526080606082015260006117f0608083018461472a565b85815260ff8516602082015283604082015260a06060820152600061548560a083018561472a565b8281036080840152615497818561472a565b98975050505050505050565b6000600182016154b5576154b561528e565b5060010190565b6000602082840312156154ce57600080fd5b8151801515811461192a57600080fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160e01b031983168152815160009061554c816004850160208701614706565b919091016004019392505050565b60208082526021908201527f476f7665726e6f723a20696e76616c69642070726f706f73616c206c656e67746040820152600d60fb1b606082015260800190565b8981526001600160a01b0389166020820152610120604082018190526000906155c68382018b6149e4565b905082810360608401526155da818a614a28565b905082810360808401526155ee8189614a58565b905082810360a08401526156028188614a58565b90508560c08401528460e0840152828103610100840152615623818561472a565b9c9b505050505050505050505050565b601f82111561567957600081815260208120601f850160051c8101602086101561565a5750805b601f850160051c820191505b8181101561159957828155600101615666565b505050565b81516001600160401b038111156156975761569761459d565b6156ab816156a5845461516d565b84615633565b602080601f8311600181146156e057600084156156c85750858301515b600019600386901b1c1916600185901b178555611599565b600085815260208120601f198616915b8281101561570f578886015182559484019460019091019084016156f0565b508582101561572d5787850151600019600388901b60f8161c191681555b5050505050600190811b0190555056fe476f7665726e6f723a2072656c617920726576657274656420776974686f7574206d657373616765a2646970667358221220ba7affd71155ab5d07348383105a5cdaec3c12c44bf7888181d5259042085dd464736f6c63430008130033","deployedBytecode":"0x6080604052600436106102b85760003560e01c80637b3c71d311610170578063c28bc2fa116100cc578063deaaa7cc11610085578063deaaa7cc146109dc578063e23a9a5214610a10578063eb9019d414610adb578063f23a6e6114610afb578063f8ce560a14610b27578063fc0c546a14610b47578063fe0d94c114610b6857600080fd5b8063c28bc2fa14610904578063c59057e414610917578063d33219b414610937578063da95691a14610956578063dd4e2ba514610976578063ddf0b009146109bc57600080fd5b8063a7713a7011610129578063a7713a7014610814578063a890c91014610829578063ab58fb8e14610849578063b58131b014610869578063bc197c811461087e578063be203094146108aa578063c01f9e37146108ca57600080fd5b80637b3c71d31461074c5780637d5e81e21461076c57806384b0196e1461078c57806391ddadf4146107b457806397c3d334146107e05780639a802a6d146107f457600080fd5b80632fe3e2611161021f57806343859632116101d85780634385963214610657578063452115d6146106a25780634bf5d7e9146106c257806354fd4d50146106d757806356781388146106ec5780635f398a141461070c57806360c4247f1461072c57600080fd5b80632fe3e26114610571578063328dd982146105a55780633932abb1146105d55780633bccf4fd146105ea5780633e4f49e61461060a57806340e58ee51461063757600080fd5b8063143489d011610271578063143489d014610458578063150b7a02146104ae578063160cbed7146104f257806324bc1a64146105125780632656227d146105275780632d63f6931461053a57600080fd5b8063013cf08b1461032857806301ffc9a7146103a357806302a251a3146103d357806303420181146103f657806306f3f9e61461041657806306fdde031461043657600080fd5b3661032357306102c6610b7b565b6001600160a01b0316146103215760405162461bcd60e51b815260206004820152601f60248201527f476f7665726e6f723a206d7573742073656e6420746f206578656375746f720060448201526064015b60405180910390fd5b005b600080fd5b34801561033457600080fd5b50610348610343366004614501565b610b95565b604080519a8b526001600160a01b0390991660208b0152978901969096526060880194909452608087019290925260a086015260c085015260e084015215156101008301521515610120820152610140015b60405180910390f35b3480156103af57600080fd5b506103c36103be36600461451a565b610c64565b604051901515815260200161039a565b3480156103df57600080fd5b506103e8610c75565b60405190815260200161039a565b34801561040257600080fd5b506103e8610411366004614660565b610ce4565b34801561042257600080fd5b50610321610431366004614501565b610ddc565b34801561044257600080fd5b5061044b610e67565b60405161039a9190614756565b34801561046457600080fd5b50610496610473366004614501565b60009081526101306020526040902054600160401b90046001600160a01b031690565b6040516001600160a01b03909116815260200161039a565b3480156104ba57600080fd5b506104d96104c936600461477e565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200161039a565b3480156104fe57600080fd5b506103e861050d366004614955565b610efa565b34801561051e57600080fd5b506103e86110ff565b6103e8610535366004614955565b611125565b34801561054657600080fd5b506103e8610555366004614501565b600090815261013060205260409020546001600160401b031690565b34801561057d57600080fd5b506103e87fb3b3f3b703cd84ce352197dcff232b1b5d3cfb2025ce47cf04742d0651f1af8881565b3480156105b157600080fd5b506105c56105c0366004614501565b611218565b60405161039a9493929190614aad565b3480156105e157600080fd5b506103e86114aa565b3480156105f657600080fd5b506103e8610605366004614afa565b6114f5565b34801561061657600080fd5b5061062a610625366004614501565b61156b565b60405161039a9190614b5e565b34801561064357600080fd5b50610321610652366004614501565b611576565b34801561066357600080fd5b506103c3610672366004614b86565b6000828152610161602090815260408083206001600160a01b038516845260080190915290205460ff1692915050565b3480156106ae57600080fd5b506103e86106bd366004614955565b6115a1565b3480156106ce57600080fd5b5061044b6115b8565b3480156106e357600080fd5b5061044b611665565b3480156106f857600080fd5b506103e8610707366004614bb6565b611680565b34801561071857600080fd5b506103e8610727366004614be2565b6116a9565b34801561073857600080fd5b506103e8610747366004614501565b6116f3565b34801561075857600080fd5b506103e8610767366004614c65565b6117a8565b34801561077857600080fd5b506103e8610787366004614cbe565b6117fa565b34801561079857600080fd5b506107a1611808565b60405161039a9796959493929190614d5e565b3480156107c057600080fd5b506107c96118a6565b60405165ffffffffffff909116815260200161039a565b3480156107ec57600080fd5b5060646103e8565b34801561080057600080fd5b506103e861080f366004614dc0565b61191a565b34801561082057600080fd5b506103e8611931565b34801561083557600080fd5b50610321610844366004614e18565b61195e565b34801561085557600080fd5b506103e8610864366004614501565b6119e6565b34801561087557600080fd5b506103e8611a82565b34801561088a57600080fd5b506104d9610899366004614e35565b63bc197c8160e01b95945050505050565b3480156108b657600080fd5b506103216108c5366004614ec8565b611acd565b3480156108d657600080fd5b506103e86108e5366004614501565b600090815261013060205260409020600101546001600160401b031690565b610321610912366004614f1b565b611c3f565b34801561092357600080fd5b506103e8610932366004614955565b611d4f565b34801561094357600080fd5b506101f8546001600160a01b0316610496565b34801561096257600080fd5b506103e8610971366004614fdd565b611d89565b34801561098257600080fd5b5060408051808201909152601a81527f737570706f72743d627261766f2671756f72756d3d627261766f000000000000602082015261044b565b3480156109c857600080fd5b506103216109d7366004614501565b611e10565b3480156109e857600080fd5b506103e87f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f81565b348015610a1c57600080fd5b50610aab610a2b366004614b86565b6040805160608101825260008082526020820181905291810191909152506000918252610161602090815260408084206001600160a01b0393909316845260089092018152918190208151606081018352905460ff8082161515835261010082041693820193909352620100009092046001600160601b03169082015290565b6040805182511515815260208084015160ff1690820152918101516001600160601b03169082015260600161039a565b348015610ae757600080fd5b506103e8610af636600461507e565b611e33565b348015610b0757600080fd5b506104d9610b163660046150aa565b63f23a6e6160e01b95945050505050565b348015610b3357600080fd5b506103e8610b42366004614501565b611e54565b348015610b5357600080fd5b5061019354610496906001600160a01b031681565b610321610b76366004614501565b611ee3565b6000610b906101f8546001600160a01b031690565b905090565b8060008080808080808080610ba98a6119e6565b60008c815261013060205260409020549098506001600160401b031660008c815261013060205260409020600101549097506001600160401b031660008c81526101616020526040812080546005820154600683015460078401546001600160a01b039093169e50949a509850929650919450610c258d61156b565b90506002816007811115610c3b57610c3b614b48565b1493506007816007811115610c5257610c52614b48565b14925050509193959799509193959799565b6000610c6f82611f06565b92915050565b61022a54604080516302a251a360e01b815290516000926001600160a01b0316916302a251a39160048083019260209291908290030181865afa158015610cc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b909190615112565b600080610d88610d807fb3b3f3b703cd84ce352197dcff232b1b5d3cfb2025ce47cf04742d0651f1af888c8c8c8c604051610d2092919061512b565b60405180910390208b80519060200120604051602001610d65959493929190948552602085019390935260ff9190911660408401526060830152608082015260a00190565b60405160208183030381529060405280519060200120611f2b565b868686611f58565b9050610dce8a828b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d9250611f76915050565b9a9950505050505050505050565b610de4610b7b565b6001600160a01b0316336001600160a01b031614610e145760405162461bcd60e51b81526004016103189061513b565b30610e1d610b7b565b6001600160a01b031614610e5b5760008036604051610e3d92919061512b565b604051809103902090505b80610e546101316120cc565b03610e4857505b610e6481612142565b50565b606061012f8054610e779061516d565b80601f0160208091040260200160405190810160405280929190818152602001828054610ea39061516d565b8015610ef05780601f10610ec557610100808354040283529160200191610ef0565b820191906000526020600020905b815481529060010190602001808311610ed357829003601f168201915b5050505050905090565b600080610f0986868686611d4f565b90506004610f168261156b565b6007811115610f2757610f27614b48565b14610f445760405162461bcd60e51b8152600401610318906151a7565b6101f8546040805163793d064960e11b815290516000926001600160a01b03169163f27a0c929160048083019260209291908290030181865afa158015610f8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb39190615112565b6101f85460405163b1c5f42760e01b81529192506001600160a01b03169063b1c5f42790610fee908a908a908a906000908b906004016151e8565b602060405180830381865afa15801561100b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102f9190615112565b60008381526101f96020526040808220929092556101f85491516308f2a0bb60e41b81526001600160a01b0390921691638f2a0bb09161107c918b918b918b91908b908990600401615236565b600060405180830381600087803b15801561109657600080fd5b505af11580156110aa573d6000803e3d6000fd5b505050507f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda28928282426110dc91906152a4565b604080519283526020830191909152015b60405180910390a15095945050505050565b6000610b90600161110e6118a6565b61111891906152b7565b65ffffffffffff16611e54565b60008061113486868686611d4f565b905060006111418261156b565b9050600481600781111561115757611157614b48565b14806111745750600581600781111561117257611172614b48565b145b6111905760405162461bcd60e51b8152600401610318906151a7565b6000828152610130602052604090819020600201805460ff19166001179055517f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f906111df9084815260200190565b60405180910390a16111f482888888886122b3565b611201828888888861234d565b61120e828888888861235a565b5095945050505050565b606080606080600061016160008781526020019081526020016000209050806001018160020182600301836004018380548060200260200160405190810160405280929190818152602001828054801561129b57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161127d575b50505050509350828054806020026020016040519081016040528092919081815260200182805480156112ed57602002820191906000526020600020905b8154815260200190600101908083116112d9575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b828210156113c15783829060005260206000200180546113349061516d565b80601f01602080910402602001604051908101604052809291908181526020018280546113609061516d565b80156113ad5780601f10611382576101008083540402835291602001916113ad565b820191906000526020600020905b81548152906001019060200180831161139057829003601f168201915b505050505081526020019060010190611315565b50505050915080805480602002602001604051908101604052809291908181526020016000905b828210156114945783829060005260206000200180546114079061516d565b80601f01602080910402602001604051908101604052809291908181526020018280546114339061516d565b80156114805780601f1061145557610100808354040283529160200191611480565b820191906000526020600020905b81548152906001019060200180831161146357829003601f168201915b5050505050815260200190600101906113e8565b5050505090509450945094509450509193509193565b61022a5460408051633932abb160e01b815290516000926001600160a01b031691633932abb19160048083019260209291908290030181865afa158015610cc0573d6000803e3d6000fd5b604080517f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f602082015290810186905260ff85166060820152600090819061154390610d8090608001610d65565b905061156087828860405180602001604052806000815250612395565b979650505050505050565b6000610c6f826123b8565b60008060008061158585612505565b9350935093509350611599848484846115a1565b505050505050565b60006115af85858585612796565b95945050505050565b6101935460408051634bf5d7e960e01b815290516060926001600160a01b031691634bf5d7e99160048083019260009291908290030181865afa92505050801561162457506040513d6000823e601f3d908101601f1916820160405261162191908101906152dd565b60015b611660575060408051808201909152601d81527f6d6f64653d626c6f636b6e756d6265722666726f6d3d64656661756c74000000602082015290565b919050565b6040805180820190915260018152603160f81b602082015290565b6000803390506116a184828560405180602001604052806000815250612395565b949350505050565b60008033905061156087828888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a9250611f76915050565b6101c75460009080820361170c5750506101c654919050565b60006101c761171c60018461534a565b8154811061172c5761172c61535d565b60009182526020918290206040805180820190915291015463ffffffff8116808352600160201b9091046001600160e01b0316928201929092529150841061178257602001516001600160e01b03169392505050565b61179761178e85612861565b6101c7906128ca565b6001600160e01b0316949350505050565b6000803390506117f086828787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061239592505050565b9695505050505050565b60006115af8585858561297d565b6000606080600080600060606065546000801b1480156118285750606654155b61186c5760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610318565b6118746129e5565b61187c6129f4565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61019354604080516324776b7d60e21b815290516000926001600160a01b0316916391ddadf49160048083019260209291908290030181865afa92505050801561190d575060408051601f3d908101601f1916820190925261190a91810190615373565b60015b61166057610b9043612a03565b6000611927848484612a6a565b90505b9392505050565b6101c75460009015611956576119486101c7612ae1565b6001600160e01b0316905090565b506101c65490565b611966610b7b565b6001600160a01b0316336001600160a01b0316146119965760405162461bcd60e51b81526004016103189061513b565b3061199f610b7b565b6001600160a01b0316146119dd57600080366040516119bf92919061512b565b604051809103902090505b806119d66101316120cc565b036119ca57505b610e6481612b11565b6101f85460008281526101f9602052604080822054905163d45c443560e01b81526004810191909152909182916001600160a01b039091169063d45c443590602401602060405180830381865afa158015611a45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a699190615112565b905080600114611a79578061192a565b60009392505050565b61022a5460408051630b58131b60e41b815290516000926001600160a01b03169163b58131b09160048083019260209291908290030181865afa158015610cc0573d6000803e3d6000fd5b600054610100900460ff1615808015611aed5750600054600160ff909116105b80611b075750303b158015611b07575060005460ff166001145b611b6a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610318565b6000805460ff191660011790558015611b8d576000805461ff0019166101001790555b611bbb6040518060400160405280600d81526020016c21b434b63223b7bb32b93737b960991b815250612b7c565b611bc484612bbd565b611bcd85612bed565b611bd683612c1d565b61022a80546001600160a01b0319166001600160a01b0384161790558015611c38576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b611c47610b7b565b6001600160a01b0316336001600160a01b031614611c775760405162461bcd60e51b81526004016103189061513b565b30611c80610b7b565b6001600160a01b031614611cbe5760008036604051611ca092919061512b565b604051809103902090505b80611cb76101316120cc565b03611cab57505b600080856001600160a01b0316858585604051611cdc92919061512b565b60006040518083038185875af1925050503d8060008114611d19576040519150601f19603f3d011682016040523d82523d6000602084013e611d1e565b606091505b5091509150611d46828260405180606001604052806028815260200161573e60289139612c4d565b50505050505050565b600084848484604051602001611d68949392919061539b565b60408051601f19818403018152919052805160209091012095945050505050565b60008251845114611ded5760405162461bcd60e51b815260206004820152602860248201527f476f7665726e6f72427261766f3a20696e76616c6964207369676e61747572656044820152670e640d8cadccee8d60c31b6064820152608401610318565b611dfb338787878787612c66565b6117f08686611e0a8787612d24565b856117fa565b600080600080611e1f85612505565b935093509350935061159984848484610efa565b600061192a8383611e4f60408051602081019091526000815290565b612a6a565b60006064611e61836116f3565b61019354604051632394e7a360e21b8152600481018690526001600160a01b0390911690638e539e8c90602401602060405180830381865afa158015611eab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ecf9190615112565b611ed991906153e6565b610c6f9190615413565b600080600080611ef285612505565b935093509350935061159984848484611125565b60006001600160e01b03198216636e665ced60e01b1480610c6f5750610c6f82612e56565b6000610c6f611f38612ef2565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000611f6987878787612efc565b9150915061120e81612fb6565b6000858152610130602052604081206001611f908861156b565b6007811115611fa157611fa1614b48565b14611ffa5760405162461bcd60e51b815260206004820152602360248201527f476f7665726e6f723a20766f7465206e6f742063757272656e746c792061637460448201526269766560e81b6064820152608401610318565b80546000906120149088906001600160401b031686612a6a565b905061202388888884886130fb565b835160000361207857866001600160a01b03167fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda48988848960405161206b9493929190615435565b60405180910390a2611560565b866001600160a01b03167fe2babfbac5889a709b63bb7f598b324e08bc5a4fb9ec647fb3cbc9ec07eb871289888489896040516120b995949392919061545d565b60405180910390a2979650505050505050565b60006120e78254600f81810b600160801b909204900b131590565b1561210557604051631ed9509560e11b815260040160405180910390fd5b508054600f0b6000818152600180840160205260408220805492905583546001600160801b03191692016001600160801b03169190911790915590565b60648111156121c55760405162461bcd60e51b815260206004820152604360248201527f476f7665726e6f72566f74657351756f72756d4672616374696f6e3a2071756f60448201527f72756d4e756d657261746f72206f7665722071756f72756d44656e6f6d696e616064820152623a37b960e91b608482015260a401610318565b60006121cf611931565b905080158015906121e157506101c754155b156122465760408051808201909152600081526101c7906020810161220584613299565b6001600160e01b039081169091528254600181018455600093845260209384902083519490930151909116600160201b0263ffffffff909316929092179101555b6122746122616122546118a6565b65ffffffffffff16612861565b61226a84613299565b6101c79190613302565b505060408051828152602081018490527f0553476bf02ef2726e8ce5ced78d63e26e602e4a2257b1f559418e24b4633997910160405180910390a15050565b306122bc610b7b565b6001600160a01b031614611c385760005b845181101561159957306001600160a01b03168582815181106122f2576122f261535d565b60200260200101516001600160a01b03160361233d5761233d83828151811061231d5761231d61535d565b60200260200101518051906020012061013161331d90919063ffffffff16565b612346816154a3565b90506122cd565b611c388585858585613359565b30612363610b7b565b6001600160a01b031614611c385761013154600f81810b600160801b909204900b1315611c3857600061013155611c38565b60006115af858585856123b360408051602081019091526000815290565b611f76565b6000806123c4836133ce565b905060048160078111156123da576123da614b48565b146123e55792915050565b60008381526101f9602052604090205480612401575092915050565b6101f854604051632ab0f52960e01b8152600481018390526001600160a01b0390911690632ab0f52990602401602060405180830381865afa15801561244b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246f91906154bc565b1561247e575060079392505050565b6101f854604051632c258a9f60e11b8152600481018390526001600160a01b039091169063584b153e90602401602060405180830381865afa1580156124c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ec91906154bc565b156124fb575060059392505050565b5060029392505050565b60608060606000806101616000878152602001908152602001600020905080600101816002016126d783600301805480602002602001604051908101604052809291908181526020016000905b828210156125fe5783829060005260206000200180546125719061516d565b80601f016020809104026020016040519081016040528092919081815260200182805461259d9061516d565b80156125ea5780601f106125bf576101008083540402835291602001916125ea565b820191906000526020600020905b8154815290600101906020018083116125cd57829003601f168201915b505050505081526020019060010190612552565b50505060048601805460408051602080840282018101909252828152935060009084015b828210156126ce5783829060005260206000200180546126419061516d565b80601f016020809104026020016040519081016040528092919081815260200182805461266d9061516d565b80156126ba5780601f1061268f576101008083540402835291602001916126ba565b820191906000526020600020905b81548152906001019060200180831161269d57829003601f168201915b505050505081526020019060010190612622565b50505050612d24565b600984015483546040805160208084028201810190925282815291869183018282801561272d57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161270f575b505050505093508280548060200260200160405190810160405280929190818152602001828054801561277f57602002820191906000526020600020905b81548152602001906001019080831161276b575b505050505092509450945094509450509193509193565b6000806127a586868686611d4f565b600081815261016160205260409020549091506001600160a01b0316338114806127f957506127d2611a82565b6127f78260016127e06118a6565b6127ea91906152b7565b65ffffffffffff16611e33565b105b6128555760405162461bcd60e51b815260206004820152602760248201527f476f7665726e6f72427261766f3a2070726f706f7365722061626f76652074686044820152661c995cda1bdb1960ca1b6064820152608401610318565b61156087878787613515565b600063ffffffff8211156128c65760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610318565b5090565b8154600090818160058111156129275760006128e584613523565b6128ef908561534a565b60008881526020902090915081015463ffffffff908116908716101561291757809150612925565b6129228160016152a4565b92505b505b60006129358787858561360b565b905080156129705761295a8761294c60018461534a565b600091825260209091200190565b54600160201b90046001600160e01b0316611560565b6000979650505050505050565b60006129d933868686516001600160401b0381111561299e5761299e61459d565b6040519080825280602002602001820160405280156129d157816020015b60608152602001906001900390816129bc5790505b508787612c66565b6115af85858585613661565b606060678054610e779061516d565b606060688054610e779061516d565b600065ffffffffffff8211156128c65760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203460448201526538206269747360d01b6064820152608401610318565b61019354604051630748d63560e31b81526001600160a01b038581166004830152602482018590526000921690633a46b1a890604401602060405180830381865afa158015612abd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119279190615112565b80546000908015611a7957612afb8361294c60018461534a565b54600160201b90046001600160e01b031661192a565b6101f854604080516001600160a01b03928316815291831660208301527f08f74ea46ef7894f65eabfb5e6e695de773a000b47c529ab559178069b226401910160405180910390a16101f880546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16612ba35760405162461bcd60e51b8152600401610318906154de565b612bb481612baf611665565b613a37565b610e6481613a86565b600054610100900460ff16612be45760405162461bcd60e51b8152600401610318906154de565b610e6481613abe565b600054610100900460ff16612c145760405162461bcd60e51b8152600401610318906154de565b610e6481613ae5565b600054610100900460ff16612c445760405162461bcd60e51b8152600401610318906154de565b610e6481613b2f565b60608315612c5c57508161192a565b61192a8383613b56565b805160208201206000612c848787612c7e8888612d24565b85611d4f565b600081815261016160205260409020600981015491925090612d195780546001600160a01b0319166001600160a01b038a161781558751612cce90600183019060208b0190614338565b508651612ce490600283019060208a0190614399565b508551612cfa90600383019060208901906143d4565b508451612d109060048301906020880190614426565b50600981018390555b505050505050505050565b6060600082516001600160401b03811115612d4157612d4161459d565b604051908082528060200260200182016040528015612d7457816020015b6060815260200190600190039081612d5f5790505b50905060005b8151811015612e4e57848181518110612d9557612d9561535d565b602002602001015151600014612e0557848181518110612db757612db761535d565b602002602001015180519060200120848281518110612dd857612dd861535d565b6020026020010151604051602001612df1929190615529565b604051602081830303815290604052612e20565b838181518110612e1757612e1761535d565b60200260200101515b828281518110612e3257612e3261535d565b602002602001018190525080612e47906154a3565b9050612d7a565b509392505050565b600063288ace0360e11b6318df743f60e31b63bf26d89760e01b6379dd796f60e01b6001600160e01b03198616821480612e9c57506001600160e01b0319868116908216145b80612eb357506001600160e01b0319868116908516145b80612ece57506001600160e01b03198616630271189760e51b145b806117f057506301ffc9a760e01b6001600160e01b03198716149695505050505050565b6000610b90613b80565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03831115612f295750600090506003612fad565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612f7d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612fa657600060019250925050612fad565b9150600090505b94509492505050565b6000816004811115612fca57612fca614b48565b03612fd25750565b6001816004811115612fe657612fe6614b48565b0361302e5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610318565b600281600481111561304257613042614b48565b0361308f5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610318565b60038160048111156130a3576130a3614b48565b03610e645760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610318565b6000858152610161602090815260408083206001600160a01b038816845260088101909252909120805460ff161561318b5760405162461bcd60e51b815260206004820152602d60248201527f476f7665726e6f72436f6d7061746962696c697479427261766f3a20766f746560448201526c08185b1c9958591e4818d85cdd609a1b6064820152608401610318565b805460ff86166101000261ffff199091161760011781556131ab84613bf4565b81546001600160601b039190911662010000026dffffffffffffffffffffffff00001990911617815560ff85166131fb57838260060160008282546131f091906152a4565b90915550611d469050565b60001960ff86160161321b57838260050160008282546131f091906152a4565b60011960ff86160161323b57838260070160008282546131f091906152a4565b60405162461bcd60e51b815260206004820152602d60248201527f476f7665726e6f72436f6d7061746962696c697479427261766f3a20696e766160448201526c6c696420766f7465207479706560981b6064820152608401610318565b60006001600160e01b038211156128c65760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610318565b600080613310858585613c5c565b915091505b935093915050565b8154600160801b90819004600f0b6000818152600180860160205260409091209390935583546001600160801b03908116939091011602179055565b6101f85460405163e38335e560e01b81526001600160a01b039091169063e38335e59034906133959088908890889060009089906004016151e8565b6000604051808303818588803b1580156133ae57600080fd5b505af11580156133c2573d6000803e3d6000fd5b50505050505050505050565b600081815261013060205260408120600281015460ff16156133f35750600792915050565b6002810154610100900460ff161561340e5750600292915050565b600083815261013060205260408120546001600160401b0316908190036134775760405162461bcd60e51b815260206004820152601d60248201527f476f7665726e6f723a20756e6b6e6f776e2070726f706f73616c2069640000006044820152606401610318565b60006134816118a6565b65ffffffffffff16905080821061349d57506000949350505050565b600085815261013060205260409020600101546001600160401b03168181106134cc5750600195945050505050565b6134d586613dfb565b80156134f857506000868152610161602052604090206006810154600590910154115b156135095750600495945050505050565b50600395945050505050565b60006115af85858585613e3b565b60008160000361353557506000919050565b6000600161354284613ef1565b901c6001901b9050600181848161355b5761355b6153fd565b048201901c90506001818481613573576135736153fd565b048201901c9050600181848161358b5761358b6153fd565b048201901c905060018184816135a3576135a36153fd565b048201901c905060018184816135bb576135bb6153fd565b048201901c905060018184816135d3576135d36153fd565b048201901c905060018184816135eb576135eb6153fd565b048201901c905061192a81828581613605576136056153fd565b04613f85565b60005b81831015612e4e5760006136228484613f9b565b60008781526020902090915063ffffffff86169082015463ffffffff16111561364d5780925061365b565b6136588160016152a4565b93505b5061360e565b60003361366e8184613fb6565b6136ba5760405162461bcd60e51b815260206004820152601d60248201527f476f7665726e6f723a2070726f706f73657220726573747269637465640000006044820152606401610318565b60006136c46118a6565b65ffffffffffff1690506136d6611a82565b6136e583610af660018561534a565b101561374d5760405162461bcd60e51b815260206004820152603160248201527f476f7665726e6f723a2070726f706f73657220766f7465732062656c6f7720706044820152701c9bdc1bdcd85b081d1a1c995cda1bdb19607a1b6064820152608401610318565b60006137628888888880519060200120611d4f565b905086518851146137855760405162461bcd60e51b81526004016103189061555a565b85518851146137a65760405162461bcd60e51b81526004016103189061555a565b60008851116137f25760405162461bcd60e51b815260206004820152601860248201527711dbdd995c9b9bdc8e88195b5c1d1e481c1c9bdc1bdcd85b60421b6044820152606401610318565b600081815261013060205260409020546001600160401b0316156138625760405162461bcd60e51b815260206004820152602160248201527f476f7665726e6f723a2070726f706f73616c20616c72656164792065786973746044820152607360f81b6064820152608401610318565b600061386c6114aa565b61387690846152a4565b90506000613882610c75565b61388c90836152a4565b90506040518060e001604052806138a2846140a7565b6001600160401b031681526001600160a01b0387166020820152600060408201526060016138cf836140a7565b6001600160401b03908116825260006020808401829052604080850183905260609485018390528883526101308252918290208551815492870151878501519186166001600160e01b031990941693909317600160401b6001600160a01b039094168402176001600160e01b0316600160e01b60e09290921c91909102178155938501516080860151908416921c0217600183015560a08301516002909201805460c09094015161ffff1990941692151561ff00191692909217610100931515939093029290921790558a517f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e091859188918e918e918111156139d4576139d461459d565b604051908082528060200260200182016040528015613a0757816020015b60608152602001906001900390816139f25790505b508d88888f604051613a219998979695949392919061559b565b60405180910390a1509098975050505050505050565b600054610100900460ff16613a5e5760405162461bcd60e51b8152600401610318906154de565b6067613a6a838261567e565b506068613a77828261567e565b50506000606581905560665550565b600054610100900460ff16613aad5760405162461bcd60e51b8152600401610318906154de565b61012f613aba828261567e565b5050565b600054610100900460ff166119dd5760405162461bcd60e51b8152600401610318906154de565b600054610100900460ff16613b0c5760405162461bcd60e51b8152600401610318906154de565b61019380546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16610e5b5760405162461bcd60e51b8152600401610318906154de565b815115613b665781518083602001fd5b8060405162461bcd60e51b81526004016103189190614756565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f613bab61410f565b613bb3614168565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60006001600160601b038211156128c65760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201526536206269747360d01b6064820152608401610318565b825460009081908015613da2576000613c7a8761294c60018561534a565b60408051808201909152905463ffffffff808216808452600160201b9092046001600160e01b031660208401529192509087161015613cfb5760405162461bcd60e51b815260206004820152601b60248201527f436865636b706f696e743a2064656372656173696e67206b65797300000000006044820152606401610318565b805163ffffffff808816911603613d435784613d1c8861294c60018661534a565b80546001600160e01b0392909216600160201b0263ffffffff909216919091179055613d92565b6040805180820190915263ffffffff80881682526001600160e01b0380881660208085019182528b54600181018d5560008d81529190912094519151909216600160201b029216919091179101555b6020015192508391506133159050565b50506040805180820190915263ffffffff80851682526001600160e01b0380851660208085019182528854600181018a5560008a815291822095519251909316600160201b029190931617920191909155905081613315565b6000818152610161602052604081206005810154613e32610b4285600090815261013060205260409020546001600160401b031690565b11159392505050565b600080613e4a86868686614199565b60008181526101f96020526040902054909150156115af576101f85460008281526101f960205260409081902054905163c4d252f560e01b81526001600160a01b039092169163c4d252f591613ea69160040190815260200190565b600060405180830381600087803b158015613ec057600080fd5b505af1158015613ed4573d6000803e3d6000fd5b50505060008281526101f960205260408120555095945050505050565b600080608083901c15613f0657608092831c92015b604083901c15613f1857604092831c92015b602083901c15613f2a57602092831c92015b601083901c15613f3c57601092831c92015b600883901c15613f4e57600892831c92015b600483901c15613f6057600492831c92015b600283901c15613f7257600292831c92015b600183901c15610c6f5760010192915050565b6000818310613f94578161192a565b5090919050565b6000613faa6002848418615413565b61192a908484166152a4565b80516000906034811015613fce576001915050610c6f565b82810160131901516001600160a01b031981166b046e0e4dee0dee6cae47a60f60a31b1461400157600192505050610c6f565b60008061400f60288561534a565b90505b83811015614086576000806140468884815181106140325761403261535d565b01602001516001600160f81b0319166142a6565b915091508161405e5760019650505050505050610c6f565b8060ff166004856001600160a01b0316901b17935050508061407f906154a3565b9050614012565b50856001600160a01b0316816001600160a01b031614935050505092915050565b60006001600160401b038211156128c65760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201526534206269747360d01b6064820152608401610318565b60008061411a6129e5565b805190915015614131578051602090910120919050565b60655480156141405792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b6000806141736129f4565b80519091501561418a578051602090910120919050565b60665480156141405792915050565b6000806141a886868686611d4f565b905060006141b58261156b565b905060028160078111156141cb576141cb614b48565b141580156141eb575060068160078111156141e8576141e8614b48565b14155b80156142095750600781600781111561420657614206614b48565b14155b6142555760405162461bcd60e51b815260206004820152601d60248201527f476f7665726e6f723a2070726f706f73616c206e6f74206163746976650000006044820152606401610318565b6000828152610130602052604090819020600201805461ff001916610100179055517f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c906110ed9084815260200190565b60008060f883901c602f811180156142c15750603a8160ff16105b156142d657600194602f199091019350915050565b8060ff1660401080156142ec575060478160ff16105b15614301576001946036199091019350915050565b8060ff166060108015614317575060678160ff16105b1561432c576001946056199091019350915050565b50600093849350915050565b82805482825590600052602060002090810192821561438d579160200282015b8281111561438d57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614358565b506128c6929150614478565b82805482825590600052602060002090810192821561438d579160200282015b8281111561438d5782518255916020019190600101906143b9565b82805482825590600052602060002090810192821561441a579160200282015b8281111561441a578251829061440a908261567e565b50916020019190600101906143f4565b506128c692915061448d565b82805482825590600052602060002090810192821561446c579160200282015b8281111561446c578251829061445c908261567e565b5091602001919060010190614446565b506128c69291506144aa565b5b808211156128c65760008155600101614479565b808211156128c65760006144a182826144c7565b5060010161448d565b808211156128c65760006144be82826144c7565b506001016144aa565b5080546144d39061516d565b6000825580601f106144e3575050565b601f016020900490600052602060002090810190610e649190614478565b60006020828403121561451357600080fd5b5035919050565b60006020828403121561452c57600080fd5b81356001600160e01b03198116811461192a57600080fd5b803560ff8116811461166057600080fd5b60008083601f84011261456757600080fd5b5081356001600160401b0381111561457e57600080fd5b60208301915083602082850101111561459657600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156145db576145db61459d565b604052919050565b60006001600160401b038211156145fc576145fc61459d565b50601f01601f191660200190565b600082601f83011261461b57600080fd5b813561462e614629826145e3565b6145b3565b81815284602083860101111561464357600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060008060e0898b03121561467c57600080fd5b8835975061468c60208a01614544565b965060408901356001600160401b03808211156146a857600080fd5b6146b48c838d01614555565b909850965060608b01359150808211156146cd57600080fd5b506146da8b828c0161460a565b9450506146e960808a01614544565b925060a0890135915060c089013590509295985092959890939650565b60005b83811015614721578181015183820152602001614709565b50506000910152565b60008151808452614742816020860160208601614706565b601f01601f19169290920160200192915050565b60208152600061192a602083018461472a565b6001600160a01b0381168114610e6457600080fd5b6000806000806080858703121561479457600080fd5b843561479f81614769565b935060208501356147af81614769565b92506040850135915060608501356001600160401b038111156147d157600080fd5b6147dd8782880161460a565b91505092959194509250565b60006001600160401b038211156148025761480261459d565b5060051b60200190565b600082601f83011261481d57600080fd5b8135602061482d614629836147e9565b82815260059290921b8401810191818101908684111561484c57600080fd5b8286015b8481101561487057803561486381614769565b8352918301918301614850565b509695505050505050565b600082601f83011261488c57600080fd5b8135602061489c614629836147e9565b82815260059290921b840181019181810190868411156148bb57600080fd5b8286015b8481101561487057803583529183019183016148bf565b600082601f8301126148e757600080fd5b813560206148f7614629836147e9565b82815260059290921b8401810191818101908684111561491657600080fd5b8286015b848110156148705780356001600160401b038111156149395760008081fd5b6149478986838b010161460a565b84525091830191830161491a565b6000806000806080858703121561496b57600080fd5b84356001600160401b038082111561498257600080fd5b61498e8883890161480c565b955060208701359150808211156149a457600080fd5b6149b08883890161487b565b945060408701359150808211156149c657600080fd5b506149d3878288016148d6565b949793965093946060013593505050565b600081518084526020808501945080840160005b83811015614a1d5781516001600160a01b0316875295820195908201906001016149f8565b509495945050505050565b600081518084526020808501945080840160005b83811015614a1d57815187529582019590820190600101614a3c565b600081518084526020808501808196508360051b8101915082860160005b85811015614aa0578284038952614a8e84835161472a565b98850198935090840190600101614a76565b5091979650505050505050565b608081526000614ac060808301876149e4565b8281036020840152614ad28187614a28565b90508281036040840152614ae68186614a58565b905082810360608401526115608185614a58565b600080600080600060a08688031215614b1257600080fd5b85359450614b2260208701614544565b9350614b3060408701614544565b94979396509394606081013594506080013592915050565b634e487b7160e01b600052602160045260246000fd5b6020810160088310614b8057634e487b7160e01b600052602160045260246000fd5b91905290565b60008060408385031215614b9957600080fd5b823591506020830135614bab81614769565b809150509250929050565b60008060408385031215614bc957600080fd5b82359150614bd960208401614544565b90509250929050565b600080600080600060808688031215614bfa57600080fd5b85359450614c0a60208701614544565b935060408601356001600160401b0380821115614c2657600080fd5b614c3289838a01614555565b90955093506060880135915080821115614c4b57600080fd5b50614c588882890161460a565b9150509295509295909350565b60008060008060608587031215614c7b57600080fd5b84359350614c8b60208601614544565b925060408501356001600160401b03811115614ca657600080fd5b614cb287828801614555565b95989497509550505050565b60008060008060808587031215614cd457600080fd5b84356001600160401b0380821115614ceb57600080fd5b614cf78883890161480c565b95506020870135915080821115614d0d57600080fd5b614d198883890161487b565b94506040870135915080821115614d2f57600080fd5b614d3b888389016148d6565b93506060870135915080821115614d5157600080fd5b506147dd8782880161460a565b60ff60f81b8816815260e060208201526000614d7d60e083018961472a565b8281036040840152614d8f818961472a565b606084018890526001600160a01b038716608085015260a0840186905283810360c08501529050610dce8185614a28565b600080600060608486031215614dd557600080fd5b8335614de081614769565b92506020840135915060408401356001600160401b03811115614e0257600080fd5b614e0e8682870161460a565b9150509250925092565b600060208284031215614e2a57600080fd5b813561192a81614769565b600080600080600060a08688031215614e4d57600080fd5b8535614e5881614769565b94506020860135614e6881614769565b935060408601356001600160401b0380821115614e8457600080fd5b614e9089838a0161487b565b94506060880135915080821115614ea657600080fd5b614eb289838a0161487b565b93506080880135915080821115614c4b57600080fd5b60008060008060808587031215614ede57600080fd5b8435614ee981614769565b93506020850135614ef981614769565b9250604085013591506060850135614f1081614769565b939692955090935050565b60008060008060608587031215614f3157600080fd5b8435614f3c81614769565b93506020850135925060408501356001600160401b03811115614ca657600080fd5b600082601f830112614f6f57600080fd5b81356020614f7f614629836147e9565b82815260059290921b84018101918181019086841115614f9e57600080fd5b8286015b848110156148705780356001600160401b03811115614fc15760008081fd5b614fcf8986838b010161460a565b845250918301918301614fa2565b600080600080600060a08688031215614ff557600080fd5b85356001600160401b038082111561500c57600080fd5b61501889838a0161480c565b9650602088013591508082111561502e57600080fd5b61503a89838a0161487b565b9550604088013591508082111561505057600080fd5b61505c89838a01614f5e565b9450606088013591508082111561507257600080fd5b614eb289838a016148d6565b6000806040838503121561509157600080fd5b823561509c81614769565b946020939093013593505050565b600080600080600060a086880312156150c257600080fd5b85356150cd81614769565b945060208601356150dd81614769565b9350604086013592506060860135915060808601356001600160401b0381111561510657600080fd5b614c588882890161460a565b60006020828403121561512457600080fd5b5051919050565b8183823760009101908152919050565b602080825260189082015277476f7665726e6f723a206f6e6c79476f7665726e616e636560401b604082015260600190565b600181811c9082168061518157607f821691505b6020821081036151a157634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526021908201527f476f7665726e6f723a2070726f706f73616c206e6f74207375636365737366756040820152601b60fa1b606082015260800190565b60a0815260006151fb60a08301886149e4565b828103602084015261520d8188614a28565b905082810360408401526152218187614a58565b60608401959095525050608001529392505050565b60c08152600061524960c08301896149e4565b828103602084015261525b8189614a28565b9050828103604084015261526f8188614a58565b60608401969096525050608081019290925260a0909101529392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610c6f57610c6f61528e565b65ffffffffffff8281168282160390808211156152d6576152d661528e565b5092915050565b6000602082840312156152ef57600080fd5b81516001600160401b0381111561530557600080fd5b8201601f8101841361531657600080fd5b8051615324614629826145e3565b81815285602083850101111561533957600080fd5b6115af826020830160208601614706565b81810381811115610c6f57610c6f61528e565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561538557600080fd5b815165ffffffffffff8116811461192a57600080fd5b6080815260006153ae60808301876149e4565b82810360208401526153c08187614a28565b905082810360408401526153d48186614a58565b91505082606083015295945050505050565b8082028115828204841417610c6f57610c6f61528e565b634e487b7160e01b600052601260045260246000fd5b60008261543057634e487b7160e01b600052601260045260246000fd5b500490565b84815260ff841660208201528260408201526080606082015260006117f0608083018461472a565b85815260ff8516602082015283604082015260a06060820152600061548560a083018561472a565b8281036080840152615497818561472a565b98975050505050505050565b6000600182016154b5576154b561528e565b5060010190565b6000602082840312156154ce57600080fd5b8151801515811461192a57600080fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160e01b031983168152815160009061554c816004850160208701614706565b919091016004019392505050565b60208082526021908201527f476f7665726e6f723a20696e76616c69642070726f706f73616c206c656e67746040820152600d60fb1b606082015260800190565b8981526001600160a01b0389166020820152610120604082018190526000906155c68382018b6149e4565b905082810360608401526155da818a614a28565b905082810360808401526155ee8189614a58565b905082810360a08401526156028188614a58565b90508560c08401528460e0840152828103610100840152615623818561472a565b9c9b505050505050505050505050565b601f82111561567957600081815260208120601f850160051c8101602086101561565a5750805b601f850160051c820191505b8181101561159957828155600101615666565b505050565b81516001600160401b038111156156975761569761459d565b6156ab816156a5845461516d565b84615633565b602080601f8311600181146156e057600084156156c85750858301515b600019600386901b1c1916600185901b178555611599565b600085815260208120601f198616915b8281101561570f578886015182559484019460019091019084016156f0565b508582101561572d5787850151600019600388901b60f8161c191681555b5050505050600190811b0190555056fe476f7665726e6f723a2072656c617920726576657274656420776974686f7574206d657373616765a2646970667358221220ba7affd71155ab5d07348383105a5cdaec3c12c44bf7888181d5259042085dd464736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` var ChildTimelockArtifact string = `{"_format":"hh-sol-artifact-1","contractName":"ChildTimelock","sourceName":"contracts/blade/governance/ChildTimelock.sol","abi":[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"CallExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"CallSalt","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"delay","type":"uint256"}],"name":"CallScheduled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"Cancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"MinDelayChange","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"},{"inputs":[],"name":"CANCELLER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXECUTOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROPOSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TIMELOCK_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"payloads","type":"bytes[]"},{"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"executeBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getMinDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"id","type":"bytes32"}],"name":"getTimestamp","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":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"hashOperation","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"payloads","type":"bytes[]"},{"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"hashOperationBatch","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"minDelay","type":"uint256"},{"internalType":"address[]","name":"proposers","type":"address[]"},{"internalType":"address[]","name":"executors","type":"address[]"},{"internalType":"address","name":"admin","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"isOperation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"isOperationDone","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"isOperationPending","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"isOperationReady","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"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":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256","name":"delay","type":"uint256"}],"name":"schedule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"payloads","type":"bytes[]"},{"internalType":"bytes32","name":"predecessor","type":"bytes32"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256","name":"delay","type":"uint256"}],"name":"scheduleBatch","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":[{"internalType":"uint256","name":"newDelay","type":"uint256"}],"name":"updateDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}],"bytecode":"0x608060405234801561001057600080fd5b506122ae806100206000396000f3fe6080604052600436106101865760003560e01c80638065657f116100d7578063bc197c8111610085578063bc197c811461048b578063c4c4c7b3146104b7578063c4d252f5146104d7578063d45c4435146104f7578063d547741f14610524578063e38335e514610544578063f23a6e6114610557578063f27a0c921461058357600080fd5b80638065657f146103b25780638f2a0bb0146103d25780638f61f4f5146103f257806391d1485414610414578063a217fddf14610434578063b08e51c014610449578063b1c5f4271461046b57600080fd5b8063248a9ca311610134578063248a9ca3146102b25780632ab0f529146102e25780632f2ff15d1461031257806331d507501461033257806336568abe14610352578063584b153e1461037257806364d623531461039257600080fd5b806301d5062a1461019257806301ffc9a7146101b457806307bd0265146101e95780630d3cf6fc14610219578063134008d31461023b57806313bc9f201461024e578063150b7a021461026e57600080fd5b3661018d57005b600080fd5b34801561019e57600080fd5b506101b26101ad366004611718565b610598565b005b3480156101c057600080fd5b506101d46101cf36600461178c565b61065c565b60405190151581526020015b60405180910390f35b3480156101f557600080fd5b5061020b60008051602061223983398151915281565b6040519081526020016101e0565b34801561022557600080fd5b5061020b6000805160206121f983398151915281565b6101b26102493660046117b6565b610687565b34801561025a57600080fd5b506101d4610269366004611821565b61072a565b34801561027a57600080fd5b506102996102893660046118ef565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020016101e0565b3480156102be57600080fd5b5061020b6102cd366004611821565b60009081526065602052604090206001015490565b3480156102ee57600080fd5b506101d46102fd366004611821565b60009081526097602052604090205460011490565b34801561031e57600080fd5b506101b261032d366004611956565b610750565b34801561033e57600080fd5b506101d461034d366004611821565b61077a565b34801561035e57600080fd5b506101b261036d366004611956565b610793565b34801561037e57600080fd5b506101d461038d366004611821565b610816565b34801561039e57600080fd5b506101b26103ad366004611821565b61082d565b3480156103be57600080fd5b5061020b6103cd3660046117b6565b6108d1565b3480156103de57600080fd5b506101b26103ed3660046119c6565b610910565b3480156103fe57600080fd5b5061020b60008051602061221983398151915281565b34801561042057600080fd5b506101d461042f366004611956565b610a91565b34801561044057600080fd5b5061020b600081565b34801561045557600080fd5b5061020b60008051602061225983398151915281565b34801561047757600080fd5b5061020b610486366004611a77565b610abc565b34801561049757600080fd5b506102996104a6366004611bad565b63bc197c8160e01b95945050505050565b3480156104c357600080fd5b506101b26104d2366004611cb8565b610b01565b3480156104e357600080fd5b506101b26104f2366004611821565b610c1a565b34801561050357600080fd5b5061020b610512366004611821565b60009081526097602052604090205490565b34801561053057600080fd5b506101b261053f366004611956565b610cdd565b6101b2610552366004611a77565b610d02565b34801561056357600080fd5b50610299610572366004611d35565b63f23a6e6160e01b95945050505050565b34801561058f57600080fd5b5060985461020b565b6000805160206122198339815191526105b081610e7a565b60006105c08989898989896108d1565b90506105cc8184610e87565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a60405161060896959493929190611dc2565b60405180910390a3831561065157807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d03878560405161064891815260200190565b60405180910390a25b505050505050505050565b60006001600160e01b03198216630271189760e51b1480610681575061068182610f76565b92915050565b6000805160206122398339815191526106a1816000610a91565b6106af576106af8133610fab565b60006106bf8888888888886108d1565b90506106cb8185611004565b6106d78888888861109f565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a60405161070f9493929190611dff565b60405180910390a36107208161116b565b5050505050505050565b6000818152609760205260408120546001811180156107495750428111155b9392505050565b60008281526065602052604090206001015461076b81610e7a565b61077583836111a4565b505050565b60008181526097602052604081205481905b1192915050565b6001600160a01b03811633146108085760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610812828261122a565b5050565b60008181526097602052604081205460019061078c565b3330146108905760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b60648201526084016107ff565b60985460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1609855565b60008686868686866040516020016108ee96959493929190611dc2565b6040516020818303038152906040528051906020012090509695505050505050565b60008051602061221983398151915261092881610e7a565b8887146109475760405162461bcd60e51b81526004016107ff90611e31565b8885146109665760405162461bcd60e51b81526004016107ff90611e31565b60006109788b8b8b8b8b8b8b8b610abc565b90506109848184610e87565b60005b8a811015610a425780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e858181106109c4576109c4611e74565b90506020020160208101906109d99190611e8a565b8d8d868181106109eb576109eb611e74565b905060200201358c8c87818110610a0457610a04611e74565b9050602002810190610a169190611ea5565b8c8b604051610a2a96959493929190611dc2565b60405180910390a3610a3b81611f01565b9050610987565b508315610a8457807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610a7b91815260200190565b60405180910390a25b5050505050505050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610add989796959493929190611fab565b60405160208183030381529060405280519060200120905098975050505050505050565b600054610100900460ff1615808015610b215750600054600160ff909116105b80610b3b5750303b158015610b3b575060005460ff166001145b610b9e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107ff565b6000805460ff191660011790558015610bc1576000805461ff0019166101001790555b610bcd85858585611291565b8015610c13576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b600080516020612259833981519152610c3281610e7a565b610c3b82610816565b610ca15760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b60648201526084016107ff565b6000828152609760205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260656020526040902060010154610cf881610e7a565b610775838361122a565b600080516020612239833981519152610d1c816000610a91565b610d2a57610d2a8133610fab565b878614610d495760405162461bcd60e51b81526004016107ff90611e31565b878414610d685760405162461bcd60e51b81526004016107ff90611e31565b6000610d7a8a8a8a8a8a8a8a8a610abc565b9050610d868185611004565b60005b89811015610e645760008b8b83818110610da557610da5611e74565b9050602002016020810190610dba9190611e8a565b905060008a8a84818110610dd057610dd0611e74565b9050602002013590503660008a8a86818110610dee57610dee611e74565b9050602002810190610e009190611ea5565b91509150610e108484848461109f565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610e479493929190611dff565b60405180910390a35050505080610e5d90611f01565b9050610d89565b50610e6e8161116b565b50505050505050505050565b610e848133610fab565b50565b610e908261077a565b15610ef55760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b60648201526084016107ff565b609854811015610f565760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b60648201526084016107ff565b610f60814261204c565b6000928352609760205260409092209190915550565b60006001600160e01b03198216637965db0b60e01b148061068157506301ffc9a760e01b6001600160e01b0319831614610681565b610fb58282610a91565b61081257610fc2816112ca565b610fcd8360206112dc565b604051602001610fde929190612083565b60408051601f198184030181529082905262461bcd60e51b82526107ff916004016120f2565b61100d8261072a565b6110295760405162461bcd60e51b81526004016107ff90612125565b80158061104457506000818152609760205260409020546001145b6108125760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b60648201526084016107ff565b6000846001600160a01b03168484846040516110bc92919061216f565b60006040518083038185875af1925050503d80600081146110f9576040519150601f19603f3d011682016040523d82523d6000602084013e6110fe565b606091505b5050905080610c135760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b60648201526084016107ff565b6111748161072a565b6111905760405162461bcd60e51b81526004016107ff90612125565b600090815260976020526040902060019055565b6111ae8282610a91565b6108125760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556111e63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6112348282610a91565b156108125760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600054610100900460ff166112b85760405162461bcd60e51b81526004016107ff9061217f565b6112c484848484611477565b50505050565b60606106816001600160a01b03831660145b606060006112eb8360026121ca565b6112f690600261204c565b6001600160401b0381111561130d5761130d61183a565b6040519080825280601f01601f191660200182016040528015611337576020820181803683370190505b509050600360fc1b8160008151811061135257611352611e74565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061138157611381611e74565b60200101906001600160f81b031916908160001a90535060006113a58460026121ca565b6113b090600161204c565b90505b6001811115611428576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106113e4576113e4611e74565b1a60f81b8282815181106113fa576113fa611e74565b60200101906001600160f81b031916908160001a90535060049490941c93611421816121e1565b90506113b3565b5083156107495760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016107ff565b600054610100900460ff1661149e5760405162461bcd60e51b81526004016107ff9061217f565b6114b66000805160206121f98339815191528061165f565b6114dc6000805160206122198339815191526000805160206121f983398151915261165f565b6115026000805160206122398339815191526000805160206121f983398151915261165f565b6115286000805160206122598339815191526000805160206121f983398151915261165f565b6115406000805160206121f9833981519152306116aa565b6001600160a01b03811615611567576115676000805160206121f9833981519152826116aa565b60005b83518110156115d8576115a460008051602061221983398151915285838151811061159757611597611e74565b60200260200101516116aa565b6115c860008051602061225983398151915285838151811061159757611597611e74565b6115d181611f01565b905061156a565b5060005b82518110156116195761160960008051602061223983398151915284838151811061159757611597611e74565b61161281611f01565b90506115dc565b5060988490556040805160008152602081018690527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150505050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b61081282826111a4565b80356001600160a01b03811681146116cb57600080fd5b919050565b60008083601f8401126116e257600080fd5b5081356001600160401b038111156116f957600080fd5b60208301915083602082850101111561171157600080fd5b9250929050565b600080600080600080600060c0888a03121561173357600080fd5b61173c886116b4565b96506020880135955060408801356001600160401b0381111561175e57600080fd5b61176a8a828b016116d0565b989b979a50986060810135976080820135975060a09091013595509350505050565b60006020828403121561179e57600080fd5b81356001600160e01b03198116811461074957600080fd5b60008060008060008060a087890312156117cf57600080fd5b6117d8876116b4565b95506020870135945060408701356001600160401b038111156117fa57600080fd5b61180689828a016116d0565b979a9699509760608101359660809091013595509350505050565b60006020828403121561183357600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156118785761187861183a565b604052919050565b600082601f83011261189157600080fd5b81356001600160401b038111156118aa576118aa61183a565b6118bd601f8201601f1916602001611850565b8181528460208386010111156118d257600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561190557600080fd5b61190e856116b4565b935061191c602086016116b4565b92506040850135915060608501356001600160401b0381111561193e57600080fd5b61194a87828801611880565b91505092959194509250565b6000806040838503121561196957600080fd5b82359150611979602084016116b4565b90509250929050565b60008083601f84011261199457600080fd5b5081356001600160401b038111156119ab57600080fd5b6020830191508360208260051b850101111561171157600080fd5b600080600080600080600080600060c08a8c0312156119e457600080fd5b89356001600160401b03808211156119fb57600080fd5b611a078d838e01611982565b909b50995060208c0135915080821115611a2057600080fd5b611a2c8d838e01611982565b909950975060408c0135915080821115611a4557600080fd5b50611a528c828d01611982565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b031215611a9357600080fd5b88356001600160401b0380821115611aaa57600080fd5b611ab68c838d01611982565b909a50985060208b0135915080821115611acf57600080fd5b611adb8c838d01611982565b909850965060408b0135915080821115611af457600080fd5b50611b018b828c01611982565b999c989b509699959896976060870135966080013595509350505050565b60006001600160401b03821115611b3857611b3861183a565b5060051b60200190565b600082601f830112611b5357600080fd5b81356020611b68611b6383611b1f565b611850565b82815260059290921b84018101918181019086841115611b8757600080fd5b8286015b84811015611ba25780358352918301918301611b8b565b509695505050505050565b600080600080600060a08688031215611bc557600080fd5b611bce866116b4565b9450611bdc602087016116b4565b935060408601356001600160401b0380821115611bf857600080fd5b611c0489838a01611b42565b94506060880135915080821115611c1a57600080fd5b611c2689838a01611b42565b93506080880135915080821115611c3c57600080fd5b50611c4988828901611880565b9150509295509295909350565b600082601f830112611c6757600080fd5b81356020611c77611b6383611b1f565b82815260059290921b84018101918181019086841115611c9657600080fd5b8286015b84811015611ba257611cab816116b4565b8352918301918301611c9a565b60008060008060808587031215611cce57600080fd5b8435935060208501356001600160401b0380821115611cec57600080fd5b611cf888838901611c56565b94506040870135915080821115611d0e57600080fd5b50611d1b87828801611c56565b925050611d2a606086016116b4565b905092959194509250565b600080600080600060a08688031215611d4d57600080fd5b611d56866116b4565b9450611d64602087016116b4565b9350604086013592506060860135915060808601356001600160401b03811115611d8d57600080fd5b611c4988828901611880565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201526000611dea60a083018688611d99565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201526000611e27606083018486611d99565b9695505050505050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611e9c57600080fd5b610749826116b4565b6000808335601e19843603018112611ebc57600080fd5b8301803591506001600160401b03821115611ed657600080fd5b60200191503681900382131561171157600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611f1357611f13611eeb565b5060010190565b81835260006020808501808196508560051b810191508460005b87811015611f9e5782840389528135601e19883603018112611f5557600080fd5b870185810190356001600160401b03811115611f7057600080fd5b803603821315611f7f57600080fd5b611f8a868284611d99565b9a87019a9550505090840190600101611f34565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b811015611fec576001600160a01b03611fd7846116b4565b16825260209283019290910190600101611fbe565b5083810360208501528881526001600160fb1b0389111561200c57600080fd5b8860051b9150818a602083013701828103602090810160408501526120349082018789611f1a565b60608401959095525050608001529695505050505050565b8082018082111561068157610681611eeb565b60005b8381101561207a578181015183820152602001612062565b50506000910152565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516120b581601785016020880161205f565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516120e681602884016020880161205f565b01602801949350505050565b602081526000825180602084015261211181604085016020870161205f565b601f01601f19169190910160400192915050565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b8183823760009101908152919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b808202811582820484141761068157610681611eeb565b6000816121f0576121f0611eeb565b50600019019056fe5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5b09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1d8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63fd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783a26469706673582212208c4ac6ee4725f0516e68b3b8fd35d5032a14c3d674c139b53e29e06603e6e22464736f6c63430008130033","deployedBytecode":"0x6080604052600436106101865760003560e01c80638065657f116100d7578063bc197c8111610085578063bc197c811461048b578063c4c4c7b3146104b7578063c4d252f5146104d7578063d45c4435146104f7578063d547741f14610524578063e38335e514610544578063f23a6e6114610557578063f27a0c921461058357600080fd5b80638065657f146103b25780638f2a0bb0146103d25780638f61f4f5146103f257806391d1485414610414578063a217fddf14610434578063b08e51c014610449578063b1c5f4271461046b57600080fd5b8063248a9ca311610134578063248a9ca3146102b25780632ab0f529146102e25780632f2ff15d1461031257806331d507501461033257806336568abe14610352578063584b153e1461037257806364d623531461039257600080fd5b806301d5062a1461019257806301ffc9a7146101b457806307bd0265146101e95780630d3cf6fc14610219578063134008d31461023b57806313bc9f201461024e578063150b7a021461026e57600080fd5b3661018d57005b600080fd5b34801561019e57600080fd5b506101b26101ad366004611718565b610598565b005b3480156101c057600080fd5b506101d46101cf36600461178c565b61065c565b60405190151581526020015b60405180910390f35b3480156101f557600080fd5b5061020b60008051602061223983398151915281565b6040519081526020016101e0565b34801561022557600080fd5b5061020b6000805160206121f983398151915281565b6101b26102493660046117b6565b610687565b34801561025a57600080fd5b506101d4610269366004611821565b61072a565b34801561027a57600080fd5b506102996102893660046118ef565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020016101e0565b3480156102be57600080fd5b5061020b6102cd366004611821565b60009081526065602052604090206001015490565b3480156102ee57600080fd5b506101d46102fd366004611821565b60009081526097602052604090205460011490565b34801561031e57600080fd5b506101b261032d366004611956565b610750565b34801561033e57600080fd5b506101d461034d366004611821565b61077a565b34801561035e57600080fd5b506101b261036d366004611956565b610793565b34801561037e57600080fd5b506101d461038d366004611821565b610816565b34801561039e57600080fd5b506101b26103ad366004611821565b61082d565b3480156103be57600080fd5b5061020b6103cd3660046117b6565b6108d1565b3480156103de57600080fd5b506101b26103ed3660046119c6565b610910565b3480156103fe57600080fd5b5061020b60008051602061221983398151915281565b34801561042057600080fd5b506101d461042f366004611956565b610a91565b34801561044057600080fd5b5061020b600081565b34801561045557600080fd5b5061020b60008051602061225983398151915281565b34801561047757600080fd5b5061020b610486366004611a77565b610abc565b34801561049757600080fd5b506102996104a6366004611bad565b63bc197c8160e01b95945050505050565b3480156104c357600080fd5b506101b26104d2366004611cb8565b610b01565b3480156104e357600080fd5b506101b26104f2366004611821565b610c1a565b34801561050357600080fd5b5061020b610512366004611821565b60009081526097602052604090205490565b34801561053057600080fd5b506101b261053f366004611956565b610cdd565b6101b2610552366004611a77565b610d02565b34801561056357600080fd5b50610299610572366004611d35565b63f23a6e6160e01b95945050505050565b34801561058f57600080fd5b5060985461020b565b6000805160206122198339815191526105b081610e7a565b60006105c08989898989896108d1565b90506105cc8184610e87565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a60405161060896959493929190611dc2565b60405180910390a3831561065157807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d03878560405161064891815260200190565b60405180910390a25b505050505050505050565b60006001600160e01b03198216630271189760e51b1480610681575061068182610f76565b92915050565b6000805160206122398339815191526106a1816000610a91565b6106af576106af8133610fab565b60006106bf8888888888886108d1565b90506106cb8185611004565b6106d78888888861109f565b6000817fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a8a8a60405161070f9493929190611dff565b60405180910390a36107208161116b565b5050505050505050565b6000818152609760205260408120546001811180156107495750428111155b9392505050565b60008281526065602052604090206001015461076b81610e7a565b61077583836111a4565b505050565b60008181526097602052604081205481905b1192915050565b6001600160a01b03811633146108085760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610812828261122a565b5050565b60008181526097602052604081205460019061078c565b3330146108905760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b60648201526084016107ff565b60985460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1609855565b60008686868686866040516020016108ee96959493929190611dc2565b6040516020818303038152906040528051906020012090509695505050505050565b60008051602061221983398151915261092881610e7a565b8887146109475760405162461bcd60e51b81526004016107ff90611e31565b8885146109665760405162461bcd60e51b81526004016107ff90611e31565b60006109788b8b8b8b8b8b8b8b610abc565b90506109848184610e87565b60005b8a811015610a425780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e858181106109c4576109c4611e74565b90506020020160208101906109d99190611e8a565b8d8d868181106109eb576109eb611e74565b905060200201358c8c87818110610a0457610a04611e74565b9050602002810190610a169190611ea5565b8c8b604051610a2a96959493929190611dc2565b60405180910390a3610a3b81611f01565b9050610987565b508315610a8457807f20fda5fd27a1ea7bf5b9567f143ac5470bb059374a27e8f67cb44f946f6d038785604051610a7b91815260200190565b60405180910390a25b5050505050505050505050565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008888888888888888604051602001610add989796959493929190611fab565b60405160208183030381529060405280519060200120905098975050505050505050565b600054610100900460ff1615808015610b215750600054600160ff909116105b80610b3b5750303b158015610b3b575060005460ff166001145b610b9e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107ff565b6000805460ff191660011790558015610bc1576000805461ff0019166101001790555b610bcd85858585611291565b8015610c13576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b600080516020612259833981519152610c3281610e7a565b610c3b82610816565b610ca15760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b60648201526084016107ff565b6000828152609760205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260656020526040902060010154610cf881610e7a565b610775838361122a565b600080516020612239833981519152610d1c816000610a91565b610d2a57610d2a8133610fab565b878614610d495760405162461bcd60e51b81526004016107ff90611e31565b878414610d685760405162461bcd60e51b81526004016107ff90611e31565b6000610d7a8a8a8a8a8a8a8a8a610abc565b9050610d868185611004565b60005b89811015610e645760008b8b83818110610da557610da5611e74565b9050602002016020810190610dba9190611e8a565b905060008a8a84818110610dd057610dd0611e74565b9050602002013590503660008a8a86818110610dee57610dee611e74565b9050602002810190610e009190611ea5565b91509150610e108484848461109f565b84867fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5886868686604051610e479493929190611dff565b60405180910390a35050505080610e5d90611f01565b9050610d89565b50610e6e8161116b565b50505050505050505050565b610e848133610fab565b50565b610e908261077a565b15610ef55760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b60648201526084016107ff565b609854811015610f565760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b60648201526084016107ff565b610f60814261204c565b6000928352609760205260409092209190915550565b60006001600160e01b03198216637965db0b60e01b148061068157506301ffc9a760e01b6001600160e01b0319831614610681565b610fb58282610a91565b61081257610fc2816112ca565b610fcd8360206112dc565b604051602001610fde929190612083565b60408051601f198184030181529082905262461bcd60e51b82526107ff916004016120f2565b61100d8261072a565b6110295760405162461bcd60e51b81526004016107ff90612125565b80158061104457506000818152609760205260409020546001145b6108125760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b60648201526084016107ff565b6000846001600160a01b03168484846040516110bc92919061216f565b60006040518083038185875af1925050503d80600081146110f9576040519150601f19603f3d011682016040523d82523d6000602084013e6110fe565b606091505b5050905080610c135760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b60648201526084016107ff565b6111748161072a565b6111905760405162461bcd60e51b81526004016107ff90612125565b600090815260976020526040902060019055565b6111ae8282610a91565b6108125760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556111e63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6112348282610a91565b156108125760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600054610100900460ff166112b85760405162461bcd60e51b81526004016107ff9061217f565b6112c484848484611477565b50505050565b60606106816001600160a01b03831660145b606060006112eb8360026121ca565b6112f690600261204c565b6001600160401b0381111561130d5761130d61183a565b6040519080825280601f01601f191660200182016040528015611337576020820181803683370190505b509050600360fc1b8160008151811061135257611352611e74565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061138157611381611e74565b60200101906001600160f81b031916908160001a90535060006113a58460026121ca565b6113b090600161204c565b90505b6001811115611428576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106113e4576113e4611e74565b1a60f81b8282815181106113fa576113fa611e74565b60200101906001600160f81b031916908160001a90535060049490941c93611421816121e1565b90506113b3565b5083156107495760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016107ff565b600054610100900460ff1661149e5760405162461bcd60e51b81526004016107ff9061217f565b6114b66000805160206121f98339815191528061165f565b6114dc6000805160206122198339815191526000805160206121f983398151915261165f565b6115026000805160206122398339815191526000805160206121f983398151915261165f565b6115286000805160206122598339815191526000805160206121f983398151915261165f565b6115406000805160206121f9833981519152306116aa565b6001600160a01b03811615611567576115676000805160206121f9833981519152826116aa565b60005b83518110156115d8576115a460008051602061221983398151915285838151811061159757611597611e74565b60200260200101516116aa565b6115c860008051602061225983398151915285838151811061159757611597611e74565b6115d181611f01565b905061156a565b5060005b82518110156116195761160960008051602061223983398151915284838151811061159757611597611e74565b61161281611f01565b90506115dc565b5060988490556040805160008152602081018690527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150505050565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b61081282826111a4565b80356001600160a01b03811681146116cb57600080fd5b919050565b60008083601f8401126116e257600080fd5b5081356001600160401b038111156116f957600080fd5b60208301915083602082850101111561171157600080fd5b9250929050565b600080600080600080600060c0888a03121561173357600080fd5b61173c886116b4565b96506020880135955060408801356001600160401b0381111561175e57600080fd5b61176a8a828b016116d0565b989b979a50986060810135976080820135975060a09091013595509350505050565b60006020828403121561179e57600080fd5b81356001600160e01b03198116811461074957600080fd5b60008060008060008060a087890312156117cf57600080fd5b6117d8876116b4565b95506020870135945060408701356001600160401b038111156117fa57600080fd5b61180689828a016116d0565b979a9699509760608101359660809091013595509350505050565b60006020828403121561183357600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156118785761187861183a565b604052919050565b600082601f83011261189157600080fd5b81356001600160401b038111156118aa576118aa61183a565b6118bd601f8201601f1916602001611850565b8181528460208386010111156118d257600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561190557600080fd5b61190e856116b4565b935061191c602086016116b4565b92506040850135915060608501356001600160401b0381111561193e57600080fd5b61194a87828801611880565b91505092959194509250565b6000806040838503121561196957600080fd5b82359150611979602084016116b4565b90509250929050565b60008083601f84011261199457600080fd5b5081356001600160401b038111156119ab57600080fd5b6020830191508360208260051b850101111561171157600080fd5b600080600080600080600080600060c08a8c0312156119e457600080fd5b89356001600160401b03808211156119fb57600080fd5b611a078d838e01611982565b909b50995060208c0135915080821115611a2057600080fd5b611a2c8d838e01611982565b909950975060408c0135915080821115611a4557600080fd5b50611a528c828d01611982565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b60008060008060008060008060a0898b031215611a9357600080fd5b88356001600160401b0380821115611aaa57600080fd5b611ab68c838d01611982565b909a50985060208b0135915080821115611acf57600080fd5b611adb8c838d01611982565b909850965060408b0135915080821115611af457600080fd5b50611b018b828c01611982565b999c989b509699959896976060870135966080013595509350505050565b60006001600160401b03821115611b3857611b3861183a565b5060051b60200190565b600082601f830112611b5357600080fd5b81356020611b68611b6383611b1f565b611850565b82815260059290921b84018101918181019086841115611b8757600080fd5b8286015b84811015611ba25780358352918301918301611b8b565b509695505050505050565b600080600080600060a08688031215611bc557600080fd5b611bce866116b4565b9450611bdc602087016116b4565b935060408601356001600160401b0380821115611bf857600080fd5b611c0489838a01611b42565b94506060880135915080821115611c1a57600080fd5b611c2689838a01611b42565b93506080880135915080821115611c3c57600080fd5b50611c4988828901611880565b9150509295509295909350565b600082601f830112611c6757600080fd5b81356020611c77611b6383611b1f565b82815260059290921b84018101918181019086841115611c9657600080fd5b8286015b84811015611ba257611cab816116b4565b8352918301918301611c9a565b60008060008060808587031215611cce57600080fd5b8435935060208501356001600160401b0380821115611cec57600080fd5b611cf888838901611c56565b94506040870135915080821115611d0e57600080fd5b50611d1b87828801611c56565b925050611d2a606086016116b4565b905092959194509250565b600080600080600060a08688031215611d4d57600080fd5b611d56866116b4565b9450611d64602087016116b4565b9350604086013592506060860135915060808601356001600160401b03811115611d8d57600080fd5b611c4988828901611880565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b038716815285602082015260a060408201526000611dea60a083018688611d99565b60608301949094525060800152949350505050565b60018060a01b0385168152836020820152606060408201526000611e27606083018486611d99565b9695505050505050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611e9c57600080fd5b610749826116b4565b6000808335601e19843603018112611ebc57600080fd5b8301803591506001600160401b03821115611ed657600080fd5b60200191503681900382131561171157600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611f1357611f13611eeb565b5060010190565b81835260006020808501808196508560051b810191508460005b87811015611f9e5782840389528135601e19883603018112611f5557600080fd5b870185810190356001600160401b03811115611f7057600080fd5b803603821315611f7f57600080fd5b611f8a868284611d99565b9a87019a9550505090840190600101611f34565b5091979650505050505050565b60a0808252810188905260008960c08301825b8b811015611fec576001600160a01b03611fd7846116b4565b16825260209283019290910190600101611fbe565b5083810360208501528881526001600160fb1b0389111561200c57600080fd5b8860051b9150818a602083013701828103602090810160408501526120349082018789611f1a565b60608401959095525050608001529695505050505050565b8082018082111561068157610681611eeb565b60005b8381101561207a578181015183820152602001612062565b50506000910152565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516120b581601785016020880161205f565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516120e681602884016020880161205f565b01602801949350505050565b602081526000825180602084015261211181604085016020870161205f565b601f01601f19169190910160400192915050565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b8183823760009101908152919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b808202811582820484141761068157610681611eeb565b6000816121f0576121f0611eeb565b50600019019056fe5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5b09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1d8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63fd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783a26469706673582212208c4ac6ee4725f0516e68b3b8fd35d5032a14c3d674c139b53e29e06603e6e22464736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` -var BridgeStorageArtifact string = `{"_format":"hh-sol-artifact-1","contractName":"BridgeStorage","sourceName":"contracts/blade/BridgeStorage.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"}],"name":"NewBatch","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"indexed":false,"internalType":"struct Validator[]","name":"newValidatorSet","type":"tuple[]"}],"name":"NewValidatorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"NewValidatorSetStored","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":"batchCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"batches","outputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"startId","type":"uint256"},{"internalType":"uint256","name":"endId","type":"uint256"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"bytes","name":"bitmap","type":"bytes"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"bool","name":"isRollback","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bls","outputs":[{"internalType":"contract IBLS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bn256G2","outputs":[{"internalType":"contract IBN256G2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"startId","type":"uint256"},{"internalType":"uint256","name":"endId","type":"uint256"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"bytes","name":"bitmap","type":"bytes"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"bool","name":"isRollback","type":"bool"}],"internalType":"struct SignedBridgeMessageBatch","name":"batch","type":"tuple"}],"name":"commitBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"internalType":"struct Validator[]","name":"newValidatorSet","type":"tuple[]"},{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"bytes","name":"bitmap","type":"bytes"}],"name":"commitValidatorSet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"commitedValidatorSets","outputs":[{"internalType":"bytes","name":"bitmap","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"currentValidatorSet","outputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentValidatorSetHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentValidatorSetLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getCommittedBatch","outputs":[{"components":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"startId","type":"uint256"},{"internalType":"uint256","name":"endId","type":"uint256"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"bytes","name":"bitmap","type":"bytes"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"bool","name":"isRollback","type":"bool"}],"internalType":"struct SignedBridgeMessageBatch","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getCommittedValidatorSet","outputs":[{"components":[{"components":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"internalType":"struct Validator[]","name":"newValidatorSet","type":"tuple[]"},{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"bytes","name":"bitmap","type":"bytes"}],"internalType":"struct SignedValidatorSet","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IBLS","name":"newBls","type":"address"},{"internalType":"contract IBN256G2","name":"newBn256G2","type":"address"},{"components":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"internalType":"struct Validator[]","name":"validators","type":"tuple[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lastCommitted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lastCommittedInternal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalVotingPower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"validatorSetCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b50611ece806100206000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c8063947287cf116100c3578063cef7125c1161007c578063cef7125c146102fb578063d4c8e3e81461031b578063dab4be301461032e578063ebad8e5614610341578063ef7337a514610354578063f896f1a51461037457600080fd5b8063947287cf1461027a57806395b0b027146102835780639eb33f5d14610296578063afe40317146102ab578063b32c4d8d146102b4578063c7106914146102db57600080fd5b80635ea5df79116101155780635ea5df79146101cd5780636151449a146101d6578063671b3793146101f657806368233eef146101ff5780636969a25c1461020857806377984a0e1461025a57600080fd5b806307b3e2521461015d5780631d1d4f2614610188578063284017f51461019f5780633b878c22146101a857806351351d53146101b157806355b01e4d146101bf575b600080fd5b61016b6004600360981b0181565b6040516001600160a01b0390911681526020015b60405180910390f35b61019160365481565b60405190815260200161017f565b61016b61202081565b61016b61010681565b61016b6002600160a01b0381565b61016b6004600160991b0181565b61019161138881565b6101e96101e436600461148f565b61037d565b60405161017f9190611517565b61019160385481565b610191603d5481565b61023b61021636600461148f565b603560205260009081526040902080546005909101546001600160a01b039091169082565b604080516001600160a01b03909316835260208301919091520161017f565b61019161026836600461148f565b603b6020526000908152604090205481565b61019161520881565b60335461016b906001600160a01b031681565b6102a96102a43660046115fa565b6104b8565b005b610191603e5481565b6102c76102c236600461148f565b610604565b60405161017f98979695949392919061165e565b6102ee6102e936600461148f565b6106d8565b60405161017f91906116d0565b61030e61030936600461148f565b610873565b60405161017f9190611776565b60345461016b906001600160a01b031681565b6102a961033c366004611789565b610913565b6102a961034f3660046117c4565b610b0d565b61019161036236600461148f565b603c6020526000908152604090205481565b61019160375481565b610385611385565b600082815260396020908152604091829020825161012081018452815481526001820154928101929092526002808201548385015260038201546060840152600482015460808401528351808501948590529293919260a08501929091600585019182845b8154815260200190600101908083116103ea575050505050815260200160078201805461041690611875565b80601f016020809104026020016040519081016040528092919081815260200182805461044290611875565b801561048f5780601f106104645761010080835404028352916020019161048f565b820191906000526020600020905b81548152906001019060200180831161047257829003601f168201915b50505091835250506008820154602082015260099091015460ff16151560409091015292915050565b600054610100900460ff16158080156104d85750600054600160ff909116105b806104f25750303b1580156104f2575060005460ff166001145b61055a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801561057d576000805461ff0019166101001790555b603380546001600160a01b038088166001600160a01b03199283161790925560348054928716929091169190911790556105b78383610c18565b80156105fd576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b603960205280600052604060002060009150905080600001549080600101549080600201549080600301549080600401549080600701805461064590611875565b80601f016020809104026020016040519081016040528092919081815260200182805461067190611875565b80156106be5780601f10610693576101008083540402835291602001916106be565b820191906000526020600020905b8154815290600101906020018083116106a157829003601f168201915b50505050600883015460099093015491929160ff16905088565b6106e06113d9565b6000828152603a602090815260408083208151815460809481028201850190935260608101838152909491938593919285929185015b8282101561079a576000848152602090819020604080516060810182526006860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b815481526020019060010190808311610765575050505050815260200160058201548152505081526020019060010190610716565b50505090825250604080518082019182905260209092019190600184019060029082845b8154815260200190600101908083116107be57505050505081526020016003820180546107ea90611875565b80601f016020809104026020016040519081016040528092919081815260200182805461081690611875565b80156108635780601f1061083857610100808354040283529160200191610863565b820191906000526020600020905b81548152906001019060200180831161084657829003601f168201915b5050505050815250509050919050565b603a60205260009081526040902060038101805461089090611875565b80601f01602080910402602001604051908101604052809291908181526020018280546108bc90611875565b80156109095780601f106108de57610100808354040283529160200191610909565b820191906000526020600020905b8154815290600101906020018083116108ec57829003601f168201915b5050505050905081565b336002600160a01b031461093a5760405163973d02cb60e01b8152600401610551906118af565b61094c610140820161012083016118e1565b1561095f5761095a81610d14565b610968565b61096881610d5c565b60008135602083013560408401356060850135608086013561010087013561099861014089016101208a016118e1565b6040805160208101989098528701959095526060860193909352608085019190915260a084015260c0830152151560e08201526101000160408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b8352909250610aa9916001600160a01b039091169063a850a90990610a53907f9e040270bf060614de9fdbc52b0658eebf5f652008ac7da12272c3e646b29f999086906004016118fe565b6040805180830381865afa158015610a6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a939190611935565b60a08401610aa460e08601866119b4565b610e70565b603d5460009081526039602052604090208290610ac68282611b69565b5050603d546040517f999f33d8277b5c68b479fda62fa5ee13eecf7d181a12666721ba4de1fcbfc14c90600090a2603d8054906000610b0483611bfa565b91905055505050565b336002600160a01b0314610b345760405163973d02cb60e01b8152600401610551906118af565b610b4185858585856111ac565b603e546000908152603a60205260409020610b6160018201856002611400565b5060038101610b71838583611a9d565b5060005b85811015610bce57868682818110610b8f57610b8f611c13565b905060c00201826000018281548110610baa57610baa611c13565b90600052602060002090600602018181610bc49190611c29565b5050600101610b75565b50603e546040517f9a11e2792c9f81a693e8dc3c0471111f92a264ec0ba5d0aeea3963f9b41d275290600090a2603e8054906000610c0b83611bfa565b9190505550505050505050565b60368190556040518190610c329084908390602001611c88565b60408051601f1981840301815291905280516020909101206037556000805b82811015610d0b576000858583818110610c6d57610c6d611c13565b905060c0020160a00135905060008111610cbd5760405162461bcd60e51b8152602060048201526011602482015270564f54494e475f504f5745525f5a45524f60781b6044820152606401610551565b610cc78184611ceb565b9250858583818110610cdb57610cdb611c13565b905060c00201603560008481526020019081526020016000208181610d009190611c29565b505050600101610c51565b50603855505050565b8035610d325760405162461bcd60e51b815260040161055190611cfe565b8060800135816060013503610d595760405162461bcd60e51b815260040161055190611d23565b50565b8035610d7a5760405162461bcd60e51b815260040161055190611cfe565b8060800135816060013503610da15760405162461bcd60e51b815260040161055190611d23565b46816060013503610e0e578060200135603c600083608001358152602001908152602001600020546001610dd59190611ceb565b14610df25760405162461bcd60e51b815260040161055190611d71565b60808101356000908152603c6020526040908190209101359055565b8060200135603b600083606001358152602001908152602001600020546001610e379190611ceb565b14610e545760405162461bcd60e51b815260040161055190611d71565b60608101356000908152603b6020526040908190209101359055565b603654610e7b61143e565b6000805b8381101561102657610e9286868361131b565b1561101e5781600003610ee6576000818152603560205260409081902081516080810190925260010160048282826020028201915b815481526020019060010190808311610ec75750505050509250610fff565b60008181526035602052604080822081516080810190925260010160048282826020028201915b815481526020019060010190808311610f0d57505060345488516020808b01516040808d01516060808f01518b51958c0151848d0151928d01519451630cbe96a560e41b81526004810198909852602488019590955260448701929092526064860191909152608485019390935260a484019190915260c483019190915260e48201529495506001600160a01b03169363cbe96a50935061010401915050608060405180830381865afa158015610fc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fec9190611da1565b6060880152604087015260208601528452505b60008181526035602052604090206005015461101b9083611ceb565b91505b600101610e7f565b50806000036110695760405162461bcd60e51b815260206004820152600f60248201526e4249544d41505f49535f454d50545960881b6044820152606401610551565b6003603854600261107a9190611a10565b6110849190611ded565b81116110ce5760405162461bcd60e51b815260206004820152601960248201527824a729aaa32324a1a4a2a72a2fab27aa24a723afa827aba2a960391b6044820152606401610551565b60335460405163ebbdac9160e01b815260009182916001600160a01b039091169063ebbdac9190611107908b9088908e90600401611e01565b6040805180830381865afa158015611123573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111479190611e4a565b915091508180156111555750805b6111a15760405162461bcd60e51b815260206004820152601d60248201527f5349474e41545552455f564552494649434154494f4e5f4641494c45440000006044820152606401610551565b505050505050505050565b836111ef5760405162461bcd60e51b8152602060048201526013602482015272115354151657d590531251105513d497d4d155606a1b6044820152606401610551565b60008585604051602001611204929190611c88565b60408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b83529092506112d0916001600160a01b039091169063a850a90990611288907f38456a8ba687e3cfdf4624782b10d2b7a64cb5f06849efda87a3ef2897ac52569086906004016118fe565b6040805180830381865afa1580156112a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c89190611935565b858585610e70565b6112da8686610c18565b7fef80356b0fe90f99a2a53b1c2d22fcfb692458289759823035acd25b9137fb37868660405161130b929190611c88565b60405180910390a1505050505050565b600080611329600884611ded565b90506000611338600885611e84565b905084821061134c5760009250505061137e565b6000600160ff83161b87878581811061136757611367611c13565b9050013560f81c60f81b60f81c60ff161611925050505b9392505050565b60405180610120016040528060008019168152602001600081526020016000815260200160008152602001600081526020016113bf61145c565b815260606020820181905260006040830181905291015290565b6040518060600160405280606081526020016113f361145c565b8152602001606081525090565b826002810192821561142e579160200282015b8281111561142e578235825591602001919060010190611413565b5061143a92915061147a565b5090565b60405180608001604052806004906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b5b8082111561143a576000815560010161147b565b6000602082840312156114a157600080fd5b5035919050565b8060005b60028110156114cb5781518452602093840193909101906001016114ac565b50505050565b6000815180845260005b818110156114f7576020818501810151868301820152016114db565b506000602082860101526020601f19601f83011685010191505092915050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a0820152600060a083015161155e60c08401826114a8565b5060c0830151610140610100818186015261157d6101608601846114d1565b60e087015161012087015295015115159301929092525090919050565b6001600160a01b0381168114610d5957600080fd5b60008083601f8401126115c157600080fd5b5081356001600160401b038111156115d857600080fd5b60208301915083602060c0830285010111156115f357600080fd5b9250929050565b6000806000806060858703121561161057600080fd5b843561161b8161159a565b9350602085013561162b8161159a565b925060408501356001600160401b0381111561164657600080fd5b611652878288016115af565b95989497509550505050565b60006101008a83528960208401528860408401528760608401528660808401528060a0840152611690818401876114d1565b60c0840195909552505090151560e0909101529695505050505050565b8060005b60048110156114cb5781518452602093840193909101906001016116b1565b60208082528251608083830152805160a080850182905260009392909160c09184019082870190865b8181101561173957835180516001600160a01b0316845287810151611720898601826116ad565b50604001518387015292860192918401916001016116f9565b5050938701519361174d60408801866114a8565b6040880151878203601f19016080890152945061176a81866114d1565b98975050505050505050565b60208152600061137e60208301846114d1565b60006020828403121561179b57600080fd5b81356001600160401b038111156117b157600080fd5b8201610140818503121561137e57600080fd5b6000806000806000608086880312156117dc57600080fd5b85356001600160401b03808211156117f357600080fd5b6117ff89838a016115af565b90975095506060880191508882111561181757600080fd5b6020880194509035908082111561182d57600080fd5b818801915088601f83011261184157600080fd5b81358181111561185057600080fd5b89602082850101111561186257600080fd5b9699959850939650602001949392505050565b600181811c9082168061188957607f821691505b6020821081036118a957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600a908201526914d654d5115350d0531360b21b604082015260600190565b8015158114610d5957600080fd5b6000602082840312156118f357600080fd5b813561137e816118d3565b82815260406020820152600061191760408301846114d1565b949350505050565b634e487b7160e01b600052604160045260246000fd5b60006040828403121561194757600080fd5b82601f83011261195657600080fd5b604051604081018181106001600160401b03821117156119785761197861191f565b806040525080604084018581111561198f57600080fd5b845b818110156119a9578051835260209283019201611991565b509195945050505050565b6000808335601e198436030181126119cb57600080fd5b8301803591506001600160401b038211156119e557600080fd5b6020019150368190038213156115f357600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417611a2757611a276119fa565b92915050565b8160005b60028110156114cb57813583820155602090910190600101611a31565b601f821115611a9857600081815260208120601f850160051c81016020861015611a755750805b601f850160051c820191505b81811015611a9457828155600101611a81565b5050505b505050565b6001600160401b03831115611ab457611ab461191f565b611ac883611ac28354611875565b83611a4e565b6000601f841160018114611afc5760008515611ae45750838201355b600019600387901b1c1916600186901b1783556105fd565b600083815260209020601f19861690835b82811015611b2d5786850135825560209485019460019092019101611b0d565b5086821015611b4a5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008135611a27816118d3565b8135815560208201356001820155604082013560028201556060820135600382015560808201356004820155611ba560a0830160058301611a2d565b611bb260e08301836119b4565b611bc0818360078601611a9d565b50506101008201356008820155611bf6611bdd6101208401611b5c565b6009830160ff1981541660ff8315151681178255505050565b5050565b600060018201611c0c57611c0c6119fa565b5060010190565b634e487b7160e01b600052603260045260246000fd5b8135611c348161159a565b81546001600160a01b0319166001600160a01b0391909116178155602082810160005b6004811015611c7757813560018286018101919091559183019101611c57565b50505060a082013560058201555050565b60208082528181018390526000908460408401835b86811015611ce0578235611cb08161159a565b6001600160a01b0316825260808385018584013760a0838101359083015260c09283019290910190600101611c9d565b509695505050505050565b80820180821115611a2757611a276119fa565b6020808252600b908201526a08a9aa0a8b2be8482a886960ab1b604082015260600190565b6020808252602e908201527f736f75726365436861696e496420616e642064657374696e6174696f6e43686160408201526d1a5b9259081b9bdd08195c5d585b60921b606082015260800190565b6020808252601690820152751253959053125117d31054d517d0d3d353525515115160521b604082015260600190565b60008060008060808587031215611db757600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b600082611dfc57611dfc611dd7565b500490565b61010081016040858337611e1860408301856116ad565b60c082018360005b6002811015611e3f578151835260209283019290910190600101611e20565b505050949350505050565b60008060408385031215611e5d57600080fd5b8251611e68816118d3565b6020840151909250611e79816118d3565b809150509250929050565b600082611e9357611e93611dd7565b50069056fea2646970667358221220deac18a8c505323ca8d18e129836876b927478aca65fa6d8c19e8665890e19f564736f6c63430008130033","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106101585760003560e01c8063947287cf116100c3578063cef7125c1161007c578063cef7125c146102fb578063d4c8e3e81461031b578063dab4be301461032e578063ebad8e5614610341578063ef7337a514610354578063f896f1a51461037457600080fd5b8063947287cf1461027a57806395b0b027146102835780639eb33f5d14610296578063afe40317146102ab578063b32c4d8d146102b4578063c7106914146102db57600080fd5b80635ea5df79116101155780635ea5df79146101cd5780636151449a146101d6578063671b3793146101f657806368233eef146101ff5780636969a25c1461020857806377984a0e1461025a57600080fd5b806307b3e2521461015d5780631d1d4f2614610188578063284017f51461019f5780633b878c22146101a857806351351d53146101b157806355b01e4d146101bf575b600080fd5b61016b6004600360981b0181565b6040516001600160a01b0390911681526020015b60405180910390f35b61019160365481565b60405190815260200161017f565b61016b61202081565b61016b61010681565b61016b6002600160a01b0381565b61016b6004600160991b0181565b61019161138881565b6101e96101e436600461148f565b61037d565b60405161017f9190611517565b61019160385481565b610191603d5481565b61023b61021636600461148f565b603560205260009081526040902080546005909101546001600160a01b039091169082565b604080516001600160a01b03909316835260208301919091520161017f565b61019161026836600461148f565b603b6020526000908152604090205481565b61019161520881565b60335461016b906001600160a01b031681565b6102a96102a43660046115fa565b6104b8565b005b610191603e5481565b6102c76102c236600461148f565b610604565b60405161017f98979695949392919061165e565b6102ee6102e936600461148f565b6106d8565b60405161017f91906116d0565b61030e61030936600461148f565b610873565b60405161017f9190611776565b60345461016b906001600160a01b031681565b6102a961033c366004611789565b610913565b6102a961034f3660046117c4565b610b0d565b61019161036236600461148f565b603c6020526000908152604090205481565b61019160375481565b610385611385565b600082815260396020908152604091829020825161012081018452815481526001820154928101929092526002808201548385015260038201546060840152600482015460808401528351808501948590529293919260a08501929091600585019182845b8154815260200190600101908083116103ea575050505050815260200160078201805461041690611875565b80601f016020809104026020016040519081016040528092919081815260200182805461044290611875565b801561048f5780601f106104645761010080835404028352916020019161048f565b820191906000526020600020905b81548152906001019060200180831161047257829003601f168201915b50505091835250506008820154602082015260099091015460ff16151560409091015292915050565b600054610100900460ff16158080156104d85750600054600160ff909116105b806104f25750303b1580156104f2575060005460ff166001145b61055a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801561057d576000805461ff0019166101001790555b603380546001600160a01b038088166001600160a01b03199283161790925560348054928716929091169190911790556105b78383610c18565b80156105fd576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b603960205280600052604060002060009150905080600001549080600101549080600201549080600301549080600401549080600701805461064590611875565b80601f016020809104026020016040519081016040528092919081815260200182805461067190611875565b80156106be5780601f10610693576101008083540402835291602001916106be565b820191906000526020600020905b8154815290600101906020018083116106a157829003601f168201915b50505050600883015460099093015491929160ff16905088565b6106e06113d9565b6000828152603a602090815260408083208151815460809481028201850190935260608101838152909491938593919285929185015b8282101561079a576000848152602090819020604080516060810182526006860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b815481526020019060010190808311610765575050505050815260200160058201548152505081526020019060010190610716565b50505090825250604080518082019182905260209092019190600184019060029082845b8154815260200190600101908083116107be57505050505081526020016003820180546107ea90611875565b80601f016020809104026020016040519081016040528092919081815260200182805461081690611875565b80156108635780601f1061083857610100808354040283529160200191610863565b820191906000526020600020905b81548152906001019060200180831161084657829003601f168201915b5050505050815250509050919050565b603a60205260009081526040902060038101805461089090611875565b80601f01602080910402602001604051908101604052809291908181526020018280546108bc90611875565b80156109095780601f106108de57610100808354040283529160200191610909565b820191906000526020600020905b8154815290600101906020018083116108ec57829003601f168201915b5050505050905081565b336002600160a01b031461093a5760405163973d02cb60e01b8152600401610551906118af565b61094c610140820161012083016118e1565b1561095f5761095a81610d14565b610968565b61096881610d5c565b60008135602083013560408401356060850135608086013561010087013561099861014089016101208a016118e1565b6040805160208101989098528701959095526060860193909352608085019190915260a084015260c0830152151560e08201526101000160408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b8352909250610aa9916001600160a01b039091169063a850a90990610a53907f9e040270bf060614de9fdbc52b0658eebf5f652008ac7da12272c3e646b29f999086906004016118fe565b6040805180830381865afa158015610a6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a939190611935565b60a08401610aa460e08601866119b4565b610e70565b603d5460009081526039602052604090208290610ac68282611b69565b5050603d546040517f999f33d8277b5c68b479fda62fa5ee13eecf7d181a12666721ba4de1fcbfc14c90600090a2603d8054906000610b0483611bfa565b91905055505050565b336002600160a01b0314610b345760405163973d02cb60e01b8152600401610551906118af565b610b4185858585856111ac565b603e546000908152603a60205260409020610b6160018201856002611400565b5060038101610b71838583611a9d565b5060005b85811015610bce57868682818110610b8f57610b8f611c13565b905060c00201826000018281548110610baa57610baa611c13565b90600052602060002090600602018181610bc49190611c29565b5050600101610b75565b50603e546040517f9a11e2792c9f81a693e8dc3c0471111f92a264ec0ba5d0aeea3963f9b41d275290600090a2603e8054906000610c0b83611bfa565b9190505550505050505050565b60368190556040518190610c329084908390602001611c88565b60408051601f1981840301815291905280516020909101206037556000805b82811015610d0b576000858583818110610c6d57610c6d611c13565b905060c0020160a00135905060008111610cbd5760405162461bcd60e51b8152602060048201526011602482015270564f54494e475f504f5745525f5a45524f60781b6044820152606401610551565b610cc78184611ceb565b9250858583818110610cdb57610cdb611c13565b905060c00201603560008481526020019081526020016000208181610d009190611c29565b505050600101610c51565b50603855505050565b8035610d325760405162461bcd60e51b815260040161055190611cfe565b8060800135816060013503610d595760405162461bcd60e51b815260040161055190611d23565b50565b8035610d7a5760405162461bcd60e51b815260040161055190611cfe565b8060800135816060013503610da15760405162461bcd60e51b815260040161055190611d23565b46816060013503610e0e578060200135603c600083608001358152602001908152602001600020546001610dd59190611ceb565b14610df25760405162461bcd60e51b815260040161055190611d71565b60808101356000908152603c6020526040908190209101359055565b8060200135603b600083606001358152602001908152602001600020546001610e379190611ceb565b14610e545760405162461bcd60e51b815260040161055190611d71565b60608101356000908152603b6020526040908190209101359055565b603654610e7b61143e565b6000805b8381101561102657610e9286868361131b565b1561101e5781600003610ee6576000818152603560205260409081902081516080810190925260010160048282826020028201915b815481526020019060010190808311610ec75750505050509250610fff565b60008181526035602052604080822081516080810190925260010160048282826020028201915b815481526020019060010190808311610f0d57505060345488516020808b01516040808d01516060808f01518b51958c0151848d0151928d01519451630cbe96a560e41b81526004810198909852602488019590955260448701929092526064860191909152608485019390935260a484019190915260c483019190915260e48201529495506001600160a01b03169363cbe96a50935061010401915050608060405180830381865afa158015610fc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fec9190611da1565b6060880152604087015260208601528452505b60008181526035602052604090206005015461101b9083611ceb565b91505b600101610e7f565b50806000036110695760405162461bcd60e51b815260206004820152600f60248201526e4249544d41505f49535f454d50545960881b6044820152606401610551565b6003603854600261107a9190611a10565b6110849190611ded565b81116110ce5760405162461bcd60e51b815260206004820152601960248201527824a729aaa32324a1a4a2a72a2fab27aa24a723afa827aba2a960391b6044820152606401610551565b60335460405163ebbdac9160e01b815260009182916001600160a01b039091169063ebbdac9190611107908b9088908e90600401611e01565b6040805180830381865afa158015611123573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111479190611e4a565b915091508180156111555750805b6111a15760405162461bcd60e51b815260206004820152601d60248201527f5349474e41545552455f564552494649434154494f4e5f4641494c45440000006044820152606401610551565b505050505050505050565b836111ef5760405162461bcd60e51b8152602060048201526013602482015272115354151657d590531251105513d497d4d155606a1b6044820152606401610551565b60008585604051602001611204929190611c88565b60408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b83529092506112d0916001600160a01b039091169063a850a90990611288907f38456a8ba687e3cfdf4624782b10d2b7a64cb5f06849efda87a3ef2897ac52569086906004016118fe565b6040805180830381865afa1580156112a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c89190611935565b858585610e70565b6112da8686610c18565b7fef80356b0fe90f99a2a53b1c2d22fcfb692458289759823035acd25b9137fb37868660405161130b929190611c88565b60405180910390a1505050505050565b600080611329600884611ded565b90506000611338600885611e84565b905084821061134c5760009250505061137e565b6000600160ff83161b87878581811061136757611367611c13565b9050013560f81c60f81b60f81c60ff161611925050505b9392505050565b60405180610120016040528060008019168152602001600081526020016000815260200160008152602001600081526020016113bf61145c565b815260606020820181905260006040830181905291015290565b6040518060600160405280606081526020016113f361145c565b8152602001606081525090565b826002810192821561142e579160200282015b8281111561142e578235825591602001919060010190611413565b5061143a92915061147a565b5090565b60405180608001604052806004906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b5b8082111561143a576000815560010161147b565b6000602082840312156114a157600080fd5b5035919050565b8060005b60028110156114cb5781518452602093840193909101906001016114ac565b50505050565b6000815180845260005b818110156114f7576020818501810151868301820152016114db565b506000602082860101526020601f19601f83011685010191505092915050565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a0820152600060a083015161155e60c08401826114a8565b5060c0830151610140610100818186015261157d6101608601846114d1565b60e087015161012087015295015115159301929092525090919050565b6001600160a01b0381168114610d5957600080fd5b60008083601f8401126115c157600080fd5b5081356001600160401b038111156115d857600080fd5b60208301915083602060c0830285010111156115f357600080fd5b9250929050565b6000806000806060858703121561161057600080fd5b843561161b8161159a565b9350602085013561162b8161159a565b925060408501356001600160401b0381111561164657600080fd5b611652878288016115af565b95989497509550505050565b60006101008a83528960208401528860408401528760608401528660808401528060a0840152611690818401876114d1565b60c0840195909552505090151560e0909101529695505050505050565b8060005b60048110156114cb5781518452602093840193909101906001016116b1565b60208082528251608083830152805160a080850182905260009392909160c09184019082870190865b8181101561173957835180516001600160a01b0316845287810151611720898601826116ad565b50604001518387015292860192918401916001016116f9565b5050938701519361174d60408801866114a8565b6040880151878203601f19016080890152945061176a81866114d1565b98975050505050505050565b60208152600061137e60208301846114d1565b60006020828403121561179b57600080fd5b81356001600160401b038111156117b157600080fd5b8201610140818503121561137e57600080fd5b6000806000806000608086880312156117dc57600080fd5b85356001600160401b03808211156117f357600080fd5b6117ff89838a016115af565b90975095506060880191508882111561181757600080fd5b6020880194509035908082111561182d57600080fd5b818801915088601f83011261184157600080fd5b81358181111561185057600080fd5b89602082850101111561186257600080fd5b9699959850939650602001949392505050565b600181811c9082168061188957607f821691505b6020821081036118a957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600a908201526914d654d5115350d0531360b21b604082015260600190565b8015158114610d5957600080fd5b6000602082840312156118f357600080fd5b813561137e816118d3565b82815260406020820152600061191760408301846114d1565b949350505050565b634e487b7160e01b600052604160045260246000fd5b60006040828403121561194757600080fd5b82601f83011261195657600080fd5b604051604081018181106001600160401b03821117156119785761197861191f565b806040525080604084018581111561198f57600080fd5b845b818110156119a9578051835260209283019201611991565b509195945050505050565b6000808335601e198436030181126119cb57600080fd5b8301803591506001600160401b038211156119e557600080fd5b6020019150368190038213156115f357600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417611a2757611a276119fa565b92915050565b8160005b60028110156114cb57813583820155602090910190600101611a31565b601f821115611a9857600081815260208120601f850160051c81016020861015611a755750805b601f850160051c820191505b81811015611a9457828155600101611a81565b5050505b505050565b6001600160401b03831115611ab457611ab461191f565b611ac883611ac28354611875565b83611a4e565b6000601f841160018114611afc5760008515611ae45750838201355b600019600387901b1c1916600186901b1783556105fd565b600083815260209020601f19861690835b82811015611b2d5786850135825560209485019460019092019101611b0d565b5086821015611b4a5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008135611a27816118d3565b8135815560208201356001820155604082013560028201556060820135600382015560808201356004820155611ba560a0830160058301611a2d565b611bb260e08301836119b4565b611bc0818360078601611a9d565b50506101008201356008820155611bf6611bdd6101208401611b5c565b6009830160ff1981541660ff8315151681178255505050565b5050565b600060018201611c0c57611c0c6119fa565b5060010190565b634e487b7160e01b600052603260045260246000fd5b8135611c348161159a565b81546001600160a01b0319166001600160a01b0391909116178155602082810160005b6004811015611c7757813560018286018101919091559183019101611c57565b50505060a082013560058201555050565b60208082528181018390526000908460408401835b86811015611ce0578235611cb08161159a565b6001600160a01b0316825260808385018584013760a0838101359083015260c09283019290910190600101611c9d565b509695505050505050565b80820180821115611a2757611a276119fa565b6020808252600b908201526a08a9aa0a8b2be8482a886960ab1b604082015260600190565b6020808252602e908201527f736f75726365436861696e496420616e642064657374696e6174696f6e43686160408201526d1a5b9259081b9bdd08195c5d585b60921b606082015260800190565b6020808252601690820152751253959053125117d31054d517d0d3d353525515115160521b604082015260600190565b60008060008060808587031215611db757600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b600082611dfc57611dfc611dd7565b500490565b61010081016040858337611e1860408301856116ad565b60c082018360005b6002811015611e3f578151835260209283019290910190600101611e20565b505050949350505050565b60008060408385031215611e5d57600080fd5b8251611e68816118d3565b6020840151909250611e79816118d3565b809150509250929050565b600082611e9357611e93611dd7565b50069056fea2646970667358221220deac18a8c505323ca8d18e129836876b927478aca65fa6d8c19e8665890e19f564736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` -var GatewayArtifact string = `{"_format":"hh-sol-artifact-1","contractName":"Gateway","sourceName":"contracts/blade/Gateway.sol","abi":[{"inputs":[{"internalType":"string","name":"only","type":"string"}],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isRollback","type":"bool"}],"name":"BridgeBatchResult","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"counter","type":"uint256"},{"indexed":true,"internalType":"bool","name":"status","type":"bool"},{"indexed":false,"internalType":"uint256","name":"sourceChainID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"destinationChainID","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"}],"name":"BridgeMessageResult","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"BridgeMsg","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"indexed":false,"internalType":"struct Validator[]","name":"newValidatorSet","type":"tuple[]"}],"name":"NewValidatorSet","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":"MAX_LENGTH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"bls","outputs":[{"internalType":"contract IBLS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bn256G2","outputs":[{"internalType":"contract IBN256G2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"internalType":"struct Validator[]","name":"newValidatorSet","type":"tuple[]"},{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"bytes","name":"bitmap","type":"bytes"}],"name":"commitValidatorSet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"counter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"currentValidatorSet","outputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentValidatorSetHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentValidatorSetLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IBLS","name":"newBls","type":"address"},{"internalType":"contract IBN256G2","name":"newBn256G2","type":"address"},{"components":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"internalType":"struct Validator[]","name":"validators","type":"tuple[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"processedEvents","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"processedEventsRollback","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes","name":"payload","type":"bytes"}],"internalType":"struct BridgeMessage[]","name":"batchMessages","type":"tuple[]"},{"components":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"startId","type":"uint256"},{"internalType":"uint256","name":"endId","type":"uint256"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"bytes","name":"bitmap","type":"bytes"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"bool","name":"isRollback","type":"bool"}],"internalType":"struct SignedBridgeMessageBatch","name":"signedBridgeBatch","type":"tuple"}],"name":"receiveBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"}],"name":"sendBridgeMsg","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalVotingPower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b5061220d806100206000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80636969a25c116100b8578063a6f9885c1161007c578063a6f9885c14610290578063c7c982c214610299578063d4c8e3e8146102bc578063e3d28ff6146102cf578063ebad8e56146102e2578063f896f1a5146102f557600080fd5b80636969a25c146101dc578063947287cf1461022e57806395b0b027146102375780639eb33f5d1461024a578063a15273bb1461025d57600080fd5b806351351d53116100ff57806351351d53146101a557806355b01e4d146101b35780635ea5df79146101c157806361bc221a146101ca578063671b3793146101d357600080fd5b806307b3e2521461013c5780631d1d4f2614610167578063284017f51461017e5780633b878c2214610187578063417d5acb14610190575b600080fd5b61014a6004600360981b0181565b6040516001600160a01b0390911681526020015b60405180910390f35b61017060365481565b60405190815260200161015e565b61014a61202081565b61014a61010681565b6101a361019e36600461183d565b6102fe565b005b61014a6002600160a01b0381565b61014a6004600160991b0181565b61017061138881565b61017060395481565b61017060385481565b61020f6101ea366004611898565b603560205260009081526040902080546005909101546001600160a01b039091169082565b604080516001600160a01b03909316835260208301919091520161015e565b61017061520881565b60335461014a906001600160a01b031681565b6101a36102583660046118f5565b61041f565b61028061026b366004611898565b603b6020526000908152604090205460ff1681565b604051901515815260200161015e565b61017061080081565b6102806102a7366004611898565b603a6020526000908152604090205460ff1681565b60345461014a906001600160a01b031681565b6101a36102dd366004611959565b610567565b6101a36102f03660046119f7565b610860565b61017060375481565b6001600160a01b03841661034c5760405162461bcd60e51b815260206004820152601060248201526f24a72b20a624a22fa922a1a2a4ab22a960811b60448201526064015b60405180910390fd5b6108008211156103935760405162461bcd60e51b815260206004820152601260248201527108ab0868a8a88a6be9a82b0be988a9c8ea8960731b6044820152606401610343565b806000036103b35760405162461bcd60e51b815260040161034390611a7e565b836001600160a01b0316336001600160a01b03166039600081546103d690611acb565b9190508190557fc63a2577937420ccd826b7d9bc6e5cf7e62be57768c38beed67ed1196a994be2468588886040516104119493929190611b0d565b60405180910390a450505050565b600054610100900460ff161580801561043f5750600054600160ff909116105b806104595750303b158015610459575060005460ff166001145b6104bc5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610343565b6000805460ff1916600117905580156104df576000805461ff0019166101001790555b603380546001600160a01b038088166001600160a01b031992831617909255603480549287169290911691909117905561051983836108b1565b8015610560576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050505050565b61057961014082016101208301611b45565b1561058d5761058883836109ad565b610597565b6105978383610a80565b60006105ab6105a68486611cb2565b610b53565b60208301356040840135606085013560808601356101008701356105d761014089016101208a01611b45565b6040805160208101989098528701959095526060860193909352608085019190915260a084015260c0830152151560e08201526101000160408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b83529092506106e8916001600160a01b039091169063a850a90990610692907f9e040270bf060614de9fdbc52b0658eebf5f652008ac7da12272c3e646b29f99908690600401611d85565b6040805180830381865afa1580156106ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d29190611da6565b60a084016106e360e0860186611e25565b610d0e565b8161010001354311801561070b575061070961014083016101208401611b45565b155b156107525760405162461bcd60e51b81526020600482015260176024820152761d1a194818985d18da081a185cc81d1a5b5959081bdd5d604a1b6044820152606401610343565b8261076561014084016101208501611b45565b6107ae5760005b818110156107a8576107a086868381811061078957610789611e6b565b905060200281019061079b9190611e81565b61104a565b60010161076c565b506107ef565b60005b818110156107ed576107e58686838181106107ce576107ce611e6b565b90506020028101906107e09190611e81565b6112a5565b6001016107b1565b505b7f69865ac24fff12c0d495b69a7ff7a4c5a39e04ad06f897f2ea0398713952bd4d602084013560408501356060860135608087013561083661014089016101208a01611b45565b6040805195865260208601949094529284019190915260608301521515608082015260a001610557565b336002600160a01b03146108a45760405163973d02cb60e01b815260206004820152600a60248201526914d654d5115350d0531360b21b6044820152606401610343565b6105608585858585611454565b603681905560405181906108cb9084908390602001611ea1565b60408051601f1981840301815291905280516020909101206037556000805b828110156109a457600085858381811061090657610906611e6b565b905060c0020160a001359050600081116109565760405162461bcd60e51b8152602060048201526011602482015270564f54494e475f504f5745525f5a45524f60781b6044820152606401610343565b6109608184611f04565b925085858381811061097457610974611e6b565b905060c002016035600084815260200190815260200160002081816109999190611f34565b5050506001016108ea565b50603855505050565b806109ca5760405162461bcd60e51b815260040161034390611f93565b466000838382816109dd576109dd611e6b565b90506020028101906109ef9190611e81565b60400135905060005b83811015610560576000858583818110610a1457610a14611e6b565b9050602002810190610a269190611e81565b610a2f90611fb8565b905083816020015114610a545760405162461bcd60e51b815260040161034390611fc4565b82816040015114610a775760405162461bcd60e51b815260040161034390611a7e565b506001016109f8565b80610a9d5760405162461bcd60e51b815260040161034390611f93565b46600083838281610ab057610ab0611e6b565b9050602002810190610ac29190611e81565b60200135905060005b83811015610560576000858583818110610ae757610ae7611e6b565b9050602002810190610af99190611e81565b610b0290611fb8565b905082816020015114610b275760405162461bcd60e51b815260040161034390611fc4565b83816040015114610b4a5760405162461bcd60e51b815260040161034390611a7e565b50600101610acb565b600080825111610b9c5760405162461bcd60e51b8152602060048201526014602482015273139bc81b595cdcd859d95cc81c1c9bdd9a59195960621b6044820152606401610343565b600082516001600160401b03811115610bb757610bb7611b62565b604051908082528060200260200182016040528015610be0578160200160208202803683370190505b50905060005b8351811015610cfd57838181518110610c0157610c01611e6b565b602002602001015160000151848281518110610c1f57610c1f611e6b565b602002602001015160200151858381518110610c3d57610c3d611e6b565b602002602001015160400151868481518110610c5b57610c5b611e6b565b602002602001015160600151878581518110610c7957610c79611e6b565b602002602001015160800151888681518110610c9757610c97611e6b565b602002602001015160a00151604051602001610cb896959493929190611ff5565b60405160208183030381529060405280519060200120828281518110610ce057610ce0611e6b565b602090810291909101015280610cf581611acb565b915050610be6565b50610d07816115c3565b9392505050565b603654610d196117bf565b6000805b83811015610ec457610d30868683611756565b15610ebc5781600003610d84576000818152603560205260409081902081516080810190925260010160048282826020028201915b815481526020019060010190808311610d655750505050509250610e9d565b60008181526035602052604080822081516080810190925260010160048282826020028201915b815481526020019060010190808311610dab57505060345488516020808b01516040808d01516060808f01518b51958c0151848d0151928d01519451630cbe96a560e41b81526004810198909852602488019590955260448701929092526064860191909152608485019390935260a484019190915260c483019190915260e48201529495506001600160a01b03169363cbe96a50935061010401915050608060405180830381865afa158015610e66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8a9190612041565b6060880152604087015260208601528452505b600081815260356020526040902060050154610eb99083611f04565b91505b600101610d1d565b5080600003610f075760405162461bcd60e51b815260206004820152600f60248201526e4249544d41505f49535f454d50545960881b6044820152606401610343565b60036038546002610f189190611f1d565b610f22919061208d565b8111610f6c5760405162461bcd60e51b815260206004820152601960248201527824a729aaa32324a1a4a2a72a2fab27aa24a723afa827aba2a960391b6044820152606401610343565b60335460405163ebbdac9160e01b815260009182916001600160a01b039091169063ebbdac9190610fa5908b9088908e906004016120a1565b6040805180830381865afa158015610fc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe59190612107565b91509150818015610ff35750805b61103f5760405162461bcd60e51b815260206004820152601d60248201527f5349474e41545552455f564552494649434154494f4e5f4641494c45440000006044820152606401610343565b505050505050505050565b80356000908152603a602052604090205460ff16156110cb5760405162461bcd60e51b815260206004820152603760248201527f44657374696e6174696f6e476174657761793a204252494447455f4d4553534160448201527611d157d254d7d053149150511657d41493d0d154d4d151604a1b6064820152608401610343565b6110db60a0820160808301612141565b6001600160a01b03163b60000361112b5760405162461bcd60e51b8152602060048201526014602482015273726563656976657220686173206e6f20636f646560601b6044820152606401610343565b80356000908152603a60205260408120805460ff191660011790558061115760a0840160808501612141565b6001600160a01b031683356111726080860160608701612141565b61117f60a0870187611e25565b604051602401611192949392919061215e565b60408051601f198184030181529181526020820180516001600160e01b031663eeb4994560e01b179052516111c79190612189565b6000604051808303816000865af19150503d8060008114611204576040519150601f19603f3d011682016040523d82523d6000602084013e611209565b606091505b5091509150816112555760405162461bcd60e51b8152602060048201526017602482015276476174657761793a2042415443485f524f4c4c4241434b60481b6044820152606401610343565b81151583600001357f01a66933f54cace7f9f3e5495103757bb2a7bc2a306c6847d590e9bd3c2557b085602001358660400135856040516112989392919061219b565b60405180910390a3505050565b80356000908152603b602052604090205460ff161561132e576040805162461bcd60e51b81526020600482015260248101919091527f44657374696e6174696f6e476174657761793a20524f4c4c4241434b5f42524960448201527f4447455f4d4553534147455f49535f414c52454144595f50524f4345535345446064820152608401610343565b80356000908152603b60205260408120805460ff191660011790558061135a60a0840160808501612141565b6001600160a01b031683356113756080860160608701612141565b61138260a0870187611e25565b604051602401611395949392919061215e565b60408051601f198184030181529181526020820180516001600160e01b0316633bd4725960e21b179052516113ca9190612189565b6000604051808303816000865af19150503d8060008114611407576040519150601f19603f3d011682016040523d82523d6000602084013e61140c565b606091505b509150915081151583600001357f01a66933f54cace7f9f3e5495103757bb2a7bc2a306c6847d590e9bd3c2557b085602001358660400135856040516112989392919061219b565b836114975760405162461bcd60e51b8152602060048201526013602482015272115354151657d590531251105513d497d4d155606a1b6044820152606401610343565b600085856040516020016114ac929190611ea1565b60408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b8352909250611578916001600160a01b039091169063a850a90990611530907f38456a8ba687e3cfdf4624782b10d2b7a64cb5f06849efda87a3ef2897ac5256908690600401611d85565b6040805180830381865afa15801561154c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115709190611da6565b858585610d0e565b61158286866108b1565b7fef80356b0fe90f99a2a53b1c2d22fcfb692458289759823035acd25b9137fb3786866040516115b3929190611ea1565b60405180910390a1505050505050565b600081516001036115f057816000815181106115e1576115e1611e6b565b60200260200101519050919050565b60018251111561174357600060028351600161160c9190611f04565b611616919061208d565b90506000816001600160401b0381111561163257611632611b62565b60405190808252806020026020018201604052801561165b578160200160208202803683370190505b5090506000805b855181101561173757600086828151811061167f5761167f611e6b565b602002602001015190506000875183600161169a9190611f04565b106116a557816116ca565b876116b1846001611f04565b815181106116c1576116c1611e6b565b60200260200101515b60408051602081018590529081018290529091506060016040516020818303038152906040528051906020012085858151811061170957611709611e6b565b60209081029190910101528361171e81611acb565b94505050506002816117309190611f04565b9050611662565b508194505050506115f0565b816000815181106115e1576115e1611e6b565b60008061176460088461208d565b905060006117736008856121c3565b905084821061178757600092505050610d07565b6000600160ff83161b8787858181106117a2576117a2611e6b565b9050013560f81c60f81b60f81c60ff161611925050509392505050565b60405180608001604052806004906020820280368337509192915050565b6001600160a01b03811681146117f257600080fd5b50565b60008083601f84011261180757600080fd5b5081356001600160401b0381111561181e57600080fd5b60208301915083602082850101111561183657600080fd5b9250929050565b6000806000806060858703121561185357600080fd5b843561185e816117dd565b935060208501356001600160401b0381111561187957600080fd5b611885878288016117f5565b9598909750949560400135949350505050565b6000602082840312156118aa57600080fd5b5035919050565b60008083601f8401126118c357600080fd5b5081356001600160401b038111156118da57600080fd5b60208301915083602060c08302850101111561183657600080fd5b6000806000806060858703121561190b57600080fd5b8435611916816117dd565b93506020850135611926816117dd565b925060408501356001600160401b0381111561194157600080fd5b61194d878288016118b1565b95989497509550505050565b60008060006040848603121561196e57600080fd5b83356001600160401b038082111561198557600080fd5b818601915086601f83011261199957600080fd5b8135818111156119a857600080fd5b8760208260051b85010111156119bd57600080fd5b6020928301955093509085013590808211156119d857600080fd5b50840161014081870312156119ec57600080fd5b809150509250925092565b600080600080600060808688031215611a0f57600080fd5b85356001600160401b0380821115611a2657600080fd5b611a3289838a016118b1565b909750955060608801915088821115611a4a57600080fd5b60208801945090359080821115611a6057600080fd5b50611a6d888289016117f5565b969995985093965092949392505050565b6020808252601c908201527f494e56414c49445f44455354494e4154494f4e5f434841494e5f494400000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600060018201611add57611add611ab5565b5060010190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b848152836020820152606060408201526000611b2d606083018486611ae4565b9695505050505050565b80151581146117f257600080fd5b600060208284031215611b5757600080fd5b8135610d0781611b37565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b0381118282101715611b9a57611b9a611b62565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611bc857611bc8611b62565b604052919050565b600060c08284031215611be257600080fd5b611bea611b78565b90508135815260208083013581830152604083013560408301526060830135611c12816117dd565b60608301526080830135611c25816117dd565b608083015260a08301356001600160401b0380821115611c4457600080fd5b818501915085601f830112611c5857600080fd5b813581811115611c6a57611c6a611b62565b611c7c601f8201601f19168501611ba0565b91508082528684828501011115611c9257600080fd5b80848401858401376000848284010152508060a085015250505092915050565b60006001600160401b0380841115611ccc57611ccc611b62565b8360051b6020611cdd818301611ba0565b868152918501918181019036841115611cf557600080fd5b865b84811015611d2957803586811115611d0f5760008081fd5b611d1b36828b01611bd0565b845250918301918301611cf7565b50979650505050505050565b60005b83811015611d50578181015183820152602001611d38565b50506000910152565b60008151808452611d71816020860160208601611d35565b601f01601f19169290920160200192915050565b828152604060208201526000611d9e6040830184611d59565b949350505050565b600060408284031215611db857600080fd5b82601f830112611dc757600080fd5b604051604081018181106001600160401b0382111715611de957611de9611b62565b8060405250806040840185811115611e0057600080fd5b845b81811015611e1a578051835260209283019201611e02565b509195945050505050565b6000808335601e19843603018112611e3c57600080fd5b8301803591506001600160401b03821115611e5657600080fd5b60200191503681900382131561183657600080fd5b634e487b7160e01b600052603260045260246000fd5b6000823560be19833603018112611e9757600080fd5b9190910192915050565b60208082528181018390526000908460408401835b86811015611ef9578235611ec9816117dd565b6001600160a01b0316825260808385018584013760a0838101359083015260c09283019290910190600101611eb6565b509695505050505050565b80820180821115611f1757611f17611ab5565b92915050565b8082028115828204841417611f1757611f17611ab5565b8135611f3f816117dd565b81546001600160a01b0319166001600160a01b0391909116178155602082810160005b6004811015611f8257813560018286018101919091559183019101611f62565b50505060a082013560058201555050565b6020808252600b908201526a08a9aa0a8b2be8482a886960ab1b604082015260600190565b6000611f173683611bd0565b6020808252601790820152761253959053125117d4d3d55490d157d0d210525397d251604a1b604082015260600190565b86815260208101869052604081018590526001600160a01b0384811660608301528316608082015260c060a0820181905260009061203590830184611d59565b98975050505050505050565b6000806000806080858703121561205757600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261209c5761209c612077565b500490565b61010081016040858337604082018460005b60048110156120d25781518352602092830192909101906001016120b3565b50505060c082018360005b60028110156120fc5781518352602092830192909101906001016120dd565b505050949350505050565b6000806040838503121561211a57600080fd5b825161212581611b37565b602084015190925061213681611b37565b809150509250929050565b60006020828403121561215357600080fd5b8135610d07816117dd565b8481526001600160a01b0384166020820152606060408201819052600090611b2d9083018486611ae4565b60008251611e97818460208701611d35565b8381528260208201526060604082015260006121ba6060830184611d59565b95945050505050565b6000826121d2576121d2612077565b50069056fea26469706673582212207f3c62a3c3bd562ed6553cffed73ff542e45db9b757025ce2a86e345c19ee69b64736f6c63430008130033","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106101375760003560e01c80636969a25c116100b8578063a6f9885c1161007c578063a6f9885c14610290578063c7c982c214610299578063d4c8e3e8146102bc578063e3d28ff6146102cf578063ebad8e56146102e2578063f896f1a5146102f557600080fd5b80636969a25c146101dc578063947287cf1461022e57806395b0b027146102375780639eb33f5d1461024a578063a15273bb1461025d57600080fd5b806351351d53116100ff57806351351d53146101a557806355b01e4d146101b35780635ea5df79146101c157806361bc221a146101ca578063671b3793146101d357600080fd5b806307b3e2521461013c5780631d1d4f2614610167578063284017f51461017e5780633b878c2214610187578063417d5acb14610190575b600080fd5b61014a6004600360981b0181565b6040516001600160a01b0390911681526020015b60405180910390f35b61017060365481565b60405190815260200161015e565b61014a61202081565b61014a61010681565b6101a361019e36600461183d565b6102fe565b005b61014a6002600160a01b0381565b61014a6004600160991b0181565b61017061138881565b61017060395481565b61017060385481565b61020f6101ea366004611898565b603560205260009081526040902080546005909101546001600160a01b039091169082565b604080516001600160a01b03909316835260208301919091520161015e565b61017061520881565b60335461014a906001600160a01b031681565b6101a36102583660046118f5565b61041f565b61028061026b366004611898565b603b6020526000908152604090205460ff1681565b604051901515815260200161015e565b61017061080081565b6102806102a7366004611898565b603a6020526000908152604090205460ff1681565b60345461014a906001600160a01b031681565b6101a36102dd366004611959565b610567565b6101a36102f03660046119f7565b610860565b61017060375481565b6001600160a01b03841661034c5760405162461bcd60e51b815260206004820152601060248201526f24a72b20a624a22fa922a1a2a4ab22a960811b60448201526064015b60405180910390fd5b6108008211156103935760405162461bcd60e51b815260206004820152601260248201527108ab0868a8a88a6be9a82b0be988a9c8ea8960731b6044820152606401610343565b806000036103b35760405162461bcd60e51b815260040161034390611a7e565b836001600160a01b0316336001600160a01b03166039600081546103d690611acb565b9190508190557fc63a2577937420ccd826b7d9bc6e5cf7e62be57768c38beed67ed1196a994be2468588886040516104119493929190611b0d565b60405180910390a450505050565b600054610100900460ff161580801561043f5750600054600160ff909116105b806104595750303b158015610459575060005460ff166001145b6104bc5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610343565b6000805460ff1916600117905580156104df576000805461ff0019166101001790555b603380546001600160a01b038088166001600160a01b031992831617909255603480549287169290911691909117905561051983836108b1565b8015610560576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050505050565b61057961014082016101208301611b45565b1561058d5761058883836109ad565b610597565b6105978383610a80565b60006105ab6105a68486611cb2565b610b53565b60208301356040840135606085013560808601356101008701356105d761014089016101208a01611b45565b6040805160208101989098528701959095526060860193909352608085019190915260a084015260c0830152151560e08201526101000160408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b83529092506106e8916001600160a01b039091169063a850a90990610692907f9e040270bf060614de9fdbc52b0658eebf5f652008ac7da12272c3e646b29f99908690600401611d85565b6040805180830381865afa1580156106ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d29190611da6565b60a084016106e360e0860186611e25565b610d0e565b8161010001354311801561070b575061070961014083016101208401611b45565b155b156107525760405162461bcd60e51b81526020600482015260176024820152761d1a194818985d18da081a185cc81d1a5b5959081bdd5d604a1b6044820152606401610343565b8261076561014084016101208501611b45565b6107ae5760005b818110156107a8576107a086868381811061078957610789611e6b565b905060200281019061079b9190611e81565b61104a565b60010161076c565b506107ef565b60005b818110156107ed576107e58686838181106107ce576107ce611e6b565b90506020028101906107e09190611e81565b6112a5565b6001016107b1565b505b7f69865ac24fff12c0d495b69a7ff7a4c5a39e04ad06f897f2ea0398713952bd4d602084013560408501356060860135608087013561083661014089016101208a01611b45565b6040805195865260208601949094529284019190915260608301521515608082015260a001610557565b336002600160a01b03146108a45760405163973d02cb60e01b815260206004820152600a60248201526914d654d5115350d0531360b21b6044820152606401610343565b6105608585858585611454565b603681905560405181906108cb9084908390602001611ea1565b60408051601f1981840301815291905280516020909101206037556000805b828110156109a457600085858381811061090657610906611e6b565b905060c0020160a001359050600081116109565760405162461bcd60e51b8152602060048201526011602482015270564f54494e475f504f5745525f5a45524f60781b6044820152606401610343565b6109608184611f04565b925085858381811061097457610974611e6b565b905060c002016035600084815260200190815260200160002081816109999190611f34565b5050506001016108ea565b50603855505050565b806109ca5760405162461bcd60e51b815260040161034390611f93565b466000838382816109dd576109dd611e6b565b90506020028101906109ef9190611e81565b60400135905060005b83811015610560576000858583818110610a1457610a14611e6b565b9050602002810190610a269190611e81565b610a2f90611fb8565b905083816020015114610a545760405162461bcd60e51b815260040161034390611fc4565b82816040015114610a775760405162461bcd60e51b815260040161034390611a7e565b506001016109f8565b80610a9d5760405162461bcd60e51b815260040161034390611f93565b46600083838281610ab057610ab0611e6b565b9050602002810190610ac29190611e81565b60200135905060005b83811015610560576000858583818110610ae757610ae7611e6b565b9050602002810190610af99190611e81565b610b0290611fb8565b905082816020015114610b275760405162461bcd60e51b815260040161034390611fc4565b83816040015114610b4a5760405162461bcd60e51b815260040161034390611a7e565b50600101610acb565b600080825111610b9c5760405162461bcd60e51b8152602060048201526014602482015273139bc81b595cdcd859d95cc81c1c9bdd9a59195960621b6044820152606401610343565b600082516001600160401b03811115610bb757610bb7611b62565b604051908082528060200260200182016040528015610be0578160200160208202803683370190505b50905060005b8351811015610cfd57838181518110610c0157610c01611e6b565b602002602001015160000151848281518110610c1f57610c1f611e6b565b602002602001015160200151858381518110610c3d57610c3d611e6b565b602002602001015160400151868481518110610c5b57610c5b611e6b565b602002602001015160600151878581518110610c7957610c79611e6b565b602002602001015160800151888681518110610c9757610c97611e6b565b602002602001015160a00151604051602001610cb896959493929190611ff5565b60405160208183030381529060405280519060200120828281518110610ce057610ce0611e6b565b602090810291909101015280610cf581611acb565b915050610be6565b50610d07816115c3565b9392505050565b603654610d196117bf565b6000805b83811015610ec457610d30868683611756565b15610ebc5781600003610d84576000818152603560205260409081902081516080810190925260010160048282826020028201915b815481526020019060010190808311610d655750505050509250610e9d565b60008181526035602052604080822081516080810190925260010160048282826020028201915b815481526020019060010190808311610dab57505060345488516020808b01516040808d01516060808f01518b51958c0151848d0151928d01519451630cbe96a560e41b81526004810198909852602488019590955260448701929092526064860191909152608485019390935260a484019190915260c483019190915260e48201529495506001600160a01b03169363cbe96a50935061010401915050608060405180830381865afa158015610e66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8a9190612041565b6060880152604087015260208601528452505b600081815260356020526040902060050154610eb99083611f04565b91505b600101610d1d565b5080600003610f075760405162461bcd60e51b815260206004820152600f60248201526e4249544d41505f49535f454d50545960881b6044820152606401610343565b60036038546002610f189190611f1d565b610f22919061208d565b8111610f6c5760405162461bcd60e51b815260206004820152601960248201527824a729aaa32324a1a4a2a72a2fab27aa24a723afa827aba2a960391b6044820152606401610343565b60335460405163ebbdac9160e01b815260009182916001600160a01b039091169063ebbdac9190610fa5908b9088908e906004016120a1565b6040805180830381865afa158015610fc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe59190612107565b91509150818015610ff35750805b61103f5760405162461bcd60e51b815260206004820152601d60248201527f5349474e41545552455f564552494649434154494f4e5f4641494c45440000006044820152606401610343565b505050505050505050565b80356000908152603a602052604090205460ff16156110cb5760405162461bcd60e51b815260206004820152603760248201527f44657374696e6174696f6e476174657761793a204252494447455f4d4553534160448201527611d157d254d7d053149150511657d41493d0d154d4d151604a1b6064820152608401610343565b6110db60a0820160808301612141565b6001600160a01b03163b60000361112b5760405162461bcd60e51b8152602060048201526014602482015273726563656976657220686173206e6f20636f646560601b6044820152606401610343565b80356000908152603a60205260408120805460ff191660011790558061115760a0840160808501612141565b6001600160a01b031683356111726080860160608701612141565b61117f60a0870187611e25565b604051602401611192949392919061215e565b60408051601f198184030181529181526020820180516001600160e01b031663eeb4994560e01b179052516111c79190612189565b6000604051808303816000865af19150503d8060008114611204576040519150601f19603f3d011682016040523d82523d6000602084013e611209565b606091505b5091509150816112555760405162461bcd60e51b8152602060048201526017602482015276476174657761793a2042415443485f524f4c4c4241434b60481b6044820152606401610343565b81151583600001357f01a66933f54cace7f9f3e5495103757bb2a7bc2a306c6847d590e9bd3c2557b085602001358660400135856040516112989392919061219b565b60405180910390a3505050565b80356000908152603b602052604090205460ff161561132e576040805162461bcd60e51b81526020600482015260248101919091527f44657374696e6174696f6e476174657761793a20524f4c4c4241434b5f42524960448201527f4447455f4d4553534147455f49535f414c52454144595f50524f4345535345446064820152608401610343565b80356000908152603b60205260408120805460ff191660011790558061135a60a0840160808501612141565b6001600160a01b031683356113756080860160608701612141565b61138260a0870187611e25565b604051602401611395949392919061215e565b60408051601f198184030181529181526020820180516001600160e01b0316633bd4725960e21b179052516113ca9190612189565b6000604051808303816000865af19150503d8060008114611407576040519150601f19603f3d011682016040523d82523d6000602084013e61140c565b606091505b509150915081151583600001357f01a66933f54cace7f9f3e5495103757bb2a7bc2a306c6847d590e9bd3c2557b085602001358660400135856040516112989392919061219b565b836114975760405162461bcd60e51b8152602060048201526013602482015272115354151657d590531251105513d497d4d155606a1b6044820152606401610343565b600085856040516020016114ac929190611ea1565b60408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b8352909250611578916001600160a01b039091169063a850a90990611530907f38456a8ba687e3cfdf4624782b10d2b7a64cb5f06849efda87a3ef2897ac5256908690600401611d85565b6040805180830381865afa15801561154c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115709190611da6565b858585610d0e565b61158286866108b1565b7fef80356b0fe90f99a2a53b1c2d22fcfb692458289759823035acd25b9137fb3786866040516115b3929190611ea1565b60405180910390a1505050505050565b600081516001036115f057816000815181106115e1576115e1611e6b565b60200260200101519050919050565b60018251111561174357600060028351600161160c9190611f04565b611616919061208d565b90506000816001600160401b0381111561163257611632611b62565b60405190808252806020026020018201604052801561165b578160200160208202803683370190505b5090506000805b855181101561173757600086828151811061167f5761167f611e6b565b602002602001015190506000875183600161169a9190611f04565b106116a557816116ca565b876116b1846001611f04565b815181106116c1576116c1611e6b565b60200260200101515b60408051602081018590529081018290529091506060016040516020818303038152906040528051906020012085858151811061170957611709611e6b565b60209081029190910101528361171e81611acb565b94505050506002816117309190611f04565b9050611662565b508194505050506115f0565b816000815181106115e1576115e1611e6b565b60008061176460088461208d565b905060006117736008856121c3565b905084821061178757600092505050610d07565b6000600160ff83161b8787858181106117a2576117a2611e6b565b9050013560f81c60f81b60f81c60ff161611925050509392505050565b60405180608001604052806004906020820280368337509192915050565b6001600160a01b03811681146117f257600080fd5b50565b60008083601f84011261180757600080fd5b5081356001600160401b0381111561181e57600080fd5b60208301915083602082850101111561183657600080fd5b9250929050565b6000806000806060858703121561185357600080fd5b843561185e816117dd565b935060208501356001600160401b0381111561187957600080fd5b611885878288016117f5565b9598909750949560400135949350505050565b6000602082840312156118aa57600080fd5b5035919050565b60008083601f8401126118c357600080fd5b5081356001600160401b038111156118da57600080fd5b60208301915083602060c08302850101111561183657600080fd5b6000806000806060858703121561190b57600080fd5b8435611916816117dd565b93506020850135611926816117dd565b925060408501356001600160401b0381111561194157600080fd5b61194d878288016118b1565b95989497509550505050565b60008060006040848603121561196e57600080fd5b83356001600160401b038082111561198557600080fd5b818601915086601f83011261199957600080fd5b8135818111156119a857600080fd5b8760208260051b85010111156119bd57600080fd5b6020928301955093509085013590808211156119d857600080fd5b50840161014081870312156119ec57600080fd5b809150509250925092565b600080600080600060808688031215611a0f57600080fd5b85356001600160401b0380821115611a2657600080fd5b611a3289838a016118b1565b909750955060608801915088821115611a4a57600080fd5b60208801945090359080821115611a6057600080fd5b50611a6d888289016117f5565b969995985093965092949392505050565b6020808252601c908201527f494e56414c49445f44455354494e4154494f4e5f434841494e5f494400000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600060018201611add57611add611ab5565b5060010190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b848152836020820152606060408201526000611b2d606083018486611ae4565b9695505050505050565b80151581146117f257600080fd5b600060208284031215611b5757600080fd5b8135610d0781611b37565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b0381118282101715611b9a57611b9a611b62565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611bc857611bc8611b62565b604052919050565b600060c08284031215611be257600080fd5b611bea611b78565b90508135815260208083013581830152604083013560408301526060830135611c12816117dd565b60608301526080830135611c25816117dd565b608083015260a08301356001600160401b0380821115611c4457600080fd5b818501915085601f830112611c5857600080fd5b813581811115611c6a57611c6a611b62565b611c7c601f8201601f19168501611ba0565b91508082528684828501011115611c9257600080fd5b80848401858401376000848284010152508060a085015250505092915050565b60006001600160401b0380841115611ccc57611ccc611b62565b8360051b6020611cdd818301611ba0565b868152918501918181019036841115611cf557600080fd5b865b84811015611d2957803586811115611d0f5760008081fd5b611d1b36828b01611bd0565b845250918301918301611cf7565b50979650505050505050565b60005b83811015611d50578181015183820152602001611d38565b50506000910152565b60008151808452611d71816020860160208601611d35565b601f01601f19169290920160200192915050565b828152604060208201526000611d9e6040830184611d59565b949350505050565b600060408284031215611db857600080fd5b82601f830112611dc757600080fd5b604051604081018181106001600160401b0382111715611de957611de9611b62565b8060405250806040840185811115611e0057600080fd5b845b81811015611e1a578051835260209283019201611e02565b509195945050505050565b6000808335601e19843603018112611e3c57600080fd5b8301803591506001600160401b03821115611e5657600080fd5b60200191503681900382131561183657600080fd5b634e487b7160e01b600052603260045260246000fd5b6000823560be19833603018112611e9757600080fd5b9190910192915050565b60208082528181018390526000908460408401835b86811015611ef9578235611ec9816117dd565b6001600160a01b0316825260808385018584013760a0838101359083015260c09283019290910190600101611eb6565b509695505050505050565b80820180821115611f1757611f17611ab5565b92915050565b8082028115828204841417611f1757611f17611ab5565b8135611f3f816117dd565b81546001600160a01b0319166001600160a01b0391909116178155602082810160005b6004811015611f8257813560018286018101919091559183019101611f62565b50505060a082013560058201555050565b6020808252600b908201526a08a9aa0a8b2be8482a886960ab1b604082015260600190565b6000611f173683611bd0565b6020808252601790820152761253959053125117d4d3d55490d157d0d210525397d251604a1b604082015260600190565b86815260208101869052604081018590526001600160a01b0384811660608301528316608082015260c060a0820181905260009061203590830184611d59565b98975050505050505050565b6000806000806080858703121561205757600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261209c5761209c612077565b500490565b61010081016040858337604082018460005b60048110156120d25781518352602092830192909101906001016120b3565b50505060c082018360005b60028110156120fc5781518352602092830192909101906001016120dd565b505050949350505050565b6000806040838503121561211a57600080fd5b825161212581611b37565b602084015190925061213681611b37565b809150509250929050565b60006020828403121561215357600080fd5b8135610d07816117dd565b8481526001600160a01b0384166020820152606060408201819052600090611b2d9083018486611ae4565b60008251611e97818460208701611d35565b8381528260208201526060604082015260006121ba6060830184611d59565b95945050505050565b6000826121d2576121d2612077565b50069056fea26469706673582212207f3c62a3c3bd562ed6553cffed73ff542e45db9b757025ce2a86e345c19ee69b64736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` +var BridgeStorageArtifact string = `{"_format":"hh-sol-artifact-1","contractName":"BridgeStorage","sourceName":"contracts/blade/BridgeStorage.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"}],"name":"NewBatch","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"indexed":false,"internalType":"struct Validator[]","name":"newValidatorSet","type":"tuple[]"}],"name":"NewValidatorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"NewValidatorSetStored","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":"batchCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"batches","outputs":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"startId","type":"uint256"},{"internalType":"uint256","name":"endId","type":"uint256"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"bytes","name":"bitmap","type":"bytes"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"bool","name":"isRollback","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bls","outputs":[{"internalType":"contract IBLS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bn256G2","outputs":[{"internalType":"contract IBN256G2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"startId","type":"uint256"},{"internalType":"uint256","name":"endId","type":"uint256"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"bytes","name":"bitmap","type":"bytes"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"bool","name":"isRollback","type":"bool"}],"internalType":"struct SignedBridgeMessageBatch","name":"batch","type":"tuple"}],"name":"commitBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"internalType":"struct Validator[]","name":"newValidatorSet","type":"tuple[]"},{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"bytes","name":"bitmap","type":"bytes"}],"name":"commitValidatorSet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"commitedValidatorSets","outputs":[{"internalType":"bytes","name":"bitmap","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"currentValidatorSet","outputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentValidatorSetHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentValidatorSetLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getCommittedBatch","outputs":[{"components":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"startId","type":"uint256"},{"internalType":"uint256","name":"endId","type":"uint256"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"bytes","name":"bitmap","type":"bytes"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"bool","name":"isRollback","type":"bool"}],"internalType":"struct SignedBridgeMessageBatch","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"firstBatchNumber","type":"uint256"}],"name":"getCommittedBatches","outputs":[{"components":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"startId","type":"uint256"},{"internalType":"uint256","name":"endId","type":"uint256"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"bytes","name":"bitmap","type":"bytes"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"bool","name":"isRollback","type":"bool"}],"internalType":"struct SignedBridgeMessageBatch[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getCommittedValidatorSet","outputs":[{"components":[{"components":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"internalType":"struct Validator[]","name":"newValidatorSet","type":"tuple[]"},{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"bytes","name":"bitmap","type":"bytes"}],"internalType":"struct SignedValidatorSet","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IBLS","name":"newBls","type":"address"},{"internalType":"contract IBN256G2","name":"newBn256G2","type":"address"},{"components":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"internalType":"struct Validator[]","name":"validators","type":"tuple[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lastCommitted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lastCommittedInternal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalVotingPower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"validatorSetCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b5061215e806100206000396000f3fe608060405234801561001057600080fd5b50600436106101635760003560e01c8063947287cf116100ce578063cef7125c11610087578063cef7125c14610306578063d4c8e3e814610326578063dab4be3014610339578063ebad8e561461034c578063ef7337a51461035f578063f1fe29dd1461037f578063f896f1a51461039f57600080fd5b8063947287cf1461028557806395b0b0271461028e5780639eb33f5d146102a1578063afe40317146102b6578063b32c4d8d146102bf578063c7106914146102e657600080fd5b80635ea5df79116101205780635ea5df79146101d85780636151449a146101e1578063671b37931461020157806368233eef1461020a5780636969a25c1461021357806377984a0e1461026557600080fd5b806307b3e252146101685780631d1d4f2614610193578063284017f5146101aa5780633b878c22146101b357806351351d53146101bc57806355b01e4d146101ca575b600080fd5b6101766004600360981b0181565b6040516001600160a01b0390911681526020015b60405180910390f35b61019c60365481565b60405190815260200161018a565b61017661202081565b61017661010681565b6101766002600160a01b0381565b6101766004600160991b0181565b61019c61138881565b6101f46101ef366004611698565b6103a8565b60405161018a91906117a2565b61019c60385481565b61019c603d5481565b610246610221366004611698565b603560205260009081526040902080546005909101546001600160a01b039091169082565b604080516001600160a01b03909316835260208301919091520161018a565b61019c610273366004611698565b603b6020526000908152604090205481565b61019c61520881565b603354610176906001600160a01b031681565b6102b46102af366004611815565b6104e3565b005b61019c603e5481565b6102d26102cd366004611698565b61062f565b60405161018a989796959493929190611879565b6102f96102f4366004611698565b610703565b60405161018a91906118eb565b610319610314366004611698565b61089e565b60405161018a9190611991565b603454610176906001600160a01b031681565b6102b46103473660046119a4565b61093e565b6102b461035a3660046119df565b610b38565b61019c61036d366004611698565b603c6020526000908152604090205481565b61039261038d366004611698565b610c43565b60405161018a9190611a90565b61019c60375481565b6103b061158e565b600082815260396020908152604091829020825161012081018452815481526001820154928101929092526002808201548385015260038201546060840152600482015460808401528351808501948590529293919260a08501929091600585019182845b815481526020019060010190808311610415575050505050815260200160078201805461044190611af2565b80601f016020809104026020016040519081016040528092919081815260200182805461046d90611af2565b80156104ba5780601f1061048f576101008083540402835291602001916104ba565b820191906000526020600020905b81548152906001019060200180831161049d57829003601f168201915b50505091835250506008820154602082015260099091015460ff16151560409091015292915050565b600054610100900460ff16158080156105035750600054600160ff909116105b8061051d5750303b15801561051d575060005460ff166001145b6105855760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156105a8576000805461ff0019166101001790555b603380546001600160a01b038088166001600160a01b03199283161790925560348054928716929091169190911790556105e28383610e21565b8015610628576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b603960205280600052604060002060009150905080600001549080600101549080600201549080600301549080600401549080600701805461067090611af2565b80601f016020809104026020016040519081016040528092919081815260200182805461069c90611af2565b80156106e95780601f106106be576101008083540402835291602001916106e9565b820191906000526020600020905b8154815290600101906020018083116106cc57829003601f168201915b50505050600883015460099093015491929160ff16905088565b61070b6115e2565b6000828152603a602090815260408083208151815460809481028201850190935260608101838152909491938593919285929185015b828210156107c5576000848152602090819020604080516060810182526006860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b815481526020019060010190808311610790575050505050815260200160058201548152505081526020019060010190610741565b50505090825250604080518082019182905260209092019190600184019060029082845b8154815260200190600101908083116107e9575050505050815260200160038201805461081590611af2565b80601f016020809104026020016040519081016040528092919081815260200182805461084190611af2565b801561088e5780601f106108635761010080835404028352916020019161088e565b820191906000526020600020905b81548152906001019060200180831161087157829003601f168201915b5050505050815250509050919050565b603a6020526000908152604090206003810180546108bb90611af2565b80601f01602080910402602001604051908101604052809291908181526020018280546108e790611af2565b80156109345780601f1061090957610100808354040283529160200191610934565b820191906000526020600020905b81548152906001019060200180831161091757829003601f168201915b5050505050905081565b336002600160a01b03146109655760405163973d02cb60e01b815260040161057c90611b2c565b61097761014082016101208301611b5e565b1561098a5761098581610f1d565b610993565b61099381610f65565b6000813560208301356040840135606085013560808601356101008701356109c361014089016101208a01611b5e565b6040805160208101989098528701959095526060860193909352608085019190915260a084015260c0830152151560e08201526101000160408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b8352909250610ad4916001600160a01b039091169063a850a90990610a7e907f9e040270bf060614de9fdbc52b0658eebf5f652008ac7da12272c3e646b29f99908690600401611b7b565b6040805180830381865afa158015610a9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abe9190611bb2565b60a08401610acf60e0860186611c31565b611079565b603d5460009081526039602052604090208290610af18282611de6565b5050603d546040517f999f33d8277b5c68b479fda62fa5ee13eecf7d181a12666721ba4de1fcbfc14c90600090a2603d8054906000610b2f83611e77565b91905055505050565b336002600160a01b0314610b5f5760405163973d02cb60e01b815260040161057c90611b2c565b610b6c85858585856113b5565b603e546000908152603a60205260409020610b8c60018201856002611609565b5060038101610b9c838583611d1a565b5060005b85811015610bf957868682818110610bba57610bba611e90565b905060c00201826000018281548110610bd557610bd5611e90565b90600052602060002090600602018181610bef9190611ea6565b5050600101610ba0565b50603e546040517f9a11e2792c9f81a693e8dc3c0471111f92a264ec0ba5d0aeea3963f9b41d275290600090a2603e8054906000610c3683611e77565b9190505550505050505050565b6060600082603d54610c559190611f05565b6001600160401b03811115610c6c57610c6c611b9c565b604051908082528060200260200182016040528015610ca557816020015b610c9261158e565b815260200190600190039081610c8a5790505b509050825b603d54811015610e1a57600081815260396020908152604091829020825161012081018452815481526001820154928101929092526002808201548385015260038201546060840152600482015460808401528351808501948590529293919260a08501929091600585019182845b815481526020019060010190808311610d195750505050508152602001600782018054610d4590611af2565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7190611af2565b8015610dbe5780601f10610d9357610100808354040283529160200191610dbe565b820191906000526020600020905b815481529060010190602001808311610da157829003601f168201915b50505091835250506008820154602082015260099091015460ff16151560409091015282610dec8684611f05565b81518110610dfc57610dfc611e90565b60200260200101819052508080610e1290611e77565b915050610caa565b5092915050565b60368190556040518190610e3b9084908390602001611f18565b60408051601f1981840301815291905280516020909101206037556000805b82811015610f14576000858583818110610e7657610e76611e90565b905060c0020160a00135905060008111610ec65760405162461bcd60e51b8152602060048201526011602482015270564f54494e475f504f5745525f5a45524f60781b604482015260640161057c565b610ed08184611f7b565b9250858583818110610ee457610ee4611e90565b905060c00201603560008481526020019081526020016000208181610f099190611ea6565b505050600101610e5a565b50603855505050565b8035610f3b5760405162461bcd60e51b815260040161057c90611f8e565b8060800135816060013503610f625760405162461bcd60e51b815260040161057c90611fb3565b50565b8035610f835760405162461bcd60e51b815260040161057c90611f8e565b8060800135816060013503610faa5760405162461bcd60e51b815260040161057c90611fb3565b46816060013503611017578060200135603c600083608001358152602001908152602001600020546001610fde9190611f7b565b14610ffb5760405162461bcd60e51b815260040161057c90612001565b60808101356000908152603c6020526040908190209101359055565b8060200135603b6000836060013581526020019081526020016000205460016110409190611f7b565b1461105d5760405162461bcd60e51b815260040161057c90612001565b60608101356000908152603b6020526040908190209101359055565b603654611084611647565b6000805b8381101561122f5761109b868683611524565b1561122757816000036110ef576000818152603560205260409081902081516080810190925260010160048282826020028201915b8154815260200190600101908083116110d05750505050509250611208565b60008181526035602052604080822081516080810190925260010160048282826020028201915b81548152602001906001019080831161111657505060345488516020808b01516040808d01516060808f01518b51958c0151848d0151928d01519451630cbe96a560e41b81526004810198909852602488019590955260448701929092526064860191909152608485019390935260a484019190915260c483019190915260e48201529495506001600160a01b03169363cbe96a50935061010401915050608060405180830381865afa1580156111d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f59190612031565b6060880152604087015260208601528452505b6000818152603560205260409020600501546112249083611f7b565b91505b600101611088565b50806000036112725760405162461bcd60e51b815260206004820152600f60248201526e4249544d41505f49535f454d50545960881b604482015260640161057c565b600360385460026112839190611c8d565b61128d919061207d565b81116112d75760405162461bcd60e51b815260206004820152601960248201527824a729aaa32324a1a4a2a72a2fab27aa24a723afa827aba2a960391b604482015260640161057c565b60335460405163ebbdac9160e01b815260009182916001600160a01b039091169063ebbdac9190611310908b9088908e90600401612091565b6040805180830381865afa15801561132c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135091906120da565b9150915081801561135e5750805b6113aa5760405162461bcd60e51b815260206004820152601d60248201527f5349474e41545552455f564552494649434154494f4e5f4641494c4544000000604482015260640161057c565b505050505050505050565b836113f85760405162461bcd60e51b8152602060048201526013602482015272115354151657d590531251105513d497d4d155606a1b604482015260640161057c565b6000858560405160200161140d929190611f18565b60408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b83529092506114d9916001600160a01b039091169063a850a90990611491907f38456a8ba687e3cfdf4624782b10d2b7a64cb5f06849efda87a3ef2897ac5256908690600401611b7b565b6040805180830381865afa1580156114ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d19190611bb2565b858585611079565b6114e38686610e21565b7fef80356b0fe90f99a2a53b1c2d22fcfb692458289759823035acd25b9137fb378686604051611514929190611f18565b60405180910390a1505050505050565b60008061153260088461207d565b90506000611541600885612114565b905084821061155557600092505050611587565b6000600160ff83161b87878581811061157057611570611e90565b9050013560f81c60f81b60f81c60ff161611925050505b9392505050565b60405180610120016040528060008019168152602001600081526020016000815260200160008152602001600081526020016115c8611665565b815260606020820181905260006040830181905291015290565b6040518060600160405280606081526020016115fc611665565b8152602001606081525090565b8260028101928215611637579160200282015b8281111561163757823582559160200191906001019061161c565b50611643929150611683565b5090565b60405180608001604052806004906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b5b808211156116435760008155600101611684565b6000602082840312156116aa57600080fd5b5035919050565b8060005b60028110156116d45781518452602093840193909101906001016116b5565b50505050565b6000815180845260005b81811015611700576020818501810151868301820152016116e4565b506000602082860101526020601f19601f83011685010191505092915050565b6000610140825184526020830151602085015260408301516040850152606083015160608501526080830151608085015260a083015161176360a08601826116b1565b5060c08301518160e086015261177b828601826116da565b60e08501516101008781019190915290940151151561012090950194909452509092915050565b6020815260006115876020830184611720565b6001600160a01b0381168114610f6257600080fd5b60008083601f8401126117dc57600080fd5b5081356001600160401b038111156117f357600080fd5b60208301915083602060c08302850101111561180e57600080fd5b9250929050565b6000806000806060858703121561182b57600080fd5b8435611836816117b5565b93506020850135611846816117b5565b925060408501356001600160401b0381111561186157600080fd5b61186d878288016117ca565b95989497509550505050565b60006101008a83528960208401528860408401528760608401528660808401528060a08401526118ab818401876116da565b60c0840195909552505090151560e0909101529695505050505050565b8060005b60048110156116d45781518452602093840193909101906001016118cc565b60208082528251608083830152805160a080850182905260009392909160c09184019082870190865b8181101561195457835180516001600160a01b031684528781015161193b898601826118c8565b5060400151838701529286019291840191600101611914565b5050938701519361196860408801866116b1565b6040880151878203601f19016080890152945061198581866116da565b98975050505050505050565b60208152600061158760208301846116da565b6000602082840312156119b657600080fd5b81356001600160401b038111156119cc57600080fd5b8201610140818503121561158757600080fd5b6000806000806000608086880312156119f757600080fd5b85356001600160401b0380821115611a0e57600080fd5b611a1a89838a016117ca565b909750955060608801915088821115611a3257600080fd5b60208801945090359080821115611a4857600080fd5b818801915088601f830112611a5c57600080fd5b813581811115611a6b57600080fd5b896020828501011115611a7d57600080fd5b9699959850939650602001949392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611ae557603f19888603018452611ad3858351611720565b94509285019290850190600101611ab7565b5092979650505050505050565b600181811c90821680611b0657607f821691505b602082108103611b2657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600a908201526914d654d5115350d0531360b21b604082015260600190565b8015158114610f6257600080fd5b600060208284031215611b7057600080fd5b813561158781611b50565b828152604060208201526000611b9460408301846116da565b949350505050565b634e487b7160e01b600052604160045260246000fd5b600060408284031215611bc457600080fd5b82601f830112611bd357600080fd5b604051604081018181106001600160401b0382111715611bf557611bf5611b9c565b8060405250806040840185811115611c0c57600080fd5b845b81811015611c26578051835260209283019201611c0e565b509195945050505050565b6000808335601e19843603018112611c4857600080fd5b8301803591506001600160401b03821115611c6257600080fd5b60200191503681900382131561180e57600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417611ca457611ca4611c77565b92915050565b8160005b60028110156116d457813583820155602090910190600101611cae565b601f821115611d1557600081815260208120601f850160051c81016020861015611cf25750805b601f850160051c820191505b81811015611d1157828155600101611cfe565b5050505b505050565b6001600160401b03831115611d3157611d31611b9c565b611d4583611d3f8354611af2565b83611ccb565b6000601f841160018114611d795760008515611d615750838201355b600019600387901b1c1916600186901b178355610628565b600083815260209020601f19861690835b82811015611daa5786850135825560209485019460019092019101611d8a565b5086821015611dc75760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008135611ca481611b50565b8135815560208201356001820155604082013560028201556060820135600382015560808201356004820155611e2260a0830160058301611caa565b611e2f60e0830183611c31565b611e3d818360078601611d1a565b50506101008201356008820155611e73611e5a6101208401611dd9565b6009830160ff1981541660ff8315151681178255505050565b5050565b600060018201611e8957611e89611c77565b5060010190565b634e487b7160e01b600052603260045260246000fd5b8135611eb1816117b5565b81546001600160a01b0319166001600160a01b0391909116178155602082810160005b6004811015611ef457813560018286018101919091559183019101611ed4565b50505060a082013560058201555050565b81810381811115611ca457611ca4611c77565b60208082528181018390526000908460408401835b86811015611f70578235611f40816117b5565b6001600160a01b0316825260808385018584013760a0838101359083015260c09283019290910190600101611f2d565b509695505050505050565b80820180821115611ca457611ca4611c77565b6020808252600b908201526a08a9aa0a8b2be8482a886960ab1b604082015260600190565b6020808252602e908201527f736f75726365436861696e496420616e642064657374696e6174696f6e43686160408201526d1a5b9259081b9bdd08195c5d585b60921b606082015260800190565b6020808252601690820152751253959053125117d31054d517d0d3d353525515115160521b604082015260600190565b6000806000806080858703121561204757600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261208c5761208c612067565b500490565b610100810160408583376120a860408301856118c8565b60c082018360005b60028110156120cf5781518352602092830192909101906001016120b0565b505050949350505050565b600080604083850312156120ed57600080fd5b82516120f881611b50565b602084015190925061210981611b50565b809150509250929050565b60008261212357612123612067565b50069056fea26469706673582212206e3de8397ec2c0b1c93669bfca66c575e025fb6f1cec5fbf00d98a7f89308ff564736f6c63430008130033","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106101635760003560e01c8063947287cf116100ce578063cef7125c11610087578063cef7125c14610306578063d4c8e3e814610326578063dab4be3014610339578063ebad8e561461034c578063ef7337a51461035f578063f1fe29dd1461037f578063f896f1a51461039f57600080fd5b8063947287cf1461028557806395b0b0271461028e5780639eb33f5d146102a1578063afe40317146102b6578063b32c4d8d146102bf578063c7106914146102e657600080fd5b80635ea5df79116101205780635ea5df79146101d85780636151449a146101e1578063671b37931461020157806368233eef1461020a5780636969a25c1461021357806377984a0e1461026557600080fd5b806307b3e252146101685780631d1d4f2614610193578063284017f5146101aa5780633b878c22146101b357806351351d53146101bc57806355b01e4d146101ca575b600080fd5b6101766004600360981b0181565b6040516001600160a01b0390911681526020015b60405180910390f35b61019c60365481565b60405190815260200161018a565b61017661202081565b61017661010681565b6101766002600160a01b0381565b6101766004600160991b0181565b61019c61138881565b6101f46101ef366004611698565b6103a8565b60405161018a91906117a2565b61019c60385481565b61019c603d5481565b610246610221366004611698565b603560205260009081526040902080546005909101546001600160a01b039091169082565b604080516001600160a01b03909316835260208301919091520161018a565b61019c610273366004611698565b603b6020526000908152604090205481565b61019c61520881565b603354610176906001600160a01b031681565b6102b46102af366004611815565b6104e3565b005b61019c603e5481565b6102d26102cd366004611698565b61062f565b60405161018a989796959493929190611879565b6102f96102f4366004611698565b610703565b60405161018a91906118eb565b610319610314366004611698565b61089e565b60405161018a9190611991565b603454610176906001600160a01b031681565b6102b46103473660046119a4565b61093e565b6102b461035a3660046119df565b610b38565b61019c61036d366004611698565b603c6020526000908152604090205481565b61039261038d366004611698565b610c43565b60405161018a9190611a90565b61019c60375481565b6103b061158e565b600082815260396020908152604091829020825161012081018452815481526001820154928101929092526002808201548385015260038201546060840152600482015460808401528351808501948590529293919260a08501929091600585019182845b815481526020019060010190808311610415575050505050815260200160078201805461044190611af2565b80601f016020809104026020016040519081016040528092919081815260200182805461046d90611af2565b80156104ba5780601f1061048f576101008083540402835291602001916104ba565b820191906000526020600020905b81548152906001019060200180831161049d57829003601f168201915b50505091835250506008820154602082015260099091015460ff16151560409091015292915050565b600054610100900460ff16158080156105035750600054600160ff909116105b8061051d5750303b15801561051d575060005460ff166001145b6105855760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156105a8576000805461ff0019166101001790555b603380546001600160a01b038088166001600160a01b03199283161790925560348054928716929091169190911790556105e28383610e21565b8015610628576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b603960205280600052604060002060009150905080600001549080600101549080600201549080600301549080600401549080600701805461067090611af2565b80601f016020809104026020016040519081016040528092919081815260200182805461069c90611af2565b80156106e95780601f106106be576101008083540402835291602001916106e9565b820191906000526020600020905b8154815290600101906020018083116106cc57829003601f168201915b50505050600883015460099093015491929160ff16905088565b61070b6115e2565b6000828152603a602090815260408083208151815460809481028201850190935260608101838152909491938593919285929185015b828210156107c5576000848152602090819020604080516060810182526006860290920180546001600160a01b0316835281516080810190925291928301906001830160048282826020028201915b815481526020019060010190808311610790575050505050815260200160058201548152505081526020019060010190610741565b50505090825250604080518082019182905260209092019190600184019060029082845b8154815260200190600101908083116107e9575050505050815260200160038201805461081590611af2565b80601f016020809104026020016040519081016040528092919081815260200182805461084190611af2565b801561088e5780601f106108635761010080835404028352916020019161088e565b820191906000526020600020905b81548152906001019060200180831161087157829003601f168201915b5050505050815250509050919050565b603a6020526000908152604090206003810180546108bb90611af2565b80601f01602080910402602001604051908101604052809291908181526020018280546108e790611af2565b80156109345780601f1061090957610100808354040283529160200191610934565b820191906000526020600020905b81548152906001019060200180831161091757829003601f168201915b5050505050905081565b336002600160a01b03146109655760405163973d02cb60e01b815260040161057c90611b2c565b61097761014082016101208301611b5e565b1561098a5761098581610f1d565b610993565b61099381610f65565b6000813560208301356040840135606085013560808601356101008701356109c361014089016101208a01611b5e565b6040805160208101989098528701959095526060860193909352608085019190915260a084015260c0830152151560e08201526101000160408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b8352909250610ad4916001600160a01b039091169063a850a90990610a7e907f9e040270bf060614de9fdbc52b0658eebf5f652008ac7da12272c3e646b29f99908690600401611b7b565b6040805180830381865afa158015610a9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abe9190611bb2565b60a08401610acf60e0860186611c31565b611079565b603d5460009081526039602052604090208290610af18282611de6565b5050603d546040517f999f33d8277b5c68b479fda62fa5ee13eecf7d181a12666721ba4de1fcbfc14c90600090a2603d8054906000610b2f83611e77565b91905055505050565b336002600160a01b0314610b5f5760405163973d02cb60e01b815260040161057c90611b2c565b610b6c85858585856113b5565b603e546000908152603a60205260409020610b8c60018201856002611609565b5060038101610b9c838583611d1a565b5060005b85811015610bf957868682818110610bba57610bba611e90565b905060c00201826000018281548110610bd557610bd5611e90565b90600052602060002090600602018181610bef9190611ea6565b5050600101610ba0565b50603e546040517f9a11e2792c9f81a693e8dc3c0471111f92a264ec0ba5d0aeea3963f9b41d275290600090a2603e8054906000610c3683611e77565b9190505550505050505050565b6060600082603d54610c559190611f05565b6001600160401b03811115610c6c57610c6c611b9c565b604051908082528060200260200182016040528015610ca557816020015b610c9261158e565b815260200190600190039081610c8a5790505b509050825b603d54811015610e1a57600081815260396020908152604091829020825161012081018452815481526001820154928101929092526002808201548385015260038201546060840152600482015460808401528351808501948590529293919260a08501929091600585019182845b815481526020019060010190808311610d195750505050508152602001600782018054610d4590611af2565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7190611af2565b8015610dbe5780601f10610d9357610100808354040283529160200191610dbe565b820191906000526020600020905b815481529060010190602001808311610da157829003601f168201915b50505091835250506008820154602082015260099091015460ff16151560409091015282610dec8684611f05565b81518110610dfc57610dfc611e90565b60200260200101819052508080610e1290611e77565b915050610caa565b5092915050565b60368190556040518190610e3b9084908390602001611f18565b60408051601f1981840301815291905280516020909101206037556000805b82811015610f14576000858583818110610e7657610e76611e90565b905060c0020160a00135905060008111610ec65760405162461bcd60e51b8152602060048201526011602482015270564f54494e475f504f5745525f5a45524f60781b604482015260640161057c565b610ed08184611f7b565b9250858583818110610ee457610ee4611e90565b905060c00201603560008481526020019081526020016000208181610f099190611ea6565b505050600101610e5a565b50603855505050565b8035610f3b5760405162461bcd60e51b815260040161057c90611f8e565b8060800135816060013503610f625760405162461bcd60e51b815260040161057c90611fb3565b50565b8035610f835760405162461bcd60e51b815260040161057c90611f8e565b8060800135816060013503610faa5760405162461bcd60e51b815260040161057c90611fb3565b46816060013503611017578060200135603c600083608001358152602001908152602001600020546001610fde9190611f7b565b14610ffb5760405162461bcd60e51b815260040161057c90612001565b60808101356000908152603c6020526040908190209101359055565b8060200135603b6000836060013581526020019081526020016000205460016110409190611f7b565b1461105d5760405162461bcd60e51b815260040161057c90612001565b60608101356000908152603b6020526040908190209101359055565b603654611084611647565b6000805b8381101561122f5761109b868683611524565b1561122757816000036110ef576000818152603560205260409081902081516080810190925260010160048282826020028201915b8154815260200190600101908083116110d05750505050509250611208565b60008181526035602052604080822081516080810190925260010160048282826020028201915b81548152602001906001019080831161111657505060345488516020808b01516040808d01516060808f01518b51958c0151848d0151928d01519451630cbe96a560e41b81526004810198909852602488019590955260448701929092526064860191909152608485019390935260a484019190915260c483019190915260e48201529495506001600160a01b03169363cbe96a50935061010401915050608060405180830381865afa1580156111d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f59190612031565b6060880152604087015260208601528452505b6000818152603560205260409020600501546112249083611f7b565b91505b600101611088565b50806000036112725760405162461bcd60e51b815260206004820152600f60248201526e4249544d41505f49535f454d50545960881b604482015260640161057c565b600360385460026112839190611c8d565b61128d919061207d565b81116112d75760405162461bcd60e51b815260206004820152601960248201527824a729aaa32324a1a4a2a72a2fab27aa24a723afa827aba2a960391b604482015260640161057c565b60335460405163ebbdac9160e01b815260009182916001600160a01b039091169063ebbdac9190611310908b9088908e90600401612091565b6040805180830381865afa15801561132c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135091906120da565b9150915081801561135e5750805b6113aa5760405162461bcd60e51b815260206004820152601d60248201527f5349474e41545552455f564552494649434154494f4e5f4641494c4544000000604482015260640161057c565b505050505050505050565b836113f85760405162461bcd60e51b8152602060048201526013602482015272115354151657d590531251105513d497d4d155606a1b604482015260640161057c565b6000858560405160200161140d929190611f18565b60408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b83529092506114d9916001600160a01b039091169063a850a90990611491907f38456a8ba687e3cfdf4624782b10d2b7a64cb5f06849efda87a3ef2897ac5256908690600401611b7b565b6040805180830381865afa1580156114ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d19190611bb2565b858585611079565b6114e38686610e21565b7fef80356b0fe90f99a2a53b1c2d22fcfb692458289759823035acd25b9137fb378686604051611514929190611f18565b60405180910390a1505050505050565b60008061153260088461207d565b90506000611541600885612114565b905084821061155557600092505050611587565b6000600160ff83161b87878581811061157057611570611e90565b9050013560f81c60f81b60f81c60ff161611925050505b9392505050565b60405180610120016040528060008019168152602001600081526020016000815260200160008152602001600081526020016115c8611665565b815260606020820181905260006040830181905291015290565b6040518060600160405280606081526020016115fc611665565b8152602001606081525090565b8260028101928215611637579160200282015b8281111561163757823582559160200191906001019061161c565b50611643929150611683565b5090565b60405180608001604052806004906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b5b808211156116435760008155600101611684565b6000602082840312156116aa57600080fd5b5035919050565b8060005b60028110156116d45781518452602093840193909101906001016116b5565b50505050565b6000815180845260005b81811015611700576020818501810151868301820152016116e4565b506000602082860101526020601f19601f83011685010191505092915050565b6000610140825184526020830151602085015260408301516040850152606083015160608501526080830151608085015260a083015161176360a08601826116b1565b5060c08301518160e086015261177b828601826116da565b60e08501516101008781019190915290940151151561012090950194909452509092915050565b6020815260006115876020830184611720565b6001600160a01b0381168114610f6257600080fd5b60008083601f8401126117dc57600080fd5b5081356001600160401b038111156117f357600080fd5b60208301915083602060c08302850101111561180e57600080fd5b9250929050565b6000806000806060858703121561182b57600080fd5b8435611836816117b5565b93506020850135611846816117b5565b925060408501356001600160401b0381111561186157600080fd5b61186d878288016117ca565b95989497509550505050565b60006101008a83528960208401528860408401528760608401528660808401528060a08401526118ab818401876116da565b60c0840195909552505090151560e0909101529695505050505050565b8060005b60048110156116d45781518452602093840193909101906001016118cc565b60208082528251608083830152805160a080850182905260009392909160c09184019082870190865b8181101561195457835180516001600160a01b031684528781015161193b898601826118c8565b5060400151838701529286019291840191600101611914565b5050938701519361196860408801866116b1565b6040880151878203601f19016080890152945061198581866116da565b98975050505050505050565b60208152600061158760208301846116da565b6000602082840312156119b657600080fd5b81356001600160401b038111156119cc57600080fd5b8201610140818503121561158757600080fd5b6000806000806000608086880312156119f757600080fd5b85356001600160401b0380821115611a0e57600080fd5b611a1a89838a016117ca565b909750955060608801915088821115611a3257600080fd5b60208801945090359080821115611a4857600080fd5b818801915088601f830112611a5c57600080fd5b813581811115611a6b57600080fd5b896020828501011115611a7d57600080fd5b9699959850939650602001949392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611ae557603f19888603018452611ad3858351611720565b94509285019290850190600101611ab7565b5092979650505050505050565b600181811c90821680611b0657607f821691505b602082108103611b2657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600a908201526914d654d5115350d0531360b21b604082015260600190565b8015158114610f6257600080fd5b600060208284031215611b7057600080fd5b813561158781611b50565b828152604060208201526000611b9460408301846116da565b949350505050565b634e487b7160e01b600052604160045260246000fd5b600060408284031215611bc457600080fd5b82601f830112611bd357600080fd5b604051604081018181106001600160401b0382111715611bf557611bf5611b9c565b8060405250806040840185811115611c0c57600080fd5b845b81811015611c26578051835260209283019201611c0e565b509195945050505050565b6000808335601e19843603018112611c4857600080fd5b8301803591506001600160401b03821115611c6257600080fd5b60200191503681900382131561180e57600080fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417611ca457611ca4611c77565b92915050565b8160005b60028110156116d457813583820155602090910190600101611cae565b601f821115611d1557600081815260208120601f850160051c81016020861015611cf25750805b601f850160051c820191505b81811015611d1157828155600101611cfe565b5050505b505050565b6001600160401b03831115611d3157611d31611b9c565b611d4583611d3f8354611af2565b83611ccb565b6000601f841160018114611d795760008515611d615750838201355b600019600387901b1c1916600186901b178355610628565b600083815260209020601f19861690835b82811015611daa5786850135825560209485019460019092019101611d8a565b5086821015611dc75760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008135611ca481611b50565b8135815560208201356001820155604082013560028201556060820135600382015560808201356004820155611e2260a0830160058301611caa565b611e2f60e0830183611c31565b611e3d818360078601611d1a565b50506101008201356008820155611e73611e5a6101208401611dd9565b6009830160ff1981541660ff8315151681178255505050565b5050565b600060018201611e8957611e89611c77565b5060010190565b634e487b7160e01b600052603260045260246000fd5b8135611eb1816117b5565b81546001600160a01b0319166001600160a01b0391909116178155602082810160005b6004811015611ef457813560018286018101919091559183019101611ed4565b50505060a082013560058201555050565b81810381811115611ca457611ca4611c77565b60208082528181018390526000908460408401835b86811015611f70578235611f40816117b5565b6001600160a01b0316825260808385018584013760a0838101359083015260c09283019290910190600101611f2d565b509695505050505050565b80820180821115611ca457611ca4611c77565b6020808252600b908201526a08a9aa0a8b2be8482a886960ab1b604082015260600190565b6020808252602e908201527f736f75726365436861696e496420616e642064657374696e6174696f6e43686160408201526d1a5b9259081b9bdd08195c5d585b60921b606082015260800190565b6020808252601690820152751253959053125117d31054d517d0d3d353525515115160521b604082015260600190565b6000806000806080858703121561204757600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261208c5761208c612067565b500490565b610100810160408583376120a860408301856118c8565b60c082018360005b60028110156120cf5781518352602092830192909101906001016120b0565b505050949350505050565b600080604083850312156120ed57600080fd5b82516120f881611b50565b602084015190925061210981611b50565b809150509250929050565b60008261212357612123612067565b50069056fea26469706673582212206e3de8397ec2c0b1c93669bfca66c575e025fb6f1cec5fbf00d98a7f89308ff564736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` +var GatewayArtifact string = `{"_format":"hh-sol-artifact-1","contractName":"Gateway","sourceName":"contracts/blade/Gateway.sol","abi":[{"inputs":[{"internalType":"string","name":"only","type":"string"}],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isRollback","type":"bool"}],"name":"BridgeBatchResult","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"counter","type":"uint256"},{"indexed":true,"internalType":"bool","name":"status","type":"bool"},{"indexed":false,"internalType":"uint256","name":"sourceChainID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"destinationChainID","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"}],"name":"BridgeMessageResult","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"BridgeMsg","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"indexed":false,"internalType":"struct Validator[]","name":"newValidatorSet","type":"tuple[]"}],"name":"NewValidatorSet","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":"MAX_LENGTH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"bls","outputs":[{"internalType":"contract IBLS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bn256G2","outputs":[{"internalType":"contract IBN256G2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"internalType":"struct Validator[]","name":"newValidatorSet","type":"tuple[]"},{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"bytes","name":"bitmap","type":"bytes"}],"name":"commitValidatorSet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"counter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"currentValidatorSet","outputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentValidatorSetHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentValidatorSetLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"startId","type":"uint256"},{"internalType":"uint256","name":"endId","type":"uint256"}],"name":"getMessagesInRange","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes","name":"payload","type":"bytes"}],"internalType":"struct BridgeMessage[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IBLS","name":"newBls","type":"address"},{"internalType":"contract IBN256G2","name":"newBn256G2","type":"address"},{"components":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[4]","name":"blsKey","type":"uint256[4]"},{"internalType":"uint256","name":"votingPower","type":"uint256"}],"internalType":"struct Validator[]","name":"validators","type":"tuple[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"processedEvents","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"processedEventsRollback","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes","name":"payload","type":"bytes"}],"internalType":"struct BridgeMessage[]","name":"batchMessages","type":"tuple[]"},{"components":[{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint256","name":"startId","type":"uint256"},{"internalType":"uint256","name":"endId","type":"uint256"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256[2]","name":"signature","type":"uint256[2]"},{"internalType":"bytes","name":"bitmap","type":"bytes"},{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"bool","name":"isRollback","type":"bool"}],"internalType":"struct SignedBridgeMessageBatch","name":"signedBridgeBatch","type":"tuple"}],"name":"receiveBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"}],"name":"sendBridgeMsg","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalVotingPower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b5061288d806100206000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80636c3e87c5116100b8578063a6f9885c1161007c578063a6f9885c146102bb578063c7c982c2146102c4578063d4c8e3e8146102e7578063e3d28ff6146102fa578063ebad8e561461030d578063f896f1a51461032057600080fd5b80636c3e87c514610239578063947287cf1461025957806395b0b027146102625780639eb33f5d14610275578063a15273bb1461028857600080fd5b806351351d531161010a57806351351d53146101b057806355b01e4d146101be5780635ea5df79146101cc57806361bc221a146101d5578063671b3793146101de5780636969a25c146101e757600080fd5b806307b3e252146101475780631d1d4f2614610172578063284017f5146101895780633b878c2214610192578063417d5acb1461019b575b600080fd5b6101556004600360981b0181565b6040516001600160a01b0390911681526020015b60405180910390f35b61017b60365481565b604051908152602001610169565b61015561202081565b61015561010681565b6101ae6101a9366004611c96565b610329565b005b6101556002600160a01b0381565b6101556004600160991b0181565b61017b61138881565b61017b60395481565b61017b60385481565b61021a6101f5366004611cf1565b603560205260009081526040902080546005909101546001600160a01b039091169082565b604080516001600160a01b039093168352602083019190915201610169565b61024c610247366004611d0a565b610547565b6040516101699190611d7c565b61017b61520881565b603354610155906001600160a01b031681565b6101ae610283366004611e70565b610878565b6102ab610296366004611cf1565b603b6020526000908152604090205460ff1681565b6040519015158152602001610169565b61017b61080081565b6102ab6102d2366004611cf1565b603a6020526000908152604090205460ff1681565b603454610155906001600160a01b031681565b6101ae610308366004611ed4565b6109c0565b6101ae61031b366004611f72565b610cb9565b61017b60375481565b6001600160a01b0384166103775760405162461bcd60e51b815260206004820152601060248201526f24a72b20a624a22fa922a1a2a4ab22a960811b60448201526064015b60405180910390fd5b6108008211156103be5760405162461bcd60e51b815260206004820152601260248201527108ab0868a8a88a6be9a82b0be988a9c8ea8960731b604482015260640161036e565b806000036103de5760405162461bcd60e51b815260040161036e90611ff9565b603980549060006103ee83612046565b919050555060006040518060c001604052806039548152602001468152602001838152602001336001600160a01b03168152602001866001600160a01b0316815260200185858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250506039548152603c60209081526040918290208451815590840151600182015590830151600282015560608301516003820180546001600160a01b039283166001600160a01b031991821617909155608085015160048401805491909316911617905560a0830151929350839290915060058201906104e890826120fe565b50905050846001600160a01b0316336001600160a01b03166039547fc63a2577937420ccd826b7d9bc6e5cf7e62be57768c38beed67ed1196a994be24686898960405161053894939291906121e6565b60405180910390a45050505050565b6060600083116105bf5760405162461bcd60e51b815260206004820152603b60248201527f7374617274206964206d75737420626520626967676572207468616e20302c2060448201527f62656163757365206669727374206576656e7473206973206f6e650000000000606482015260840161036e565b8183111561061a5760405162461bcd60e51b815260206004820152602260248201527f737461727449642063616e7420626520626967676572207468616e20656e64206044820152611a5960f21b606482015260840161036e565b60395482111561068d5760405162461bcd60e51b815260206004820152603860248201527f656e6449642063616e7420626520626967676572207468616e206c656e676874604482015277206f6620627269646765206d65737361676520617272617960401b606482015260840161036e565b60006106998484612210565b6106a4906001612223565b6001600160401b038111156106bb576106bb61205f565b60405190808252806020026020018201604052801561073757816020015b6107246040518060c0016040528060008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b03168152602001606081525090565b8152602001906001900390816106d95790505b509050835b83811161086e576000818152603c6020908152604091829020825160c0810184528154815260018201549281019290925260028101549282019290925260038201546001600160a01b039081166060830152600483015416608082015260058201805491929160a0840191906107b190612075565b80601f01602080910402602001604051908101604052809291908181526020018280546107dd90612075565b801561082a5780601f106107ff5761010080835404028352916020019161082a565b820191906000526020600020905b81548152906001019060200180831161080d57829003601f168201915b5050505050815250508286836108409190612210565b8151811061085057610850612236565b6020026020010181905250808061086690612046565b91505061073c565b5090505b92915050565b600054610100900460ff16158080156108985750600054600160ff909116105b806108b25750303b1580156108b2575060005460ff166001145b6109155760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161036e565b6000805460ff191660011790558015610938576000805461ff0019166101001790555b603380546001600160a01b038088166001600160a01b03199283161790925560348054928716929091169190911790556109728383610d0a565b80156109b9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050505050565b6109d26101408201610120830161225a565b156109e6576109e18383610e06565b6109f0565b6109f08383610ed9565b6000610a046109ff84866123b1565b610fac565b6020830135604084013560608501356080860135610100870135610a3061014089016101208a0161225a565b6040805160208101989098528701959095526060860193909352608085019190915260a084015260c0830152151560e08201526101000160408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b8352909250610b41916001600160a01b039091169063a850a90990610aeb907f9e040270bf060614de9fdbc52b0658eebf5f652008ac7da12272c3e646b29f99908690600401612434565b6040805180830381865afa158015610b07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2b9190612455565b60a08401610b3c60e08601866124d4565b611167565b81610100013543118015610b645750610b626101408301610120840161225a565b155b15610bab5760405162461bcd60e51b81526020600482015260176024820152761d1a194818985d18da081a185cc81d1a5b5959081bdd5d604a1b604482015260640161036e565b82610bbe6101408401610120850161225a565b610c075760005b81811015610c0157610bf9868683818110610be257610be2612236565b9050602002810190610bf4919061251a565b6114a3565b600101610bc5565b50610c48565b60005b81811015610c4657610c3e868683818110610c2757610c27612236565b9050602002810190610c39919061251a565b6116fe565b600101610c0a565b505b7f69865ac24fff12c0d495b69a7ff7a4c5a39e04ad06f897f2ea0398713952bd4d6020840135604085013560608601356080870135610c8f61014089016101208a0161225a565b6040805195865260208601949094529284019190915260608301521515608082015260a0016109b0565b336002600160a01b0314610cfd5760405163973d02cb60e01b815260206004820152600a60248201526914d654d5115350d0531360b21b604482015260640161036e565b6109b985858585856118ad565b60368190556040518190610d24908490839060200161253a565b60408051601f1981840301815291905280516020909101206037556000805b82811015610dfd576000858583818110610d5f57610d5f612236565b905060c0020160a00135905060008111610daf5760405162461bcd60e51b8152602060048201526011602482015270564f54494e475f504f5745525f5a45524f60781b604482015260640161036e565b610db98184612223565b9250858583818110610dcd57610dcd612236565b905060c00201603560008481526020019081526020016000208181610df291906125b4565b505050600101610d43565b50603855505050565b80610e235760405162461bcd60e51b815260040161036e90612613565b46600083838281610e3657610e36612236565b9050602002810190610e48919061251a565b60400135905060005b838110156109b9576000858583818110610e6d57610e6d612236565b9050602002810190610e7f919061251a565b610e8890612638565b905083816020015114610ead5760405162461bcd60e51b815260040161036e90612644565b82816040015114610ed05760405162461bcd60e51b815260040161036e90611ff9565b50600101610e51565b80610ef65760405162461bcd60e51b815260040161036e90612613565b46600083838281610f0957610f09612236565b9050602002810190610f1b919061251a565b60200135905060005b838110156109b9576000858583818110610f4057610f40612236565b9050602002810190610f52919061251a565b610f5b90612638565b905082816020015114610f805760405162461bcd60e51b815260040161036e90612644565b83816040015114610fa35760405162461bcd60e51b815260040161036e90611ff9565b50600101610f24565b600080825111610ff55760405162461bcd60e51b8152602060048201526014602482015273139bc81b595cdcd859d95cc81c1c9bdd9a59195960621b604482015260640161036e565b600082516001600160401b038111156110105761101061205f565b604051908082528060200260200182016040528015611039578160200160208202803683370190505b50905060005b83518110156111565783818151811061105a5761105a612236565b60200260200101516000015184828151811061107857611078612236565b60200260200101516020015185838151811061109657611096612236565b6020026020010151604001518684815181106110b4576110b4612236565b6020026020010151606001518785815181106110d2576110d2612236565b6020026020010151608001518886815181106110f0576110f0612236565b602002602001015160a0015160405160200161111196959493929190612675565b6040516020818303038152906040528051906020012082828151811061113957611139612236565b60209081029190910101528061114e81612046565b91505061103f565b5061116081611a1c565b9392505050565b603654611172611c18565b6000805b8381101561131d57611189868683611baf565b1561131557816000036111dd576000818152603560205260409081902081516080810190925260010160048282826020028201915b8154815260200190600101908083116111be57505050505092506112f6565b60008181526035602052604080822081516080810190925260010160048282826020028201915b81548152602001906001019080831161120457505060345488516020808b01516040808d01516060808f01518b51958c0151848d0151928d01519451630cbe96a560e41b81526004810198909852602488019590955260448701929092526064860191909152608485019390935260a484019190915260c483019190915260e48201529495506001600160a01b03169363cbe96a50935061010401915050608060405180830381865afa1580156112bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e391906126c1565b6060880152604087015260208601528452505b6000818152603560205260409020600501546113129083612223565b91505b600101611176565b50806000036113605760405162461bcd60e51b815260206004820152600f60248201526e4249544d41505f49535f454d50545960881b604482015260640161036e565b60036038546002611371919061259d565b61137b919061270d565b81116113c55760405162461bcd60e51b815260206004820152601960248201527824a729aaa32324a1a4a2a72a2fab27aa24a723afa827aba2a960391b604482015260640161036e565b60335460405163ebbdac9160e01b815260009182916001600160a01b039091169063ebbdac91906113fe908b9088908e90600401612721565b6040805180830381865afa15801561141a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143e9190612787565b9150915081801561144c5750805b6114985760405162461bcd60e51b815260206004820152601d60248201527f5349474e41545552455f564552494649434154494f4e5f4641494c4544000000604482015260640161036e565b505050505050505050565b80356000908152603a602052604090205460ff16156115245760405162461bcd60e51b815260206004820152603760248201527f44657374696e6174696f6e476174657761793a204252494447455f4d4553534160448201527611d157d254d7d053149150511657d41493d0d154d4d151604a1b606482015260840161036e565b61153460a08201608083016127c1565b6001600160a01b03163b6000036115845760405162461bcd60e51b8152602060048201526014602482015273726563656976657220686173206e6f20636f646560601b604482015260640161036e565b80356000908152603a60205260408120805460ff19166001179055806115b060a08401608085016127c1565b6001600160a01b031683356115cb60808601606087016127c1565b6115d860a08701876124d4565b6040516024016115eb94939291906127de565b60408051601f198184030181529181526020820180516001600160e01b031663eeb4994560e01b179052516116209190612809565b6000604051808303816000865af19150503d806000811461165d576040519150601f19603f3d011682016040523d82523d6000602084013e611662565b606091505b5091509150816116ae5760405162461bcd60e51b8152602060048201526017602482015276476174657761793a2042415443485f524f4c4c4241434b60481b604482015260640161036e565b81151583600001357f01a66933f54cace7f9f3e5495103757bb2a7bc2a306c6847d590e9bd3c2557b085602001358660400135856040516116f19392919061281b565b60405180910390a3505050565b80356000908152603b602052604090205460ff1615611787576040805162461bcd60e51b81526020600482015260248101919091527f44657374696e6174696f6e476174657761793a20524f4c4c4241434b5f42524960448201527f4447455f4d4553534147455f49535f414c52454144595f50524f434553534544606482015260840161036e565b80356000908152603b60205260408120805460ff19166001179055806117b360a08401608085016127c1565b6001600160a01b031683356117ce60808601606087016127c1565b6117db60a08701876124d4565b6040516024016117ee94939291906127de565b60408051601f198184030181529181526020820180516001600160e01b0316633bd4725960e21b179052516118239190612809565b6000604051808303816000865af19150503d8060008114611860576040519150601f19603f3d011682016040523d82523d6000602084013e611865565b606091505b509150915081151583600001357f01a66933f54cace7f9f3e5495103757bb2a7bc2a306c6847d590e9bd3c2557b085602001358660400135856040516116f19392919061281b565b836118f05760405162461bcd60e51b8152602060048201526013602482015272115354151657d590531251105513d497d4d155606a1b604482015260640161036e565b6000858560405160200161190592919061253a565b60408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b83529092506119d1916001600160a01b039091169063a850a90990611989907f38456a8ba687e3cfdf4624782b10d2b7a64cb5f06849efda87a3ef2897ac5256908690600401612434565b6040805180830381865afa1580156119a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c99190612455565b858585611167565b6119db8686610d0a565b7fef80356b0fe90f99a2a53b1c2d22fcfb692458289759823035acd25b9137fb378686604051611a0c92919061253a565b60405180910390a1505050505050565b60008151600103611a495781600081518110611a3a57611a3a612236565b60200260200101519050919050565b600182511115611b9c576000600283516001611a659190612223565b611a6f919061270d565b90506000816001600160401b03811115611a8b57611a8b61205f565b604051908082528060200260200182016040528015611ab4578160200160208202803683370190505b5090506000805b8551811015611b90576000868281518110611ad857611ad8612236565b6020026020010151905060008751836001611af39190612223565b10611afe5781611b23565b87611b0a846001612223565b81518110611b1a57611b1a612236565b60200260200101515b604080516020810185905290810182905290915060600160405160208183030381529060405280519060200120858581518110611b6257611b62612236565b602090810291909101015283611b7781612046565b9450505050600281611b899190612223565b9050611abb565b50819450505050611a49565b81600081518110611a3a57611a3a612236565b600080611bbd60088461270d565b90506000611bcc600885612843565b9050848210611be057600092505050611160565b6000600160ff83161b878785818110611bfb57611bfb612236565b9050013560f81c60f81b60f81c60ff161611925050509392505050565b60405180608001604052806004906020820280368337509192915050565b6001600160a01b0381168114611c4b57600080fd5b50565b60008083601f840112611c6057600080fd5b5081356001600160401b03811115611c7757600080fd5b602083019150836020828501011115611c8f57600080fd5b9250929050565b60008060008060608587031215611cac57600080fd5b8435611cb781611c36565b935060208501356001600160401b03811115611cd257600080fd5b611cde87828801611c4e565b9598909750949560400135949350505050565b600060208284031215611d0357600080fd5b5035919050565b60008060408385031215611d1d57600080fd5b50508035926020909101359150565b60005b83811015611d47578181015183820152602001611d2f565b50506000910152565b60008151808452611d68816020860160208601611d2c565b601f01601f19169290920160200192915050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015611e1e57888303603f19018552815180518452878101518885015286810151878501526060808201516001600160a01b03908116918601919091526080808301519091169085015260a09081015160c091850182905290611e0a81860183611d50565b968901969450505090860190600101611da3565b509098975050505050505050565b60008083601f840112611e3e57600080fd5b5081356001600160401b03811115611e5557600080fd5b60208301915083602060c083028501011115611c8f57600080fd5b60008060008060608587031215611e8657600080fd5b8435611e9181611c36565b93506020850135611ea181611c36565b925060408501356001600160401b03811115611ebc57600080fd5b611ec887828801611e2c565b95989497509550505050565b600080600060408486031215611ee957600080fd5b83356001600160401b0380821115611f0057600080fd5b818601915086601f830112611f1457600080fd5b813581811115611f2357600080fd5b8760208260051b8501011115611f3857600080fd5b602092830195509350908501359080821115611f5357600080fd5b5084016101408187031215611f6757600080fd5b809150509250925092565b600080600080600060808688031215611f8a57600080fd5b85356001600160401b0380821115611fa157600080fd5b611fad89838a01611e2c565b909750955060608801915088821115611fc557600080fd5b60208801945090359080821115611fdb57600080fd5b50611fe888828901611c4e565b969995985093965092949392505050565b6020808252601c908201527f494e56414c49445f44455354494e4154494f4e5f434841494e5f494400000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006001820161205857612058612030565b5060010190565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061208957607f821691505b6020821081036120a957634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156120f957600081815260208120601f850160051c810160208610156120d65750805b601f850160051c820191505b818110156120f5578281556001016120e2565b5050505b505050565b81516001600160401b038111156121175761211761205f565b61212b816121258454612075565b846120af565b602080601f83116001811461216057600084156121485750858301515b600019600386901b1c1916600185901b1785556120f5565b600085815260208120601f198616915b8281101561218f57888601518255948401946001909101908401612170565b50858210156121ad5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8481528360208201526060604082015260006122066060830184866121bd565b9695505050505050565b8181038181111561087257610872612030565b8082018082111561087257610872612030565b634e487b7160e01b600052603260045260246000fd5b8015158114611c4b57600080fd5b60006020828403121561226c57600080fd5b81356111608161224c565b60405160c081016001600160401b03811182821017156122995761229961205f565b60405290565b604051601f8201601f191681016001600160401b03811182821017156122c7576122c761205f565b604052919050565b600060c082840312156122e157600080fd5b6122e9612277565b9050813581526020808301358183015260408301356040830152606083013561231181611c36565b6060830152608083013561232481611c36565b608083015260a08301356001600160401b038082111561234357600080fd5b818501915085601f83011261235757600080fd5b8135818111156123695761236961205f565b61237b601f8201601f1916850161229f565b9150808252868482850101111561239157600080fd5b80848401858401376000848284010152508060a085015250505092915050565b60006001600160401b03808411156123cb576123cb61205f565b8360051b60206123dc81830161229f565b8681529185019181810190368411156123f457600080fd5b865b848110156124285780358681111561240e5760008081fd5b61241a36828b016122cf565b8452509183019183016123f6565b50979650505050505050565b82815260406020820152600061244d6040830184611d50565b949350505050565b60006040828403121561246757600080fd5b82601f83011261247657600080fd5b604051604081018181106001600160401b03821117156124985761249861205f565b80604052508060408401858111156124af57600080fd5b845b818110156124c95780518352602092830192016124b1565b509195945050505050565b6000808335601e198436030181126124eb57600080fd5b8301803591506001600160401b0382111561250557600080fd5b602001915036819003821315611c8f57600080fd5b6000823560be1983360301811261253057600080fd5b9190910192915050565b60208082528181018390526000908460408401835b8681101561259257823561256281611c36565b6001600160a01b0316825260808385018584013760a0838101359083015260c0928301929091019060010161254f565b509695505050505050565b808202811582820484141761087257610872612030565b81356125bf81611c36565b81546001600160a01b0319166001600160a01b0391909116178155602082810160005b6004811015612602578135600182860181019190915591830191016125e2565b50505060a082013560058201555050565b6020808252600b908201526a08a9aa0a8b2be8482a886960ab1b604082015260600190565b600061087236836122cf565b6020808252601790820152761253959053125117d4d3d55490d157d0d210525397d251604a1b604082015260600190565b86815260208101869052604081018590526001600160a01b0384811660608301528316608082015260c060a082018190526000906126b590830184611d50565b98975050505050505050565b600080600080608085870312156126d757600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261271c5761271c6126f7565b500490565b61010081016040858337604082018460005b6004811015612752578151835260209283019290910190600101612733565b50505060c082018360005b600281101561277c57815183526020928301929091019060010161275d565b505050949350505050565b6000806040838503121561279a57600080fd5b82516127a58161224c565b60208401519092506127b68161224c565b809150509250929050565b6000602082840312156127d357600080fd5b813561116081611c36565b8481526001600160a01b038416602082015260606040820181905260009061220690830184866121bd565b60008251612530818460208701611d2c565b83815282602082015260606040820152600061283a6060830184611d50565b95945050505050565b600082612852576128526126f7565b50069056fea26469706673582212206b117189d117d56b6a3a9d33fd5cab640b0033b4a4f05c18853a33b0b4fcd03664736f6c63430008130033","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106101425760003560e01c80636c3e87c5116100b8578063a6f9885c1161007c578063a6f9885c146102bb578063c7c982c2146102c4578063d4c8e3e8146102e7578063e3d28ff6146102fa578063ebad8e561461030d578063f896f1a51461032057600080fd5b80636c3e87c514610239578063947287cf1461025957806395b0b027146102625780639eb33f5d14610275578063a15273bb1461028857600080fd5b806351351d531161010a57806351351d53146101b057806355b01e4d146101be5780635ea5df79146101cc57806361bc221a146101d5578063671b3793146101de5780636969a25c146101e757600080fd5b806307b3e252146101475780631d1d4f2614610172578063284017f5146101895780633b878c2214610192578063417d5acb1461019b575b600080fd5b6101556004600360981b0181565b6040516001600160a01b0390911681526020015b60405180910390f35b61017b60365481565b604051908152602001610169565b61015561202081565b61015561010681565b6101ae6101a9366004611c96565b610329565b005b6101556002600160a01b0381565b6101556004600160991b0181565b61017b61138881565b61017b60395481565b61017b60385481565b61021a6101f5366004611cf1565b603560205260009081526040902080546005909101546001600160a01b039091169082565b604080516001600160a01b039093168352602083019190915201610169565b61024c610247366004611d0a565b610547565b6040516101699190611d7c565b61017b61520881565b603354610155906001600160a01b031681565b6101ae610283366004611e70565b610878565b6102ab610296366004611cf1565b603b6020526000908152604090205460ff1681565b6040519015158152602001610169565b61017b61080081565b6102ab6102d2366004611cf1565b603a6020526000908152604090205460ff1681565b603454610155906001600160a01b031681565b6101ae610308366004611ed4565b6109c0565b6101ae61031b366004611f72565b610cb9565b61017b60375481565b6001600160a01b0384166103775760405162461bcd60e51b815260206004820152601060248201526f24a72b20a624a22fa922a1a2a4ab22a960811b60448201526064015b60405180910390fd5b6108008211156103be5760405162461bcd60e51b815260206004820152601260248201527108ab0868a8a88a6be9a82b0be988a9c8ea8960731b604482015260640161036e565b806000036103de5760405162461bcd60e51b815260040161036e90611ff9565b603980549060006103ee83612046565b919050555060006040518060c001604052806039548152602001468152602001838152602001336001600160a01b03168152602001866001600160a01b0316815260200185858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250506039548152603c60209081526040918290208451815590840151600182015590830151600282015560608301516003820180546001600160a01b039283166001600160a01b031991821617909155608085015160048401805491909316911617905560a0830151929350839290915060058201906104e890826120fe565b50905050846001600160a01b0316336001600160a01b03166039547fc63a2577937420ccd826b7d9bc6e5cf7e62be57768c38beed67ed1196a994be24686898960405161053894939291906121e6565b60405180910390a45050505050565b6060600083116105bf5760405162461bcd60e51b815260206004820152603b60248201527f7374617274206964206d75737420626520626967676572207468616e20302c2060448201527f62656163757365206669727374206576656e7473206973206f6e650000000000606482015260840161036e565b8183111561061a5760405162461bcd60e51b815260206004820152602260248201527f737461727449642063616e7420626520626967676572207468616e20656e64206044820152611a5960f21b606482015260840161036e565b60395482111561068d5760405162461bcd60e51b815260206004820152603860248201527f656e6449642063616e7420626520626967676572207468616e206c656e676874604482015277206f6620627269646765206d65737361676520617272617960401b606482015260840161036e565b60006106998484612210565b6106a4906001612223565b6001600160401b038111156106bb576106bb61205f565b60405190808252806020026020018201604052801561073757816020015b6107246040518060c0016040528060008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b03168152602001606081525090565b8152602001906001900390816106d95790505b509050835b83811161086e576000818152603c6020908152604091829020825160c0810184528154815260018201549281019290925260028101549282019290925260038201546001600160a01b039081166060830152600483015416608082015260058201805491929160a0840191906107b190612075565b80601f01602080910402602001604051908101604052809291908181526020018280546107dd90612075565b801561082a5780601f106107ff5761010080835404028352916020019161082a565b820191906000526020600020905b81548152906001019060200180831161080d57829003601f168201915b5050505050815250508286836108409190612210565b8151811061085057610850612236565b6020026020010181905250808061086690612046565b91505061073c565b5090505b92915050565b600054610100900460ff16158080156108985750600054600160ff909116105b806108b25750303b1580156108b2575060005460ff166001145b6109155760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161036e565b6000805460ff191660011790558015610938576000805461ff0019166101001790555b603380546001600160a01b038088166001600160a01b03199283161790925560348054928716929091169190911790556109728383610d0a565b80156109b9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050505050565b6109d26101408201610120830161225a565b156109e6576109e18383610e06565b6109f0565b6109f08383610ed9565b6000610a046109ff84866123b1565b610fac565b6020830135604084013560608501356080860135610100870135610a3061014089016101208a0161225a565b6040805160208101989098528701959095526060860193909352608085019190915260a084015260c0830152151560e08201526101000160408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b8352909250610b41916001600160a01b039091169063a850a90990610aeb907f9e040270bf060614de9fdbc52b0658eebf5f652008ac7da12272c3e646b29f99908690600401612434565b6040805180830381865afa158015610b07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2b9190612455565b60a08401610b3c60e08601866124d4565b611167565b81610100013543118015610b645750610b626101408301610120840161225a565b155b15610bab5760405162461bcd60e51b81526020600482015260176024820152761d1a194818985d18da081a185cc81d1a5b5959081bdd5d604a1b604482015260640161036e565b82610bbe6101408401610120850161225a565b610c075760005b81811015610c0157610bf9868683818110610be257610be2612236565b9050602002810190610bf4919061251a565b6114a3565b600101610bc5565b50610c48565b60005b81811015610c4657610c3e868683818110610c2757610c27612236565b9050602002810190610c39919061251a565b6116fe565b600101610c0a565b505b7f69865ac24fff12c0d495b69a7ff7a4c5a39e04ad06f897f2ea0398713952bd4d6020840135604085013560608601356080870135610c8f61014089016101208a0161225a565b6040805195865260208601949094529284019190915260608301521515608082015260a0016109b0565b336002600160a01b0314610cfd5760405163973d02cb60e01b815260206004820152600a60248201526914d654d5115350d0531360b21b604482015260640161036e565b6109b985858585856118ad565b60368190556040518190610d24908490839060200161253a565b60408051601f1981840301815291905280516020909101206037556000805b82811015610dfd576000858583818110610d5f57610d5f612236565b905060c0020160a00135905060008111610daf5760405162461bcd60e51b8152602060048201526011602482015270564f54494e475f504f5745525f5a45524f60781b604482015260640161036e565b610db98184612223565b9250858583818110610dcd57610dcd612236565b905060c00201603560008481526020019081526020016000208181610df291906125b4565b505050600101610d43565b50603855505050565b80610e235760405162461bcd60e51b815260040161036e90612613565b46600083838281610e3657610e36612236565b9050602002810190610e48919061251a565b60400135905060005b838110156109b9576000858583818110610e6d57610e6d612236565b9050602002810190610e7f919061251a565b610e8890612638565b905083816020015114610ead5760405162461bcd60e51b815260040161036e90612644565b82816040015114610ed05760405162461bcd60e51b815260040161036e90611ff9565b50600101610e51565b80610ef65760405162461bcd60e51b815260040161036e90612613565b46600083838281610f0957610f09612236565b9050602002810190610f1b919061251a565b60200135905060005b838110156109b9576000858583818110610f4057610f40612236565b9050602002810190610f52919061251a565b610f5b90612638565b905082816020015114610f805760405162461bcd60e51b815260040161036e90612644565b83816040015114610fa35760405162461bcd60e51b815260040161036e90611ff9565b50600101610f24565b600080825111610ff55760405162461bcd60e51b8152602060048201526014602482015273139bc81b595cdcd859d95cc81c1c9bdd9a59195960621b604482015260640161036e565b600082516001600160401b038111156110105761101061205f565b604051908082528060200260200182016040528015611039578160200160208202803683370190505b50905060005b83518110156111565783818151811061105a5761105a612236565b60200260200101516000015184828151811061107857611078612236565b60200260200101516020015185838151811061109657611096612236565b6020026020010151604001518684815181106110b4576110b4612236565b6020026020010151606001518785815181106110d2576110d2612236565b6020026020010151608001518886815181106110f0576110f0612236565b602002602001015160a0015160405160200161111196959493929190612675565b6040516020818303038152906040528051906020012082828151811061113957611139612236565b60209081029190910101528061114e81612046565b91505061103f565b5061116081611a1c565b9392505050565b603654611172611c18565b6000805b8381101561131d57611189868683611baf565b1561131557816000036111dd576000818152603560205260409081902081516080810190925260010160048282826020028201915b8154815260200190600101908083116111be57505050505092506112f6565b60008181526035602052604080822081516080810190925260010160048282826020028201915b81548152602001906001019080831161120457505060345488516020808b01516040808d01516060808f01518b51958c0151848d0151928d01519451630cbe96a560e41b81526004810198909852602488019590955260448701929092526064860191909152608485019390935260a484019190915260c483019190915260e48201529495506001600160a01b03169363cbe96a50935061010401915050608060405180830381865afa1580156112bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e391906126c1565b6060880152604087015260208601528452505b6000818152603560205260409020600501546113129083612223565b91505b600101611176565b50806000036113605760405162461bcd60e51b815260206004820152600f60248201526e4249544d41505f49535f454d50545960881b604482015260640161036e565b60036038546002611371919061259d565b61137b919061270d565b81116113c55760405162461bcd60e51b815260206004820152601960248201527824a729aaa32324a1a4a2a72a2fab27aa24a723afa827aba2a960391b604482015260640161036e565b60335460405163ebbdac9160e01b815260009182916001600160a01b039091169063ebbdac91906113fe908b9088908e90600401612721565b6040805180830381865afa15801561141a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143e9190612787565b9150915081801561144c5750805b6114985760405162461bcd60e51b815260206004820152601d60248201527f5349474e41545552455f564552494649434154494f4e5f4641494c4544000000604482015260640161036e565b505050505050505050565b80356000908152603a602052604090205460ff16156115245760405162461bcd60e51b815260206004820152603760248201527f44657374696e6174696f6e476174657761793a204252494447455f4d4553534160448201527611d157d254d7d053149150511657d41493d0d154d4d151604a1b606482015260840161036e565b61153460a08201608083016127c1565b6001600160a01b03163b6000036115845760405162461bcd60e51b8152602060048201526014602482015273726563656976657220686173206e6f20636f646560601b604482015260640161036e565b80356000908152603a60205260408120805460ff19166001179055806115b060a08401608085016127c1565b6001600160a01b031683356115cb60808601606087016127c1565b6115d860a08701876124d4565b6040516024016115eb94939291906127de565b60408051601f198184030181529181526020820180516001600160e01b031663eeb4994560e01b179052516116209190612809565b6000604051808303816000865af19150503d806000811461165d576040519150601f19603f3d011682016040523d82523d6000602084013e611662565b606091505b5091509150816116ae5760405162461bcd60e51b8152602060048201526017602482015276476174657761793a2042415443485f524f4c4c4241434b60481b604482015260640161036e565b81151583600001357f01a66933f54cace7f9f3e5495103757bb2a7bc2a306c6847d590e9bd3c2557b085602001358660400135856040516116f19392919061281b565b60405180910390a3505050565b80356000908152603b602052604090205460ff1615611787576040805162461bcd60e51b81526020600482015260248101919091527f44657374696e6174696f6e476174657761793a20524f4c4c4241434b5f42524960448201527f4447455f4d4553534147455f49535f414c52454144595f50524f434553534544606482015260840161036e565b80356000908152603b60205260408120805460ff19166001179055806117b360a08401608085016127c1565b6001600160a01b031683356117ce60808601606087016127c1565b6117db60a08701876124d4565b6040516024016117ee94939291906127de565b60408051601f198184030181529181526020820180516001600160e01b0316633bd4725960e21b179052516118239190612809565b6000604051808303816000865af19150503d8060008114611860576040519150601f19603f3d011682016040523d82523d6000602084013e611865565b606091505b509150915081151583600001357f01a66933f54cace7f9f3e5495103757bb2a7bc2a306c6847d590e9bd3c2557b085602001358660400135856040516116f19392919061281b565b836118f05760405162461bcd60e51b8152602060048201526013602482015272115354151657d590531251105513d497d4d155606a1b604482015260640161036e565b6000858560405160200161190592919061253a565b60408051601f198184030181528282528051602091820120908301520160408051601f198184030181529082905260335463a850a90960e01b83529092506119d1916001600160a01b039091169063a850a90990611989907f38456a8ba687e3cfdf4624782b10d2b7a64cb5f06849efda87a3ef2897ac5256908690600401612434565b6040805180830381865afa1580156119a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c99190612455565b858585611167565b6119db8686610d0a565b7fef80356b0fe90f99a2a53b1c2d22fcfb692458289759823035acd25b9137fb378686604051611a0c92919061253a565b60405180910390a1505050505050565b60008151600103611a495781600081518110611a3a57611a3a612236565b60200260200101519050919050565b600182511115611b9c576000600283516001611a659190612223565b611a6f919061270d565b90506000816001600160401b03811115611a8b57611a8b61205f565b604051908082528060200260200182016040528015611ab4578160200160208202803683370190505b5090506000805b8551811015611b90576000868281518110611ad857611ad8612236565b6020026020010151905060008751836001611af39190612223565b10611afe5781611b23565b87611b0a846001612223565b81518110611b1a57611b1a612236565b60200260200101515b604080516020810185905290810182905290915060600160405160208183030381529060405280519060200120858581518110611b6257611b62612236565b602090810291909101015283611b7781612046565b9450505050600281611b899190612223565b9050611abb565b50819450505050611a49565b81600081518110611a3a57611a3a612236565b600080611bbd60088461270d565b90506000611bcc600885612843565b9050848210611be057600092505050611160565b6000600160ff83161b878785818110611bfb57611bfb612236565b9050013560f81c60f81b60f81c60ff161611925050509392505050565b60405180608001604052806004906020820280368337509192915050565b6001600160a01b0381168114611c4b57600080fd5b50565b60008083601f840112611c6057600080fd5b5081356001600160401b03811115611c7757600080fd5b602083019150836020828501011115611c8f57600080fd5b9250929050565b60008060008060608587031215611cac57600080fd5b8435611cb781611c36565b935060208501356001600160401b03811115611cd257600080fd5b611cde87828801611c4e565b9598909750949560400135949350505050565b600060208284031215611d0357600080fd5b5035919050565b60008060408385031215611d1d57600080fd5b50508035926020909101359150565b60005b83811015611d47578181015183820152602001611d2f565b50506000910152565b60008151808452611d68816020860160208601611d2c565b601f01601f19169290920160200192915050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015611e1e57888303603f19018552815180518452878101518885015286810151878501526060808201516001600160a01b03908116918601919091526080808301519091169085015260a09081015160c091850182905290611e0a81860183611d50565b968901969450505090860190600101611da3565b509098975050505050505050565b60008083601f840112611e3e57600080fd5b5081356001600160401b03811115611e5557600080fd5b60208301915083602060c083028501011115611c8f57600080fd5b60008060008060608587031215611e8657600080fd5b8435611e9181611c36565b93506020850135611ea181611c36565b925060408501356001600160401b03811115611ebc57600080fd5b611ec887828801611e2c565b95989497509550505050565b600080600060408486031215611ee957600080fd5b83356001600160401b0380821115611f0057600080fd5b818601915086601f830112611f1457600080fd5b813581811115611f2357600080fd5b8760208260051b8501011115611f3857600080fd5b602092830195509350908501359080821115611f5357600080fd5b5084016101408187031215611f6757600080fd5b809150509250925092565b600080600080600060808688031215611f8a57600080fd5b85356001600160401b0380821115611fa157600080fd5b611fad89838a01611e2c565b909750955060608801915088821115611fc557600080fd5b60208801945090359080821115611fdb57600080fd5b50611fe888828901611c4e565b969995985093965092949392505050565b6020808252601c908201527f494e56414c49445f44455354494e4154494f4e5f434841494e5f494400000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006001820161205857612058612030565b5060010190565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061208957607f821691505b6020821081036120a957634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156120f957600081815260208120601f850160051c810160208610156120d65750805b601f850160051c820191505b818110156120f5578281556001016120e2565b5050505b505050565b81516001600160401b038111156121175761211761205f565b61212b816121258454612075565b846120af565b602080601f83116001811461216057600084156121485750858301515b600019600386901b1c1916600185901b1785556120f5565b600085815260208120601f198616915b8281101561218f57888601518255948401946001909101908401612170565b50858210156121ad5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8481528360208201526060604082015260006122066060830184866121bd565b9695505050505050565b8181038181111561087257610872612030565b8082018082111561087257610872612030565b634e487b7160e01b600052603260045260246000fd5b8015158114611c4b57600080fd5b60006020828403121561226c57600080fd5b81356111608161224c565b60405160c081016001600160401b03811182821017156122995761229961205f565b60405290565b604051601f8201601f191681016001600160401b03811182821017156122c7576122c761205f565b604052919050565b600060c082840312156122e157600080fd5b6122e9612277565b9050813581526020808301358183015260408301356040830152606083013561231181611c36565b6060830152608083013561232481611c36565b608083015260a08301356001600160401b038082111561234357600080fd5b818501915085601f83011261235757600080fd5b8135818111156123695761236961205f565b61237b601f8201601f1916850161229f565b9150808252868482850101111561239157600080fd5b80848401858401376000848284010152508060a085015250505092915050565b60006001600160401b03808411156123cb576123cb61205f565b8360051b60206123dc81830161229f565b8681529185019181810190368411156123f457600080fd5b865b848110156124285780358681111561240e5760008081fd5b61241a36828b016122cf565b8452509183019183016123f6565b50979650505050505050565b82815260406020820152600061244d6040830184611d50565b949350505050565b60006040828403121561246757600080fd5b82601f83011261247657600080fd5b604051604081018181106001600160401b03821117156124985761249861205f565b80604052508060408401858111156124af57600080fd5b845b818110156124c95780518352602092830192016124b1565b509195945050505050565b6000808335601e198436030181126124eb57600080fd5b8301803591506001600160401b0382111561250557600080fd5b602001915036819003821315611c8f57600080fd5b6000823560be1983360301811261253057600080fd5b9190910192915050565b60208082528181018390526000908460408401835b8681101561259257823561256281611c36565b6001600160a01b0316825260808385018584013760a0838101359083015260c0928301929091019060010161254f565b509695505050505050565b808202811582820484141761087257610872612030565b81356125bf81611c36565b81546001600160a01b0319166001600160a01b0391909116178155602082810160005b6004811015612602578135600182860181019190915591830191016125e2565b50505060a082013560058201555050565b6020808252600b908201526a08a9aa0a8b2be8482a886960ab1b604082015260600190565b600061087236836122cf565b6020808252601790820152761253959053125117d4d3d55490d157d0d210525397d251604a1b604082015260600190565b86815260208101869052604081018590526001600160a01b0384811660608301528316608082015260c060a082018190526000906126b590830184611d50565b98975050505050505050565b600080600080608085870312156126d757600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261271c5761271c6126f7565b500490565b61010081016040858337604082018460005b6004811015612752578151835260209283019290910190600101612733565b50505060c082018360005b600281101561277c57815183526020928301929091019060010161275d565b505050949350505050565b6000806040838503121561279a57600080fd5b82516127a58161224c565b60208401519092506127b68161224c565b809150509250929050565b6000602082840312156127d357600080fd5b813561116081611c36565b8481526001600160a01b038416602082015260606040820181905260009061220690830184866121bd565b60008251612530818460208701611d2c565b83815282602082015260606040820152600061283a6060830184611d50565b95945050505050565b600082612852576128526126f7565b50069056fea26469706673582212206b117189d117d56b6a3a9d33fd5cab640b0033b4a4f05c18853a33b0b4fcd03664736f6c63430008130033","linkReferences":{},"deployedLinkReferences":{}}` diff --git a/e2e-polybft/e2e/acls_test.go b/e2e-polybft/e2e/acls_test.go index a08c095c1..9147986f2 100644 --- a/e2e-polybft/e2e/acls_test.go +++ b/e2e-polybft/e2e/acls_test.go @@ -355,6 +355,7 @@ func TestE2E_AddressLists_Bridge(t *testing.T) { admin, _ := crypto.GenerateECDSAKey() target, _ := crypto.GenerateECDSAKey() other, _ := crypto.GenerateECDSAKey() + realyerKey, _ := crypto.GenerateECDSAKey() adminAddr := admin.Address() targetAddr := target.Address() @@ -367,6 +368,7 @@ func TestE2E_AddressLists_Bridge(t *testing.T) { framework.WithBridgeAllowListEnabled(otherAddr), framework.WithBridgeBlockListAdmin(adminAddr), framework.WithBridgeBlockListEnabled(otherAddr), + framework.WithRelayerPrivateKey(realyerKey), ) defer cluster.Stop() diff --git a/e2e-polybft/e2e/bridge_test.go b/e2e-polybft/e2e/bridge_test.go index 9b408c3d3..d163fd083 100644 --- a/e2e-polybft/e2e/bridge_test.go +++ b/e2e-polybft/e2e/bridge_test.go @@ -71,19 +71,26 @@ func TestE2E_Bridge_ExternalChainTokensTransfers(t *testing.T) { t.Logf("Receiver#%d=%s\n", i+1, receivers[i]) } + relayerPrivateKey, err := crypto.GenerateECDSAKey() + require.NoError(t, err) + cluster := framework.NewTestCluster(t, 5, framework.WithTestRewardToken(), framework.WithNumBlockConfirmations(numBlockConfirmations), framework.WithEpochSize(epochSize), framework.WithBridges(numberOfBridges), framework.WithBridgeBatchThreshold(100), + framework.WithRelayerPrivateKey(relayerPrivateKey), framework.WithSecretsCallback(func(addrs []types.Address, tcc *framework.TestClusterConfig) { for i := 0; i < len(addrs); i++ { // premine receivers, so that they are able to do withdrawals tcc.StakeAmounts = append(tcc.StakeAmounts, ethgo.Ether(10)) } + tcc.StakeAmounts = append(tcc.StakeAmounts, ethgo.Ether(10)) + tcc.Premine = append(tcc.Premine, receivers...) + tcc.Premine = append(tcc.Premine, relayerPrivateKey.String()) })) defer cluster.Stop() @@ -337,10 +344,14 @@ func TestE2E_Bridge_ERC721Transfer(t *testing.T) { t.Logf("Receiver#%d=%s\n", i+1, receivers[i]) } + relayerPrivateKey, err := crypto.GenerateECDSAKey() + require.NoError(t, err) + cluster := framework.NewTestCluster(t, 5, framework.WithEpochSize(epochSize), framework.WithPremine(receiversAddrs...), framework.WithBridges(numberOfBridges), + framework.WithRelayerPrivateKey(relayerPrivateKey), framework.WithSecretsCallback(func(addrs []types.Address, tcc *framework.TestClusterConfig) { for i := 0; i < len(addrs); i++ { tcc.StakeAmounts = append(tcc.StakeAmounts, ethgo.Ether(10)) @@ -516,11 +527,15 @@ func TestE2E_Bridge_ERC1155Transfer(t *testing.T) { t.Logf("Receiver#%d=%s\n", i+1, receivers[i]) } + relayerPrivateKey, err := crypto.GenerateECDSAKey() + require.NoError(t, err) + cluster := framework.NewTestCluster(t, 5, framework.WithNumBlockConfirmations(0), framework.WithEpochSize(epochSize), framework.WithPremine(receiversAddrs...), framework.WithBridges(numberOfBridges), + framework.WithRelayerPrivateKey(relayerPrivateKey), framework.WithSecretsCallback(func(addrs []types.Address, tcc *framework.TestClusterConfig) { for i := 0; i < len(addrs); i++ { tcc.StakeAmounts = append(tcc.StakeAmounts, ethgo.Ether(10)) @@ -723,12 +738,16 @@ func TestE2E_Bridge_InternalChainTokensTransfer(t *testing.T) { t.Logf("Depositor#%d=%s\n", i+1, depositors[i]) } + relayerPrivateKey, err := crypto.GenerateECDSAKey() + require.NoError(t, err) + // setup cluster cluster := framework.NewTestCluster(t, 5, framework.WithNumBlockConfirmations(0), framework.WithEpochSize(epochSize), framework.WithBridges(numberOfBridges), framework.WithBridgeBlockListAdmin(adminAddr), + framework.WithRelayerPrivateKey(relayerPrivateKey), framework.WithPremine(append(depositors, adminAddr)...)) //nolint:makezero defer cluster.Stop() @@ -1017,6 +1036,9 @@ func TestE2E_Bridge_Transfers_AccessLists(t *testing.T) { admin, _ := crypto.GenerateECDSAKey() adminAddr := admin.Address() + relayerPrivateKey, err := crypto.GenerateECDSAKey() + require.NoError(t, err) + cluster := framework.NewTestCluster(t, 5, framework.WithNumBlockConfirmations(0), framework.WithEpochSize(epochSize), @@ -1025,6 +1047,7 @@ func TestE2E_Bridge_Transfers_AccessLists(t *testing.T) { framework.WithBridges(numberOfBridges), framework.WithBridgeAllowListAdmin(adminAddr), framework.WithBridgeBlockListAdmin(adminAddr), + framework.WithRelayerPrivateKey(relayerPrivateKey), framework.WithSecretsCallback(func(a []types.Address, tcc *framework.TestClusterConfig) { for i := 0; i < len(a); i++ { receivers[i] = a[i].String() @@ -1210,6 +1233,8 @@ func TestE2E_Bridge_Transfers_AccessLists(t *testing.T) { } func TestE2E_Bridge_NonMintableERC20Token_WithPremine(t *testing.T) { + t.Skip() + var ( stateSyncedLogsCount = 2 epochSize = uint64(10) @@ -1234,6 +1259,9 @@ func TestE2E_Bridge_NonMintableERC20Token_WithPremine(t *testing.T) { rewardWalletKeyRaw, err := rewardWalletKey.MarshallPrivateKey() require.NoError(t, err) + relayerPrivateKey, err := crypto.GenerateECDSAKey() + require.NoError(t, err) + // start cluster with default, non-mintable native erc20 root token // with london fork enabled cluster := framework.NewTestCluster(t, 5, @@ -1242,6 +1270,7 @@ func TestE2E_Bridge_NonMintableERC20Token_WithPremine(t *testing.T) { framework.WithNumBlockConfirmations(numBlockConfirmations), framework.WithNativeTokenConfig(nativeTokenNonMintableConfig), framework.WithBridgeBatchThreshold(25), + framework.WithRelayerPrivateKey(relayerPrivateKey), // this enables London (EIP-1559) fork framework.WithBurnContract(&polycfg.BurnContractInfo{ BlockNumber: 0, @@ -1506,11 +1535,15 @@ func TestE2E_Bridge_L1OriginatedNativeToken_ERC20StakingToken(t *testing.T) { minter, err := crypto.GenerateECDSAKey() require.NoError(t, err) + relayerPrivateKey, err := crypto.GenerateECDSAKey() + require.NoError(t, err) + cluster := framework.NewTestCluster(t, 5, framework.WithNumBlockConfirmations(0), framework.WithEpochSize(epochSize), framework.WithBridges(numberOfBridges), framework.WithBladeAdmin(minter.Address().String()), + framework.WithRelayerPrivateKey(relayerPrivateKey), framework.WithSecretsCallback(func(addrs []types.Address, tcc *framework.TestClusterConfig) { for i := 0; i < len(addrs); i++ { tcc.StakeAmounts = append(tcc.StakeAmounts, initialStake) diff --git a/e2e-polybft/e2e/burn_contract_test.go b/e2e-polybft/e2e/burn_contract_test.go index ca5824eb0..982509c88 100644 --- a/e2e-polybft/e2e/burn_contract_test.go +++ b/e2e-polybft/e2e/burn_contract_test.go @@ -13,6 +13,7 @@ import ( func TestE2E_BurnContract_Deployed(t *testing.T) { contractKey, _ := crypto.GenerateECDSAKey() destinationKey, _ := crypto.GenerateECDSAKey() + relayerKey, _ := crypto.GenerateECDSAKey() contractAddr := contractKey.Address() destinationAddr := destinationKey.Address() @@ -21,6 +22,7 @@ func TestE2E_BurnContract_Deployed(t *testing.T) { framework.WithBridges(1), framework.WithNativeTokenConfig(nativeTokenNonMintableConfig), framework.WithTestRewardToken(), + framework.WithRelayerPrivateKey(relayerKey), framework.WithBurnContract(&polycfg.BurnContractInfo{ Address: contractAddr, DestinationAddress: destinationAddr, diff --git a/e2e-polybft/e2e/consensus_test.go b/e2e-polybft/e2e/consensus_test.go index 419891a43..edbe522ca 100644 --- a/e2e-polybft/e2e/consensus_test.go +++ b/e2e-polybft/e2e/consensus_test.go @@ -544,11 +544,15 @@ func TestE2E_Consensus_EIP1559Check(t *testing.T) { recipient := types.StringToAddress("1234") burnContractAddr := types.StringToAddress("0xDeadBeef") + relayerPrivate, err := crypto.GenerateECDSAKey() + require.NoError(t, err) + // sender must have premined some native tokens cluster := framework.NewTestCluster(t, 5, framework.WithBridges(1), framework.WithNativeTokenConfig(nativeTokenNonMintableConfig), framework.WithBurnContract(&polycfg.BurnContractInfo{BlockNumber: 0, Address: burnContractAddr}), + framework.WithRelayerPrivateKey(relayerPrivate), framework.WithSecretsCallback(func(a []types.Address, config *framework.TestClusterConfig) { for range a { config.StakeAmounts = append(config.StakeAmounts, command.DefaultPremineBalance) diff --git a/e2e-polybft/framework/test-bridge-relayer.go b/e2e-polybft/framework/test-bridge-relayer.go new file mode 100644 index 000000000..f8797238f --- /dev/null +++ b/e2e-polybft/framework/test-bridge-relayer.go @@ -0,0 +1,73 @@ +package framework + +import ( + "encoding/hex" + "strconv" + "testing" + "time" + + "github.com/0xPolygon/polygon-edge/crypto" +) + +type TestRelayer struct { + t *testing.T + + clusterConfig *TestClusterConfig + externalChainID uint64 + key *crypto.ECDSAKey + node *node + genesisPath string + validatorJSONRPC string +} + +func NewTestBridgeRelayer(t *testing.T, clusterConfig *TestClusterConfig, externalChainID uint64, genesisPath string, key *crypto.ECDSAKey, validatorJSONRPC string) *TestRelayer { + relayer := &TestRelayer{ + t: t, + key: key, + externalChainID: externalChainID, + genesisPath: genesisPath, + clusterConfig: clusterConfig, + validatorJSONRPC: validatorJSONRPC, + } + + relayer.Start() + + return relayer +} + +func (t *TestRelayer) Start() { + marshalledKey, err := t.key.MarshallPrivateKey() + if err != nil { + t.t.Fatal(err) + } + + //Build arguments + args := []string{ + "bridge-relayer", + "--genesis-path", t.genesisPath, + "--private-key", hex.EncodeToString(marshalledKey), + "--internal-chain-rpc", t.validatorJSONRPC, + "--external-chain-id", strconv.FormatUint(t.externalChainID, 10), + "--poll-interval", strconv.Itoa(5), + "--database-path", t.t.TempDir() + "bridge-relayer.db", + } + + stdout := t.clusterConfig.GetStdout("bridge-relayer") + + node, err := newNode(t.clusterConfig.Binary, args, stdout) + if err != nil { + t.t.Fatal(err) + } + + t.node = node + + time.Sleep(250 * time.Millisecond) +} + +func (t *TestRelayer) Stop() { + if err := t.node.Stop(); err != nil { + t.t.Fatal(err) + } + + t.node = nil +} diff --git a/e2e-polybft/framework/test-bridge.go b/e2e-polybft/framework/test-bridge.go index 01210ddc8..70e05ae09 100644 --- a/e2e-polybft/framework/test-bridge.go +++ b/e2e-polybft/framework/test-bridge.go @@ -323,8 +323,8 @@ func (t *TestBridge) deployExternalChainContracts(genesisPath string, threshold return nil } -// fundAddressesOnRoot sends predefined amount of tokens to external chain addresses -func (t *TestBridge) fundAddressesOnRoot(polybftConfig polycfg.PolyBFT) error { +// fundAddressesOnExternal sends predefined amount of tokens to external chain addresses +func (t *TestBridge) fundAddressesOnExternal(polybftConfig polycfg.PolyBFT) error { validatorSecrets, err := genesis.GetValidatorKeyFiles(t.clusterConfig.TmpDir, t.clusterConfig.ValidatorPrefix) if err != nil { return fmt.Errorf("could not get validator secrets on initial external chain funding of genesis validators: %w", err) @@ -371,6 +371,19 @@ func (t *TestBridge) fundAddressesOnRoot(polybftConfig polycfg.PolyBFT) error { return nil } +func (t *TestBridge) fundRelayerAddressOnExternal(relayerAddress types.Address) error { + args := []string{"bridge", "fund"} + + args = append(args, "--addresses", relayerAddress.String()) + args = append(args, "--amounts", command.DefaultPremineBalance.String()) // this is more than enough tokens + + if err := t.cmdRun(args...); err != nil { + return fmt.Errorf("failed to fund non-validator addresses on root: %w", err) + } + + return nil +} + // FundValidators sends tokens to a external chain validators func (t *TestBridge) FundValidators(secretsPaths []string, amounts []*big.Int) error { if len(secretsPaths) != len(amounts) { diff --git a/e2e-polybft/framework/test-cluster.go b/e2e-polybft/framework/test-cluster.go index 8c54c02c3..1ceb9b35d 100644 --- a/e2e-polybft/framework/test-cluster.go +++ b/e2e-polybft/framework/test-cluster.go @@ -59,7 +59,6 @@ type NodeType int const ( None NodeType = 0 Validator NodeType = 1 - Relayer NodeType = 2 ) func (nt NodeType) IsSet(value NodeType) bool { @@ -130,6 +129,7 @@ type TestClusterConfig struct { BridgeAllowListEnabled []types.Address BridgeBlockListAdmin []types.Address BridgeBlockListEnabled []types.Address + RelayerPrivateKey *crypto.ECDSAKey NumBlockConfirmations uint64 @@ -231,10 +231,11 @@ func (c *TestClusterConfig) getStakeAmount(validatorIndex int) *big.Int { } type TestCluster struct { - Config *TestClusterConfig - Servers []*TestServer - Bridges []*TestBridge - initialPort int64 + Config *TestClusterConfig + Servers []*TestServer + Bridges []*TestBridge + BridgeRelayers []*TestRelayer + initialPort int64 once sync.Once failCh chan struct{} @@ -485,6 +486,12 @@ func WithBridgeBatchThreshold(threshold uint64) ClusterOption { } } +func WithRelayerPrivateKey(relayerPrivateKey *crypto.ECDSAKey) ClusterOption { + return func(h *TestClusterConfig) { + h.RelayerPrivateKey = relayerPrivateKey + } +} + func isTrueEnv(e string) bool { return strings.ToLower(os.Getenv(e)) == "true" } @@ -539,12 +546,13 @@ func NewTestCluster(t *testing.T, validatorsCount int, opts ...ClusterOption) *T require.NoError(t, err) cluster := &TestCluster{ - Servers: []*TestServer{}, - Config: config, - initialPort: 30300, - failCh: make(chan struct{}), - once: sync.Once{}, - Bridges: make([]*TestBridge, config.NumberOfBridges), + Servers: []*TestServer{}, + Config: config, + initialPort: 30300, + failCh: make(chan struct{}), + once: sync.Once{}, + Bridges: make([]*TestBridge, config.NumberOfBridges), + BridgeRelayers: make([]*TestRelayer, config.NumberOfBridges), } // in case no validators are specified in opts, all nodes will be validators @@ -775,9 +783,16 @@ func NewTestCluster(t *testing.T, validatorsCount int, opts ...ClusterOption) *T require.NoError(t, err) // fund addresses on the bridge chain - err = bridge.fundAddressesOnRoot(polybftConfig) + err = bridge.fundAddressesOnExternal(polybftConfig) require.NoError(t, err) + if cluster.Config.RelayerPrivateKey != nil { + if cluster.Config.RelayerPrivateKey.Address() != types.ZeroAddress { + err = bridge.fundRelayerAddressOnExternal(cluster.Config.RelayerPrivateKey.Address()) + require.NoError(t, err) + } + } + // add premine if token is non-mintable if i == 0 { err = bridge.mintNativeRootToken(addresses, tokenConfig, polybftConfig) @@ -798,9 +813,6 @@ func NewTestCluster(t *testing.T, validatorsCount int, opts ...ClusterOption) *T for i := 1; i <= int(cluster.Config.ValidatorSetSize); i++ { nodeType := Validator - if i == 1 { - nodeType.Append(Relayer) - } dir := cluster.Config.ValidatorPrefix + strconv.Itoa(i) cluster.InitTestServer(t, dir, bridgeJSONRPCs, nodeType) @@ -811,6 +823,17 @@ func NewTestCluster(t *testing.T, validatorsCount int, opts ...ClusterOption) *T cluster.InitTestServer(t, dir, bridgeJSONRPCs, None) } + for i := uint64(0); i < cluster.Config.NumberOfBridges; i++ { + bridgeRelayer := NewTestBridgeRelayer(t, + cluster.Config, + i+1, + cluster.Config.Dir("genesis.json"), + cluster.Config.RelayerPrivateKey, + cluster.Servers[0].JSONRPCAddr()) + + cluster.BridgeRelayers[i] = bridgeRelayer + } + return cluster } @@ -834,7 +857,6 @@ func (c *TestCluster) InitTestServer(t *testing.T, config.Chain = c.Config.Dir("genesis.json") config.P2PPort = c.getOpenPort() config.LogLevel = logLevel - config.Relayer = nodeType.IsSet(Relayer) config.NumBlockConfirmations = c.Config.NumBlockConfirmations config.BridgeJSONRPCs = bridgeJSONRPCs config.UseTLS = c.Config.UseTLS diff --git a/e2e-polybft/framework/test-server.go b/e2e-polybft/framework/test-server.go index 42f8a0551..db0ff440a 100644 --- a/e2e-polybft/framework/test-server.go +++ b/e2e-polybft/framework/test-server.go @@ -36,7 +36,6 @@ type TestServerConfig struct { DataDir string Chain string LogLevel string - Relayer bool NumBlockConfirmations uint64 BridgeJSONRPCs []string UseTLS bool @@ -189,10 +188,6 @@ func (t *TestServer) Start() { args = append(args, "--log-level", "DEBUG") } - if config.Relayer { - args = append(args, "--relayer") - } - if config.UseTLS { args = append(args, "--use-tls") }