diff --git a/chains/chainsql/chainsql_invoker.go b/chains/chainsql/chainsql_invoker.go new file mode 100644 index 0000000..a794845 --- /dev/null +++ b/chains/chainsql/chainsql_invoker.go @@ -0,0 +1,161 @@ +package chainsql + +import ( + "encoding/json" + "fmt" + "github.com/ChainSQL/go-chainsql-api/common" + "github.com/ChainSQL/go-chainsql-api/core" + data "github.com/ChainSQL/go-chainsql-api/data" + eccd_abi "github.com/polynetwork/poly-io-test/chains/chainsql/eccd_abi" + eccm_abi "github.com/polynetwork/poly-io-test/chains/chainsql/eccm_abi" + eccmp_abi "github.com/polynetwork/poly-io-test/chains/chainsql/eccmp_abi" + config2 "github.com/polynetwork/poly-io-test/config" + "github.com/polynetwork/poly-io-test/log" + "io/ioutil" + "os" +) +type ChainsqlInvoker struct { + ChainsqlSdk *core.Chainsql + TransOpts *core.TransactOpts +} + +type Account struct { + Address string + Secrect string +} +type Config struct { + URL string + ServerName string + RootCertPath string + ClientCertPath string + ClientKeyPath string + Account Account +} + + +func NewConfig(configFilePath string) *Config { + + fileContent, err := ReadFile(configFilePath) + if err != nil { + log.Errorf("NewServiceConfig: failed, err: %s", err) + return nil + } + config := &Config{} + err = json.Unmarshal(fileContent, config) + if err != nil { + log.Errorf("NewServiceConfig: failed, err: %s", err) + return nil + } + + return config +} + +// Dial connects a client to the given URL and groupID. +func Dial(config *Config) (*core.Chainsql, error) { + node := core.NewChainsql() + node.Connect( + config.URL, + config.RootCertPath, + config.ClientCertPath, + config.ClientKeyPath, + config.ServerName) + + node.As(config.Account.Address, config.Account.Secrect) + return node, nil +} + +func NewChainsqlInvoker() (*ChainsqlInvoker, error) { + instance := &ChainsqlInvoker{} + cfg := NewConfig(config2.DefConfig.ChainsqlSdkConfFile) + + chainsql, err := Dial(cfg) + if err != nil { + return nil, err + } + instance.ChainsqlSdk = chainsql + instance.TransOpts = &core.TransactOpts{ + ContractValue: 0, + Gas: 30000000, + Expectation: "validate_success", + } + return instance, nil +} + + +func ReadFile(fileName string) ([]byte, error) { + file, err := os.OpenFile(fileName, os.O_RDONLY, 0666) + if err != nil { + return nil, fmt.Errorf("ReadFile: open file %s error %s", fileName, err) + } + defer func() { + err := file.Close() + if err != nil { + log.Errorf("ReadFile: File %s close error %s", fileName, err) + } + }() + data, err := ioutil.ReadAll(file) + if err != nil { + return nil, fmt.Errorf("ReadFile: ioutil.ReadAll %s error %s", fileName, err) + } + return data, nil +} + +func (invoker *ChainsqlInvoker) DeployCrossChainDataContract() (string, error) { + + ret,_,err := eccd_abi.DeployEthCrossChainData(invoker.ChainsqlSdk,invoker.TransOpts) + if err != nil{ + return "",err + } + + return ret.ContractAddress,nil +} + +func (invoker *ChainsqlInvoker) DeployCrossChainManagerContract(ccdcAddress string, chainID uint64) (string, error) { + account, err := data.NewAccountFromAddress(ccdcAddress) + if err != nil { + return "", err + } + eccdAddress := common.BytesToAddress(account.Bytes()) + ret,_,err := eccm_abi.DeployEthCrossChainManager(invoker.ChainsqlSdk,invoker.TransOpts,eccdAddress,chainID) + if err != nil{ + return "",err + } + + return ret.ContractAddress,nil +} + +func (invoker *ChainsqlInvoker) TransaferOwnershipForECCD(ccdcAddress string,ownerAddress string) (*common.TxResult,error){ + account, err := data.NewAccountFromAddress(ownerAddress) + if err != nil { + return nil, err + } + ccmcAddress := common.BytesToAddress(account.Bytes()) + + eccdContract,_ := eccd_abi.NewEthCrossChainData(invoker.ChainsqlSdk,ccdcAddress) + return eccdContract.TransferOwnership(invoker.TransOpts,ccmcAddress) +} + +func (invoker *ChainsqlInvoker) DeployCrossChainManagerProxyContract(ccmcAddress string) (string, error) { + account, err := data.NewAccountFromAddress(ccmcAddress) + if err != nil { + return "", err + } + eccmAddress := common.BytesToAddress(account.Bytes()) + ret,_,err := eccmp_abi.DeployEccmpAbi(invoker.ChainsqlSdk,invoker.TransOpts,eccmAddress) + if err != nil{ + return "",err + } + + return ret.ContractAddress,nil +} + +func (invoker *ChainsqlInvoker) TransferOwnershipForECCM(ccmcAddress string,ccmp string) (*common.TxResult,error){ + account, err := data.NewAccountFromAddress(ccmp) + if err != nil { + return nil, err + } + ccmpAddress := common.BytesToAddress(account.Bytes()) + + eccmContract,_ := eccm_abi.NewEthCrossChainManager(invoker.ChainsqlSdk,ccmcAddress) + return eccmContract.TransferOwnership(invoker.TransOpts,ccmpAddress) +} \ No newline at end of file diff --git a/chains/chainsql/eccd_abi/eccd_abi.go b/chains/chainsql/eccd_abi/eccd_abi.go new file mode 100644 index 0000000..20a70b9 --- /dev/null +++ b/chains/chainsql/eccd_abi/eccd_abi.go @@ -0,0 +1,1328 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package EthCrossChainData + +import ( + "errors" + "math/big" + "strings" + + "github.com/ChainSQL/go-chainsql-api/abigen/abi" + "github.com/ChainSQL/go-chainsql-api/abigen/abi/bind" + "github.com/ChainSQL/go-chainsql-api/common" + "github.com/ChainSQL/go-chainsql-api/core" + "github.com/ChainSQL/go-chainsql-api/data" + "github.com/ChainSQL/go-chainsql-api/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = bind.Bind + _ = common.Big1 +) + +// EthCrossChainDataMetaData contains all meta data concerning the EthCrossChainData contract. +var EthCrossChainDataMetaData = &core.CtrMetaData{ + ABI: "[{\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"ConKeepersPkBytes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CurEpochStartHeight\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"EthToPolyTxHashIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"EthToPolyTxHashMap\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"ExtraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"fromChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"fromChainTx\",\"type\":\"bytes32\"}],\"name\":\"checkIfFromChainTxExist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurEpochConPubKeyBytes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurEpochStartHeight\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ethTxHashIndex\",\"type\":\"uint256\"}],\"name\":\"getEthTxHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getEthTxHashIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"key1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"key2\",\"type\":\"bytes32\"}],\"name\":\"getExtraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"fromChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"fromChainTx\",\"type\":\"bytes32\"}],\"name\":\"markFromChainTxExist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"curEpochPkBytes\",\"type\":\"bytes\"}],\"name\":\"putCurEpochConPubKeyBytes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"curEpochStartHeight\",\"type\":\"uint32\"}],\"name\":\"putCurEpochStartHeight\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"ethTxHash\",\"type\":\"bytes32\"}],\"name\":\"putEthTxHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"key1\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"key2\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"value\",\"type\":\"bytes\"}],\"name\":\"putExtraData\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405260006100146100d160201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35060008060146101000a81548160ff0219169083151502179055506100d9565b600033905090565b611b59806100e86000396000f3fe608060405234801561001057600080fd5b506004361061014c5760003560e01c80635c975abb116100c35780638da5cb5b1161007c5780638da5cb5b146107425780638f32d59b1461078c578063e90bfdcf146107ae578063f2fde38b14610808578063fcbdc1e01461084c578063ff3d24a1146108cf5761014c565b80635c975abb146105fb57806367e31a741461061d57806369d4807414610647578063715018a6146106ca5780638456cb59146106d45780638a8bd17f146106f65761014c565b80633f4ba83a116101155780633f4ba83a146103a357806340602bb5146103c557806341973cd9146104765780634c3ccf6414610549578063529caad81461058f5780635ac40790146105d15761014c565b8062c5fff8146101515780630586763c1461016f5780631afe374e146101c957806320bbde38146102b05780632992787514610361575b600080fd5b6101596108ed565b6040518082815260200191505060405180910390f35b6101af6004803603604081101561018557600080fd5b81019080803567ffffffffffffffff169060200190929190803590602001909291905050506108f3565b604051808215151515815260200191505060405180910390f35b610296600480360360608110156101df57600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561021057600080fd5b82018360208201111561022257600080fd5b8035906020019184600183028401116401000000008311171561024457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610943565b604051808215151515815260200191505060405180910390f35b6102e6600480360360408110156102c657600080fd5b810190808035906020019092919080359060200190929190505050610a85565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561032657808201518184015260208101905061030b565b50505050905090810190601f1680156103535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61038d6004803603602081101561037757600080fd5b8101908080359060200190929190505050610b42565b6040518082815260200191505060405180910390f35b6103ab610b5f565b604051808215151515815260200191505060405180910390f35b6103fb600480360360408110156103db57600080fd5b810190808035906020019092919080359060200190929190505050610c6c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561043b578082015181840152602081019050610420565b50505050905090810190601f1680156104685780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61052f6004803603602081101561048c57600080fd5b81019080803590602001906401000000008111156104a957600080fd5b8201836020820111156104bb57600080fd5b803590602001918460018302840111640100000000831117156104dd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610d33565b604051808215151515815260200191505060405180910390f35b6105756004803603602081101561055f57600080fd5b8101908080359060200190929190505050610e51565b604051808215151515815260200191505060405180910390f35b6105bb600480360360208110156105a557600080fd5b8101908080359060200190929190505050610f7e565b6040518082815260200191505060405180910390f35b6105d9610f96565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b610603610fb0565b604051808215151515815260200191505060405180910390f35b610625610fc6565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b61064f610fdc565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561068f578082015181840152602081019050610674565b50505050905090810190601f1680156106bc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6106d261107e565b005b6106dc6111b7565b604051808215151515815260200191505060405180910390f35b6107286004803603602081101561070c57600080fd5b81019080803563ffffffff1690602001909291905050506112c5565b604051808215151515815260200191505060405180910390f35b61074a6113ed565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610794611416565b604051808215151515815260200191505060405180910390f35b6107ee600480360360408110156107c457600080fd5b81019080803567ffffffffffffffff16906020019092919080359060200190929190505050611474565b604051808215151515815260200191505060405180910390f35b61084a6004803603602081101561081e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115cd565b005b610854611653565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610894578082015181840152602081019050610879565b50505050905090810190601f1680156108c15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6108d76116f1565b6040518082815260200191505060405180910390f35b60025481565b6000600560008467ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060009054906101000a900460ff16905092915050565b60008060149054906101000a900460ff16156109c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6109cf611416565b610a41576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b816006600086815260200190815260200160002060008581526020019081526020016000209080519060200190610a79929190611a59565b50600190509392505050565b6006602052816000526040600020602052806000526040600020600091509150508054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b3a5780601f10610b0f57610100808354040283529160200191610b3a565b820191906000526020600020905b815481529060010190602001808311610b1d57829003601f168201915b505050505081565b600060016000838152602001908152602001600020549050919050565b6000610b69611416565b610bdb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600060149054906101000a900460ff16610c5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b610c656116fb565b6001905090565b60606006600084815260200190815260200160002060008381526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d265780601f10610cfb57610100808354040283529160200191610d26565b820191906000526020600020905b815481529060010190602001808311610d0957829003601f168201915b5050505050905092915050565b60008060149054906101000a900460ff1615610db7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b610dbf611416565b610e31576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8160039080519060200190610e47929190611a59565b5060019050919050565b60008060149054906101000a900460ff1615610ed5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b610edd611416565b610f4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b816001600060025481526020019081526020016000208190555060016002540160028190555060019050919050565b60016020528060005260406000206000915090505481565b6000600460009054906101000a900463ffffffff16905090565b60008060149054906101000a900460ff16905090565b600460009054906101000a900463ffffffff1681565b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110745780601f1061104957610100808354040283529160200191611074565b820191906000526020600020905b81548152906001019060200180831161105757829003601f168201915b5050505050905090565b611086611416565b6110f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006111c1611416565b611233576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600060149054906101000a900460ff16156112b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6112be611803565b6001905090565b60008060149054906101000a900460ff1615611349576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b611351611416565b6113c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b81600460006101000a81548163ffffffff021916908363ffffffff16021790555060019050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661145861190d565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b60008060149054906101000a900460ff16156114f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b611500611416565b611572576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6001600560008567ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060006101000a81548160ff0219169083151502179055506001905092915050565b6115d5611416565b611647576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61165081611915565b50565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116e95780601f106116be576101008083540402835291602001916116e9565b820191906000526020600020905b8154815290600101906020018083116116cc57829003601f168201915b505050505081565b6000600254905090565b600060149054906101000a900460ff1661177d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6117c061190d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600060149054906101000a900460ff1615611886576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586118ca61190d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561199b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611aff6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611a9a57805160ff1916838001178555611ac8565b82800160010185558215611ac8579182015b82811115611ac7578251825591602001919060010190611aac565b5b509050611ad59190611ad9565b5090565b611afb91905b80821115611af7576000816000905550600101611adf565b5090565b9056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a265627a7a72315820abd2ff3f9fab911cceb20159f1034c6ad22cdcaec82eb7fbef2a40b6536ca43a64736f6c63430005110032", +} + +// EthCrossChainDataABI is the input ABI used to generate the binding from. +// Deprecated: Use EthCrossChainDataMetaData.ABI instead. +var EthCrossChainDataABI = EthCrossChainDataMetaData.ABI + +// EthCrossChainDataBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use EthCrossChainDataMetaData.Bin instead. +var EthCrossChainDataBin = EthCrossChainDataMetaData.Bin + +// DeployEthCrossChainData deploys a new ChainSQL contract, binding an instance of EthCrossChainData to it. +func DeployEthCrossChainData(chainsql *core.Chainsql, auth *core.TransactOpts) (*core.DeployTxRet, *EthCrossChainData, error) { + parsed, err := EthCrossChainDataMetaData.GetAbi() + if err != nil { + return &core.DeployTxRet{}, nil, err + } + if parsed == nil { + return &core.DeployTxRet{}, nil, errors.New("GetABI returned nil") + } + + deployRet, contract, err := core.DeployContract(chainsql, auth, *parsed, common.FromHex(EthCrossChainDataBin)) + if err != nil { + return &core.DeployTxRet{}, nil, err + } + return deployRet, &EthCrossChainData{EthCrossChainDataCaller: EthCrossChainDataCaller{contract: contract}, EthCrossChainDataTransactor: EthCrossChainDataTransactor{contract: contract}, EthCrossChainDataFilterer: EthCrossChainDataFilterer{contract: contract}}, nil +} + +// EthCrossChainData is an auto generated Go binding around an ChainSQL contract. +type EthCrossChainData struct { + EthCrossChainDataCaller // Read-only binding to the contract + EthCrossChainDataTransactor // Write-only binding to the contract + EthCrossChainDataFilterer // Log filterer for contract events +} + +// EthCrossChainDataCaller is an auto generated read-only Go binding around an ChainSQL contract. +type EthCrossChainDataCaller struct { + contract *core.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainDataTransactor is an auto generated write-only Go binding around an ChainSQL contract. +type EthCrossChainDataTransactor struct { + contract *core.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainDataFilterer is an auto generated log filtering Go binding around an ChainSQL contract events. +type EthCrossChainDataFilterer struct { + contract *core.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainDataSession is an auto generated Go binding around an ChainSQL contract, +// with pre-set call and transact options. +type EthCrossChainDataSession struct { + Contract *EthCrossChainData // Generic contract binding to set the session for + CallOpts core.CallOpts // Call options to use throughout this session + TransactOpts core.TransactOpts // Transaction auth options to use throughout this session +} + +// EthCrossChainDataCallerSession is an auto generated read-only Go binding around an ChainSQL contract, +// with pre-set call options. +type EthCrossChainDataCallerSession struct { + Contract *EthCrossChainDataCaller // Generic contract caller binding to set the session for + CallOpts core.CallOpts // Call options to use throughout this session +} + +// EthCrossChainDataTransactorSession is an auto generated write-only Go binding around an ChainSQL contract, +// with pre-set transact options. +type EthCrossChainDataTransactorSession struct { + Contract *EthCrossChainDataTransactor // Generic contract transactor binding to set the session for + TransactOpts core.TransactOpts // Transaction auth options to use throughout this session +} + +// EthCrossChainDataRaw is an auto generated low-level Go binding around an ChainSQL contract. +type EthCrossChainDataRaw struct { + Contract *EthCrossChainData // Generic contract binding to access the raw methods on +} + +// EthCrossChainDataCallerRaw is an auto generated low-level read-only Go binding around an ChainSQL contract. +type EthCrossChainDataCallerRaw struct { + Contract *EthCrossChainDataCaller // Generic read-only contract binding to access the raw methods on +} + +// EthCrossChainDataTransactorRaw is an auto generated low-level write-only Go binding around an ChainSQL contract. +type EthCrossChainDataTransactorRaw struct { + Contract *EthCrossChainDataTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewEthCrossChainData creates a new instance of EthCrossChainData, bound to a specific deployed contract. +func NewEthCrossChainData(chainsql *core.Chainsql, address string) (*EthCrossChainData, error) { + contract, err := bindEthCrossChainData(chainsql, address) + if err != nil { + return nil, err + } + return &EthCrossChainData{EthCrossChainDataCaller: EthCrossChainDataCaller{contract: contract}, EthCrossChainDataTransactor: EthCrossChainDataTransactor{contract: contract}, EthCrossChainDataFilterer: EthCrossChainDataFilterer{contract: contract}}, nil +} + +// // NewEthCrossChainDataCaller creates a new read-only instance of EthCrossChainData, bound to a specific deployed contract. +// func NewEthCrossChainDataCaller(address common.Address, caller bind.ContractCaller) (*EthCrossChainDataCaller, error) { +// contract, err := bindEthCrossChainData(address, caller, nil, nil) +// if err != nil { +// return nil, err +// } +// return &EthCrossChainDataCaller{contract: contract}, nil +// } + +// // NewEthCrossChainDataTransactor creates a new write-only instance of EthCrossChainData, bound to a specific deployed contract. +// func NewEthCrossChainDataTransactor(address common.Address, transactor bind.ContractTransactor) (*EthCrossChainDataTransactor, error) { +// contract, err := bindEthCrossChainData(address, nil, transactor, nil) +// if err != nil { +// return nil, err +// } +// return &EthCrossChainDataTransactor{contract: contract}, nil +// } + +// // NewEthCrossChainDataFilterer creates a new log filterer instance of EthCrossChainData, bound to a specific deployed contract. +// func NewEthCrossChainDataFilterer(address common.Address, filterer bind.ContractFilterer) (*EthCrossChainDataFilterer, error) { +// contract, err := bindEthCrossChainData(address, nil, nil, filterer) +// if err != nil { +// return nil, err +// } +// return &EthCrossChainDataFilterer{contract: contract}, nil +// } + +// bindEthCrossChainData binds a generic wrapper to an already deployed contract. +func bindEthCrossChainData(chainsql *core.Chainsql, address string) (*core.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(EthCrossChainDataABI)) + if err != nil { + return nil, err + } + return core.NewBoundContract(chainsql, address, parsed), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +// func (_EthCrossChainData *EthCrossChainDataRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { +// return _EthCrossChainData.Contract.EthCrossChainDataCaller.contract.Call(opts, result, method, params...) +// } + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +// func (_EthCrossChainData *EthCrossChainDataRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { +// return _EthCrossChainData.Contract.EthCrossChainDataTransactor.contract.Transfer(opts) +// } + +// Transact invokes the (paid) contract method with params as input values. +// func (_EthCrossChainData *EthCrossChainDataRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { +// return _EthCrossChainData.Contract.EthCrossChainDataTransactor.contract.Transact(opts, method, params...) +// } + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +// func (_EthCrossChainData *EthCrossChainDataCallerRaw) Call(opts *core.CallOpts, result *[]interface{}, method string, params ...interface{}) error { +// return _EthCrossChainData.Contract.contract.Call(opts, result, method, params...) +// } + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +// func (_EthCrossChainData *EthCrossChainDataTransactorRaw) Transfer(opts *core.TransactOpts) (*types.Transaction, error) { +// return _EthCrossChainData.Contract.contract.Transfer(opts) +// } + +// Transact invokes the (paid) contract method with params as input values. +// func (_EthCrossChainData *EthCrossChainDataTransactorRaw) Transact(opts *core.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { +// return _EthCrossChainData.Contract.contract.Transact(opts, method, params...) +// } + +// ConKeepersPkBytes is a free data retrieval call binding the contract method 0xfcbdc1e0. +// +// Solidity: function ConKeepersPkBytes() view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCaller) ConKeepersPkBytes(opts *core.CallOpts) ([]byte, error) { + var out []interface{} + err := _EthCrossChainData.contract.Call(opts, &out, "ConKeepersPkBytes") + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// ConKeepersPkBytes is a free data retrieval call binding the contract method 0xfcbdc1e0. +// +// Solidity: function ConKeepersPkBytes() view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataSession) ConKeepersPkBytes() ([]byte, error) { + return _EthCrossChainData.Contract.ConKeepersPkBytes(&_EthCrossChainData.CallOpts) +} + +// ConKeepersPkBytes is a free data retrieval call binding the contract method 0xfcbdc1e0. +// +// Solidity: function ConKeepersPkBytes() view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCallerSession) ConKeepersPkBytes() ([]byte, error) { + return _EthCrossChainData.Contract.ConKeepersPkBytes(&_EthCrossChainData.CallOpts) +} + +// CurEpochStartHeight is a free data retrieval call binding the contract method 0x67e31a74. +// +// Solidity: function CurEpochStartHeight() view returns(uint32) +func (_EthCrossChainData *EthCrossChainDataCaller) CurEpochStartHeight(opts *core.CallOpts) (uint32, error) { + var out []interface{} + err := _EthCrossChainData.contract.Call(opts, &out, "CurEpochStartHeight") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// CurEpochStartHeight is a free data retrieval call binding the contract method 0x67e31a74. +// +// Solidity: function CurEpochStartHeight() view returns(uint32) +func (_EthCrossChainData *EthCrossChainDataSession) CurEpochStartHeight() (uint32, error) { + return _EthCrossChainData.Contract.CurEpochStartHeight(&_EthCrossChainData.CallOpts) +} + +// CurEpochStartHeight is a free data retrieval call binding the contract method 0x67e31a74. +// +// Solidity: function CurEpochStartHeight() view returns(uint32) +func (_EthCrossChainData *EthCrossChainDataCallerSession) CurEpochStartHeight() (uint32, error) { + return _EthCrossChainData.Contract.CurEpochStartHeight(&_EthCrossChainData.CallOpts) +} + +// EthToPolyTxHashIndex is a free data retrieval call binding the contract method 0x00c5fff8. +// +// Solidity: function EthToPolyTxHashIndex() view returns(uint256) +func (_EthCrossChainData *EthCrossChainDataCaller) EthToPolyTxHashIndex(opts *core.CallOpts) (*big.Int, error) { + var out []interface{} + err := _EthCrossChainData.contract.Call(opts, &out, "EthToPolyTxHashIndex") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// EthToPolyTxHashIndex is a free data retrieval call binding the contract method 0x00c5fff8. +// +// Solidity: function EthToPolyTxHashIndex() view returns(uint256) +func (_EthCrossChainData *EthCrossChainDataSession) EthToPolyTxHashIndex() (*big.Int, error) { + return _EthCrossChainData.Contract.EthToPolyTxHashIndex(&_EthCrossChainData.CallOpts) +} + +// EthToPolyTxHashIndex is a free data retrieval call binding the contract method 0x00c5fff8. +// +// Solidity: function EthToPolyTxHashIndex() view returns(uint256) +func (_EthCrossChainData *EthCrossChainDataCallerSession) EthToPolyTxHashIndex() (*big.Int, error) { + return _EthCrossChainData.Contract.EthToPolyTxHashIndex(&_EthCrossChainData.CallOpts) +} + +// EthToPolyTxHashMap is a free data retrieval call binding the contract method 0x529caad8. +// +// Solidity: function EthToPolyTxHashMap(uint256 ) view returns(bytes32) +func (_EthCrossChainData *EthCrossChainDataCaller) EthToPolyTxHashMap(opts *core.CallOpts, arg0 *big.Int) ([32]byte, error) { + var out []interface{} + err := _EthCrossChainData.contract.Call(opts, &out, "EthToPolyTxHashMap", arg0) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// EthToPolyTxHashMap is a free data retrieval call binding the contract method 0x529caad8. +// +// Solidity: function EthToPolyTxHashMap(uint256 ) view returns(bytes32) +func (_EthCrossChainData *EthCrossChainDataSession) EthToPolyTxHashMap(arg0 *big.Int) ([32]byte, error) { + return _EthCrossChainData.Contract.EthToPolyTxHashMap(&_EthCrossChainData.CallOpts, arg0) +} + +// EthToPolyTxHashMap is a free data retrieval call binding the contract method 0x529caad8. +// +// Solidity: function EthToPolyTxHashMap(uint256 ) view returns(bytes32) +func (_EthCrossChainData *EthCrossChainDataCallerSession) EthToPolyTxHashMap(arg0 *big.Int) ([32]byte, error) { + return _EthCrossChainData.Contract.EthToPolyTxHashMap(&_EthCrossChainData.CallOpts, arg0) +} + +// ExtraData is a free data retrieval call binding the contract method 0x20bbde38. +// +// Solidity: function ExtraData(bytes32 , bytes32 ) view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCaller) ExtraData(opts *core.CallOpts, arg0 [32]byte, arg1 [32]byte) ([]byte, error) { + var out []interface{} + err := _EthCrossChainData.contract.Call(opts, &out, "ExtraData", arg0, arg1) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// ExtraData is a free data retrieval call binding the contract method 0x20bbde38. +// +// Solidity: function ExtraData(bytes32 , bytes32 ) view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataSession) ExtraData(arg0 [32]byte, arg1 [32]byte) ([]byte, error) { + return _EthCrossChainData.Contract.ExtraData(&_EthCrossChainData.CallOpts, arg0, arg1) +} + +// ExtraData is a free data retrieval call binding the contract method 0x20bbde38. +// +// Solidity: function ExtraData(bytes32 , bytes32 ) view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCallerSession) ExtraData(arg0 [32]byte, arg1 [32]byte) ([]byte, error) { + return _EthCrossChainData.Contract.ExtraData(&_EthCrossChainData.CallOpts, arg0, arg1) +} + +// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. +// +// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) +func (_EthCrossChainData *EthCrossChainDataCaller) CheckIfFromChainTxExist(opts *core.CallOpts, fromChainId uint64, fromChainTx [32]byte) (bool, error) { + var out []interface{} + err := _EthCrossChainData.contract.Call(opts, &out, "checkIfFromChainTxExist", fromChainId, fromChainTx) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. +// +// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) CheckIfFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (bool, error) { + return _EthCrossChainData.Contract.CheckIfFromChainTxExist(&_EthCrossChainData.CallOpts, fromChainId, fromChainTx) +} + +// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. +// +// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) +func (_EthCrossChainData *EthCrossChainDataCallerSession) CheckIfFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (bool, error) { + return _EthCrossChainData.Contract.CheckIfFromChainTxExist(&_EthCrossChainData.CallOpts, fromChainId, fromChainTx) +} + +// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. +// +// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCaller) GetCurEpochConPubKeyBytes(opts *core.CallOpts) ([]byte, error) { + var out []interface{} + err := _EthCrossChainData.contract.Call(opts, &out, "getCurEpochConPubKeyBytes") + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. +// +// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataSession) GetCurEpochConPubKeyBytes() ([]byte, error) { + return _EthCrossChainData.Contract.GetCurEpochConPubKeyBytes(&_EthCrossChainData.CallOpts) +} + +// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. +// +// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCallerSession) GetCurEpochConPubKeyBytes() ([]byte, error) { + return _EthCrossChainData.Contract.GetCurEpochConPubKeyBytes(&_EthCrossChainData.CallOpts) +} + +// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. +// +// Solidity: function getCurEpochStartHeight() view returns(uint32) +func (_EthCrossChainData *EthCrossChainDataCaller) GetCurEpochStartHeight(opts *core.CallOpts) (uint32, error) { + var out []interface{} + err := _EthCrossChainData.contract.Call(opts, &out, "getCurEpochStartHeight") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. +// +// Solidity: function getCurEpochStartHeight() view returns(uint32) +func (_EthCrossChainData *EthCrossChainDataSession) GetCurEpochStartHeight() (uint32, error) { + return _EthCrossChainData.Contract.GetCurEpochStartHeight(&_EthCrossChainData.CallOpts) +} + +// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. +// +// Solidity: function getCurEpochStartHeight() view returns(uint32) +func (_EthCrossChainData *EthCrossChainDataCallerSession) GetCurEpochStartHeight() (uint32, error) { + return _EthCrossChainData.Contract.GetCurEpochStartHeight(&_EthCrossChainData.CallOpts) +} + +// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. +// +// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) +func (_EthCrossChainData *EthCrossChainDataCaller) GetEthTxHash(opts *core.CallOpts, ethTxHashIndex *big.Int) ([32]byte, error) { + var out []interface{} + err := _EthCrossChainData.contract.Call(opts, &out, "getEthTxHash", ethTxHashIndex) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. +// +// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) +func (_EthCrossChainData *EthCrossChainDataSession) GetEthTxHash(ethTxHashIndex *big.Int) ([32]byte, error) { + return _EthCrossChainData.Contract.GetEthTxHash(&_EthCrossChainData.CallOpts, ethTxHashIndex) +} + +// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. +// +// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) +func (_EthCrossChainData *EthCrossChainDataCallerSession) GetEthTxHash(ethTxHashIndex *big.Int) ([32]byte, error) { + return _EthCrossChainData.Contract.GetEthTxHash(&_EthCrossChainData.CallOpts, ethTxHashIndex) +} + +// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. +// +// Solidity: function getEthTxHashIndex() view returns(uint256) +func (_EthCrossChainData *EthCrossChainDataCaller) GetEthTxHashIndex(opts *core.CallOpts) (*big.Int, error) { + var out []interface{} + err := _EthCrossChainData.contract.Call(opts, &out, "getEthTxHashIndex") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. +// +// Solidity: function getEthTxHashIndex() view returns(uint256) +func (_EthCrossChainData *EthCrossChainDataSession) GetEthTxHashIndex() (*big.Int, error) { + return _EthCrossChainData.Contract.GetEthTxHashIndex(&_EthCrossChainData.CallOpts) +} + +// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. +// +// Solidity: function getEthTxHashIndex() view returns(uint256) +func (_EthCrossChainData *EthCrossChainDataCallerSession) GetEthTxHashIndex() (*big.Int, error) { + return _EthCrossChainData.Contract.GetEthTxHashIndex(&_EthCrossChainData.CallOpts) +} + +// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. +// +// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCaller) GetExtraData(opts *core.CallOpts, key1 [32]byte, key2 [32]byte) ([]byte, error) { + var out []interface{} + err := _EthCrossChainData.contract.Call(opts, &out, "getExtraData", key1, key2) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. +// +// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataSession) GetExtraData(key1 [32]byte, key2 [32]byte) ([]byte, error) { + return _EthCrossChainData.Contract.GetExtraData(&_EthCrossChainData.CallOpts, key1, key2) +} + +// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. +// +// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) +func (_EthCrossChainData *EthCrossChainDataCallerSession) GetExtraData(key1 [32]byte, key2 [32]byte) ([]byte, error) { + return _EthCrossChainData.Contract.GetExtraData(&_EthCrossChainData.CallOpts, key1, key2) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainData *EthCrossChainDataCaller) IsOwner(opts *core.CallOpts) (bool, error) { + var out []interface{} + err := _EthCrossChainData.contract.Call(opts, &out, "isOwner") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) IsOwner() (bool, error) { + return _EthCrossChainData.Contract.IsOwner(&_EthCrossChainData.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainData *EthCrossChainDataCallerSession) IsOwner() (bool, error) { + return _EthCrossChainData.Contract.IsOwner(&_EthCrossChainData.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainData *EthCrossChainDataCaller) Owner(opts *core.CallOpts) (common.Address, error) { + var out []interface{} + err := _EthCrossChainData.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainData *EthCrossChainDataSession) Owner() (common.Address, error) { + return _EthCrossChainData.Contract.Owner(&_EthCrossChainData.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainData *EthCrossChainDataCallerSession) Owner() (common.Address, error) { + return _EthCrossChainData.Contract.Owner(&_EthCrossChainData.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainData *EthCrossChainDataCaller) Paused(opts *core.CallOpts) (bool, error) { + var out []interface{} + err := _EthCrossChainData.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) Paused() (bool, error) { + return _EthCrossChainData.Contract.Paused(&_EthCrossChainData.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainData *EthCrossChainDataCallerSession) Paused() (bool, error) { + return _EthCrossChainData.Contract.Paused(&_EthCrossChainData.CallOpts) +} + +// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. +// +// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactor) MarkFromChainTxExist(opts *core.TransactOpts, fromChainId uint64, fromChainTx [32]byte) (*common.TxResult, error) { + return _EthCrossChainData.contract.Transact(opts, "markFromChainTxExist", fromChainId, fromChainTx) +} + +// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. +// +// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) MarkFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (*common.TxResult, error) { + return _EthCrossChainData.Contract.MarkFromChainTxExist(&_EthCrossChainData.TransactOpts, fromChainId, fromChainTx) +} + +// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. +// +// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactorSession) MarkFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (*common.TxResult, error) { + return _EthCrossChainData.Contract.MarkFromChainTxExist(&_EthCrossChainData.TransactOpts, fromChainId, fromChainTx) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactor) Pause(opts *core.TransactOpts) (*common.TxResult, error) { + return _EthCrossChainData.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) Pause() (*common.TxResult, error) { + return _EthCrossChainData.Contract.Pause(&_EthCrossChainData.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactorSession) Pause() (*common.TxResult, error) { + return _EthCrossChainData.Contract.Pause(&_EthCrossChainData.TransactOpts) +} + +// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. +// +// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactor) PutCurEpochConPubKeyBytes(opts *core.TransactOpts, curEpochPkBytes []byte) (*common.TxResult, error) { + return _EthCrossChainData.contract.Transact(opts, "putCurEpochConPubKeyBytes", curEpochPkBytes) +} + +// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. +// +// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) PutCurEpochConPubKeyBytes(curEpochPkBytes []byte) (*common.TxResult, error) { + return _EthCrossChainData.Contract.PutCurEpochConPubKeyBytes(&_EthCrossChainData.TransactOpts, curEpochPkBytes) +} + +// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. +// +// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactorSession) PutCurEpochConPubKeyBytes(curEpochPkBytes []byte) (*common.TxResult, error) { + return _EthCrossChainData.Contract.PutCurEpochConPubKeyBytes(&_EthCrossChainData.TransactOpts, curEpochPkBytes) +} + +// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. +// +// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactor) PutCurEpochStartHeight(opts *core.TransactOpts, curEpochStartHeight uint32) (*common.TxResult, error) { + return _EthCrossChainData.contract.Transact(opts, "putCurEpochStartHeight", curEpochStartHeight) +} + +// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. +// +// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) PutCurEpochStartHeight(curEpochStartHeight uint32) (*common.TxResult, error) { + return _EthCrossChainData.Contract.PutCurEpochStartHeight(&_EthCrossChainData.TransactOpts, curEpochStartHeight) +} + +// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. +// +// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactorSession) PutCurEpochStartHeight(curEpochStartHeight uint32) (*common.TxResult, error) { + return _EthCrossChainData.Contract.PutCurEpochStartHeight(&_EthCrossChainData.TransactOpts, curEpochStartHeight) +} + +// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. +// +// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactor) PutEthTxHash(opts *core.TransactOpts, ethTxHash [32]byte) (*common.TxResult, error) { + return _EthCrossChainData.contract.Transact(opts, "putEthTxHash", ethTxHash) +} + +// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. +// +// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) PutEthTxHash(ethTxHash [32]byte) (*common.TxResult, error) { + return _EthCrossChainData.Contract.PutEthTxHash(&_EthCrossChainData.TransactOpts, ethTxHash) +} + +// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. +// +// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactorSession) PutEthTxHash(ethTxHash [32]byte) (*common.TxResult, error) { + return _EthCrossChainData.Contract.PutEthTxHash(&_EthCrossChainData.TransactOpts, ethTxHash) +} + +// PutExtraData is a paid mutator transaction binding the contract method 0x1afe374e. +// +// Solidity: function putExtraData(bytes32 key1, bytes32 key2, bytes value) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactor) PutExtraData(opts *core.TransactOpts, key1 [32]byte, key2 [32]byte, value []byte) (*common.TxResult, error) { + return _EthCrossChainData.contract.Transact(opts, "putExtraData", key1, key2, value) +} + +// PutExtraData is a paid mutator transaction binding the contract method 0x1afe374e. +// +// Solidity: function putExtraData(bytes32 key1, bytes32 key2, bytes value) returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) PutExtraData(key1 [32]byte, key2 [32]byte, value []byte) (*common.TxResult, error) { + return _EthCrossChainData.Contract.PutExtraData(&_EthCrossChainData.TransactOpts, key1, key2, value) +} + +// PutExtraData is a paid mutator transaction binding the contract method 0x1afe374e. +// +// Solidity: function putExtraData(bytes32 key1, bytes32 key2, bytes value) returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactorSession) PutExtraData(key1 [32]byte, key2 [32]byte, value []byte) (*common.TxResult, error) { + return _EthCrossChainData.Contract.PutExtraData(&_EthCrossChainData.TransactOpts, key1, key2, value) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainData *EthCrossChainDataTransactor) RenounceOwnership(opts *core.TransactOpts) (*common.TxResult, error) { + return _EthCrossChainData.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainData *EthCrossChainDataSession) RenounceOwnership() (*common.TxResult, error) { + return _EthCrossChainData.Contract.RenounceOwnership(&_EthCrossChainData.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainData *EthCrossChainDataTransactorSession) RenounceOwnership() (*common.TxResult, error) { + return _EthCrossChainData.Contract.RenounceOwnership(&_EthCrossChainData.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainData *EthCrossChainDataTransactor) TransferOwnership(opts *core.TransactOpts, newOwner common.Address) (*common.TxResult, error) { + return _EthCrossChainData.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainData *EthCrossChainDataSession) TransferOwnership(newOwner common.Address) (*common.TxResult, error) { + return _EthCrossChainData.Contract.TransferOwnership(&_EthCrossChainData.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainData *EthCrossChainDataTransactorSession) TransferOwnership(newOwner common.Address) (*common.TxResult, error) { + return _EthCrossChainData.Contract.TransferOwnership(&_EthCrossChainData.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactor) Unpause(opts *core.TransactOpts) (*common.TxResult, error) { + return _EthCrossChainData.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainData *EthCrossChainDataSession) Unpause() (*common.TxResult, error) { + return _EthCrossChainData.Contract.Unpause(&_EthCrossChainData.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainData *EthCrossChainDataTransactorSession) Unpause() (*common.TxResult, error) { + return _EthCrossChainData.Contract.Unpause(&_EthCrossChainData.TransactOpts) +} + +// EthCrossChainDataOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the EthCrossChainData contract. +type EthCrossChainDataOwnershipTransferredIterator struct { + Event *EthCrossChainDataOwnershipTransferred // Event containing the contract specifics and raw log + + contract *core.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan data.Log // Log channel receiving the found contract events + sub event.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainDataOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainDataOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainDataOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainDataOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainDataOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainDataOwnershipTransferred represents a OwnershipTransferred event raised by the EthCrossChainData contract. +type EthCrossChainDataOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw data.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +// func (_EthCrossChainData *EthCrossChainDataFilterer) FilterOwnershipTransferred(opts *core.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*EthCrossChainDataOwnershipTransferredIterator, error) { +// +// var previousOwnerRule []interface{} +// for _, previousOwnerItem := range previousOwner { +// previousOwnerRule = append(previousOwnerRule, previousOwnerItem) +// } +// var newOwnerRule []interface{} +// for _, newOwnerItem := range newOwner { +// newOwnerRule = append(newOwnerRule, newOwnerItem) +// } + +// logs, sub, err := _EthCrossChainData.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) +// if err != nil { +// return nil, err +// } +// return &EthCrossChainDataOwnershipTransferredIterator{contract: _EthCrossChainData.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +// } + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EthCrossChainData *EthCrossChainDataFilterer) WatchOwnershipTransferred(opts *core.WatchOpts, sink chan<- *EthCrossChainDataOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + sub, err := _EthCrossChainData.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.UnSubscribe() + for { + select { + case log := <-sub.EventMsgCh: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainDataOwnershipTransferred) + if err := _EthCrossChainData.contract.UnpackLog(event, "OwnershipTransferred", *log); err != nil { + return err + } + event.Raw = *log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_EthCrossChainData *EthCrossChainDataFilterer) GetOwnershipTransferredPastEvent(txHash string, ContractLogs string) ([]*EthCrossChainDataOwnershipTransferred, error) { + var logRaws []*data.Log + var err error + if ContractLogs != "" { + logRaws, err = _EthCrossChainData.contract.GetPastEventByCtrLog(ContractLogs) + } else if txHash != "" { + logRaws, err = _EthCrossChainData.contract.GetPastEventByTxHash(txHash) + } else { + return nil, errors.New("both txHash or ContractLogs is not provided for param") + } + + if err != nil { + return nil, err + } + var events []*EthCrossChainDataOwnershipTransferred + for _, logRaw := range logRaws { + event, err := _EthCrossChainData.ParseOwnershipTransferred(*logRaw) + if err != nil && err.Error() != "event signature mismatch" { + return nil, err + } + if event != nil { + events = append(events, event) + } + } + return events, nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EthCrossChainData *EthCrossChainDataFilterer) ParseOwnershipTransferred(log data.Log) (*EthCrossChainDataOwnershipTransferred, error) { + event := new(EthCrossChainDataOwnershipTransferred) + if err := _EthCrossChainData.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EthCrossChainDataPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the EthCrossChainData contract. +type EthCrossChainDataPausedIterator struct { + Event *EthCrossChainDataPaused // Event containing the contract specifics and raw log + + contract *core.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan data.Log // Log channel receiving the found contract events + sub event.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainDataPausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainDataPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainDataPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainDataPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainDataPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainDataPaused represents a Paused event raised by the EthCrossChainData contract. +type EthCrossChainDataPaused struct { + Account common.Address + Raw data.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +// func (_EthCrossChainData *EthCrossChainDataFilterer) FilterPaused(opts *core.FilterOpts) (*EthCrossChainDataPausedIterator, error) { +// +// + +// logs, sub, err := _EthCrossChainData.contract.FilterLogs(opts, "Paused") +// if err != nil { +// return nil, err +// } +// return &EthCrossChainDataPausedIterator{contract: _EthCrossChainData.contract, event: "Paused", logs: logs, sub: sub}, nil +// } + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EthCrossChainData *EthCrossChainDataFilterer) WatchPaused(opts *core.WatchOpts, sink chan<- *EthCrossChainDataPaused) (event.Subscription, error) { + + sub, err := _EthCrossChainData.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.UnSubscribe() + for { + select { + case log := <-sub.EventMsgCh: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainDataPaused) + if err := _EthCrossChainData.contract.UnpackLog(event, "Paused", *log); err != nil { + return err + } + event.Raw = *log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_EthCrossChainData *EthCrossChainDataFilterer) GetPausedPastEvent(txHash string, ContractLogs string) ([]*EthCrossChainDataPaused, error) { + var logRaws []*data.Log + var err error + if ContractLogs != "" { + logRaws, err = _EthCrossChainData.contract.GetPastEventByCtrLog(ContractLogs) + } else if txHash != "" { + logRaws, err = _EthCrossChainData.contract.GetPastEventByTxHash(txHash) + } else { + return nil, errors.New("both txHash or ContractLogs is not provided for param") + } + + if err != nil { + return nil, err + } + var events []*EthCrossChainDataPaused + for _, logRaw := range logRaws { + event, err := _EthCrossChainData.ParsePaused(*logRaw) + if err != nil && err.Error() != "event signature mismatch" { + return nil, err + } + if event != nil { + events = append(events, event) + } + } + return events, nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EthCrossChainData *EthCrossChainDataFilterer) ParsePaused(log data.Log) (*EthCrossChainDataPaused, error) { + event := new(EthCrossChainDataPaused) + if err := _EthCrossChainData.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EthCrossChainDataUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the EthCrossChainData contract. +type EthCrossChainDataUnpausedIterator struct { + Event *EthCrossChainDataUnpaused // Event containing the contract specifics and raw log + + contract *core.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan data.Log // Log channel receiving the found contract events + sub event.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainDataUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainDataUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainDataUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainDataUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainDataUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainDataUnpaused represents a Unpaused event raised by the EthCrossChainData contract. +type EthCrossChainDataUnpaused struct { + Account common.Address + Raw data.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +// func (_EthCrossChainData *EthCrossChainDataFilterer) FilterUnpaused(opts *core.FilterOpts) (*EthCrossChainDataUnpausedIterator, error) { +// +// + +// logs, sub, err := _EthCrossChainData.contract.FilterLogs(opts, "Unpaused") +// if err != nil { +// return nil, err +// } +// return &EthCrossChainDataUnpausedIterator{contract: _EthCrossChainData.contract, event: "Unpaused", logs: logs, sub: sub}, nil +// } + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EthCrossChainData *EthCrossChainDataFilterer) WatchUnpaused(opts *core.WatchOpts, sink chan<- *EthCrossChainDataUnpaused) (event.Subscription, error) { + + sub, err := _EthCrossChainData.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.UnSubscribe() + for { + select { + case log := <-sub.EventMsgCh: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainDataUnpaused) + if err := _EthCrossChainData.contract.UnpackLog(event, "Unpaused", *log); err != nil { + return err + } + event.Raw = *log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_EthCrossChainData *EthCrossChainDataFilterer) GetUnpausedPastEvent(txHash string, ContractLogs string) ([]*EthCrossChainDataUnpaused, error) { + var logRaws []*data.Log + var err error + if ContractLogs != "" { + logRaws, err = _EthCrossChainData.contract.GetPastEventByCtrLog(ContractLogs) + } else if txHash != "" { + logRaws, err = _EthCrossChainData.contract.GetPastEventByTxHash(txHash) + } else { + return nil, errors.New("both txHash or ContractLogs is not provided for param") + } + + if err != nil { + return nil, err + } + var events []*EthCrossChainDataUnpaused + for _, logRaw := range logRaws { + event, err := _EthCrossChainData.ParseUnpaused(*logRaw) + if err != nil && err.Error() != "event signature mismatch" { + return nil, err + } + if event != nil { + events = append(events, event) + } + } + return events, nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EthCrossChainData *EthCrossChainDataFilterer) ParseUnpaused(log data.Log) (*EthCrossChainDataUnpaused, error) { + event := new(EthCrossChainDataUnpaused) + if err := _EthCrossChainData.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/chains/chainsql/eccm_abi/eccm_abi.go b/chains/chainsql/eccm_abi/eccm_abi.go new file mode 100644 index 0000000..cb38fd1 --- /dev/null +++ b/chains/chainsql/eccm_abi/eccm_abi.go @@ -0,0 +1,1750 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package EthCrossChainManager + +import ( + "errors" + "math/big" + "strings" + + "github.com/ChainSQL/go-chainsql-api/abigen/abi" + "github.com/ChainSQL/go-chainsql-api/abigen/abi/bind" + "github.com/ChainSQL/go-chainsql-api/common" + "github.com/ChainSQL/go-chainsql-api/core" + "github.com/ChainSQL/go-chainsql-api/data" + "github.com/ChainSQL/go-chainsql-api/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = bind.Bind + _ = common.Big1 +) + +// EthCrossChainManagerMetaData contains all meta data concerning the EthCrossChainManager contract. +var EthCrossChainManagerMetaData = &core.CtrMetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_eccd\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_chainId\",\"type\":\"uint64\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"height\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"}],\"name\":\"ChangeBookKeeperEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"txId\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"proxyOrAssetContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"toContract\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"rawdata\",\"type\":\"bytes\"}],\"name\":\"CrossChainEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"height\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"}],\"name\":\"InitGenesisBlockEvent\",\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"fromChainID\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"toContract\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"crossChainTxHash\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"fromChainTxHash\",\"type\":\"bytes\"}],\"name\":\"VerifyHeaderAndExecuteTxEvent\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"EthCrossChainDataAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"pubKeyList\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sigList\",\"type\":\"bytes\"}],\"name\":\"changeBookKeeper\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"toContract\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"method\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txData\",\"type\":\"bytes\"}],\"name\":\"crossChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"pubKeyList\",\"type\":\"bytes\"}],\"name\":\"initGenesisBlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_newChainId\",\"type\":\"uint64\"}],\"name\":\"setChainId\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newEthCrossChainManagerAddress\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"rawHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"headerProof\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"curRawHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"headerSig\",\"type\":\"bytes\"}],\"name\":\"verifyHeaderAndExecuteTx\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080604052611002600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503480156200005457600080fd5b506040516200706d3803806200706d833981810160405260408110156200007a57600080fd5b81019080805190602001909291908051906020019092919050505081816000620000a9620001d560201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35060008060146101000a81548160ff02191690831515021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050505050620001dd565b600033905090565b616e8080620001ed6000396000f3fe608060405234801561001057600080fd5b50600436106100f45760003560e01c80637e724ff3116100975780639a8a0592116100665780639a8a059214610636578063bd5cf62514610668578063d450e04c146107b7578063f2fde38b14610ae6576100f4565b80637e724ff31461054c5780638456cb59146105a85780638da5cb5b146105ca5780638f32d59b14610614576100f4565b80633f4ba83a116100d35780633f4ba83a146104ae5780635c975abb146104d05780636f31031d146104f2578063715018a614610542576100f4565b8062ba1694146100f957806329dcf4ab1461014357806334a773eb14610344575b600080fd5b610101610b2a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61032a6004803603606081101561015957600080fd5b810190808035906020019064010000000081111561017657600080fd5b82018360208201111561018857600080fd5b803590602001918460018302840111640100000000831117156101aa57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561020d57600080fd5b82018360208201111561021f57600080fd5b8035906020019184600183028401116401000000008311171561024157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156102a457600080fd5b8201836020820111156102b657600080fd5b803590602001918460018302840111640100000000831117156102d857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610b50565b604051808215151515815260200191505060405180910390f35b6104946004803603604081101561035a57600080fd5b810190808035906020019064010000000081111561037757600080fd5b82018360208201111561038957600080fd5b803590602001918460018302840111640100000000831117156103ab57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561040e57600080fd5b82018360208201111561042057600080fd5b8035906020019184600183028401116401000000008311171561044257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061130f565b604051808215151515815260200191505060405180910390f35b6104b661190d565b604051808215151515815260200191505060405180910390f35b6104d8611b2d565b604051808215151515815260200191505060405180910390f35b6105286004803603602081101561050857600080fd5b81019080803567ffffffffffffffff169060200190929190505050611b43565b604051808215151515815260200191505060405180910390f35b61054a611c72565b005b61058e6004803603602081101561056257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611dab565b604051808215151515815260200191505060405180910390f35b6105b0611f70565b604051808215151515815260200191505060405180910390f35b6105d261218e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61061c6121b7565b604051808215151515815260200191505060405180910390f35b61063e612215565b604051808267ffffffffffffffff1667ffffffffffffffff16815260200191505060405180910390f35b61079d6004803603608081101561067e57600080fd5b81019080803567ffffffffffffffff169060200190929190803590602001906401000000008111156106af57600080fd5b8201836020820111156106c157600080fd5b803590602001918460018302840111640100000000831117156106e357600080fd5b90919293919293908035906020019064010000000081111561070457600080fd5b82018360208201111561071657600080fd5b8035906020019184600183028401116401000000008311171561073857600080fd5b90919293919293908035906020019064010000000081111561075957600080fd5b82018360208201111561076b57600080fd5b8035906020019184600183028401116401000000008311171561078d57600080fd5b909192939192939050505061222f565b604051808215151515815260200191505060405180910390f35b610acc600480360360a08110156107cd57600080fd5b81019080803590602001906401000000008111156107ea57600080fd5b8201836020820111156107fc57600080fd5b8035906020019184600183028401116401000000008311171561081e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561088157600080fd5b82018360208201111561089357600080fd5b803590602001918460018302840111640100000000831117156108b557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561091857600080fd5b82018360208201111561092a57600080fd5b8035906020019184600183028401116401000000008311171561094c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156109af57600080fd5b8201836020820111156109c157600080fd5b803590602001918460018302840111640100000000831117156109e357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610a4657600080fd5b820183602082011115610a5857600080fd5b80359060200191846001830284011164010000000083111715610a7a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612b4c565b604051808215151515815260200191505060405180910390f35b610b2860048036036020811015610afc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506135a6565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060149054906101000a900460ff1615610bd4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b610bdc616838565b610be58561362c565b90506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff16635ac407906040518163ffffffff1660e01b815260040160206040518083038186803b158015610c5657600080fd5b505afa158015610c6a573d6000803e3d6000fd5b505050506040513d6020811015610c8057600080fd5b810190808051906020019092919050505063ffffffff1690508067ffffffffffffffff16836060015163ffffffff1611610d05576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603e815260200180616b0e603e913960400191505060405180910390fd5b600060601b6bffffffffffffffffffffffff19168361014001516bffffffffffffffffffffffff19161415610d85576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806169ba6025913960400191505060405180910390fd5b6060610ece8373ffffffffffffffffffffffffffffffffffffffff166369d480746040518163ffffffff1660e01b815260040160006040518083038186803b158015610dd057600080fd5b505afa158015610de4573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015610e0e57600080fd5b8101908080516040519392919084640100000000821115610e2e57600080fd5b83820191506020820185811115610e4457600080fd5b8251866001820283011164010000000082111715610e6157600080fd5b8083526020830192505050908051906020019080838360005b83811015610e95578082015181840152602081019050610e7a565b50505050905090810190601f168015610ec25780820380516001836020036101000a031916815260200191505b506040525050506137b7565b9050600081519050610ef189888460036001860381610ee957fe5b0485036138a5565b610f63576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f566572696679207369676e6174757265206661696c656421000000000000000081525060200191505060405180910390fd5b60006060610f708a613bad565b91509150816bffffffffffffffffffffffff19168761014001516bffffffffffffffffffffffff19161461100c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4e657874426f6f6b65727320696c6c6567616c0000000000000000000000000081525060200191505060405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff16638a8bd17f88606001516040518263ffffffff1660e01b8152600401808263ffffffff1663ffffffff168152602001915050602060405180830381600087803b15801561106f57600080fd5b505af1158015611083573d6000803e3d6000fd5b505050506040513d602081101561109957600080fd5b81019080805190602001909291905050506110ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180616c08602d913960400191505060405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff166341973cd961112483613cdd565b6040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611173578082015181840152602081019050611158565b50505050905090810190601f1680156111a05780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1580156111bf57600080fd5b505af11580156111d3573d6000803e3d6000fd5b505050506040513d60208110156111e957600080fd5b810190808051906020019092919050505061124f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b815260200180616b77603b913960400191505060405180910390fd5b7fe60d33488cba3977bf65766cd2f8ac9617f64bf3b3198aff6240ce5c7d43b69087606001518c604051808363ffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156112c25780820151818401526020810190506112a7565b50505050905090810190601f1680156112ef5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a160019750505050505050509392505050565b60008060149054906101000a900460ff1615611393576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff166369d480746040518163ffffffff1660e01b815260040160006040518083038186803b15801561140257600080fd5b505afa158015611416573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561144057600080fd5b810190808051604051939291908464010000000082111561146057600080fd5b8382019150602082018581111561147657600080fd5b825186600182028301116401000000008211171561149357600080fd5b8083526020830192505050908051906020019080838360005b838110156114c75780820151818401526020810190506114ac565b50505050905090810190601f1680156114f45780820380516001836020036101000a031916815260200191505b506040525050505114611552576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180616ced6038913960400191505060405180910390fd5b61155a616838565b6115638561362c565b90506000606061157286613bad565b91509150816bffffffffffffffffffffffff19168361014001516bffffffffffffffffffffffff19161461160e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4e657874426f6f6b65727320696c6c6567616c0000000000000000000000000081525060200191505060405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff16638a8bd17f84606001516040518263ffffffff1660e01b8152600401808263ffffffff1663ffffffff168152602001915050602060405180830381600087803b15801561167157600080fd5b505af1158015611685573d6000803e3d6000fd5b505050506040513d602081101561169b57600080fd5b8101908080519060200190929190505050611701576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526043815260200180616a516043913960600191505060405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff166341973cd961172683613cdd565b6040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561177557808201518184015260208101905061175a565b50505050905090810190601f1680156117a25780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1580156117c157600080fd5b505af11580156117d5573d6000803e3d6000fd5b505050506040513d60208110156117eb57600080fd5b8101908080519060200190929190505050611851576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526043815260200180616d256043913960600191505060405180910390fd5b7ff01968fc3a2655cf1b5144cb32de6dc898f91b9239c103744e8457152ab2fbde836060015188604051808363ffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156118c45780820151818401526020810190506118a9565b50505050905090810190601f1680156118f15780820380516001836020036101000a031916815260200191505b50935050505060405180910390a1600194505050505092915050565b60006119176121b7565b611989576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611991611b2d565b1561199f5761199e613dfb565b5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a0c57600080fd5b505afa158015611a20573d6000803e3d6000fd5b505050506040513d6020811015611a3657600080fd5b810190808051906020019092919050505015611b25578073ffffffffffffffffffffffffffffffffffffffff16633f4ba83a6040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9457600080fd5b505af1158015611aa8573d6000803e3d6000fd5b505050506040513d6020811015611abe57600080fd5b8101908080519060200190929190505050611b24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806169df6029913960400191505060405180910390fd5b5b600191505090565b60008060149054906101000a900460ff16905090565b60008060149054906101000a900460ff16611bc6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b611bce6121b7565b611c40576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b81600160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060019050919050565b611c7a6121b7565b611cec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060149054906101000a900460ff16611e2e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b611e366121b7565b611ea8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff1663f2fde38b846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015611f4e57600080fd5b505af1158015611f62573d6000803e3d6000fd5b505050506001915050919050565b6000611f7a6121b7565b611fec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611ff4611b2d565b61200157612000613f03565b5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561206e57600080fd5b505afa158015612082573d6000803e3d6000fd5b505050506040513d602081101561209857600080fd5b8101908080519060200190929190505050612186578073ffffffffffffffffffffffffffffffffffffffff16638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156120f557600080fd5b505af1158015612109573d6000803e3d6000fd5b505050506040513d602081101561211f57600080fd5b8101908080519060200190929190505050612185576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806169936027913960400191505060405180910390fd5b5b600191505090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166121f961400d565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b600160149054906101000a900467ffffffffffffffff1681565b60008060149054906101000a900460ff16156122b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff1663ff3d24a16040518163ffffffff1660e01b815260040160206040518083038186803b15801561232257600080fd5b505afa158015612336573d6000803e3d6000fd5b505050506040513d602081101561234c57600080fd5b81019080805190602001909291905050509050606061236a82614015565b90506060612377826140c8565b612552600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166325a54c5e3086604051602001808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140182805190602001908083835b602083106124255780518252602082019150602081019050602083039250612402565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156124a957808201518184015260208101905061248e565b50505050905090810190601f1680156124d65780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b1580156124f357600080fd5b505afa158015612507573d6000803e3d6000fd5b505050506040513d602081101561251d57600080fd5b8101908080519060200190929190505050604051602001808281526020019150506040516020818303038152906040526140c8565b61256361255e3361419e565b6140c8565b61256c8f6141be565b6125b98f8f8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506140c8565b6126068e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506140c8565b6126538d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506140c8565b6040516020018088805190602001908083835b602083106126895780518252602082019150602081019050602083039250612666565b6001836020036101000a03801982511681845116808217855250505050505090500187805190602001908083835b602083106126da57805182526020820191506020810190506020830392506126b7565b6001836020036101000a03801982511681845116808217855250505050505090500186805190602001908083835b6020831061272b5780518252602082019150602081019050602083039250612708565b6001836020036101000a03801982511681845116808217855250505050505090500185805190602001908083835b6020831061277c5780518252602082019150602081019050602083039250612759565b6001836020036101000a03801982511681845116808217855250505050505090500184805190602001908083835b602083106127cd57805182526020820191506020810190506020830392506127aa565b6001836020036101000a03801982511681845116808217855250505050505090500183805190602001908083835b6020831061281e57805182526020820191506020810190506020830392506127fb565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b6020831061286f578051825260208201915060208101905060208303925061284c565b6001836020036101000a03801982511681845116808217855250505050505090500197505050505050505060405160208183030381529060405290508373ffffffffffffffffffffffffffffffffffffffff16634c3ccf6482805190602001206040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561290557600080fd5b505af1158015612919573d6000803e3d6000fd5b505050506040513d602081101561292f57600080fd5b8101908080519060200190929190505050612995576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180616dac6030913960400191505060405180910390fd5b3273ffffffffffffffffffffffffffffffffffffffff167f6ad3bf15c1988bc04bc153490cab16db8efb9a3990215bf1c64ea6e28be8848383338f8f8f8760405180806020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018667ffffffffffffffff1667ffffffffffffffff168152602001806020018060200184810384528a818151815260200191508051906020019080838360005b83811015612a67578082015181840152602081019050612a4c565b50505050905090810190601f168015612a945780820380516001836020036101000a031916815260200191505b508481038352878782818152602001925080828437600081840152601f19601f820116905080830192505050848103825285818151815260200191508051906020019080838360005b83811015612af8578082015181840152602081019050612add565b50505050905090810190601f168015612b255780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390a26001945050505050979650505050505050565b60008060149054906101000a900460ff1615612bd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b612bd8616838565b612be18661362c565b90506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506060612d538273ffffffffffffffffffffffffffffffffffffffff166369d480746040518163ffffffff1660e01b815260040160006040518083038186803b158015612c5557600080fd5b505afa158015612c69573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015612c9357600080fd5b8101908080516040519392919084640100000000821115612cb357600080fd5b83820191506020820185811115612cc957600080fd5b8251866001820283011164010000000082111715612ce657600080fd5b8083526020830192505050908051906020019080838360005b83811015612d1a578082015181840152602081019050612cff565b50505050905090810190601f168015612d475780820380516001836020036101000a031916815260200191505b506040525050506137b7565b905060008273ffffffffffffffffffffffffffffffffffffffff16635ac407906040518163ffffffff1660e01b815260040160206040518083038186803b158015612d9d57600080fd5b505afa158015612db1573d6000803e3d6000fd5b505050506040513d6020811015612dc757600080fd5b810190808051906020019092919050505063ffffffff16905060008251905081856060015163ffffffff1610612e6c57612e128a888560036001860381612e0a57fe5b0485036138a5565b612e67576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180616e22602a913960400191505060405180910390fd5b612f8a565b612e8788888560036001860381612e7f57fe5b0485036138a5565b612edc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180616c356038913960400191505060405180910390fd5b612ee4616838565b612eed8961362c565b90506060612f008b836101000151614206565b9050612f0b816143d3565b612f148d614458565b14612f87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f766572696679206865616465722070726f6f66206661696c656421000000000081525060200191505060405180910390fd5b50505b6060612f9a8c8760e00151614206565b9050612fa46168d3565b612fad82614665565b90508573ffffffffffffffffffffffffffffffffffffffff16630586763c8260200151612fdd84600001516143d3565b6040518363ffffffff1660e01b8152600401808367ffffffffffffffff1667ffffffffffffffff1681526020018281526020019250505060206040518083038186803b15801561302c57600080fd5b505afa158015613040573d6000803e3d6000fd5b505050506040513d602081101561305657600080fd5b8101908080519060200190929190505050156130bd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180616d8a6022913960400191505060405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff1663e90bfdcf82602001516130eb84600001516143d3565b6040518363ffffffff1660e01b8152600401808367ffffffffffffffff1667ffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561313c57600080fd5b505af1158015613150573d6000803e3d6000fd5b505050506040513d602081101561316657600080fd5b81019080805190602001909291905050506131e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f536176652063726f7373636861696e207478206578697374206661696c65642181525060200191505060405180910390fd5b600160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1681604001516060015167ffffffffffffffff1614613273576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180616a946026913960400191505060405180910390fd5b600061328682604001516080015161479b565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561334c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4e6f20656363642068657265210000000000000000000000000000000000000081525060200191505060405180910390fd5b61337581836040015160a00151846040015160c001518560400151604001518660200151614803565b6133e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f457865637574652043726f7373436861696e205478206661696c65642100000081525060200191505060405180910390fd5b7f8a4a2663ce60ce4955c595da2894de0415240f1ace024cfbff85f513b656bdae82602001518360400151608001518460000151856040015160000151604051808567ffffffffffffffff1667ffffffffffffffff168152602001806020018060200180602001848103845287818151815260200191508051906020019080838360005b8381101561348657808201518184015260208101905061346b565b50505050905090810190601f1680156134b35780820380516001836020036101000a031916815260200191505b50848103835286818151815260200191508051906020019080838360005b838110156134ec5780820151818401526020810190506134d1565b50505050905090810190601f1680156135195780820380516001836020036101000a031916815260200191505b50848103825285818151815260200191508051906020019080838360005b83811015613552578082015181840152602081019050613537565b50505050905090810190601f16801561357f5780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a160019850505050505050505095945050505050565b6135ae6121b7565b613620576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61362981614cad565b50565b613634616838565b61363c616838565b600080905061364b8482614df1565b836000018193508263ffffffff1663ffffffff16815250505061366e8482614eb9565b836020018193508267ffffffffffffffff1667ffffffffffffffff1681525050506136998482614f81565b8360a0018193508281525050506136b08482614f81565b8360c0018193508281525050506136c78482614f81565b8360e0018193508281525050506136de8482614f81565b83610100018193508281525050506136f68482614df1565b836040018193508263ffffffff1663ffffffff1681525050506137198482614df1565b836060018193508263ffffffff1663ffffffff16815250505061373c8482614eb9565b836080018193508267ffffffffffffffff1667ffffffffffffffff1681525050506137678482615028565b819150836101200181935082905250506137818482615128565b8361014001819350826bffffffffffffffffffffffff19166bffffffffffffffffffffffff191681525050508192505050919050565b6060600080905060006137ca8483614eb9565b809350819250505060608167ffffffffffffffff1660405190808252806020026020018201604052801561380d5781602001602082028038833980820191505090505b509050606060008090505b8367ffffffffffffffff16811015613898576138348786615028565b80965081935050506138458261479b565b83828151811061385157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080600101915050613818565b5081945050505050919050565b6000806138b186614458565b905060006138ca604187516151b290919063ffffffff16565b90506060816040519080825280602002602001820160405280156138fd5781602001602082028038833980820191505090505b509050600080600080600090505b85811015613b905761392a6139258c6041840260206151fc565b6143d3565b93506139466139418c6020604185020160206151fc565b6143d3565b9250601b8b604060418402018151811061395c57fe5b602001015160f81c60f81b60f81c019150600161100273ffffffffffffffffffffffffffffffffffffffff166325a54c5e89604051602001808281526020019150506040516020818303038152906040526040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156139fc5780820151818401526020810190506139e1565b50505050905090810190601f168015613a295780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b158015613a4657600080fd5b505afa158015613a5a573d6000803e3d6000fd5b505050506040513d6020811015613a7057600080fd5b810190808051906020019092919050505083868660405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015613adb573d6000803e3d6000fd5b50505060206040510351858281518110613af157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600073ffffffffffffffffffffffffffffffffffffffff16858281518110613b4f57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415613b83576000975050505050505050613ba5565b808060010191505061390b565b50613b9c89858a615288565b96505050505050505b949350505050565b6000606060006043845181613bbe57fe5b0614613c32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f5f7075624b65794c697374206c656e67746820696c6c6567616c21000000000081525060200191505060405180910390fd5b60006043845181613c3f57fe5b0490506001811015613cb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f746f6f2073686f7274205f7075624b65794c697374210000000000000000000081525060200191505060405180910390fd5b613cd38160036001840381613cca57fe5b04830386615368565b9250925050915091565b60606000825190506060613cf0826141be565b905060008090505b82811015613df05781613d25613d20878481518110613d1357fe5b602002602001015161419e565b6140c8565b6040516020018083805190602001908083835b60208310613d5b5780518252602082019150602081019050602083039250613d38565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310613dac5780518252602082019150602081019050602083039250613d89565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405291508080600101915050613cf8565b508092505050919050565b600060149054906101000a900460ff16613e7d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa613ec061400d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600060149054906101000a900460ff1615613f86576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613fca61400d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600033905090565b60607f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8211156140ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f56616c75652065786365656473207468652072616e676500000000000000000081525060200191505060405180910390fd5b60405190506020815281602082015260408101604052919050565b60606000825190506140d9816157f0565b836040516020018083805190602001908083835b6020831061411057805182526020820191506020810190506020830392506140ed565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310614161578051825260208201915060208101905060208303925061413e565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050919050565b60606040519050601481528160601b602082015260408101604052919050565b606080604051905060088082526000601f5b828210156141f35785811a826020860101536001820191506001810390506141d0565b5050602882016040525080915050919050565b6060600080905060606142198583615028565b8093508192505050600061422c82615ac9565b905060006142576021614249868a51615c8490919063ffffffff16565b6151b290919063ffffffff16565b905060008060008090505b8381101561436b576142748a88615cce565b80985081935050506142868a88614f81565b8098508194505050600060f81b827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156142cd576142c68386615d75565b945061435e565b600160f81b827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561430c576143058584615d75565b945061435d565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180616bb2602e913960400191505060405180910390fd5b5b8080600101915050614262565b508784146143c4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180616add6031913960400191505060405180910390fd5b84965050505050505092915050565b6000602082511461444c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6279746573206c656e677468206973206e6f742033322e00000000000000000081525060200191505060405180910390fd5b60208201519050919050565b600061100273ffffffffffffffffffffffffffffffffffffffff166325a54c5e61100273ffffffffffffffffffffffffffffffffffffffff166325a54c5e856040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156144e65780820151818401526020810190506144cb565b50505050905090810190601f1680156145135780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561453057600080fd5b505afa158015614544573d6000803e3d6000fd5b505050506040513d602081101561455a57600080fd5b8101908080519060200190929190505050604051602001808281526020019150506040516020818303038152906040526040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156145d95780820151818401526020810190506145be565b50505050905090810190601f1680156146065780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561462357600080fd5b505afa158015614637573d6000803e3d6000fd5b505050506040513d602081101561464d57600080fd5b81019080805190602001909291905050509050919050565b61466d6168d3565b6146756168d3565b60008090506146848482615028565b81915083600001819350829052505061469d8482614eb9565b836020018193508267ffffffffffffffff1667ffffffffffffffff1681525050506146c6616904565b6146d08583615028565b8191508260000181945082905250506146e98583615028565b8191508260200181945082905250506147028583615028565b81915082604001819450829052505061471b8583614eb9565b826060018194508267ffffffffffffffff1667ffffffffffffffff1681525050506147468583615028565b81915082608001819450829052505061475f8583615028565b8191508260a00181945082905250506147788583615028565b8191508260c0018194508290525050808360400181905250829350505050919050565b600060148251146147f7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180616a086023913960400191505060405180910390fd5b60148201519050919050565b600061480e86615eee565b614863576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180616be06028913960400191505060405180910390fd5b606060008773ffffffffffffffffffffffffffffffffffffffff16876040516020018082805190602001908083835b602083106148b55780518252602082019150602081019050602083039250614892565b6001836020036101000a038019825116818451168082178552505050505050905001807f2862797465732c62797465732c75696e74363429000000000000000000000000815250601401915050604051602081830303815290604052805190602001208787876040516020018080602001806020018467ffffffffffffffff1667ffffffffffffffff168152602001838103835286818151815260200191508051906020019080838360005b8381101561497c578082015181840152602081019050614961565b50505050905090810190601f1680156149a95780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156149e25780820151818401526020810190506149c7565b50505050905090810190601f168015614a0f5780820380516001836020036101000a031916815260200191505b509550505050505060405160208183030381529060405260405160200180837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260040182805190602001908083835b60208310614aa05780518252602082019150602081019050602083039250614a7d565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b60208310614b085780518252602082019150602081019050602083039250614ae5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614b6a576040519150601f19603f3d011682016040523d82523d6000602084013e614b6f565b606091505b5080935081925050506001151581151514614bd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180616b4c602b913960400191505060405180910390fd5b600082511415614c30576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180616c6d6027913960400191505060405180910390fd5b6000614c3d83601f615f39565b5090506001151581151514614c9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526037815260200180616c946037913960400191505060405180910390fd5b6001935050505095945050505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614d33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180616a2b6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008083516004840111158015614e0a57506004830183105b614e5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180616ddc6022913960400191505060405180910390fd5b600060405160046000600182038760208a0101515b83831015614e945780821a83860153600183019250600182039150614e74565b5050508082016040528060200382035192505050806004850192509250509250929050565b60008083516008840111158015614ed257506008830183105b614f27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180616d686022913960400191505060405180910390fd5b600060405160086000600182038760208a0101515b83831015614f5c5780821a83860153600183019250600182039150614f3c565b5050508082016040528060200382035192505050806008850192509250509250929050565b60008083516020840111158015614f9a57506020830183105b61500c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4e657874486173682c206f66667365742065786365656473206d6178696d756d81525060200191505060405180910390fd5b6000602084018501519050806020850192509250509250929050565b606060008061503785856160c0565b8095508192505050845181850111158015615053575080840184105b6150a8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180616dfe6024913960400191505060405180910390fd5b60608115600081146150c557604051915060208201604052615116565b6040519150601f8316801560200281840101848101888315602002848c0101015b8183101561510357805183526020830192506020810190506150e6565b50858552601f19601f8301166040525050505b50808286019350935050509250929050565b6000808351601484011115801561514157506014830183105b615196576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180616aba6023913960400191505060405180910390fd5b6000602084018501519050806014850192509250509250929050565b60006151f483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506163f1565b905092915050565b60608183018451101561520e57600080fd5b606082156000811461522b5760405191506020820160405261527c565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015615269578051835260208301925060208101905061524c565b50868552601f19601f8301166040525050505b50809150509392505050565b6000806000905060008090505b84518110156153595760008090505b865181101561534b578681815181106152b957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff168683815181106152e357fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16141561533e57828060010193505086818151811061531b57fe5b60200260200101600073ffffffffffffffffffffffffffffffffffffffff168152505b80806001019150506152a4565b508080600101915050615295565b50828110159150509392505050565b6000606080615376866164b8565b90506060866040519080825280602002602001820160405280156153a95781602001602082028038833980820191505090505b5090506000606060008090505b8981101561550c576153cd886043830260436151fc565b9150846153e16153dc84616500565b6140c8565b6040516020018083805190602001908083835b6020831061541757805182526020820191506020810190506020830392506153f4565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b602083106154685780518252602082019150602081019050602083039250615445565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405294506154ac82600360406151fc565b8051906020012092508260001c8482815181106154c557fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080806001019150506153b6565b5083615517896164b8565b6040516020018083805190602001908083835b6020831061554d578051825260208201915060208101905060208303925061552a565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b6020831061559e578051825260208201915060208101905060208303925061557b565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529350600061100273ffffffffffffffffffffffffffffffffffffffff16634e76e99861100273ffffffffffffffffffffffffffffffffffffffff166325a54c5e886040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615663578082015181840152602081019050615648565b50505050905090810190601f1680156156905780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b1580156156ad57600080fd5b505afa1580156156c1573d6000803e3d6000fd5b505050506040513d60208110156156d757600080fd5b8101908080519060200190929190505050604051602001808281526020019150506040516020818303038152906040526040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561575657808201518184015260208101905061573b565b50505050905090810190601f1680156157835780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b1580156157a057600080fd5b505afa1580156157b4573d6000803e3d6000fd5b505050506040513d60208110156157ca57600080fd5b810190808051906020019092919050505090508084965096505050505050935093915050565b606060fd8267ffffffffffffffff1610156158155761580e8261664c565b9050615ac4565b61ffff8267ffffffffffffffff16116159015761583560fd60f81b616671565b61583e836164b8565b6040516020018083805190602001908083835b602083106158745780518252602082019150602081019050602083039250615851565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b602083106158c557805182526020820191506020810190506020830392506158a2565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529050615ac4565b63ffffffff8267ffffffffffffffff16116159ef5761592360fe60f81b616671565b61592c83616686565b6040516020018083805190602001908083835b60208310615962578051825260208201915060208101905060208303925061593f565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b602083106159b35780518252602082019150602081019050602083039250615990565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529050615ac4565b6159fc60ff60f81b616671565b615a05836141be565b6040516020018083805190602001908083835b60208310615a3b5780518252602082019150602081019050602083039250615a18565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310615a8c5780518252602082019150602081019050602083039250615a69565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b919050565b60008061100290508073ffffffffffffffffffffffffffffffffffffffff166325a54c5e600060f81b8560405160200180837effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260010182805190602001908083835b60208310615b735780518252602082019150602081019050602083039250615b50565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615bf7578082015181840152602081019050615bdc565b50505050905090810190601f168015615c245780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b158015615c4157600080fd5b505afa158015615c55573d6000803e3d6000fd5b505050506040513d6020811015615c6b57600080fd5b8101908080519060200190929190505050915050919050565b6000615cc683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506166ce565b905092915050565b60008083516001840111158015615ce757506001830183105b615d59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4e657874427974652c204f66667365742065786365656473206d6178696d756d81525060200191505060405180910390fd5b6000836020860101519050806001850192509250509250929050565b60008061100290508073ffffffffffffffffffffffffffffffffffffffff166325a54c5e600160f81b868660405160200180847effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260010183815260200182815260200193505050506040516020818303038152906040526040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615e60578082015181840152602081019050615e45565b50505050905090810190601f168015615e8d5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b158015615eaa57600080fd5b505afa158015615ebe573d6000803e3d6000fd5b505050506040513d6020811015615ed457600080fd5b810190808051906020019092919050505091505092915050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91506000801b8214158015615f305750808214155b92505050919050565b60008083516001840111158015615f5257506001830183105b615fc4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4f66667365742065786365656473206c696d697400000000000000000000000081525060200191505060405180910390fd5b60008360208601015190506000600160f81b827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561600857600190506160ae565b600060f81b827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561603f57600090506160ad565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4e657874426f6f6c2076616c7565206572726f7200000000000000000000000081525060200191505060405180910390fd5b5b80600186019350935050509250929050565b60008060006160cf8585615cce565b8095508192505050600060fd60f81b827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156161b257616111868661678e565b8161ffff169150809650819250505060fd8110158015616133575061ffff8111155b6161a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4e65787455696e7431362c2076616c7565206f7574736964652072616e67650081525060200191505060405180910390fd5b80859350935050506163ea565b60fe60f81b827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561628f576161ea8686614df1565b8163ffffffff169150809650819250505061ffff81118015616210575063ffffffff8111155b616282576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4e65787456617255696e742c2076616c7565206f7574736964652072616e676581525060200191505060405180910390fd5b80859350935050506163ea565b60ff60f81b827effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415616362576162c78686614eb9565b8167ffffffffffffffff169150809650819250505063ffffffff8111616355576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4e65787456617255696e742c2076616c7565206f7574736964652072616e676581525060200191505060405180910390fd5b80859350935050506163ea565b8160f81c60ff16905060fd81106163e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4e65787456617255696e742c2076616c7565206f7574736964652072616e676581525060200191505060405180910390fd5b80859350935050505b9250929050565b600080831415829061649e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015616463578082015181840152602081019050616448565b50505050905090810190601f1680156164905780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816164aa57fe5b049050809150509392505050565b606080604051905060028082526000601f5b828210156164ed5785811a826020860101536001820191506001810390506164ca565b5050602282016040525080915050919050565b606060438251101561657a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f6b6579206c656e67676820697320746f6f2073686f727400000000000000000081525060200191505060405180910390fd5b61658782600060236151fc565b9050600060028360428151811061659a57fe5b602001015160f81c60f81b60f81c60ff16816165b257fe5b0660ff16141561660257600260f81b816002815181106165ce57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350616644565b600360f81b8160028151811061661457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b809050919050565b6060806040519050600181528260f81b60208201526021810160405280915050919050565b606061667f8260f81c61664c565b9050919050565b606080604051905060048082526000601f5b828210156166bb5785811a82602086010153600182019150600181039050616698565b5050602482016040525080915050919050565b600083831115829061677b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015616740578082015181840152602081019050616725565b50505050905090810190601f16801561676d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080835160028401111580156167a757506002830183105b6167fc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180616ccb6022913960400191505060405180910390fd5b6000604051846020870101518060011a82538060001a600183015360028201604052601e82035192505050806002850192509250509250929050565b604051806101600160405280600063ffffffff168152602001600067ffffffffffffffff168152602001600063ffffffff168152602001600063ffffffff168152602001600067ffffffffffffffff168152602001600080191681526020016000801916815260200160008019168152602001600080191681526020016060815260200160006bffffffffffffffffffffffff191681525090565b604051806060016040528060608152602001600067ffffffffffffffff1681526020016168fe61694b565b81525090565b6040518060e00160405280606081526020016060815260200160608152602001600067ffffffffffffffff1681526020016060815260200160608152602001606081525090565b6040518060e00160405280606081526020016060815260200160608152602001600067ffffffffffffffff168152602001606081526020016060815260200160608152509056fe70617573652045746843726f7373436861696e4461746120636f6e7472616374206661696c6564546865206e657874426f6f6b4b6565706572206f662068656164657220697320656d707479756e70617573652045746843726f7373436861696e4461746120636f6e7472616374206661696c65646279746573206c656e67746820646f6573206e6f74206d6174636820616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735361766520506f6c7920636861696e2063757272656e742065706f63682073746172742068656967687420746f204461746120636f6e7472616374206661696c65642154686973205478206973206e6f742061696d696e672061742074686973206e6574776f726b214e657874427974657332302c206f66667365742065786365656473206d6178696d756d6d65726b6c6550726f76652c2065787065637420726f6f74206973206e6f7420657175616c2061637475616c20726f6f7454686520686569676874206f6620686561646572206973206c6f776572207468616e2063757272656e742065706f6368207374617274206865696768742145746843726f7373436861696e2063616c6c20627573696e65737320636f6e7472616374206661696c65645361766520506f6c7920636861696e20626f6f6b206b65657065727320627974657320746f204461746120636f6e7472616374206661696c6564216d65726b6c6550726f76652c204e6578744279746520666f7220706f736974696f6e20696e666f206661696c65645468652070617373656420696e2061646472657373206973206e6f74206120636f6e74726163742153617665204d43204c617465737448656967687420746f204461746120636f6e7472616374206661696c65642156657269667920706f6c7920636861696e2063757272656e742065706f636820686561646572207369676e6174757265206661696c6564214e6f2072657475726e2076616c75652066726f6d20627573696e65737320636f6e74726163742145746843726f7373436861696e2063616c6c20627573696e65737320636f6e74726163742072657475726e206973206e6f7420747275654e65787455696e7431362c206f66667365742065786365656473206d6178696d756d45746843726f7373436861696e4461746120636f6e74726163742068617320616c7265616479206265656e20696e697469616c697a6564215361766520506f6c7920636861696e2063757272656e742065706f636820626f6f6b206b65657065727320746f204461746120636f6e7472616374206661696c6564214e65787455696e7436342c206f66667365742065786365656473206d6178696d756d746865207472616e73616374696f6e20686173206265656e20657865637574656421536176652065746854784861736820627920696e64657820746f204461746120636f6e7472616374206661696c6564214e65787455696e7433322c206f66667365742065786365656473206d6178696d756d4e65787456617242797465732c206f66667365742065786365656473206d6178696d756d56657269667920706f6c7920636861696e20686561646572207369676e6174757265206661696c656421a265627a7a7231582086ec0b43f04697b1655986e71d49ee5b251842c5cc178d3b7df0c0ef1b17aa8564736f6c63430005100032", +} + +// EthCrossChainManagerABI is the input ABI used to generate the binding from. +// Deprecated: Use EthCrossChainManagerMetaData.ABI instead. +var EthCrossChainManagerABI = EthCrossChainManagerMetaData.ABI + +// EthCrossChainManagerBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use EthCrossChainManagerMetaData.Bin instead. +var EthCrossChainManagerBin = EthCrossChainManagerMetaData.Bin + +// DeployEthCrossChainManager deploys a new ChainSQL contract, binding an instance of EthCrossChainManager to it. +func DeployEthCrossChainManager(chainsql *core.Chainsql, auth *core.TransactOpts, _eccd common.Address, _chainId uint64) (*core.DeployTxRet, *EthCrossChainManager, error) { + parsed, err := EthCrossChainManagerMetaData.GetAbi() + if err != nil { + return &core.DeployTxRet{}, nil, err + } + if parsed == nil { + return &core.DeployTxRet{}, nil, errors.New("GetABI returned nil") + } + + deployRet, contract, err := core.DeployContract(chainsql, auth, *parsed, common.FromHex(EthCrossChainManagerBin), _eccd, _chainId) + if err != nil { + return &core.DeployTxRet{}, nil, err + } + return deployRet, &EthCrossChainManager{EthCrossChainManagerCaller: EthCrossChainManagerCaller{contract: contract}, EthCrossChainManagerTransactor: EthCrossChainManagerTransactor{contract: contract}, EthCrossChainManagerFilterer: EthCrossChainManagerFilterer{contract: contract}}, nil +} + +// EthCrossChainManager is an auto generated Go binding around an ChainSQL contract. +type EthCrossChainManager struct { + EthCrossChainManagerCaller // Read-only binding to the contract + EthCrossChainManagerTransactor // Write-only binding to the contract + EthCrossChainManagerFilterer // Log filterer for contract events +} + +// EthCrossChainManagerCaller is an auto generated read-only Go binding around an ChainSQL contract. +type EthCrossChainManagerCaller struct { + contract *core.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainManagerTransactor is an auto generated write-only Go binding around an ChainSQL contract. +type EthCrossChainManagerTransactor struct { + contract *core.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainManagerFilterer is an auto generated log filtering Go binding around an ChainSQL contract events. +type EthCrossChainManagerFilterer struct { + contract *core.BoundContract // Generic contract wrapper for the low level calls +} + +// EthCrossChainManagerSession is an auto generated Go binding around an ChainSQL contract, +// with pre-set call and transact options. +type EthCrossChainManagerSession struct { + Contract *EthCrossChainManager // Generic contract binding to set the session for + CallOpts core.CallOpts // Call options to use throughout this session + TransactOpts core.TransactOpts // Transaction auth options to use throughout this session +} + +// EthCrossChainManagerCallerSession is an auto generated read-only Go binding around an ChainSQL contract, +// with pre-set call options. +type EthCrossChainManagerCallerSession struct { + Contract *EthCrossChainManagerCaller // Generic contract caller binding to set the session for + CallOpts core.CallOpts // Call options to use throughout this session +} + +// EthCrossChainManagerTransactorSession is an auto generated write-only Go binding around an ChainSQL contract, +// with pre-set transact options. +type EthCrossChainManagerTransactorSession struct { + Contract *EthCrossChainManagerTransactor // Generic contract transactor binding to set the session for + TransactOpts core.TransactOpts // Transaction auth options to use throughout this session +} + +// EthCrossChainManagerRaw is an auto generated low-level Go binding around an ChainSQL contract. +type EthCrossChainManagerRaw struct { + Contract *EthCrossChainManager // Generic contract binding to access the raw methods on +} + +// EthCrossChainManagerCallerRaw is an auto generated low-level read-only Go binding around an ChainSQL contract. +type EthCrossChainManagerCallerRaw struct { + Contract *EthCrossChainManagerCaller // Generic read-only contract binding to access the raw methods on +} + +// EthCrossChainManagerTransactorRaw is an auto generated low-level write-only Go binding around an ChainSQL contract. +type EthCrossChainManagerTransactorRaw struct { + Contract *EthCrossChainManagerTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewEthCrossChainManager creates a new instance of EthCrossChainManager, bound to a specific deployed contract. +func NewEthCrossChainManager(chainsql *core.Chainsql, address string) (*EthCrossChainManager, error) { + contract, err := bindEthCrossChainManager(chainsql, address) + if err != nil { + return nil, err + } + return &EthCrossChainManager{EthCrossChainManagerCaller: EthCrossChainManagerCaller{contract: contract}, EthCrossChainManagerTransactor: EthCrossChainManagerTransactor{contract: contract}, EthCrossChainManagerFilterer: EthCrossChainManagerFilterer{contract: contract}}, nil +} + +// // NewEthCrossChainManagerCaller creates a new read-only instance of EthCrossChainManager, bound to a specific deployed contract. +// func NewEthCrossChainManagerCaller(address common.Address, caller bind.ContractCaller) (*EthCrossChainManagerCaller, error) { +// contract, err := bindEthCrossChainManager(address, caller, nil, nil) +// if err != nil { +// return nil, err +// } +// return &EthCrossChainManagerCaller{contract: contract}, nil +// } + +// // NewEthCrossChainManagerTransactor creates a new write-only instance of EthCrossChainManager, bound to a specific deployed contract. +// func NewEthCrossChainManagerTransactor(address common.Address, transactor bind.ContractTransactor) (*EthCrossChainManagerTransactor, error) { +// contract, err := bindEthCrossChainManager(address, nil, transactor, nil) +// if err != nil { +// return nil, err +// } +// return &EthCrossChainManagerTransactor{contract: contract}, nil +// } + +// // NewEthCrossChainManagerFilterer creates a new log filterer instance of EthCrossChainManager, bound to a specific deployed contract. +// func NewEthCrossChainManagerFilterer(address common.Address, filterer bind.ContractFilterer) (*EthCrossChainManagerFilterer, error) { +// contract, err := bindEthCrossChainManager(address, nil, nil, filterer) +// if err != nil { +// return nil, err +// } +// return &EthCrossChainManagerFilterer{contract: contract}, nil +// } + +// bindEthCrossChainManager binds a generic wrapper to an already deployed contract. +func bindEthCrossChainManager(chainsql *core.Chainsql, address string) (*core.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(EthCrossChainManagerABI)) + if err != nil { + return nil, err + } + return core.NewBoundContract(chainsql, address, parsed), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +// func (_EthCrossChainManager *EthCrossChainManagerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { +// return _EthCrossChainManager.Contract.EthCrossChainManagerCaller.contract.Call(opts, result, method, params...) +// } + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +// func (_EthCrossChainManager *EthCrossChainManagerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { +// return _EthCrossChainManager.Contract.EthCrossChainManagerTransactor.contract.Transfer(opts) +// } + +// Transact invokes the (paid) contract method with params as input values. +// func (_EthCrossChainManager *EthCrossChainManagerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { +// return _EthCrossChainManager.Contract.EthCrossChainManagerTransactor.contract.Transact(opts, method, params...) +// } + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +// func (_EthCrossChainManager *EthCrossChainManagerCallerRaw) Call(opts *core.CallOpts, result *[]interface{}, method string, params ...interface{}) error { +// return _EthCrossChainManager.Contract.contract.Call(opts, result, method, params...) +// } + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +// func (_EthCrossChainManager *EthCrossChainManagerTransactorRaw) Transfer(opts *core.TransactOpts) (*types.Transaction, error) { +// return _EthCrossChainManager.Contract.contract.Transfer(opts) +// } + +// Transact invokes the (paid) contract method with params as input values. +// func (_EthCrossChainManager *EthCrossChainManagerTransactorRaw) Transact(opts *core.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { +// return _EthCrossChainManager.Contract.contract.Transact(opts, method, params...) +// } + +// EthCrossChainDataAddress is a free data retrieval call binding the contract method 0x00ba1694. +// +// Solidity: function EthCrossChainDataAddress() view returns(address) +func (_EthCrossChainManager *EthCrossChainManagerCaller) EthCrossChainDataAddress(opts *core.CallOpts) (common.Address, error) { + var out []interface{} + err := _EthCrossChainManager.contract.Call(opts, &out, "EthCrossChainDataAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// EthCrossChainDataAddress is a free data retrieval call binding the contract method 0x00ba1694. +// +// Solidity: function EthCrossChainDataAddress() view returns(address) +func (_EthCrossChainManager *EthCrossChainManagerSession) EthCrossChainDataAddress() (common.Address, error) { + return _EthCrossChainManager.Contract.EthCrossChainDataAddress(&_EthCrossChainManager.CallOpts) +} + +// EthCrossChainDataAddress is a free data retrieval call binding the contract method 0x00ba1694. +// +// Solidity: function EthCrossChainDataAddress() view returns(address) +func (_EthCrossChainManager *EthCrossChainManagerCallerSession) EthCrossChainDataAddress() (common.Address, error) { + return _EthCrossChainManager.Contract.EthCrossChainDataAddress(&_EthCrossChainManager.CallOpts) +} + +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_EthCrossChainManager *EthCrossChainManagerCaller) ChainId(opts *core.CallOpts) (uint64, error) { + var out []interface{} + err := _EthCrossChainManager.contract.Call(opts, &out, "chainId") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_EthCrossChainManager *EthCrossChainManagerSession) ChainId() (uint64, error) { + return _EthCrossChainManager.Contract.ChainId(&_EthCrossChainManager.CallOpts) +} + +// ChainId is a free data retrieval call binding the contract method 0x9a8a0592. +// +// Solidity: function chainId() view returns(uint64) +func (_EthCrossChainManager *EthCrossChainManagerCallerSession) ChainId() (uint64, error) { + return _EthCrossChainManager.Contract.ChainId(&_EthCrossChainManager.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerCaller) IsOwner(opts *core.CallOpts) (bool, error) { + var out []interface{} + err := _EthCrossChainManager.contract.Call(opts, &out, "isOwner") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) IsOwner() (bool, error) { + return _EthCrossChainManager.Contract.IsOwner(&_EthCrossChainManager.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerCallerSession) IsOwner() (bool, error) { + return _EthCrossChainManager.Contract.IsOwner(&_EthCrossChainManager.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainManager *EthCrossChainManagerCaller) Owner(opts *core.CallOpts) (common.Address, error) { + var out []interface{} + err := _EthCrossChainManager.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainManager *EthCrossChainManagerSession) Owner() (common.Address, error) { + return _EthCrossChainManager.Contract.Owner(&_EthCrossChainManager.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EthCrossChainManager *EthCrossChainManagerCallerSession) Owner() (common.Address, error) { + return _EthCrossChainManager.Contract.Owner(&_EthCrossChainManager.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerCaller) Paused(opts *core.CallOpts) (bool, error) { + var out []interface{} + err := _EthCrossChainManager.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) Paused() (bool, error) { + return _EthCrossChainManager.Contract.Paused(&_EthCrossChainManager.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerCallerSession) Paused() (bool, error) { + return _EthCrossChainManager.Contract.Paused(&_EthCrossChainManager.CallOpts) +} + +// ChangeBookKeeper is a paid mutator transaction binding the contract method 0x29dcf4ab. +// +// Solidity: function changeBookKeeper(bytes rawHeader, bytes pubKeyList, bytes sigList) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) ChangeBookKeeper(opts *core.TransactOpts, rawHeader []byte, pubKeyList []byte, sigList []byte) (*common.TxResult, error) { + return _EthCrossChainManager.contract.Transact(opts, "changeBookKeeper", rawHeader, pubKeyList, sigList) +} + +// ChangeBookKeeper is a paid mutator transaction binding the contract method 0x29dcf4ab. +// +// Solidity: function changeBookKeeper(bytes rawHeader, bytes pubKeyList, bytes sigList) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) ChangeBookKeeper(rawHeader []byte, pubKeyList []byte, sigList []byte) (*common.TxResult, error) { + return _EthCrossChainManager.Contract.ChangeBookKeeper(&_EthCrossChainManager.TransactOpts, rawHeader, pubKeyList, sigList) +} + +// ChangeBookKeeper is a paid mutator transaction binding the contract method 0x29dcf4ab. +// +// Solidity: function changeBookKeeper(bytes rawHeader, bytes pubKeyList, bytes sigList) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) ChangeBookKeeper(rawHeader []byte, pubKeyList []byte, sigList []byte) (*common.TxResult, error) { + return _EthCrossChainManager.Contract.ChangeBookKeeper(&_EthCrossChainManager.TransactOpts, rawHeader, pubKeyList, sigList) +} + +// CrossChain is a paid mutator transaction binding the contract method 0xbd5cf625. +// +// Solidity: function crossChain(uint64 toChainId, bytes toContract, bytes method, bytes txData) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) CrossChain(opts *core.TransactOpts, toChainId uint64, toContract []byte, method []byte, txData []byte) (*common.TxResult, error) { + return _EthCrossChainManager.contract.Transact(opts, "crossChain", toChainId, toContract, method, txData) +} + +// CrossChain is a paid mutator transaction binding the contract method 0xbd5cf625. +// +// Solidity: function crossChain(uint64 toChainId, bytes toContract, bytes method, bytes txData) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) CrossChain(toChainId uint64, toContract []byte, method []byte, txData []byte) (*common.TxResult, error) { + return _EthCrossChainManager.Contract.CrossChain(&_EthCrossChainManager.TransactOpts, toChainId, toContract, method, txData) +} + +// CrossChain is a paid mutator transaction binding the contract method 0xbd5cf625. +// +// Solidity: function crossChain(uint64 toChainId, bytes toContract, bytes method, bytes txData) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) CrossChain(toChainId uint64, toContract []byte, method []byte, txData []byte) (*common.TxResult, error) { + return _EthCrossChainManager.Contract.CrossChain(&_EthCrossChainManager.TransactOpts, toChainId, toContract, method, txData) +} + +// InitGenesisBlock is a paid mutator transaction binding the contract method 0x34a773eb. +// +// Solidity: function initGenesisBlock(bytes rawHeader, bytes pubKeyList) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) InitGenesisBlock(opts *core.TransactOpts, rawHeader []byte, pubKeyList []byte) (*common.TxResult, error) { + return _EthCrossChainManager.contract.Transact(opts, "initGenesisBlock", rawHeader, pubKeyList) +} + +// InitGenesisBlock is a paid mutator transaction binding the contract method 0x34a773eb. +// +// Solidity: function initGenesisBlock(bytes rawHeader, bytes pubKeyList) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) InitGenesisBlock(rawHeader []byte, pubKeyList []byte) (*common.TxResult, error) { + return _EthCrossChainManager.Contract.InitGenesisBlock(&_EthCrossChainManager.TransactOpts, rawHeader, pubKeyList) +} + +// InitGenesisBlock is a paid mutator transaction binding the contract method 0x34a773eb. +// +// Solidity: function initGenesisBlock(bytes rawHeader, bytes pubKeyList) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) InitGenesisBlock(rawHeader []byte, pubKeyList []byte) (*common.TxResult, error) { + return _EthCrossChainManager.Contract.InitGenesisBlock(&_EthCrossChainManager.TransactOpts, rawHeader, pubKeyList) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) Pause(opts *core.TransactOpts) (*common.TxResult, error) { + return _EthCrossChainManager.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) Pause() (*common.TxResult, error) { + return _EthCrossChainManager.Contract.Pause(&_EthCrossChainManager.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) Pause() (*common.TxResult, error) { + return _EthCrossChainManager.Contract.Pause(&_EthCrossChainManager.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainManager *EthCrossChainManagerTransactor) RenounceOwnership(opts *core.TransactOpts) (*common.TxResult, error) { + return _EthCrossChainManager.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainManager *EthCrossChainManagerSession) RenounceOwnership() (*common.TxResult, error) { + return _EthCrossChainManager.Contract.RenounceOwnership(&_EthCrossChainManager.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) RenounceOwnership() (*common.TxResult, error) { + return _EthCrossChainManager.Contract.RenounceOwnership(&_EthCrossChainManager.TransactOpts) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) SetChainId(opts *core.TransactOpts, _newChainId uint64) (*common.TxResult, error) { + return _EthCrossChainManager.contract.Transact(opts, "setChainId", _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) SetChainId(_newChainId uint64) (*common.TxResult, error) { + return _EthCrossChainManager.Contract.SetChainId(&_EthCrossChainManager.TransactOpts, _newChainId) +} + +// SetChainId is a paid mutator transaction binding the contract method 0x6f31031d. +// +// Solidity: function setChainId(uint64 _newChainId) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) SetChainId(_newChainId uint64) (*common.TxResult, error) { + return _EthCrossChainManager.Contract.SetChainId(&_EthCrossChainManager.TransactOpts, _newChainId) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainManager *EthCrossChainManagerTransactor) TransferOwnership(opts *core.TransactOpts, newOwner common.Address) (*common.TxResult, error) { + return _EthCrossChainManager.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainManager *EthCrossChainManagerSession) TransferOwnership(newOwner common.Address) (*common.TxResult, error) { + return _EthCrossChainManager.Contract.TransferOwnership(&_EthCrossChainManager.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) TransferOwnership(newOwner common.Address) (*common.TxResult, error) { + return _EthCrossChainManager.Contract.TransferOwnership(&_EthCrossChainManager.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) Unpause(opts *core.TransactOpts) (*common.TxResult, error) { + return _EthCrossChainManager.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) Unpause() (*common.TxResult, error) { + return _EthCrossChainManager.Contract.Unpause(&_EthCrossChainManager.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) Unpause() (*common.TxResult, error) { + return _EthCrossChainManager.Contract.Unpause(&_EthCrossChainManager.TransactOpts) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address newEthCrossChainManagerAddress) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) UpgradeToNew(opts *core.TransactOpts, newEthCrossChainManagerAddress common.Address) (*common.TxResult, error) { + return _EthCrossChainManager.contract.Transact(opts, "upgradeToNew", newEthCrossChainManagerAddress) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address newEthCrossChainManagerAddress) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) UpgradeToNew(newEthCrossChainManagerAddress common.Address) (*common.TxResult, error) { + return _EthCrossChainManager.Contract.UpgradeToNew(&_EthCrossChainManager.TransactOpts, newEthCrossChainManagerAddress) +} + +// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. +// +// Solidity: function upgradeToNew(address newEthCrossChainManagerAddress) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) UpgradeToNew(newEthCrossChainManagerAddress common.Address) (*common.TxResult, error) { + return _EthCrossChainManager.Contract.UpgradeToNew(&_EthCrossChainManager.TransactOpts, newEthCrossChainManagerAddress) +} + +// VerifyHeaderAndExecuteTx is a paid mutator transaction binding the contract method 0xd450e04c. +// +// Solidity: function verifyHeaderAndExecuteTx(bytes proof, bytes rawHeader, bytes headerProof, bytes curRawHeader, bytes headerSig) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactor) VerifyHeaderAndExecuteTx(opts *core.TransactOpts, proof []byte, rawHeader []byte, headerProof []byte, curRawHeader []byte, headerSig []byte) (*common.TxResult, error) { + return _EthCrossChainManager.contract.Transact(opts, "verifyHeaderAndExecuteTx", proof, rawHeader, headerProof, curRawHeader, headerSig) +} + +// VerifyHeaderAndExecuteTx is a paid mutator transaction binding the contract method 0xd450e04c. +// +// Solidity: function verifyHeaderAndExecuteTx(bytes proof, bytes rawHeader, bytes headerProof, bytes curRawHeader, bytes headerSig) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerSession) VerifyHeaderAndExecuteTx(proof []byte, rawHeader []byte, headerProof []byte, curRawHeader []byte, headerSig []byte) (*common.TxResult, error) { + return _EthCrossChainManager.Contract.VerifyHeaderAndExecuteTx(&_EthCrossChainManager.TransactOpts, proof, rawHeader, headerProof, curRawHeader, headerSig) +} + +// VerifyHeaderAndExecuteTx is a paid mutator transaction binding the contract method 0xd450e04c. +// +// Solidity: function verifyHeaderAndExecuteTx(bytes proof, bytes rawHeader, bytes headerProof, bytes curRawHeader, bytes headerSig) returns(bool) +func (_EthCrossChainManager *EthCrossChainManagerTransactorSession) VerifyHeaderAndExecuteTx(proof []byte, rawHeader []byte, headerProof []byte, curRawHeader []byte, headerSig []byte) (*common.TxResult, error) { + return _EthCrossChainManager.Contract.VerifyHeaderAndExecuteTx(&_EthCrossChainManager.TransactOpts, proof, rawHeader, headerProof, curRawHeader, headerSig) +} + +// EthCrossChainManagerChangeBookKeeperEventIterator is returned from FilterChangeBookKeeperEvent and is used to iterate over the raw logs and unpacked data for ChangeBookKeeperEvent events raised by the EthCrossChainManager contract. +type EthCrossChainManagerChangeBookKeeperEventIterator struct { + Event *EthCrossChainManagerChangeBookKeeperEvent // Event containing the contract specifics and raw log + + contract *core.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan data.Log // Log channel receiving the found contract events + sub event.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerChangeBookKeeperEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerChangeBookKeeperEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerChangeBookKeeperEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerChangeBookKeeperEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerChangeBookKeeperEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerChangeBookKeeperEvent represents a ChangeBookKeeperEvent event raised by the EthCrossChainManager contract. +type EthCrossChainManagerChangeBookKeeperEvent struct { + Height *big.Int + RawHeader []byte + Raw data.Log // Blockchain specific contextual infos +} + +// FilterChangeBookKeeperEvent is a free log retrieval operation binding the contract event 0xe60d33488cba3977bf65766cd2f8ac9617f64bf3b3198aff6240ce5c7d43b690. +// +// Solidity: event ChangeBookKeeperEvent(uint256 height, bytes rawHeader) +// func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterChangeBookKeeperEvent(opts *core.FilterOpts) (*EthCrossChainManagerChangeBookKeeperEventIterator, error) { +// +// +// + +// logs, sub, err := _EthCrossChainManager.contract.FilterLogs(opts, "ChangeBookKeeperEvent") +// if err != nil { +// return nil, err +// } +// return &EthCrossChainManagerChangeBookKeeperEventIterator{contract: _EthCrossChainManager.contract, event: "ChangeBookKeeperEvent", logs: logs, sub: sub}, nil +// } + +// WatchChangeBookKeeperEvent is a free log subscription operation binding the contract event 0xe60d33488cba3977bf65766cd2f8ac9617f64bf3b3198aff6240ce5c7d43b690. +// +// Solidity: event ChangeBookKeeperEvent(uint256 height, bytes rawHeader) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) WatchChangeBookKeeperEvent(opts *core.WatchOpts, sink chan<- *EthCrossChainManagerChangeBookKeeperEvent) (event.Subscription, error) { + + sub, err := _EthCrossChainManager.contract.WatchLogs(opts, "ChangeBookKeeperEvent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.UnSubscribe() + for { + select { + case log := <-sub.EventMsgCh: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerChangeBookKeeperEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "ChangeBookKeeperEvent", *log); err != nil { + return err + } + event.Raw = *log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_EthCrossChainManager *EthCrossChainManagerFilterer) GetChangeBookKeeperEventPastEvent(txHash string, ContractLogs string) ([]*EthCrossChainManagerChangeBookKeeperEvent, error) { + var logRaws []*data.Log + var err error + if ContractLogs != "" { + logRaws, err = _EthCrossChainManager.contract.GetPastEventByCtrLog(ContractLogs) + } else if txHash != "" { + logRaws, err = _EthCrossChainManager.contract.GetPastEventByTxHash(txHash) + } else { + return nil, errors.New("both txHash or ContractLogs is not provided for param") + } + + if err != nil { + return nil, err + } + var events []*EthCrossChainManagerChangeBookKeeperEvent + for _, logRaw := range logRaws { + event, err := _EthCrossChainManager.ParseChangeBookKeeperEvent(*logRaw) + if err != nil && err.Error() != "event signature mismatch" { + return nil, err + } + if event != nil { + events = append(events, event) + } + } + return events, nil +} + +// ParseChangeBookKeeperEvent is a log parse operation binding the contract event 0xe60d33488cba3977bf65766cd2f8ac9617f64bf3b3198aff6240ce5c7d43b690. +// +// Solidity: event ChangeBookKeeperEvent(uint256 height, bytes rawHeader) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseChangeBookKeeperEvent(log data.Log) (*EthCrossChainManagerChangeBookKeeperEvent, error) { + event := new(EthCrossChainManagerChangeBookKeeperEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "ChangeBookKeeperEvent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EthCrossChainManagerCrossChainEventIterator is returned from FilterCrossChainEvent and is used to iterate over the raw logs and unpacked data for CrossChainEvent events raised by the EthCrossChainManager contract. +type EthCrossChainManagerCrossChainEventIterator struct { + Event *EthCrossChainManagerCrossChainEvent // Event containing the contract specifics and raw log + + contract *core.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan data.Log // Log channel receiving the found contract events + sub event.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerCrossChainEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerCrossChainEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerCrossChainEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerCrossChainEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerCrossChainEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerCrossChainEvent represents a CrossChainEvent event raised by the EthCrossChainManager contract. +type EthCrossChainManagerCrossChainEvent struct { + Sender common.Address + TxId []byte + ProxyOrAssetContract common.Address + ToChainId uint64 + ToContract []byte + Rawdata []byte + Raw data.Log // Blockchain specific contextual infos +} + +// FilterCrossChainEvent is a free log retrieval operation binding the contract event 0x6ad3bf15c1988bc04bc153490cab16db8efb9a3990215bf1c64ea6e28be88483. +// +// Solidity: event CrossChainEvent(address indexed sender, bytes txId, address proxyOrAssetContract, uint64 toChainId, bytes toContract, bytes rawdata) +// func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterCrossChainEvent(opts *core.FilterOpts, sender []common.Address) (*EthCrossChainManagerCrossChainEventIterator, error) { +// +// var senderRule []interface{} +// for _, senderItem := range sender { +// senderRule = append(senderRule, senderItem) +// } +// +// +// +// +// + +// logs, sub, err := _EthCrossChainManager.contract.FilterLogs(opts, "CrossChainEvent", senderRule) +// if err != nil { +// return nil, err +// } +// return &EthCrossChainManagerCrossChainEventIterator{contract: _EthCrossChainManager.contract, event: "CrossChainEvent", logs: logs, sub: sub}, nil +// } + +// WatchCrossChainEvent is a free log subscription operation binding the contract event 0x6ad3bf15c1988bc04bc153490cab16db8efb9a3990215bf1c64ea6e28be88483. +// +// Solidity: event CrossChainEvent(address indexed sender, bytes txId, address proxyOrAssetContract, uint64 toChainId, bytes toContract, bytes rawdata) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) WatchCrossChainEvent(opts *core.WatchOpts, sink chan<- *EthCrossChainManagerCrossChainEvent, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + sub, err := _EthCrossChainManager.contract.WatchLogs(opts, "CrossChainEvent", senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.UnSubscribe() + for { + select { + case log := <-sub.EventMsgCh: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerCrossChainEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "CrossChainEvent", *log); err != nil { + return err + } + event.Raw = *log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_EthCrossChainManager *EthCrossChainManagerFilterer) GetCrossChainEventPastEvent(txHash string, ContractLogs string) ([]*EthCrossChainManagerCrossChainEvent, error) { + var logRaws []*data.Log + var err error + if ContractLogs != "" { + logRaws, err = _EthCrossChainManager.contract.GetPastEventByCtrLog(ContractLogs) + } else if txHash != "" { + logRaws, err = _EthCrossChainManager.contract.GetPastEventByTxHash(txHash) + } else { + return nil, errors.New("both txHash or ContractLogs is not provided for param") + } + + if err != nil { + return nil, err + } + var events []*EthCrossChainManagerCrossChainEvent + for _, logRaw := range logRaws { + event, err := _EthCrossChainManager.ParseCrossChainEvent(*logRaw) + if err != nil && err.Error() != "event signature mismatch" { + return nil, err + } + if event != nil { + events = append(events, event) + } + } + return events, nil +} + +// ParseCrossChainEvent is a log parse operation binding the contract event 0x6ad3bf15c1988bc04bc153490cab16db8efb9a3990215bf1c64ea6e28be88483. +// +// Solidity: event CrossChainEvent(address indexed sender, bytes txId, address proxyOrAssetContract, uint64 toChainId, bytes toContract, bytes rawdata) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseCrossChainEvent(log data.Log) (*EthCrossChainManagerCrossChainEvent, error) { + event := new(EthCrossChainManagerCrossChainEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "CrossChainEvent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EthCrossChainManagerInitGenesisBlockEventIterator is returned from FilterInitGenesisBlockEvent and is used to iterate over the raw logs and unpacked data for InitGenesisBlockEvent events raised by the EthCrossChainManager contract. +type EthCrossChainManagerInitGenesisBlockEventIterator struct { + Event *EthCrossChainManagerInitGenesisBlockEvent // Event containing the contract specifics and raw log + + contract *core.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan data.Log // Log channel receiving the found contract events + sub event.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerInitGenesisBlockEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerInitGenesisBlockEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerInitGenesisBlockEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerInitGenesisBlockEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerInitGenesisBlockEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerInitGenesisBlockEvent represents a InitGenesisBlockEvent event raised by the EthCrossChainManager contract. +type EthCrossChainManagerInitGenesisBlockEvent struct { + Height *big.Int + RawHeader []byte + Raw data.Log // Blockchain specific contextual infos +} + +// FilterInitGenesisBlockEvent is a free log retrieval operation binding the contract event 0xf01968fc3a2655cf1b5144cb32de6dc898f91b9239c103744e8457152ab2fbde. +// +// Solidity: event InitGenesisBlockEvent(uint256 height, bytes rawHeader) +// func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterInitGenesisBlockEvent(opts *core.FilterOpts) (*EthCrossChainManagerInitGenesisBlockEventIterator, error) { +// +// +// + +// logs, sub, err := _EthCrossChainManager.contract.FilterLogs(opts, "InitGenesisBlockEvent") +// if err != nil { +// return nil, err +// } +// return &EthCrossChainManagerInitGenesisBlockEventIterator{contract: _EthCrossChainManager.contract, event: "InitGenesisBlockEvent", logs: logs, sub: sub}, nil +// } + +// WatchInitGenesisBlockEvent is a free log subscription operation binding the contract event 0xf01968fc3a2655cf1b5144cb32de6dc898f91b9239c103744e8457152ab2fbde. +// +// Solidity: event InitGenesisBlockEvent(uint256 height, bytes rawHeader) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) WatchInitGenesisBlockEvent(opts *core.WatchOpts, sink chan<- *EthCrossChainManagerInitGenesisBlockEvent) (event.Subscription, error) { + + sub, err := _EthCrossChainManager.contract.WatchLogs(opts, "InitGenesisBlockEvent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.UnSubscribe() + for { + select { + case log := <-sub.EventMsgCh: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerInitGenesisBlockEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "InitGenesisBlockEvent", *log); err != nil { + return err + } + event.Raw = *log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_EthCrossChainManager *EthCrossChainManagerFilterer) GetInitGenesisBlockEventPastEvent(txHash string, ContractLogs string) ([]*EthCrossChainManagerInitGenesisBlockEvent, error) { + var logRaws []*data.Log + var err error + if ContractLogs != "" { + logRaws, err = _EthCrossChainManager.contract.GetPastEventByCtrLog(ContractLogs) + } else if txHash != "" { + logRaws, err = _EthCrossChainManager.contract.GetPastEventByTxHash(txHash) + } else { + return nil, errors.New("both txHash or ContractLogs is not provided for param") + } + + if err != nil { + return nil, err + } + var events []*EthCrossChainManagerInitGenesisBlockEvent + for _, logRaw := range logRaws { + event, err := _EthCrossChainManager.ParseInitGenesisBlockEvent(*logRaw) + if err != nil && err.Error() != "event signature mismatch" { + return nil, err + } + if event != nil { + events = append(events, event) + } + } + return events, nil +} + +// ParseInitGenesisBlockEvent is a log parse operation binding the contract event 0xf01968fc3a2655cf1b5144cb32de6dc898f91b9239c103744e8457152ab2fbde. +// +// Solidity: event InitGenesisBlockEvent(uint256 height, bytes rawHeader) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseInitGenesisBlockEvent(log data.Log) (*EthCrossChainManagerInitGenesisBlockEvent, error) { + event := new(EthCrossChainManagerInitGenesisBlockEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "InitGenesisBlockEvent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EthCrossChainManagerOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the EthCrossChainManager contract. +type EthCrossChainManagerOwnershipTransferredIterator struct { + Event *EthCrossChainManagerOwnershipTransferred // Event containing the contract specifics and raw log + + contract *core.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan data.Log // Log channel receiving the found contract events + sub event.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerOwnershipTransferred represents a OwnershipTransferred event raised by the EthCrossChainManager contract. +type EthCrossChainManagerOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw data.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +// func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterOwnershipTransferred(opts *core.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*EthCrossChainManagerOwnershipTransferredIterator, error) { +// +// var previousOwnerRule []interface{} +// for _, previousOwnerItem := range previousOwner { +// previousOwnerRule = append(previousOwnerRule, previousOwnerItem) +// } +// var newOwnerRule []interface{} +// for _, newOwnerItem := range newOwner { +// newOwnerRule = append(newOwnerRule, newOwnerItem) +// } + +// logs, sub, err := _EthCrossChainManager.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) +// if err != nil { +// return nil, err +// } +// return &EthCrossChainManagerOwnershipTransferredIterator{contract: _EthCrossChainManager.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +// } + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) WatchOwnershipTransferred(opts *core.WatchOpts, sink chan<- *EthCrossChainManagerOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + sub, err := _EthCrossChainManager.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.UnSubscribe() + for { + select { + case log := <-sub.EventMsgCh: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerOwnershipTransferred) + if err := _EthCrossChainManager.contract.UnpackLog(event, "OwnershipTransferred", *log); err != nil { + return err + } + event.Raw = *log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_EthCrossChainManager *EthCrossChainManagerFilterer) GetOwnershipTransferredPastEvent(txHash string, ContractLogs string) ([]*EthCrossChainManagerOwnershipTransferred, error) { + var logRaws []*data.Log + var err error + if ContractLogs != "" { + logRaws, err = _EthCrossChainManager.contract.GetPastEventByCtrLog(ContractLogs) + } else if txHash != "" { + logRaws, err = _EthCrossChainManager.contract.GetPastEventByTxHash(txHash) + } else { + return nil, errors.New("both txHash or ContractLogs is not provided for param") + } + + if err != nil { + return nil, err + } + var events []*EthCrossChainManagerOwnershipTransferred + for _, logRaw := range logRaws { + event, err := _EthCrossChainManager.ParseOwnershipTransferred(*logRaw) + if err != nil && err.Error() != "event signature mismatch" { + return nil, err + } + if event != nil { + events = append(events, event) + } + } + return events, nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseOwnershipTransferred(log data.Log) (*EthCrossChainManagerOwnershipTransferred, error) { + event := new(EthCrossChainManagerOwnershipTransferred) + if err := _EthCrossChainManager.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EthCrossChainManagerPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the EthCrossChainManager contract. +type EthCrossChainManagerPausedIterator struct { + Event *EthCrossChainManagerPaused // Event containing the contract specifics and raw log + + contract *core.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan data.Log // Log channel receiving the found contract events + sub event.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerPausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerPaused represents a Paused event raised by the EthCrossChainManager contract. +type EthCrossChainManagerPaused struct { + Account common.Address + Raw data.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +// func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterPaused(opts *core.FilterOpts) (*EthCrossChainManagerPausedIterator, error) { +// +// + +// logs, sub, err := _EthCrossChainManager.contract.FilterLogs(opts, "Paused") +// if err != nil { +// return nil, err +// } +// return &EthCrossChainManagerPausedIterator{contract: _EthCrossChainManager.contract, event: "Paused", logs: logs, sub: sub}, nil +// } + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) WatchPaused(opts *core.WatchOpts, sink chan<- *EthCrossChainManagerPaused) (event.Subscription, error) { + + sub, err := _EthCrossChainManager.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.UnSubscribe() + for { + select { + case log := <-sub.EventMsgCh: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerPaused) + if err := _EthCrossChainManager.contract.UnpackLog(event, "Paused", *log); err != nil { + return err + } + event.Raw = *log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_EthCrossChainManager *EthCrossChainManagerFilterer) GetPausedPastEvent(txHash string, ContractLogs string) ([]*EthCrossChainManagerPaused, error) { + var logRaws []*data.Log + var err error + if ContractLogs != "" { + logRaws, err = _EthCrossChainManager.contract.GetPastEventByCtrLog(ContractLogs) + } else if txHash != "" { + logRaws, err = _EthCrossChainManager.contract.GetPastEventByTxHash(txHash) + } else { + return nil, errors.New("both txHash or ContractLogs is not provided for param") + } + + if err != nil { + return nil, err + } + var events []*EthCrossChainManagerPaused + for _, logRaw := range logRaws { + event, err := _EthCrossChainManager.ParsePaused(*logRaw) + if err != nil && err.Error() != "event signature mismatch" { + return nil, err + } + if event != nil { + events = append(events, event) + } + } + return events, nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParsePaused(log data.Log) (*EthCrossChainManagerPaused, error) { + event := new(EthCrossChainManagerPaused) + if err := _EthCrossChainManager.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EthCrossChainManagerUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the EthCrossChainManager contract. +type EthCrossChainManagerUnpausedIterator struct { + Event *EthCrossChainManagerUnpaused // Event containing the contract specifics and raw log + + contract *core.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan data.Log // Log channel receiving the found contract events + sub event.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerUnpaused represents a Unpaused event raised by the EthCrossChainManager contract. +type EthCrossChainManagerUnpaused struct { + Account common.Address + Raw data.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +// func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterUnpaused(opts *core.FilterOpts) (*EthCrossChainManagerUnpausedIterator, error) { +// +// + +// logs, sub, err := _EthCrossChainManager.contract.FilterLogs(opts, "Unpaused") +// if err != nil { +// return nil, err +// } +// return &EthCrossChainManagerUnpausedIterator{contract: _EthCrossChainManager.contract, event: "Unpaused", logs: logs, sub: sub}, nil +// } + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) WatchUnpaused(opts *core.WatchOpts, sink chan<- *EthCrossChainManagerUnpaused) (event.Subscription, error) { + + sub, err := _EthCrossChainManager.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.UnSubscribe() + for { + select { + case log := <-sub.EventMsgCh: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerUnpaused) + if err := _EthCrossChainManager.contract.UnpackLog(event, "Unpaused", *log); err != nil { + return err + } + event.Raw = *log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_EthCrossChainManager *EthCrossChainManagerFilterer) GetUnpausedPastEvent(txHash string, ContractLogs string) ([]*EthCrossChainManagerUnpaused, error) { + var logRaws []*data.Log + var err error + if ContractLogs != "" { + logRaws, err = _EthCrossChainManager.contract.GetPastEventByCtrLog(ContractLogs) + } else if txHash != "" { + logRaws, err = _EthCrossChainManager.contract.GetPastEventByTxHash(txHash) + } else { + return nil, errors.New("both txHash or ContractLogs is not provided for param") + } + + if err != nil { + return nil, err + } + var events []*EthCrossChainManagerUnpaused + for _, logRaw := range logRaws { + event, err := _EthCrossChainManager.ParseUnpaused(*logRaw) + if err != nil && err.Error() != "event signature mismatch" { + return nil, err + } + if event != nil { + events = append(events, event) + } + } + return events, nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseUnpaused(log data.Log) (*EthCrossChainManagerUnpaused, error) { + event := new(EthCrossChainManagerUnpaused) + if err := _EthCrossChainManager.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EthCrossChainManagerVerifyHeaderAndExecuteTxEventIterator is returned from FilterVerifyHeaderAndExecuteTxEvent and is used to iterate over the raw logs and unpacked data for VerifyHeaderAndExecuteTxEvent events raised by the EthCrossChainManager contract. +type EthCrossChainManagerVerifyHeaderAndExecuteTxEventIterator struct { + Event *EthCrossChainManagerVerifyHeaderAndExecuteTxEvent // Event containing the contract specifics and raw log + + contract *core.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan data.Log // Log channel receiving the found contract events + sub event.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EthCrossChainManagerVerifyHeaderAndExecuteTxEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerVerifyHeaderAndExecuteTxEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EthCrossChainManagerVerifyHeaderAndExecuteTxEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EthCrossChainManagerVerifyHeaderAndExecuteTxEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EthCrossChainManagerVerifyHeaderAndExecuteTxEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EthCrossChainManagerVerifyHeaderAndExecuteTxEvent represents a VerifyHeaderAndExecuteTxEvent event raised by the EthCrossChainManager contract. +type EthCrossChainManagerVerifyHeaderAndExecuteTxEvent struct { + FromChainID uint64 + ToContract []byte + CrossChainTxHash []byte + FromChainTxHash []byte + Raw data.Log // Blockchain specific contextual infos +} + +// FilterVerifyHeaderAndExecuteTxEvent is a free log retrieval operation binding the contract event 0x8a4a2663ce60ce4955c595da2894de0415240f1ace024cfbff85f513b656bdae. +// +// Solidity: event VerifyHeaderAndExecuteTxEvent(uint64 fromChainID, bytes toContract, bytes crossChainTxHash, bytes fromChainTxHash) +// func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterVerifyHeaderAndExecuteTxEvent(opts *core.FilterOpts) (*EthCrossChainManagerVerifyHeaderAndExecuteTxEventIterator, error) { +// +// +// +// +// + +// logs, sub, err := _EthCrossChainManager.contract.FilterLogs(opts, "VerifyHeaderAndExecuteTxEvent") +// if err != nil { +// return nil, err +// } +// return &EthCrossChainManagerVerifyHeaderAndExecuteTxEventIterator{contract: _EthCrossChainManager.contract, event: "VerifyHeaderAndExecuteTxEvent", logs: logs, sub: sub}, nil +// } + +// WatchVerifyHeaderAndExecuteTxEvent is a free log subscription operation binding the contract event 0x8a4a2663ce60ce4955c595da2894de0415240f1ace024cfbff85f513b656bdae. +// +// Solidity: event VerifyHeaderAndExecuteTxEvent(uint64 fromChainID, bytes toContract, bytes crossChainTxHash, bytes fromChainTxHash) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) WatchVerifyHeaderAndExecuteTxEvent(opts *core.WatchOpts, sink chan<- *EthCrossChainManagerVerifyHeaderAndExecuteTxEvent) (event.Subscription, error) { + + sub, err := _EthCrossChainManager.contract.WatchLogs(opts, "VerifyHeaderAndExecuteTxEvent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.UnSubscribe() + for { + select { + case log := <-sub.EventMsgCh: + // New log arrived, parse the event and forward to the user + event := new(EthCrossChainManagerVerifyHeaderAndExecuteTxEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "VerifyHeaderAndExecuteTxEvent", *log); err != nil { + return err + } + event.Raw = *log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_EthCrossChainManager *EthCrossChainManagerFilterer) GetVerifyHeaderAndExecuteTxEventPastEvent(txHash string, ContractLogs string) ([]*EthCrossChainManagerVerifyHeaderAndExecuteTxEvent, error) { + var logRaws []*data.Log + var err error + if ContractLogs != "" { + logRaws, err = _EthCrossChainManager.contract.GetPastEventByCtrLog(ContractLogs) + } else if txHash != "" { + logRaws, err = _EthCrossChainManager.contract.GetPastEventByTxHash(txHash) + } else { + return nil, errors.New("both txHash or ContractLogs is not provided for param") + } + + if err != nil { + return nil, err + } + var events []*EthCrossChainManagerVerifyHeaderAndExecuteTxEvent + for _, logRaw := range logRaws { + event, err := _EthCrossChainManager.ParseVerifyHeaderAndExecuteTxEvent(*logRaw) + if err != nil && err.Error() != "event signature mismatch" { + return nil, err + } + if event != nil { + events = append(events, event) + } + } + return events, nil +} + +// ParseVerifyHeaderAndExecuteTxEvent is a log parse operation binding the contract event 0x8a4a2663ce60ce4955c595da2894de0415240f1ace024cfbff85f513b656bdae. +// +// Solidity: event VerifyHeaderAndExecuteTxEvent(uint64 fromChainID, bytes toContract, bytes crossChainTxHash, bytes fromChainTxHash) +func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseVerifyHeaderAndExecuteTxEvent(log data.Log) (*EthCrossChainManagerVerifyHeaderAndExecuteTxEvent, error) { + event := new(EthCrossChainManagerVerifyHeaderAndExecuteTxEvent) + if err := _EthCrossChainManager.contract.UnpackLog(event, "VerifyHeaderAndExecuteTxEvent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/chains/chainsql/eccmp_abi/eccmp_abi.go b/chains/chainsql/eccmp_abi/eccmp_abi.go new file mode 100644 index 0000000..8dd80e0 --- /dev/null +++ b/chains/chainsql/eccmp_abi/eccmp_abi.go @@ -0,0 +1,997 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package eccmp_abi + +import ( + "errors" + "math/big" + "strings" + + "github.com/ChainSQL/go-chainsql-api/abigen/abi" + "github.com/ChainSQL/go-chainsql-api/abigen/abi/bind" + "github.com/ChainSQL/go-chainsql-api/common" + "github.com/ChainSQL/go-chainsql-api/core" + "github.com/ChainSQL/go-chainsql-api/data" + "github.com/ChainSQL/go-chainsql-api/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = bind.Bind + _ = common.Big1 +) + +// EccmpAbiMetaData contains all meta data concerning the EccmpAbi contract. +var EccmpAbiMetaData = &core.CtrMetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ethCrossChainManagerAddr\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_newChainId\",\"type\":\"uint64\"}],\"name\":\"changeManagerChainID\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getEthCrossChainManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pauseEthCrossChainManager\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpauseEthCrossChainManager\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newEthCrossChainManagerAddr\",\"type\":\"address\"}],\"name\":\"upgradeEthCrossChainManager\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50604051611ad1380380611ad18339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600061005461015360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35060008060146101000a81548160ff02191690831515021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061015b565b600033905090565b6119678061016a6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806387939a7f1161007157806387939a7f1461016d5780638da5cb5b146101b75780638f32d59b14610201578063a2681d2814610223578063ab59d32d1461025b578063f2fde38b146102b7576100b4565b80633b9a80b8146100b95780633f4ba83a146100db5780634390c707146100fd5780635c975abb1461011f578063715018a6146101415780638456cb591461014b575b600080fd5b6100c16102fb565b604051808215151515815260200191505060405180910390f35b6100e361055a565b604051808215151515815260200191505060405180910390f35b6101056105fb565b604051808215151515815260200191505060405180910390f35b610127610859565b604051808215151515815260200191505060405180910390f35b61014961086f565b005b6101536109a8565b604051808215151515815260200191505060405180910390f35b610175610a4a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101bf610af6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610209610b1f565b604051808215151515815260200191505060405180910390f35b6102596004803603602081101561023957600080fd5b81019080803567ffffffffffffffff169060200190929190505050610b7d565b005b61029d6004803603602081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f16565b604051808215151515815260200191505060405180910390f35b6102f9600480360360208110156102cd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113cb565b005b6000610305610b1f565b610377576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600060149054906101000a900460ff16156103fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506104296109a8565b61047e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603081526020018061187c6030913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156104c657600080fd5b505af11580156104da573d6000803e3d6000fd5b505050506040513d60208110156104f057600080fd5b8101908080519060200190929190505050610556576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180611908602b913960400191505060405180910390fd5b5090565b6000610564610b1f565b6105d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6105de610859565b6105eb57600190506105f8565b6105f3611451565b600190505b90565b6000610605610b1f565b610677576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600060149054906101000a900460ff166106f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16633f4ba83a6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561076857600080fd5b505af115801561077c573d6000803e3d6000fd5b505050506040513d602081101561079257600080fd5b81019080805190602001909291905050506107f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d8152602001806118db602d913960400191505060405180910390fd5b61080061055a565b610855576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603281526020018061184a6032913960400191505060405180910390fd5b5090565b60008060149054906101000a900460ff16905090565b610877610b1f565b6108e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006109b2610b1f565b610a24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610a2c610859565b15610a3a5760019050610a47565b610a42611559565b600190505b90565b60008060149054906101000a900460ff1615610ace576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b61611663565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b610b85610b1f565b610bf7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600060149054906101000a900460ff16610c79576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ce657600080fd5b505afa158015610cfa573d6000803e3d6000fd5b505050506040513d6020811015610d1057600080fd5b8101908080519060200190929190505050610dfe578073ffffffffffffffffffffffffffffffffffffffff16638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610d6d57600080fd5b505af1158015610d81573d6000803e3d6000fd5b505050506040513d6020811015610d9757600080fd5b8101908080519060200190929190505050610dfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806118ac602f913960400191505060405180910390fd5b5b8073ffffffffffffffffffffffffffffffffffffffff16636f31031d836040518263ffffffff1660e01b8152600401808267ffffffffffffffff1667ffffffffffffffff168152602001915050602060405180830381600087803b158015610e6557600080fd5b505af1158015610e79573d6000803e3d6000fd5b505050506040513d6020811015610e8f57600080fd5b8101908080519060200190929190505050610f12576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f73657420636861696e204944206661696c65642e20000000000000000000000081525060200191505060405180910390fd5b5050565b6000610f20610b1f565b610f92576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600060149054906101000a900460ff16611014576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561108157600080fd5b505afa158015611095573d6000803e3d6000fd5b505050506040513d60208110156110ab57600080fd5b8101908080519060200190929190505050611199578073ffffffffffffffffffffffffffffffffffffffff16638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561110857600080fd5b505af115801561111c573d6000803e3d6000fd5b505050506040513d602081101561113257600080fd5b8101908080519060200190929190505050611198576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806118ac602f913960400191505060405180910390fd5b5b8073ffffffffffffffffffffffffffffffffffffffff16637e724ff3846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561121857600080fd5b505af115801561122c573d6000803e3d6000fd5b505050506040513d602081101561124257600080fd5b81019080805190602001909291905050506112a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806117fb6029913960400191505060405180910390fd5b60008390508073ffffffffffffffffffffffffffffffffffffffff16638f32d59b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112f357600080fd5b505afa158015611307573d6000803e3d6000fd5b505050506040513d602081101561131d57600080fd5b8101908080519060200190929190505050611383576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604b8152602001806117b0604b913960600191505060405180910390fd5b83600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050919050565b6113d3610b1f565b611445576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61144e8161166b565b50565b600060149054906101000a900460ff166114d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611516611663565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600060149054906101000a900460ff16156115dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611620611663565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156116f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806118246026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fe45746843726f7373436861696e4d616e6167657250726f7879206973206e6f74206f776e6572206f66206e65772045746843726f7373436861696e4d616e6167657220636f6e747261637445746843726f7373436861696e4d616e616765722075706772616465546f4e6577206661696c6564214f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373756e70617573652045746843726f7373436861696e4d616e6167657250726f787920636f6e7472616374206661696c65642170617573652045746843726f7373436861696e4d616e6167657250726f787920636f6e7472616374206661696c6564215061757365206f6c642045746843726f7373436861696e4d616e6167657220636f6e7472616374206661696c656421756e70617573652045746843726f7373436861696e4d616e6167657220636f6e7472616374206661696c65642170617573652045746843726f7373436861696e4d616e6167657220636f6e7472616374206661696c656421a265627a7a72315820aa267dcfec48b655967c266b94d6d3439b90dac9b6d4cf4debfbad1510c641b264736f6c63430005100032", +} + +// EccmpAbiABI is the input ABI used to generate the binding from. +// Deprecated: Use EccmpAbiMetaData.ABI instead. +var EccmpAbiABI = EccmpAbiMetaData.ABI + +// EccmpAbiBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use EccmpAbiMetaData.Bin instead. +var EccmpAbiBin = EccmpAbiMetaData.Bin + +// DeployEccmpAbi deploys a new ChainSQL contract, binding an instance of EccmpAbi to it. +func DeployEccmpAbi(chainsql *core.Chainsql, auth *core.TransactOpts, _ethCrossChainManagerAddr common.Address) (*core.DeployTxRet, *EccmpAbi, error) { + parsed, err := EccmpAbiMetaData.GetAbi() + if err != nil { + return &core.DeployTxRet{}, nil, err + } + if parsed == nil { + return &core.DeployTxRet{}, nil, errors.New("GetABI returned nil") + } + + deployRet, contract, err := core.DeployContract(chainsql, auth, *parsed, common.FromHex(EccmpAbiBin), _ethCrossChainManagerAddr) + if err != nil { + return &core.DeployTxRet{}, nil, err + } + return deployRet, &EccmpAbi{EccmpAbiCaller: EccmpAbiCaller{contract: contract}, EccmpAbiTransactor: EccmpAbiTransactor{contract: contract}, EccmpAbiFilterer: EccmpAbiFilterer{contract: contract}}, nil +} + +// EccmpAbi is an auto generated Go binding around an ChainSQL contract. +type EccmpAbi struct { + EccmpAbiCaller // Read-only binding to the contract + EccmpAbiTransactor // Write-only binding to the contract + EccmpAbiFilterer // Log filterer for contract events +} + +// EccmpAbiCaller is an auto generated read-only Go binding around an ChainSQL contract. +type EccmpAbiCaller struct { + contract *core.BoundContract // Generic contract wrapper for the low level calls +} + +// EccmpAbiTransactor is an auto generated write-only Go binding around an ChainSQL contract. +type EccmpAbiTransactor struct { + contract *core.BoundContract // Generic contract wrapper for the low level calls +} + +// EccmpAbiFilterer is an auto generated log filtering Go binding around an ChainSQL contract events. +type EccmpAbiFilterer struct { + contract *core.BoundContract // Generic contract wrapper for the low level calls +} + +// EccmpAbiSession is an auto generated Go binding around an ChainSQL contract, +// with pre-set call and transact options. +type EccmpAbiSession struct { + Contract *EccmpAbi // Generic contract binding to set the session for + CallOpts core.CallOpts // Call options to use throughout this session + TransactOpts core.TransactOpts // Transaction auth options to use throughout this session +} + +// EccmpAbiCallerSession is an auto generated read-only Go binding around an ChainSQL contract, +// with pre-set call options. +type EccmpAbiCallerSession struct { + Contract *EccmpAbiCaller // Generic contract caller binding to set the session for + CallOpts core.CallOpts // Call options to use throughout this session +} + +// EccmpAbiTransactorSession is an auto generated write-only Go binding around an ChainSQL contract, +// with pre-set transact options. +type EccmpAbiTransactorSession struct { + Contract *EccmpAbiTransactor // Generic contract transactor binding to set the session for + TransactOpts core.TransactOpts // Transaction auth options to use throughout this session +} + +// EccmpAbiRaw is an auto generated low-level Go binding around an ChainSQL contract. +type EccmpAbiRaw struct { + Contract *EccmpAbi // Generic contract binding to access the raw methods on +} + +// EccmpAbiCallerRaw is an auto generated low-level read-only Go binding around an ChainSQL contract. +type EccmpAbiCallerRaw struct { + Contract *EccmpAbiCaller // Generic read-only contract binding to access the raw methods on +} + +// EccmpAbiTransactorRaw is an auto generated low-level write-only Go binding around an ChainSQL contract. +type EccmpAbiTransactorRaw struct { + Contract *EccmpAbiTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewEccmpAbi creates a new instance of EccmpAbi, bound to a specific deployed contract. +func NewEccmpAbi(chainsql *core.Chainsql, address string) (*EccmpAbi, error) { + contract, err := bindEccmpAbi(chainsql, address) + if err != nil { + return nil, err + } + return &EccmpAbi{EccmpAbiCaller: EccmpAbiCaller{contract: contract}, EccmpAbiTransactor: EccmpAbiTransactor{contract: contract}, EccmpAbiFilterer: EccmpAbiFilterer{contract: contract}}, nil +} + +// // NewEccmpAbiCaller creates a new read-only instance of EccmpAbi, bound to a specific deployed contract. +// func NewEccmpAbiCaller(address common.Address, caller bind.ContractCaller) (*EccmpAbiCaller, error) { +// contract, err := bindEccmpAbi(address, caller, nil, nil) +// if err != nil { +// return nil, err +// } +// return &EccmpAbiCaller{contract: contract}, nil +// } + +// // NewEccmpAbiTransactor creates a new write-only instance of EccmpAbi, bound to a specific deployed contract. +// func NewEccmpAbiTransactor(address common.Address, transactor bind.ContractTransactor) (*EccmpAbiTransactor, error) { +// contract, err := bindEccmpAbi(address, nil, transactor, nil) +// if err != nil { +// return nil, err +// } +// return &EccmpAbiTransactor{contract: contract}, nil +// } + +// // NewEccmpAbiFilterer creates a new log filterer instance of EccmpAbi, bound to a specific deployed contract. +// func NewEccmpAbiFilterer(address common.Address, filterer bind.ContractFilterer) (*EccmpAbiFilterer, error) { +// contract, err := bindEccmpAbi(address, nil, nil, filterer) +// if err != nil { +// return nil, err +// } +// return &EccmpAbiFilterer{contract: contract}, nil +// } + +// bindEccmpAbi binds a generic wrapper to an already deployed contract. +func bindEccmpAbi(chainsql *core.Chainsql, address string) (*core.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(EccmpAbiABI)) + if err != nil { + return nil, err + } + return core.NewBoundContract(chainsql, address, parsed), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +// func (_EccmpAbi *EccmpAbiRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { +// return _EccmpAbi.Contract.EccmpAbiCaller.contract.Call(opts, result, method, params...) +// } + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +// func (_EccmpAbi *EccmpAbiRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { +// return _EccmpAbi.Contract.EccmpAbiTransactor.contract.Transfer(opts) +// } + +// Transact invokes the (paid) contract method with params as input values. +// func (_EccmpAbi *EccmpAbiRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { +// return _EccmpAbi.Contract.EccmpAbiTransactor.contract.Transact(opts, method, params...) +// } + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +// func (_EccmpAbi *EccmpAbiCallerRaw) Call(opts *core.CallOpts, result *[]interface{}, method string, params ...interface{}) error { +// return _EccmpAbi.Contract.contract.Call(opts, result, method, params...) +// } + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +// func (_EccmpAbi *EccmpAbiTransactorRaw) Transfer(opts *core.TransactOpts) (*types.Transaction, error) { +// return _EccmpAbi.Contract.contract.Transfer(opts) +// } + +// Transact invokes the (paid) contract method with params as input values. +// func (_EccmpAbi *EccmpAbiTransactorRaw) Transact(opts *core.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { +// return _EccmpAbi.Contract.contract.Transact(opts, method, params...) +// } + +// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. +// +// Solidity: function getEthCrossChainManager() view returns(address) +func (_EccmpAbi *EccmpAbiCaller) GetEthCrossChainManager(opts *core.CallOpts) (common.Address, error) { + var out []interface{} + err := _EccmpAbi.contract.Call(opts, &out, "getEthCrossChainManager") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. +// +// Solidity: function getEthCrossChainManager() view returns(address) +func (_EccmpAbi *EccmpAbiSession) GetEthCrossChainManager() (common.Address, error) { + return _EccmpAbi.Contract.GetEthCrossChainManager(&_EccmpAbi.CallOpts) +} + +// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. +// +// Solidity: function getEthCrossChainManager() view returns(address) +func (_EccmpAbi *EccmpAbiCallerSession) GetEthCrossChainManager() (common.Address, error) { + return _EccmpAbi.Contract.GetEthCrossChainManager(&_EccmpAbi.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EccmpAbi *EccmpAbiCaller) IsOwner(opts *core.CallOpts) (bool, error) { + var out []interface{} + err := _EccmpAbi.contract.Call(opts, &out, "isOwner") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EccmpAbi *EccmpAbiSession) IsOwner() (bool, error) { + return _EccmpAbi.Contract.IsOwner(&_EccmpAbi.CallOpts) +} + +// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. +// +// Solidity: function isOwner() view returns(bool) +func (_EccmpAbi *EccmpAbiCallerSession) IsOwner() (bool, error) { + return _EccmpAbi.Contract.IsOwner(&_EccmpAbi.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EccmpAbi *EccmpAbiCaller) Owner(opts *core.CallOpts) (common.Address, error) { + var out []interface{} + err := _EccmpAbi.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EccmpAbi *EccmpAbiSession) Owner() (common.Address, error) { + return _EccmpAbi.Contract.Owner(&_EccmpAbi.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_EccmpAbi *EccmpAbiCallerSession) Owner() (common.Address, error) { + return _EccmpAbi.Contract.Owner(&_EccmpAbi.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EccmpAbi *EccmpAbiCaller) Paused(opts *core.CallOpts) (bool, error) { + var out []interface{} + err := _EccmpAbi.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EccmpAbi *EccmpAbiSession) Paused() (bool, error) { + return _EccmpAbi.Contract.Paused(&_EccmpAbi.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_EccmpAbi *EccmpAbiCallerSession) Paused() (bool, error) { + return _EccmpAbi.Contract.Paused(&_EccmpAbi.CallOpts) +} + +// ChangeManagerChainID is a paid mutator transaction binding the contract method 0xa2681d28. +// +// Solidity: function changeManagerChainID(uint64 _newChainId) returns() +func (_EccmpAbi *EccmpAbiTransactor) ChangeManagerChainID(opts *core.TransactOpts, _newChainId uint64) (*common.TxResult, error) { + return _EccmpAbi.contract.Transact(opts, "changeManagerChainID", _newChainId) +} + +// ChangeManagerChainID is a paid mutator transaction binding the contract method 0xa2681d28. +// +// Solidity: function changeManagerChainID(uint64 _newChainId) returns() +func (_EccmpAbi *EccmpAbiSession) ChangeManagerChainID(_newChainId uint64) (*common.TxResult, error) { + return _EccmpAbi.Contract.ChangeManagerChainID(&_EccmpAbi.TransactOpts, _newChainId) +} + +// ChangeManagerChainID is a paid mutator transaction binding the contract method 0xa2681d28. +// +// Solidity: function changeManagerChainID(uint64 _newChainId) returns() +func (_EccmpAbi *EccmpAbiTransactorSession) ChangeManagerChainID(_newChainId uint64) (*common.TxResult, error) { + return _EccmpAbi.Contract.ChangeManagerChainID(&_EccmpAbi.TransactOpts, _newChainId) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EccmpAbi *EccmpAbiTransactor) Pause(opts *core.TransactOpts) (*common.TxResult, error) { + return _EccmpAbi.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EccmpAbi *EccmpAbiSession) Pause() (*common.TxResult, error) { + return _EccmpAbi.Contract.Pause(&_EccmpAbi.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns(bool) +func (_EccmpAbi *EccmpAbiTransactorSession) Pause() (*common.TxResult, error) { + return _EccmpAbi.Contract.Pause(&_EccmpAbi.TransactOpts) +} + +// PauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x3b9a80b8. +// +// Solidity: function pauseEthCrossChainManager() returns(bool) +func (_EccmpAbi *EccmpAbiTransactor) PauseEthCrossChainManager(opts *core.TransactOpts) (*common.TxResult, error) { + return _EccmpAbi.contract.Transact(opts, "pauseEthCrossChainManager") +} + +// PauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x3b9a80b8. +// +// Solidity: function pauseEthCrossChainManager() returns(bool) +func (_EccmpAbi *EccmpAbiSession) PauseEthCrossChainManager() (*common.TxResult, error) { + return _EccmpAbi.Contract.PauseEthCrossChainManager(&_EccmpAbi.TransactOpts) +} + +// PauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x3b9a80b8. +// +// Solidity: function pauseEthCrossChainManager() returns(bool) +func (_EccmpAbi *EccmpAbiTransactorSession) PauseEthCrossChainManager() (*common.TxResult, error) { + return _EccmpAbi.Contract.PauseEthCrossChainManager(&_EccmpAbi.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EccmpAbi *EccmpAbiTransactor) RenounceOwnership(opts *core.TransactOpts) (*common.TxResult, error) { + return _EccmpAbi.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EccmpAbi *EccmpAbiSession) RenounceOwnership() (*common.TxResult, error) { + return _EccmpAbi.Contract.RenounceOwnership(&_EccmpAbi.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_EccmpAbi *EccmpAbiTransactorSession) RenounceOwnership() (*common.TxResult, error) { + return _EccmpAbi.Contract.RenounceOwnership(&_EccmpAbi.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EccmpAbi *EccmpAbiTransactor) TransferOwnership(opts *core.TransactOpts, newOwner common.Address) (*common.TxResult, error) { + return _EccmpAbi.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EccmpAbi *EccmpAbiSession) TransferOwnership(newOwner common.Address) (*common.TxResult, error) { + return _EccmpAbi.Contract.TransferOwnership(&_EccmpAbi.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_EccmpAbi *EccmpAbiTransactorSession) TransferOwnership(newOwner common.Address) (*common.TxResult, error) { + return _EccmpAbi.Contract.TransferOwnership(&_EccmpAbi.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EccmpAbi *EccmpAbiTransactor) Unpause(opts *core.TransactOpts) (*common.TxResult, error) { + return _EccmpAbi.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EccmpAbi *EccmpAbiSession) Unpause() (*common.TxResult, error) { + return _EccmpAbi.Contract.Unpause(&_EccmpAbi.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns(bool) +func (_EccmpAbi *EccmpAbiTransactorSession) Unpause() (*common.TxResult, error) { + return _EccmpAbi.Contract.Unpause(&_EccmpAbi.TransactOpts) +} + +// UnpauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x4390c707. +// +// Solidity: function unpauseEthCrossChainManager() returns(bool) +func (_EccmpAbi *EccmpAbiTransactor) UnpauseEthCrossChainManager(opts *core.TransactOpts) (*common.TxResult, error) { + return _EccmpAbi.contract.Transact(opts, "unpauseEthCrossChainManager") +} + +// UnpauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x4390c707. +// +// Solidity: function unpauseEthCrossChainManager() returns(bool) +func (_EccmpAbi *EccmpAbiSession) UnpauseEthCrossChainManager() (*common.TxResult, error) { + return _EccmpAbi.Contract.UnpauseEthCrossChainManager(&_EccmpAbi.TransactOpts) +} + +// UnpauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x4390c707. +// +// Solidity: function unpauseEthCrossChainManager() returns(bool) +func (_EccmpAbi *EccmpAbiTransactorSession) UnpauseEthCrossChainManager() (*common.TxResult, error) { + return _EccmpAbi.Contract.UnpauseEthCrossChainManager(&_EccmpAbi.TransactOpts) +} + +// UpgradeEthCrossChainManager is a paid mutator transaction binding the contract method 0xab59d32d. +// +// Solidity: function upgradeEthCrossChainManager(address _newEthCrossChainManagerAddr) returns(bool) +func (_EccmpAbi *EccmpAbiTransactor) UpgradeEthCrossChainManager(opts *core.TransactOpts, _newEthCrossChainManagerAddr common.Address) (*common.TxResult, error) { + return _EccmpAbi.contract.Transact(opts, "upgradeEthCrossChainManager", _newEthCrossChainManagerAddr) +} + +// UpgradeEthCrossChainManager is a paid mutator transaction binding the contract method 0xab59d32d. +// +// Solidity: function upgradeEthCrossChainManager(address _newEthCrossChainManagerAddr) returns(bool) +func (_EccmpAbi *EccmpAbiSession) UpgradeEthCrossChainManager(_newEthCrossChainManagerAddr common.Address) (*common.TxResult, error) { + return _EccmpAbi.Contract.UpgradeEthCrossChainManager(&_EccmpAbi.TransactOpts, _newEthCrossChainManagerAddr) +} + +// UpgradeEthCrossChainManager is a paid mutator transaction binding the contract method 0xab59d32d. +// +// Solidity: function upgradeEthCrossChainManager(address _newEthCrossChainManagerAddr) returns(bool) +func (_EccmpAbi *EccmpAbiTransactorSession) UpgradeEthCrossChainManager(_newEthCrossChainManagerAddr common.Address) (*common.TxResult, error) { + return _EccmpAbi.Contract.UpgradeEthCrossChainManager(&_EccmpAbi.TransactOpts, _newEthCrossChainManagerAddr) +} + +// EccmpAbiOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the EccmpAbi contract. +type EccmpAbiOwnershipTransferredIterator struct { + Event *EccmpAbiOwnershipTransferred // Event containing the contract specifics and raw log + + contract *core.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan data.Log // Log channel receiving the found contract events + sub event.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EccmpAbiOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EccmpAbiOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EccmpAbiOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EccmpAbiOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EccmpAbiOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EccmpAbiOwnershipTransferred represents a OwnershipTransferred event raised by the EccmpAbi contract. +type EccmpAbiOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw data.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +// func (_EccmpAbi *EccmpAbiFilterer) FilterOwnershipTransferred(opts *core.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*EccmpAbiOwnershipTransferredIterator, error) { +// +// var previousOwnerRule []interface{} +// for _, previousOwnerItem := range previousOwner { +// previousOwnerRule = append(previousOwnerRule, previousOwnerItem) +// } +// var newOwnerRule []interface{} +// for _, newOwnerItem := range newOwner { +// newOwnerRule = append(newOwnerRule, newOwnerItem) +// } + +// logs, sub, err := _EccmpAbi.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) +// if err != nil { +// return nil, err +// } +// return &EccmpAbiOwnershipTransferredIterator{contract: _EccmpAbi.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +// } + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EccmpAbi *EccmpAbiFilterer) WatchOwnershipTransferred(opts *core.WatchOpts, sink chan<- *EccmpAbiOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + sub, err := _EccmpAbi.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.UnSubscribe() + for { + select { + case log := <-sub.EventMsgCh: + // New log arrived, parse the event and forward to the user + event := new(EccmpAbiOwnershipTransferred) + if err := _EccmpAbi.contract.UnpackLog(event, "OwnershipTransferred", *log); err != nil { + return err + } + event.Raw = *log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_EccmpAbi *EccmpAbiFilterer) GetOwnershipTransferredPastEvent(txHash string, ContractLogs string) ([]*EccmpAbiOwnershipTransferred, error) { + var logRaws []*data.Log + var err error + if ContractLogs != "" { + logRaws, err = _EccmpAbi.contract.GetPastEventByCtrLog(ContractLogs) + } else if txHash != "" { + logRaws, err = _EccmpAbi.contract.GetPastEventByTxHash(txHash) + } else { + return nil, errors.New("both txHash or ContractLogs is not provided for param") + } + + if err != nil { + return nil, err + } + var events []*EccmpAbiOwnershipTransferred + for _, logRaw := range logRaws { + event, err := _EccmpAbi.ParseOwnershipTransferred(*logRaw) + if err != nil && err.Error() != "event signature mismatch" { + return nil, err + } + if event != nil { + events = append(events, event) + } + } + return events, nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_EccmpAbi *EccmpAbiFilterer) ParseOwnershipTransferred(log data.Log) (*EccmpAbiOwnershipTransferred, error) { + event := new(EccmpAbiOwnershipTransferred) + if err := _EccmpAbi.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EccmpAbiPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the EccmpAbi contract. +type EccmpAbiPausedIterator struct { + Event *EccmpAbiPaused // Event containing the contract specifics and raw log + + contract *core.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan data.Log // Log channel receiving the found contract events + sub event.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EccmpAbiPausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EccmpAbiPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EccmpAbiPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EccmpAbiPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EccmpAbiPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EccmpAbiPaused represents a Paused event raised by the EccmpAbi contract. +type EccmpAbiPaused struct { + Account common.Address + Raw data.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +// func (_EccmpAbi *EccmpAbiFilterer) FilterPaused(opts *core.FilterOpts) (*EccmpAbiPausedIterator, error) { +// +// + +// logs, sub, err := _EccmpAbi.contract.FilterLogs(opts, "Paused") +// if err != nil { +// return nil, err +// } +// return &EccmpAbiPausedIterator{contract: _EccmpAbi.contract, event: "Paused", logs: logs, sub: sub}, nil +// } + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EccmpAbi *EccmpAbiFilterer) WatchPaused(opts *core.WatchOpts, sink chan<- *EccmpAbiPaused) (event.Subscription, error) { + + sub, err := _EccmpAbi.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.UnSubscribe() + for { + select { + case log := <-sub.EventMsgCh: + // New log arrived, parse the event and forward to the user + event := new(EccmpAbiPaused) + if err := _EccmpAbi.contract.UnpackLog(event, "Paused", *log); err != nil { + return err + } + event.Raw = *log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_EccmpAbi *EccmpAbiFilterer) GetPausedPastEvent(txHash string, ContractLogs string) ([]*EccmpAbiPaused, error) { + var logRaws []*data.Log + var err error + if ContractLogs != "" { + logRaws, err = _EccmpAbi.contract.GetPastEventByCtrLog(ContractLogs) + } else if txHash != "" { + logRaws, err = _EccmpAbi.contract.GetPastEventByTxHash(txHash) + } else { + return nil, errors.New("both txHash or ContractLogs is not provided for param") + } + + if err != nil { + return nil, err + } + var events []*EccmpAbiPaused + for _, logRaw := range logRaws { + event, err := _EccmpAbi.ParsePaused(*logRaw) + if err != nil && err.Error() != "event signature mismatch" { + return nil, err + } + if event != nil { + events = append(events, event) + } + } + return events, nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_EccmpAbi *EccmpAbiFilterer) ParsePaused(log data.Log) (*EccmpAbiPaused, error) { + event := new(EccmpAbiPaused) + if err := _EccmpAbi.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// EccmpAbiUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the EccmpAbi contract. +type EccmpAbiUnpausedIterator struct { + Event *EccmpAbiUnpaused // Event containing the contract specifics and raw log + + contract *core.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan data.Log // Log channel receiving the found contract events + sub event.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *EccmpAbiUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(EccmpAbiUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(EccmpAbiUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *EccmpAbiUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *EccmpAbiUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// EccmpAbiUnpaused represents a Unpaused event raised by the EccmpAbi contract. +type EccmpAbiUnpaused struct { + Account common.Address + Raw data.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +// func (_EccmpAbi *EccmpAbiFilterer) FilterUnpaused(opts *core.FilterOpts) (*EccmpAbiUnpausedIterator, error) { +// +// + +// logs, sub, err := _EccmpAbi.contract.FilterLogs(opts, "Unpaused") +// if err != nil { +// return nil, err +// } +// return &EccmpAbiUnpausedIterator{contract: _EccmpAbi.contract, event: "Unpaused", logs: logs, sub: sub}, nil +// } + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EccmpAbi *EccmpAbiFilterer) WatchUnpaused(opts *core.WatchOpts, sink chan<- *EccmpAbiUnpaused) (event.Subscription, error) { + + sub, err := _EccmpAbi.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.UnSubscribe() + for { + select { + case log := <-sub.EventMsgCh: + // New log arrived, parse the event and forward to the user + event := new(EccmpAbiUnpaused) + if err := _EccmpAbi.contract.UnpackLog(event, "Unpaused", *log); err != nil { + return err + } + event.Raw = *log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_EccmpAbi *EccmpAbiFilterer) GetUnpausedPastEvent(txHash string, ContractLogs string) ([]*EccmpAbiUnpaused, error) { + var logRaws []*data.Log + var err error + if ContractLogs != "" { + logRaws, err = _EccmpAbi.contract.GetPastEventByCtrLog(ContractLogs) + } else if txHash != "" { + logRaws, err = _EccmpAbi.contract.GetPastEventByTxHash(txHash) + } else { + return nil, errors.New("both txHash or ContractLogs is not provided for param") + } + + if err != nil { + return nil, err + } + var events []*EccmpAbiUnpaused + for _, logRaw := range logRaws { + event, err := _EccmpAbi.ParseUnpaused(*logRaw) + if err != nil && err.Error() != "event signature mismatch" { + return nil, err + } + if event != nil { + events = append(events, event) + } + } + return events, nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_EccmpAbi *EccmpAbiFilterer) ParseUnpaused(log data.Log) (*EccmpAbiUnpaused, error) { + event := new(EccmpAbiUnpaused) + if err := _EccmpAbi.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/cmd/chainsql_deployer/run.go b/cmd/chainsql_deployer/run.go new file mode 100644 index 0000000..e49dd46 --- /dev/null +++ b/cmd/chainsql_deployer/run.go @@ -0,0 +1,91 @@ +package main + +import ( + "flag" + "github.com/ChainSQL/go-chainsql-api/data" + "github.com/polynetwork/poly-io-test/chains/chainsql" + "github.com/polynetwork/poly-io-test/config" + "github.com/polynetwork/poly-io-test/log" +) + +var ( + fnEth string + configPath string +) + +func init() { + flag.StringVar(&configPath, "conf", "./config.json", "Config of poly-io-test") + flag.StringVar(&fnEth, "func", "deploy", "choose function to run: deploy or setup") + flag.Parse() +} + +func main() { + err := config.DefConfig.Init(configPath) + if err != nil { + panic(err) + } + + switch fnEth { + case "deploy": + DeployChainsqlSmartContract() + case "setup": + break + } +} + +func DeployChainsqlSmartContract() { + + var ( + eccdAddr string + eccmAddr string + err error + ) + + invoker, err := chainsql.NewChainsqlInvoker() + if err != nil { + panic(err) + } + + eccdAddr,err = invoker.DeployCrossChainDataContract() + if err != nil{ + panic(err) + } + + account, err := data.NewAccountFromAddress(eccdAddr) + if err != nil { + panic(err) + } + + log.Infof("eccd_address:%s, hex:0x%x",eccdAddr,account.Bytes()) + + eccmAddr,err = invoker.DeployCrossChainManagerContract(eccdAddr,config.DefConfig.ChainsqlChainID) + + result,err := invoker.TransaferOwnershipForECCD(eccdAddr,eccmAddr) + + if err != nil{ + panic(err) + } + if result.Status != "validate_success"{ + panic(result.ErrorMessage) + } + account, err = data.NewAccountFromAddress(eccmAddr) + if err != nil { + panic(err) + } + + log.Infof("eccm_address:%s, hex:0x%x",eccmAddr,account.Bytes()) + eccmpAddr,err := invoker.DeployCrossChainManagerProxyContract(eccmAddr) + if err != nil{ + panic(err) + } + result,err = invoker.TransferOwnershipForECCM(eccmAddr,eccmpAddr) + if result.Status != "validate_success"{ + panic(result.ErrorMessage) + } + + account, err = data.NewAccountFromAddress(eccmpAddr) + if err != nil { + panic(err) + } + log.Infof("eccmp_address:%s, hex:0x%x",eccmpAddr,account.Bytes()) +} diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 7ef974c..5f8ed5d 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -44,6 +44,8 @@ import ( "github.com/polynetwork/eth-contracts/go_abi/eccmp_abi" "github.com/polynetwork/poly-go-sdk" "github.com/polynetwork/poly-io-test/chains/btc" + "github.com/polynetwork/poly-io-test/chains/chainsql" + eccm_abi3 "github.com/polynetwork/poly-io-test/chains/chainsql/eccm_abi" cosmos2 "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" "github.com/polynetwork/poly-io-test/chains/fabric" @@ -168,6 +170,10 @@ func main() { if RegisterFiscoChain(poly, acc) { ApproveRegisterSideChain(config.DefConfig.FiscoChainID, poly, accArr) } + case config.DefConfig.ChainsqlChainID: + if RegisterChainsqlChain(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.ChainsqlChainID, poly, accArr) + } case config.DefConfig.FabricChainID: if RegisterFabricChain(poly, acc) { ApproveRegisterSideChain(config.DefConfig.FabricChainID, poly, accArr) @@ -194,6 +200,9 @@ func main() { if RegisterFabricChain(poly, acc) { ApproveRegisterSideChain(config.DefConfig.FabricChainID, poly, accArr) } + if RegisterChainsqlChain(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.ChainsqlChainID, poly, accArr) + } } case "sync_genesis_header": @@ -222,6 +231,8 @@ func main() { SyncPolyGenesisHeaderToFisco(poly) case config.DefConfig.FabricChainID: SyncPolyGenesisHeaderToFabric(poly) + case config.DefConfig.ChainsqlChainID: + SyncPolyGenesisHeaderToChainsql(poly) case 0: SyncBtcGenesisHeader(poly, acc) SyncEthGenesisHeader(poly, accArr) @@ -229,6 +240,7 @@ func main() { SyncCosmosGenesisHeader(poly, accArr) SyncNeoGenesisHeader(poly, accArr) SyncPolyGenesisHeaderToFisco(poly) + SyncPolyGenesisHeaderToChainsql(poly) } case "update_btc": @@ -368,6 +380,18 @@ func main() { } } SyncFiscoRootCA(poly, accArr, rootca) + case "sync_chainsql_root_ca": + wArr := strings.Split(pWalletFiles, ",") + pArr := strings.Split(pPwds, ",") + + accArr := make([]*poly_go_sdk.Account, len(wArr)) + for i, v := range wArr { + accArr[i], err = btc.GetAccountByPassword(poly, v, []byte(pArr[i])) + if err != nil { + panic(fmt.Errorf("failed to decode no%d wallet %s with pwd %s", i, wArr[i], pArr[i])) + } + } + SyncChainsqlRootCA(poly, accArr, rootca) case "sync_fabric_root_ca": wArr := strings.Split(pWalletFiles, ",") pArr := strings.Split(pPwds, ",") @@ -728,6 +752,49 @@ func SyncPolyGenesisHeaderToFisco(poly *poly_go_sdk.PolySdk) { log.Infof("successful to sync poly genesis header to Fisco: ( txhash: %s )", tx.Hash().String()) } +func SyncPolyGenesisHeaderToChainsql(poly *poly_go_sdk.PolySdk) { + gb, err := poly.GetBlockByHeight(config.DefConfig.RCEpoch) + if err != nil { + panic(err) + } + info := &vconfig.VbftBlockInfo{} + if err := json.Unmarshal(gb.Header.ConsensusPayload, info); err != nil { + panic(fmt.Errorf("commitGenesisHeader - unmarshal blockInfo error: %s", err)) + } + + var bookkeepers []keypair.PublicKey + for _, peer := range info.NewChainConfig.Peers { + keystr, _ := hex.DecodeString(peer.ID) + key, _ := keypair.DeserializePublicKey(keystr) + bookkeepers = append(bookkeepers, key) + } + bookkeepers = keypair.SortPublicKeys(bookkeepers) + + publickeys := make([]byte, 0) + for _, key := range bookkeepers { + publickeys = append(publickeys, ont.GetOntNoCompressKey(key)...) + } + + rawHdr := gb.Header.ToArray() + invoker, err := chainsql.NewChainsqlInvoker() + if err != nil { + panic(err) + } + eccm, err := eccm_abi3.NewEthCrossChainManager(invoker.ChainsqlSdk,config.DefConfig.ChainsqlCCMC) + if err != nil { + panic(err) + } + tx, err := eccm.InitGenesisBlock(invoker.TransOpts,rawHdr, publickeys) + if err != nil { + panic(err) + } + if tx.ErrorCode != "" || tx.ErrorMessage != ""{ + panic(tx.ErrorMessage) + } + log.Infof("successful to sync poly genesis header to chainsql: ( txhash: %s )", tx.TxHash) +} + + func SyncPolyGenesisHeaderToFabric(poly *poly_go_sdk.PolySdk) { gb, err := poly.GetBlockByHeight(config.DefConfig.RCEpoch) if err != nil { @@ -1026,6 +1093,26 @@ func RegisterFiscoChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) boo return true } +func RegisterChainsqlChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.ChainsqlChainID, 9, "chainsql", + 1, common3.HexToAddress(config.DefConfig.ChainsqlCCMCHex).Bytes(), acc) + if err != nil { + if strings.Contains(err.Error(), "already registered") { + log.Infof("chainsql chain %d already registered", config.DefConfig.ChainsqlChainID) + return false + } + if strings.Contains(err.Error(), "already requested") { + log.Infof("chainsql chain %d already requested", config.DefConfig.ChainsqlChainID) + return true + } + panic(fmt.Errorf("RegisterChainsqlChain failed: %v", err)) + } + testcase.WaitPolyTx(txhash, poly) + fmt.Printf("successful to register chainsql chain: ( txhash: %s )", txhash.ToHexString()) + + return true +} + func RegisterFabricChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.FabricChainID, 7, "fabric", fabricRelayerTy, []byte(config.DefConfig.FabricCCM), acc) @@ -1514,6 +1601,26 @@ func SyncFiscoRootCA(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account, f } } +func SyncChainsqlRootCA(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account, file string) { + raw, err := ioutil.ReadFile(file) + if err != nil { + log.Fatal(err) + os.Exit(1) + } + + txhash, err := poly.Native.Hs.SyncRootCertificate(config.DefConfig.ChainsqlChainID, raw, accArr) + if err != nil { + if strings.Contains(err.Error(), "had been initialized") { + log.Info("chainsql ca already synced") + } else { + panic(fmt.Errorf("SyncChainsqlRootCA failed: %v", err)) + } + } else { + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to sync chainsql root CA: (txhash: %s, \n CA: \n%s )", txhash.ToHexString(), string(raw)) + } +} + func SyncFabricRootCA(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account, files string) { arr := strings.Split(files, ",") certs := &common4.CertTrustChain{ diff --git a/config/config.go b/config/config.go index a077e60..042c864 100644 --- a/config/config.go +++ b/config/config.go @@ -42,6 +42,7 @@ type TestConfig struct { NeoChainID uint64 FiscoChainID uint64 FabricChainID uint64 + ChainsqlChainID uint64 BtcRestAddr string BtcRestUser string @@ -91,6 +92,9 @@ type TestConfig struct { // fisco chain FiscoSdkConfFile string + //chainsql + ChainsqlSdkConfFile string + // fabric FabricChannel string FabricSdkConfFile string @@ -160,6 +164,11 @@ type TestConfig struct { FiscoEth string FiscoLockProxy string + // chainsql + ChainsqlCCMC string + ChainsqlCCMCHex string + ChainsqlLockProxy string + // cosmos CMLockProxy string diff --git a/go.mod b/go.mod index 45123d0..dc577c7 100644 --- a/go.mod +++ b/go.mod @@ -3,19 +3,18 @@ module github.com/polynetwork/poly-io-test go 1.14 require ( + github.com/ChainSQL/go-chainsql-api v1.1.0 github.com/FISCO-BCOS/go-sdk v0.9.0 - github.com/btcsuite/btcd v0.20.1-beta + github.com/btcsuite/btcd v0.21.0-beta github.com/btcsuite/btcutil v1.0.2 github.com/cosmos/cosmos-sdk v0.39.1 github.com/ethereum/go-ethereum v1.9.15 - github.com/golang/protobuf v1.4.1 + github.com/golang/protobuf v1.4.2 github.com/google/go-cmp v0.5.2 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/hyperledger/fabric-protos-go v0.0.0-20200707132912-fee30f3ccd23 github.com/hyperledger/fabric-sdk-go v1.0.0-rc1 github.com/joeqian10/neo-gogogo v0.0.0-20200811090937-d8aab8600241 - github.com/kr/text v0.2.0 // indirect - github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c github.com/ontio/ontology-crypto v1.0.9 github.com/ontio/ontology-go-sdk v1.11.9-0.20200819065441-7c4b7a8330f6 @@ -28,11 +27,7 @@ require ( github.com/stretchr/testify v1.6.1 github.com/tendermint/tendermint v0.33.7 github.com/tjfoc/gmsm v1.3.2-0.20200914155643-24d14c7bd05c - golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a // indirect - golang.org/x/net v0.0.0-20200904194848-62affa334b73 // indirect - golang.org/x/text v0.3.3 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect ) diff --git a/go.sum b/go.sum index 688811f..ec00045 100644 --- a/go.sum +++ b/go.sum @@ -17,6 +17,8 @@ github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6L github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/ChainSQL/go-chainsql-api v1.1.0 h1:eURF0RN5tdz/dmoBdOMG96y0Qb7yLzcAvnayysbETTc= +github.com/ChainSQL/go-chainsql-api v1.1.0/go.mod h1:bx8Zi/Dhn4fObdfoHILwuql86E2nOP3la/BIcf/HKtw= github.com/ChainSafe/go-schnorrkel v0.0.0-20200102211924-4bcbc698314f/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= @@ -68,8 +70,9 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= -github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= +github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= @@ -86,6 +89,8 @@ github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJ github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= +github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= @@ -139,6 +144,7 @@ github.com/dchest/siphash v1.2.1 h1:4cLinnzVJDKxTCl9B01807Yiy+W7ZzVHj/KIroQRvT4= github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea h1:j4317fAZh7X6GqbFowYdYdI0L9bwxL07jyPZIdepyZ0= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= @@ -234,8 +240,9 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1 h1:ZFgWrT+bLgsYPirOnRfKLYJLvssAegOj/hgyMFdJZe0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= @@ -258,7 +265,6 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGa github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -303,7 +309,6 @@ github.com/hyperledger/fabric-lib-go v1.0.0/go.mod h1:H362nMlunurmHwkYqR5uHL2UDW github.com/hyperledger/fabric-protos-go v0.0.0-20200424173316-dd554ba3746e/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= github.com/hyperledger/fabric-protos-go v0.0.0-20200707132912-fee30f3ccd23 h1:SEbB3yH4ISTGRifDamYXAst36gO2kM855ndMJlsv+pc= github.com/hyperledger/fabric-protos-go v0.0.0-20200707132912-fee30f3ccd23/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= -github.com/hyperledger/fabric-sdk-go v1.0.0-beta3.0.20201006151309-9c426dcc5096 h1:veml7LmfavSHqF8w8z/PGGlfdXvmx5SstQIH6Nyy87c= github.com/hyperledger/fabric-sdk-go v1.0.0-beta3.0.20201006151309-9c426dcc5096/go.mod h1:qWE9Syfg1KbwNjtILk70bJLilnmCvllIYFCSY/pa1RU= github.com/hyperledger/fabric-sdk-go v1.0.0-rc1 h1:cfDo/5ovUZf2dCz08fznUxxVYEWAT4yKJcAh9b+K9Mk= github.com/hyperledger/fabric-sdk-go v1.0.0-rc1/go.mod h1:qWE9Syfg1KbwNjtILk70bJLilnmCvllIYFCSY/pa1RU= @@ -352,10 +357,10 @@ github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -389,7 +394,6 @@ github.com/minio/highwayhash v1.0.0 h1:iMSDhgUILCr0TNm8LWlSjF8N0ZIj2qbO8WHp6Q/J2 github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.2 h1:mRS76wmkOn3KkKAyXDu42V+6ebnXWIztFSYGN7GeoRg= github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -402,8 +406,6 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -432,7 +434,6 @@ github.com/ontio/ontology-go-sdk v1.11.9-0.20200819065441-7c4b7a8330f6 h1:Mg3uDL github.com/ontio/ontology-go-sdk v1.11.9-0.20200819065441-7c4b7a8330f6/go.mod h1:lAj5+PJjxvxLQ1HvomKHBQDV7W3zxGfVSQOMbjUtDB4= github.com/ontio/wagon v0.4.1 h1:3A8BxTMVGrQnyWxD1h8w5PLvN9GZMWjC75Jw+5Vgpe0= github.com/ontio/wagon v0.4.1/go.mod h1:oTPdgWT7WfPlEyzVaHSn1vQPMSbOpQPv+WphxibWlhg= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6 h1:lNCW6THrCKBiJBpz8kbVGjC7MgdCGKwuvBgc7LoD6sw= @@ -441,7 +442,6 @@ github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7ir github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4= github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= github.com/pelletier/go-toml v1.8.0 h1:Keo9qb7iRJs2voHvunFtuuYFsbWeOBh8/P9v/kVMFtw= github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs= @@ -518,7 +518,6 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5I github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -529,11 +528,9 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.0.1-0.20190317074736-539464a789e9/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.1 h1:qgMbHoJbPbw579P+1zVY+6n4nIFuIchaIjzZ/I/Yq8M= github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.3.1 h1:GPTpEAuNr98px18yNQ66JllNil98wfRZ/5Ukny8FeQA= github.com/spf13/afero v1.3.1/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -652,11 +649,11 @@ golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200406173513-056763e48d71/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de h1:ikNHVSjEfnvz6sxdSPCaPt572qowuyMDMJLLm3Db3ig= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -683,10 +680,9 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200904194848-62affa334b73 h1:MXfv8rhZWmFeqX3GNZRsd6vOLoaCHjYEX3qkRo3YBUA= -golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -713,11 +709,14 @@ golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 h1:5B6i6EAiSYyejWfvc5Rc9BbI3rzIsrrXfAQBWnYfn+w= golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -733,7 +732,6 @@ golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -763,15 +761,15 @@ google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0 h1:cJv5/xdbk1NnMPR1VP9+HU6gupuG9MLBoH1r6RHZ2MY= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= @@ -796,7 +794,6 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=