From 26213634bddab460e52f1995faf9c61867d12ea6 Mon Sep 17 00:00:00 2001 From: zouxyan Date: Fri, 21 Aug 2020 12:08:01 +0800 Subject: [PATCH 01/96] optimized and add bsc --- .gitignore | 9 +- README.md | 72 +- chains/btc/btc_invoker.go | 4 +- chains/btc/utils.go | 4 +- chains/cosmos/cosmos_invoker.go | 42 +- chains/eth/abi/btcx/btcx_abi.go | 5851 ------------ chains/eth/abi/eccd/eccd_abi.go | 2687 ------ chains/eth/abi/eccm/eccm_abi.go | 5021 ---------- chains/eth/abi/eccmp/eccmp_abi.go | 2304 ----- chains/eth/abi/erc20/erc20_abi.go | 4365 --------- chains/eth/abi/lockproxy/lock_proxy.go | 2474 ----- chains/eth/abi/oep4/oep4_abi.go | 3102 ------ chains/eth/abi/ongx/ongx_abi.go | 3026 ------ chains/eth/abi/ontx/ontx_abi.go | 3026 ------ chains/eth/dai.go | 1200 +++ chains/eth/eth_invoker.go | 82 +- chains/eth/eth_test.go | 288 +- chains/eth/eth_tools.go | 6 +- chains/eth/wbtc.go | 11539 +++++++++++++++++++++++ chains/neo/invoker.go | 45 + chains/neo/invoker_test.go | 23 + chains/ont/avm/ethx.avm | 2 +- chains/ont/avm/lock_proxy.avm | 2 +- chains/ont/avm/obtc.avm | 1 + chains/ont/avm/odai.avm | 1 + chains/ont/avm/ousdc.avm | 1 + chains/ont/avm/ousdt.avm | 1 + chains/ont/ont_invoker.go | 271 +- chains/ont/ont_test.go | 48 + cmd/btc_prepare/run.go | 20 +- cmd/cctest/main.go | 24 +- cmd/cosmos_prepare/run.go | 10 +- cmd/eth_deployer/run.go | 169 +- cmd/ont_deployer/run.go | 8 +- cmd/tools/run.go | 385 +- config/config.go | 66 +- go.mod | 31 +- go.sum | 278 +- testcase/init.go | 12 + testcase/method.go | 1546 ++- testcase/testcase.go | 408 +- testframework/check.go | 67 +- testframework/framework.go | 70 +- testframework/framework_context.go | 41 +- 44 files changed, 16131 insertions(+), 32501 deletions(-) delete mode 100644 chains/eth/abi/btcx/btcx_abi.go delete mode 100644 chains/eth/abi/eccd/eccd_abi.go delete mode 100644 chains/eth/abi/eccm/eccm_abi.go delete mode 100644 chains/eth/abi/eccmp/eccmp_abi.go delete mode 100644 chains/eth/abi/erc20/erc20_abi.go delete mode 100644 chains/eth/abi/lockproxy/lock_proxy.go delete mode 100644 chains/eth/abi/oep4/oep4_abi.go delete mode 100644 chains/eth/abi/ongx/ongx_abi.go delete mode 100644 chains/eth/abi/ontx/ontx_abi.go create mode 100644 chains/eth/dai.go create mode 100644 chains/eth/wbtc.go create mode 100644 chains/neo/invoker.go create mode 100644 chains/neo/invoker_test.go create mode 100644 chains/ont/avm/obtc.avm create mode 100644 chains/ont/avm/odai.avm create mode 100644 chains/ont/avm/ousdc.avm create mode 100644 chains/ont/avm/ousdt.avm create mode 100644 chains/ont/ont_test.go diff --git a/.gitignore b/.gitignore index bb1844e..cbda1bb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ .idea/ .idea/* .wallets/* +.vscode report/* -config-dev.json -config-test.json -config-main.json -test.go \ No newline at end of file +config-*.json +test.go +fisco_sdk.toml +*.yaml diff --git a/README.md b/README.md index 9344cc4..f0b508b 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,14 @@ Before you try the testcase or other functions, you need to finish the configura "CMGasPrice": "0.00001stake", "CMGas": 200000, "CMCrossChainId": 1000, + "CMEpoch": 1, + ### + + ### + # NEO + "NeoUrl": "http://seed9.ngd.network:20332", + "NeoWif": "", + "NeoEpoch": 0, ### ### @@ -77,6 +85,7 @@ Before you try the testcase or other functions, you need to finish the configura "RCWallet": "./wallet.dat", "RCWalletPwd": "pwd", "RchainJsonRpcAddress": "http://ip:port", + "RCEpoch": 60000, ### ### @@ -92,31 +101,58 @@ Before you try the testcase or other functions, you need to finish the configura # This part is the contract configuration for each chain. # After deployment, it is automatically written. # follows are contracts for testnet - "EthErc20": "0x33fb970bE14548309bbbdcbFe6327865C6d71b70", - "EthOep4": "0xde5dBad6ab0FD0EBDEBf6B6cf4eB93D51207dc8f", - "Eccd": "0xA38366d552672556CE82426Da5031E2Ae0598dcD", - "Eccm": "0xcF9b45217192F70c1df42Ba460Fd644FDB248eA5", - "Eccmp": "0xb600c8a2e8852832B75DB9Da1A3A1c173eAb28d8", - "EthLockProxy": "0xE44dDbAb7a9Aa11b9D0cA8b686F9E0299DB735d1", - "EthOngx": "0x0A03605ad4E8381855cF7b650f9482002267ad33", - "EthOntx": "0x8cE92808118Bc43c2B8635d3eb6b1b67cD2fB9a0", - "BtceContractAddress": "0x92705a16815A3d1AEC3cE9Cc273C5aa302961FcC", - "OntErc20": "e930755b130dccb25dc3cfee2b2e30d9370c1a75", - "OntOep4": "969850e009b5e2a061694f3479ec8e44bc68bcd3", - "OntLockProxy": "34a593c5ccfb8590e9a4bc7018529016aa4a55ad", - "OntEth": "ec2e25c4c12371ca37b129477a23a152e62ff103", + "EthErc20": "0x276788aF4a803781267c84692416311DE1F761f9", + "EthOep4": "0x3105A14F7956D33a51F12eF3AE50A3f1eF161Dff", + "Eccd": "0xA38366d552672556CE82426Da5031E2Ae0598dcD", + "Eccm": "0x726532586C50ec9f4080B71f906a3d9779bbd64F", + "Eccmp": "0xb600c8a2e8852832B75DB9Da1A3A1c173eAb28d8", + "EthLockProxy": "0xD8aE73e06552E270340b63A8bcAbf9277a1aac99", + "EthOngx": "0x42d9feF0Cbd9c3000CECe9764d99A4a6fE9E1B34", + "EthOntx": "0x530aae4C0859894023906e28467f2a7F111B6ff3", + "EthOntd": "0x76130c293AA35bf7B3e5fED1E9aE1E5DF12C6A92", + "EthRenBTC": "0x239100e629a9Ca8e0BF45C7892b0fc72d78AA97A", + "EthUSDT": "0xad3f96ae966ad60347f31845b7e4b333104c52fb", + "EthWBTC": "0x557563dc4ed3fd256eBA55B9622f53331ab97c2f", + "EthDai": "0x8Cad2301F7348DFc10C65778197028F432d51e76", + "EthUSDC": "0x0d9c8723b343a8368bebe0b5e89273ff8d712e3c", + "EthNeo": "0x7E269f2f33A97C64192e9889FAeEC72A6fcdB397", + "BtceContractAddress": "0x92705a16815A3d1AEC3cE9Cc273C5aa302961FcC", + "OntErc20": "e930755b130dccb25dc3cfee2b2e30d9370c1a75", + "OntOep4": "969850e009b5e2a061694f3479ec8e44bc68bcd3", + "OntLockProxy": "33c439c502cb4b6ac5a1e8057a65fe1fa7c300e2", + "OntEth": "7009a2f7c8a2e45fa386a6078c7bfeaf518be487", + "OntUSDT": "c6f91c11d740d39943b99a6b1c6fd2b5f476e2a3", + "OntWBTC": "aede525f05065306423a5522bfcd31b5847ffa52", + "OntDai": "96cf88356123592835a2fa75068a242260be1791", + "OntUSDC": "07a12c0a6bdce4df04ef4b2045d1b0fd63a56e25", + "OntNeo": "13eef3e184d878038317d806796b3af2d9f9b36d", + "OntONTD": "869951e3397550e800d5faf579857cdb637a0051", + "OntRenBTC": "ec547bc4486dea97cb659f1fe73407922f9e63c8", "BtcoContractAddress": "814d32455c21bfc25c33b75ccbfc34fe8e79bff1", + "NeoCCMC": "0xe1695b1314a1331e3935481620417ed835669407", + "NeoLockProxy": "0x229e8fe772d5f0cbb408d58b593e42a1d1dfa3a9", + "CNeo": "c074a05e9dcf0141cbe6b4b3475dd67baf4dcb60", + "NeoOnt": "5a9222225f1bdb135123b74354c7248200c440aa", + "NeoOntd": "5a9222225f1bdb135123b74354c7248200c440aa", + "NeoEth": "d7b32de37ad906df80805c2419ff5560d20f9cbf", "CMLockProxy": "f71b55ef55cedc91fd007f7a9ba386ec978f3aa8", ### ### # Test transaction limit. The cross-chain amount would not be over the limit. "BtcValLimit": 100000, - "OntValLimit": 100, - "OngValLimit": 100000, - "EthValLimit": 10000000, - "Oep4ValLimit": 10000000, - "Erc20ValLimit": 10000000 + "OntValLimit": 10, + "OntdValLimit": 1000, + "OngValLimit": 10000, + "EthValLimit": 100000, + "Oep4ValLimit": 1000, + "Erc20ValLimit": 1000, + "USDTValLimit": 10000, + "NeoValLimit": 10000, + "USDCValLimit": 1000, + "WBTCValLimit": 1000, + "RenBTCValLimit": 1000, + "OntdValFloor": 100 ### } ``` diff --git a/chains/btc/btc_invoker.go b/chains/btc/btc_invoker.go index 9a577a5..12dcd92 100644 --- a/chains/btc/btc_invoker.go +++ b/chains/btc/btc_invoker.go @@ -111,13 +111,13 @@ func (invoker *BtcInvoker) BindBtcxWithVendor(btcx string, btcxChainId uint64, v btcx = strings.Replace(btcx, "0x", "", 1) var btcxBytes []byte switch btcxChainId { - case config.ONT_CHAIN_ID: //ONT ChainId: 3 + case config.DefConfig.OntChainID: //ONT ChainId: 3 addr, err := common2.AddressFromHexString(btcx) if err != nil { return common.UINT256_EMPTY, err } btcxBytes = addr[:] - case 2: //ETH ChainID: 2 + case config.DefConfig.EthChainID: //ETH ChainID: 2 addr, err := hex.DecodeString(btcx) if err != nil { return common.UINT256_EMPTY, err diff --git a/chains/btc/utils.go b/chains/btc/utils.go index da49de4..7aa6bfc 100644 --- a/chains/btc/utils.go +++ b/chains/btc/utils.go @@ -651,7 +651,7 @@ func BuildData(toChainId uint64, ccFee int64, toAddr string) ([]byte, error) { ccflag := byte(0xcc) var args *btc.Args switch toChainId { - case 2: + case config.DefConfig.EthChainID: toAddr = strings.Replace(toAddr, "0x", "", 1) toAddrBytes, err := hex.DecodeString(toAddr) if err != nil { @@ -662,7 +662,7 @@ func BuildData(toChainId uint64, ccFee int64, toAddr string) ([]byte, error) { ToChainID: toChainId, Fee: ccFee, } - case config.ONT_CHAIN_ID: + case config.DefConfig.OntChainID: addrBytes, _ := common.AddressFromBase58(toAddr) args = &btc.Args{ Address: addrBytes[:], diff --git a/chains/cosmos/cosmos_invoker.go b/chains/cosmos/cosmos_invoker.go index 03d20af..99877a2 100644 --- a/chains/cosmos/cosmos_invoker.go +++ b/chains/cosmos/cosmos_invoker.go @@ -250,21 +250,21 @@ func (invoker *CosmosInvoker) SetupBtcx(denom, redeem string) error { return err } tx, err := invoker.sendCosmosTx([]types.Msg{btcx.NewMsgCreateDenom(invoker.Acc.Acc, denom, redeem)}) - if err != nil { + if err != nil && !strings.Contains(err.Error(), "already") { return err } invoker.WaitTx(tx.Hash) // bind btcx asset hash - tx, err = invoker.BtcxBindAsset(denom, config.BTC_CHAIN_ID, btcutil.Hash160(rawRdm)) + tx, err = invoker.BtcxBindAsset(denom, config.DefConfig.BtcChainID, btcutil.Hash160(rawRdm)) if err != nil { return fmt.Errorf("asset: %s, BtcxBindAsset error: %v", denom, err) } - tx, err = invoker.BtcxBindAsset(denom, config.ETH_CHAIN_ID, common.HexToAddress(config.DefConfig.BtceContractAddress).Bytes()) + tx, err = invoker.BtcxBindAsset(denom, config.DefConfig.EthChainID, common.HexToAddress(config.DefConfig.BtceContractAddress).Bytes()) if err != nil { return fmt.Errorf("asset: %s, BtcxBindAsset error: %v", denom, err) } btcOnt, _ := common2.AddressFromHexString(config.DefConfig.BtcoContractAddress) - tx, err = invoker.BtcxBindAsset(denom, config.ONT_CHAIN_ID, btcOnt[:]) + tx, err = invoker.BtcxBindAsset(denom, config.DefConfig.OntChainID, btcOnt[:]) if err != nil { return fmt.Errorf("asset: %s, BtcxBindAsset error: %v", denom, err) } @@ -277,96 +277,96 @@ func (invoker *CosmosInvoker) SetupBtcx(denom, redeem string) error { func (invoker *CosmosInvoker) SetupAllAssets(proxy []byte) error { // create coins and deletage to lockproxy tx, err := invoker.CreateAsset(config.CM_ETHX, "1000000000000000000000000", proxy) - if err != nil { + if err != nil && !strings.Contains(err.Error(), "already") { return fmt.Errorf("create ethx failed: %v", err) } { // bind ethx asset hash var err error - _, err = invoker.BindAsset(config.CM_ETHX, config.ETH_CHAIN_ID, common.HexToAddress("0x0000000000000000000000000000000000000000").Bytes()) + _, err = invoker.BindAsset(config.CM_ETHX, config.DefConfig.EthChainID, common.HexToAddress("0x0000000000000000000000000000000000000000").Bytes()) if err != nil { return fmt.Errorf("asset: %s, bindAsset error: %v", config.CM_ETHX, err) } ontEth, _ := common2.AddressFromHexString(config.DefConfig.OntEth) - _, err = invoker.BindAsset(config.CM_ETHX, config.ONT_CHAIN_ID, ontEth[:]) + _, err = invoker.BindAsset(config.CM_ETHX, config.DefConfig.OntChainID, ontEth[:]) if err != nil { return fmt.Errorf("asset: %s, bindAsset error: %v", config.CM_ETHX, err) } } tx, err = invoker.CreateAsset(config.CM_ERC20, "1000000000000000000000000", proxy) - if err != nil { + if err != nil && !strings.Contains(err.Error(), "already") { return fmt.Errorf("create erc20x failed: %v", err) } { // bind erc20x asset hash var err error - _, err = invoker.BindAsset(config.CM_ERC20, config.ETH_CHAIN_ID, common.HexToAddress(config.DefConfig.EthErc20).Bytes()) + _, err = invoker.BindAsset(config.CM_ERC20, config.DefConfig.EthChainID, common.HexToAddress(config.DefConfig.EthErc20).Bytes()) if err != nil { return fmt.Errorf("asset: %s, bindAsset error: %v", config.CM_ERC20, err) } ontErc20, _ := common2.AddressFromHexString(config.DefConfig.OntErc20) - _, err = invoker.BindAsset(config.CM_ERC20, config.ONT_CHAIN_ID, ontErc20[:]) + _, err = invoker.BindAsset(config.CM_ERC20, config.DefConfig.OntChainID, ontErc20[:]) if err != nil { return fmt.Errorf("asset: %s, bindAsset error: %v", config.CM_ERC20, err) } } tx, err = invoker.CreateAsset(config.CM_ONT, "1000000000", proxy) - if err != nil { + if err != nil && !strings.Contains(err.Error(), "already") { return fmt.Errorf("create ontx failed: %v", err) } { // bind ontx asset hash var err error - _, err = invoker.BindAsset(config.CM_ONT, config.ETH_CHAIN_ID, common.HexToAddress(config.DefConfig.EthOntx).Bytes()) + _, err = invoker.BindAsset(config.CM_ONT, config.DefConfig.EthChainID, common.HexToAddress(config.DefConfig.EthOntx).Bytes()) if err != nil { return fmt.Errorf("asset: %s, bindAsset error: %v", config.CM_ONT, err) } - _, err = invoker.BindAsset(config.CM_ONT, config.ONT_CHAIN_ID, ontology_go_sdk.ONT_CONTRACT_ADDRESS[:]) + _, err = invoker.BindAsset(config.CM_ONT, config.DefConfig.OntChainID, ontology_go_sdk.ONT_CONTRACT_ADDRESS[:]) if err != nil { return fmt.Errorf("asset: %s, bindAsset error: %v", config.CM_ONT, err) } } tx, err = invoker.CreateAsset(config.CM_ONG, "1000000000000000000", proxy) - if err != nil { + if err != nil && !strings.Contains(err.Error(), "already") { return fmt.Errorf("create ongx failed: %v", err) } { // bind ongx asset hash var err error - _, err = invoker.BindAsset(config.CM_ONG, config.ETH_CHAIN_ID, common.HexToAddress(config.DefConfig.EthOngx).Bytes()) + _, err = invoker.BindAsset(config.CM_ONG, config.DefConfig.EthChainID, common.HexToAddress(config.DefConfig.EthOngx).Bytes()) if err != nil { return fmt.Errorf("asset: %s, bindAsset error: %v", config.CM_ONG, err) } - _, err = invoker.BindAsset(config.CM_ONG, config.ONT_CHAIN_ID, ontology_go_sdk.ONG_CONTRACT_ADDRESS[:]) + _, err = invoker.BindAsset(config.CM_ONG, config.DefConfig.OntChainID, ontology_go_sdk.ONG_CONTRACT_ADDRESS[:]) if err != nil { return fmt.Errorf("asset: %s, bindAsset error: %v", config.CM_ONG, err) } } tx, err = invoker.CreateAsset(config.CM_OEP4, "10000000000000", proxy) - if err != nil { + if err != nil && !strings.Contains(err.Error(), "already") { return fmt.Errorf("create oep4x failed: %v", err) } { // bind oep4 asset hash var err error - _, err = invoker.BindAsset(config.CM_OEP4, config.ETH_CHAIN_ID, common.HexToAddress(config.DefConfig.EthOep4).Bytes()) + _, err = invoker.BindAsset(config.CM_OEP4, config.DefConfig.EthChainID, common.HexToAddress(config.DefConfig.EthOep4).Bytes()) if err != nil { return fmt.Errorf("asset: %s, bindAsset error: %v", config.CM_OEP4, err) } ontOep4, _ := common2.AddressFromHexString(config.DefConfig.OntOep4) - _, err = invoker.BindAsset(config.CM_OEP4, config.ONT_CHAIN_ID, ontOep4[:]) + _, err = invoker.BindAsset(config.CM_OEP4, config.DefConfig.OntChainID, ontOep4[:]) if err != nil { return fmt.Errorf("asset: %s, bindAsset error: %v", config.CM_OEP4, err) } } // bind eth proxy hash ontProxyHash, _ := common2.AddressFromHexString(config.DefConfig.OntLockProxy) - _, err = invoker.BindProxy(config.ONT_CHAIN_ID, ontProxyHash[:]) + _, err = invoker.BindProxy(config.DefConfig.OntChainID, ontProxyHash[:]) if err != nil { return fmt.Errorf("BindProxy ethx failed: %v", err) } // bind ont proxy hash - _, err = invoker.BindProxy(config.ETH_CHAIN_ID, common.HexToAddress(config.DefConfig.EthLockProxy).Bytes()) + _, err = invoker.BindProxy(config.DefConfig.EthChainID, common.HexToAddress(config.DefConfig.EthLockProxy).Bytes()) if err != nil { return fmt.Errorf("BindProxy ethx failed: %v", err) } diff --git a/chains/eth/abi/btcx/btcx_abi.go b/chains/eth/abi/btcx/btcx_abi.go deleted file mode 100644 index af78471..0000000 --- a/chains/eth/abi/btcx/btcx_abi.go +++ /dev/null @@ -1,5851 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package btcx - -import ( - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// BTCXABI is the input ABI used to generate the binding from. -const BTCXABI = "[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_redeemScript\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"contractAddr\",\"type\":\"bytes\"}],\"name\":\"BindAssetHash\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fromAssetHash\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fromAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"toAssetHash\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"toAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"LockEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"managerContract\",\"type\":\"address\"}],\"name\":\"SetManagerProxyEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"toAssetHash\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"UnlockEvent\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"contractAddr\",\"type\":\"bytes\"}],\"name\":\"bindAssetHash\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"bondAssetHashes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"toUserAddr\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"lock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"managerProxyContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumLimit\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"operator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"redeemScript\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"ethCrossChainManagerProxyAddr\",\"type\":\"address\"}],\"name\":\"setManagerProxy\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"minimumTransferLimit\",\"type\":\"uint64\"}],\"name\":\"setMinimumLimit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"argsBs\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"fromContractAddr\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"fromChainId\",\"type\":\"uint64\"}],\"name\":\"unlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// BTCXFuncSigs maps the 4-byte function signature to its string representation. -var BTCXFuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "e760f18c": "bindAssetHash(uint64,bytes)", - "888ab36a": "bondAssetHashes(uint64)", - "42966c68": "burn(uint256)", - "313ce567": "decimals()", - "a457c2d7": "decreaseAllowance(address,uint256)", - "39509351": "increaseAllowance(address,uint256)", - "154ab7f0": "lock(uint64,bytes,uint64)", - "d798f881": "managerProxyContract()", - "3414999c": "minimumLimit()", - "40c10f19": "mint(address,uint256)", - "06fdde03": "name()", - "570ca735": "operator()", - "ea7342e9": "redeemScript()", - "af9980f0": "setManagerProxy(address)", - "d78c6243": "setMinimumLimit(uint64)", - "95d89b41": "symbol()", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", - "06af4b9f": "unlock(bytes,bytes,uint64)", -} - -// BTCXBin is the compiled bytecode used for deploying new contracts. -var BTCXBin = "0x60806040523480156200001157600080fd5b5060405162002a9a38038062002a9a833981810160405260208110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604081810181526009825268212a21902a37b5b2b760b91b602080840191825282518084019093526004835263084a886b60e31b908301528251929550909350600892506200013a9160039190620001b4565b50815162000150906004906020850190620001b4565b506005805460ff191660ff9290921691909117905550620001729050620001af565b600680546001600160a01b0319166001600160a01b03929092169190911790558051620001a7906008906020840190620001b4565b505062000256565b335b90565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001f757805160ff191683800117855562000227565b8280016001018555821562000227579182015b82811115620002275782518255916020019190600101906200020a565b506200023592915062000239565b5090565b620001b191905b8082111562000235576000815560010162000240565b61283480620002666000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063570ca735116100c3578063af9980f01161007c578063af9980f0146105d9578063d78c624314610601578063d798f88114610627578063dd62ed3e1461062f578063e760f18c1461065d578063ea7342e9146107115761014d565b8063570ca7351461050957806370a082311461052d578063888ab36a1461055357806395d89b4114610579578063a457c2d714610581578063a9059cbb146105ad5761014d565b806323b872dd1161011557806323b872dd1461041c578063313ce567146104525780633414999c14610470578063395093511461049457806340c10f19146104c057806342966c68146104ec5761014d565b806306af4b9f1461015257806306fdde031461029a578063095ea7b314610317578063154ab7f01461034357806318160ddd14610402575b600080fd5b6102866004803603606081101561016857600080fd5b810190602081018135600160201b81111561018257600080fd5b82018360208201111561019457600080fd5b803590602001918460018302840111600160201b831117156101b557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561020757600080fd5b82018360208201111561021957600080fd5b803590602001918460018302840111600160201b8311171561023a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160401b031691506107199050565b604080519115158252519081900360200190f35b6102a261097d565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102dc5781810151838201526020016102c4565b50505050905090810190601f1680156103095780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102866004803603604081101561032d57600080fd5b506001600160a01b038135169060200135610a14565b6102866004803603606081101561035957600080fd5b6001600160401b038235169190810190604081016020820135600160201b81111561038357600080fd5b82018360208201111561039557600080fd5b803590602001918460018302840111600160201b831117156103b657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160401b03169150610a319050565b61040a610f84565b60408051918252519081900360200190f35b6102866004803603606081101561043257600080fd5b506001600160a01b03813581169160208101359091169060400135610f8a565b61045a611017565b6040805160ff9092168252519081900360200190f35b610478611020565b604080516001600160401b039092168252519081900360200190f35b610286600480360360408110156104aa57600080fd5b506001600160a01b03813516906020013561102f565b610286600480360360408110156104d657600080fd5b506001600160a01b038135169060200135611083565b6102866004803603602081101561050257600080fd5b5035611163565b61051161117f565b604080516001600160a01b039092168252519081900360200190f35b61040a6004803603602081101561054357600080fd5b50356001600160a01b031661118e565b6102a26004803603602081101561056957600080fd5b50356001600160401b03166111a9565b6102a2611244565b6102866004803603604081101561059757600080fd5b506001600160a01b0381351690602001356112a5565b610286600480360360408110156105c357600080fd5b506001600160a01b038135169060200135611313565b6105ff600480360360208110156105ef57600080fd5b50356001600160a01b0316611327565b005b6102866004803603602081101561061757600080fd5b50356001600160401b03166113b2565b610511611401565b61040a6004803603604081101561064557600080fd5b506001600160a01b0381358116916020013516611415565b6105ff6004803603604081101561067357600080fd5b6001600160401b038235169190810190604081016020820135600160201b81111561069d57600080fd5b8201836020820111156106af57600080fd5b803590602001918460018302840111600160201b831117156106d057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611440945050505050565b6102a2611548565b600080600560019054906101000a90046001600160a01b03169050806001600160a01b03166387939a7f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561076d57600080fd5b505afa158015610781573d6000803e3d6000fd5b505050506040513d602081101561079757600080fd5b50516001600160a01b03166107aa6115a3565b6001600160a01b0316146107ef5760405162461bcd60e51b815260040180806020018281038252602d8152602001806126c6602d913960400191505060405180910390fd5b6107f76124f6565b610800866115a7565b905060008551116108425760405162461bcd60e51b815260040180806020018281038252602b81526020018061269b602b913960400191505060405180910390fd5b6001600160401b038416600090815260076020526040902061086490866115e8565b6108b5576040805162461bcd60e51b815260206004820152601c60248201527f46726f6d20636f6e74726163742061646472657373206572726f722100000000604482015290519081900360640190fd5b60006108c4826000015161169c565b90506108dd8183602001516001600160401b0316611083565b6109185760405162461bcd60e51b81526004018080602001828103825260228152602001806126316022913960400191505060405180910390fd5b602080830151604080513081526001600160a01b038516938101939093526001600160401b0390911682820152517f9de6a54a8cf32cab5e3b075705f253958091d35e16a984ff100dca79d5e381c19181900360600190a15060019695505050505050565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a095780601f106109de57610100808354040283529160200191610a09565b820191906000526020600020905b8154815290600101906020018083116109ec57829003601f168201915b505050505090505b90565b6000610a28610a216115a3565b84846116e6565b50600192915050565b6000610a3b6124f6565b6040518060400160405280858152602001846001600160401b031681525090506060856001600160401b031660011415610b5c576009546001600160401b039081169085161015610abd5760405162461bcd60e51b81526004018080602001828103825260278152602001806127906027913960400191505060405180910390fd5b6008805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152610b5593869391929091830182828015610b4b5780601f10610b2057610100808354040283529160200191610b4b565b820191906000526020600020905b815481529060010190602001808311610b2e57829003601f168201915b50505050506117d2565b9050610b68565b610b65826118fc565b90505b610b7a846001600160401b0316611163565b610bb55760405162461bcd60e51b81526004018080602001828103825260228152602001806126796022913960400191505060405180910390fd5b6000600560019054906101000a90046001600160a01b031690506000816001600160a01b03166387939a7f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c0a57600080fd5b505afa158015610c1e573d6000803e3d6000fd5b505050506040513d6020811015610c3457600080fd5b50516001600160401b03891660008181526007602052604090819020905163bd5cf62560e01b8152600481019283526080602482019081528254600260001961010060018416150201909116046084830181905294955085946001600160a01b0386169463bd5cf625948f9490938b9390916044810191606482019160a4019087908015610d035780601f10610cd857610100808354040283529160200191610d03565b820191906000526020600020905b815481529060010190602001808311610ce657829003601f168201915b50508481038352600681526020018065756e6c6f636b60d01b815250602001848103825285818151815260200191508051906020019080838360005b83811015610d57578181015183820152602001610d3f565b50505050905090810190601f168015610d845780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b158015610da757600080fd5b505af1158015610dbb573d6000803e3d6000fd5b505050506040513d6020811015610dd157600080fd5b5051610e0e5760405162461bcd60e51b815260040180806020018281038252602f81526020018061271b602f913960400191505060405180910390fd5b7fe225456e445c7beafac1321a85eb5707386d185a767603f3fc40a7cfe71ccefb30610e386115a3565b6001600160401b03808d1660008181526007602090815260409182902082516001600160a01b03808916825287169281019290925291810192909252918c1660a082015260c0606082018181528354600260001961010060018416150201909116049183018290528f93928f928f9290608083019060e084019087908015610f015780601f10610ed657610100808354040283529160200191610f01565b820191906000526020600020905b815481529060010190602001808311610ee457829003601f168201915b5050838103825285518152855160209182019187019080838360005b83811015610f35578181015183820152602001610f1d565b50505050905090810190601f168015610f625780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390a150600198975050505050505050565b60025490565b6000610f978484846119d3565b61100d84610fa36115a3565b611008856040518060600160405280602881526020016126f3602891396001600160a01b038a16600090815260016020526040812090610fe16115a3565b6001600160a01b03168152602081019190915260400160002054919063ffffffff611b2f16565b6116e6565b5060019392505050565b60055460ff1690565b6009546001600160401b031681565b6000610a2861103c6115a3565b84611008856001600061104d6115a3565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff611bc616565b600080600560019054906101000a90046001600160a01b03169050806001600160a01b03166387939a7f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110d757600080fd5b505afa1580156110eb573d6000803e3d6000fd5b505050506040513d602081101561110157600080fd5b50516001600160a01b03166111146115a3565b6001600160a01b0316146111595760405162461bcd60e51b815260040180806020018281038252602d8152602001806126c6602d913960400191505060405180910390fd5b61100d8484611c27565b60006111766111706115a3565b83611d17565b5060015b919050565b6006546001600160a01b031681565b6001600160a01b031660009081526020819052604090205490565b60076020908152600091825260409182902080548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452909183018282801561123c5780601f106112115761010080835404028352916020019161123c565b820191906000526020600020905b81548152906001019060200180831161121f57829003601f168201915b505050505081565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a095780601f106109de57610100808354040283529160200191610a09565b6000610a286112b26115a3565b84611008856040518060600160405280602581526020016127db60259139600160006112dc6115a3565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff611b2f16565b6000610a286113206115a3565b84846119d3565b6006546001600160a01b031661133b6115a3565b6001600160a01b03161461134e57600080fd5b600580546001600160a01b03808416610100908102610100600160a81b03199093169290921792839055604080519290930416815290517f43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec49181900360200190a150565b6006546000906001600160a01b03166113c96115a3565b6001600160a01b0316146113dc57600080fd5b6009805467ffffffffffffffff19166001600160401b03939093169290921790915590565b60055461010090046001600160a01b031681565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6006546001600160a01b03166114546115a3565b6001600160a01b03161461146757600080fd5b6001600160401b038216600090815260076020908152604090912082516114909284019061250e565b507f0c7bb21b9c9883bba0ddd55e34ec4c47bebd32dbce1192972fc4b2310f4acdb4828260405180836001600160401b03166001600160401b0316815260200180602001828103825283818151815260200191508051906020019080838360005b838110156115095781810151838201526020016114f1565b50505050905090810190601f1680156115365780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15050565b6008805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561123c5780601f106112115761010080835404028352916020019161123c565b3390565b6115af6124f6565b6115b76124f6565b60006115c38482611e13565b90835290506115d28482611eed565b506001600160401b031660208301525092915050565b600080600190508354600260018083161561010002038216048451808214600181146116175760009450611690565b821561169057602083106001811461167557600189600052602060002060208a018581015b60028482841001141561166c57815183541461165b5760009950600093505b60018301925060208201915061163c565b5050505061168e565b6101008086040294506020880151851461168e57600095505b505b50929695505050505050565b600081516014146116de5760405162461bcd60e51b81526004018080602001828103825260238152602001806125ec6023913960400191505060405180910390fd5b506014015190565b6001600160a01b03831661172b5760405162461bcd60e51b81526004018080602001828103825260248152602001806127b76024913960400191505060405180910390fd5b6001600160a01b0382166117705760405162461bcd60e51b815260040180806020018281038252602281526020018061260f6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6060806117e28460000151611f94565b6117ef856020015161205a565b6117f885611f94565b6040516020018084805190602001908083835b6020831061182a5780518252601f19909201916020918201910161180b565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b602083106118725780518252601f199092019160209182019101611853565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106118ba5780518252601f19909201916020918201910161189b565b6001836020036101000a038019825116818451168082178552505050505050905001935050505060405160208183030381529060405290508091505092915050565b60608061190c8360000151611f94565b611919846020015161205a565b6040516020018083805190602001908083835b6020831061194b5780518252601f19909201916020918201910161192c565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106119935780518252601f199092019160209182019101611974565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052905080915050919050565b6001600160a01b038316611a185760405162461bcd60e51b815260040180806020018281038252602581526020018061276b6025913960400191505060405180910390fd5b6001600160a01b038216611a5d5760405162461bcd60e51b81526004018080602001828103825260238152602001806125a76023913960400191505060405180910390fd5b611aa081604051806060016040528060268152602001612653602691396001600160a01b038616600090815260208190526040902054919063ffffffff611b2f16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611ad5908263ffffffff611bc616565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611bbe5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611b83578181015183820152602001611b6b565b50505050905090810190601f168015611bb05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015611c20576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216611c82576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254611c95908263ffffffff611bc616565b6002556001600160a01b038216600090815260208190526040902054611cc1908263ffffffff611bc616565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216611d5c5760405162461bcd60e51b815260040180806020018281038252602181526020018061274a6021913960400191505060405180910390fd5b611d9f816040518060600160405280602281526020016125ca602291396001600160a01b038516600090815260208190526040902054919063ffffffff611b2f16565b6001600160a01b038316600090815260208190526040902055600254611dcb908263ffffffff61209d16565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6060600080611e2285856120df565b86519095509091508185011115611e79576040805162461bcd60e51b81526020600482015260166024820152756f66667365742065786365656473206d6178696d756d60501b604482015290519081900360640190fd5b606081158015611e9457604051915060208201604052611ede565b6040519150601f8316801560200281840101848101888315602002848c0101015b81831015611ecd578051835260209283019201611eb5565b5050848452601f01601f1916604052505b509250830190505b9250929050565b6000808351836008011115611f42576040805162461bcd60e51b81526020600482015260166024820152756f66667365742065786365656473206d6178696d756d60501b604482015290519081900360640190fd5b600060405160086000600182038760208a0101515b83831015611f775780821a83860153600183019250600182039150611f57565b505050808201604052602003900351956008949094019450505050565b8051606090611fa281612195565b836040516020018083805190602001908083835b60208310611fd55780518252601f199092019160209182019101611fb6565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b6020831061201d5780518252601f199092019160209182019101611ffe565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050919050565b6040516008808252606091906000601f5b8282101561208d5785811a82602086010153600191909101906000190161206b565b5050506040818101905292915050565b6000611c2083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b2f565b60008060006120ee85856122db565b9450905060fd60f81b6001600160f81b031982161415612123576121128585612344565b8161ffff1691509250925050611ee6565b607f60f91b6001600160f81b0319821614156121565761214385856123ce565b8163ffffffff1691509250925050611ee6565b6001600160f81b03198082161415612188576121728585611eed565b816001600160401b031691509250925050611ee6565b60f81c9150829050611ee6565b606060fd826001600160401b031610156121b9576121b282612475565b905061117a565b61ffff826001600160401b031611612297576121d860fd60f81b612490565b6121e1836124a4565b6040516020018083805190602001908083835b602083106122135780518252601f1990920191602091820191016121f4565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b6020831061225b5780518252601f19909201916020918201910161223c565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052905061117a565b63ffffffff826001600160401b0316116122c1576122b8607f60f91b612490565b6121e1836124cd565b6122d26001600160f81b0319612490565b6121e18361205a565b6000808351836001011115612330576040805162461bcd60e51b81526020600482015260166024820152754f66667365742065786365656473206d6178696d756d60501b604482015290519081900360640190fd5b505081810160200151600182019250929050565b6000808351836002011115612399576040805162461bcd60e51b81526020600482015260166024820152756f66667365742065786365656473206d6178696d756d60501b604482015290519081900360640190fd5b6000604051846020870101518060011a82538060001a6001830153506002818101604052601d19909101519694019450505050565b6000808351836004011115612423576040805162461bcd60e51b81526020600482015260166024820152756f66667365742065786365656473206d6178696d756d60501b604482015290519081900360640190fd5b600060405160046000600182038760208a0101515b838310156124585780821a83860153600183019250600182039150612438565b505050808201604052602003900351956004949094019450505050565b604080516001815260f89290921b6020830152818101905290565b606061249e8260f81c612475565b92915050565b6040516002808252606091906000601f60ff86166020850153600191909101906000190161206b565b6040516004808252606091906000601f60ff86166020850153600191909101906000190161206b565b60408051808201909152606081526000602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061254f57805160ff191683800117855561257c565b8280016001018555821561257c579182015b8281111561257c578251825591602001919060010190612561565b5061258892915061258c565b5090565b610a1191905b80821115612588576000815560010161259256fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63656279746573206c656e67746820646f6573206e6f74206d61746368206164647265737345524332303a20617070726f766520746f20746865207a65726f20616464726573736d696e74204254435820696e20756e6c6f636b206d6574686f64206661696c65642145524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654275726e206d73672e73656e646572204254435820746f6b656e73206661696c656466726f6d20617373657420636f6e747261637420616464726573732063616e6e6f7420626520656d7074796d736753656e646572206973206e6f742045746843726f7373436861696e4d616e61676572436f6e747261637445524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545746843726f7373436861696e4d616e616765722063726f7373436861696e206578656375746564206572726f722145524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f20616464726573736274637820616d6f756e742073686f756c642062652067726561746572207468616e203230303045524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a7231582040ee9c6fc0a9315643f605d24d6d3980f90f4279c941c6308994961aadf0af5064736f6c634300050f0032" - -// DeployBTCX deploys a new Ethereum contract, binding an instance of BTCX to it. -func DeployBTCX(auth *bind.TransactOpts, backend bind.ContractBackend, _redeemScript []byte) (common.Address, *types.Transaction, *BTCX, error) { - parsed, err := abi.JSON(strings.NewReader(BTCXABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(BTCXBin), backend, _redeemScript) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &BTCX{BTCXCaller: BTCXCaller{contract: contract}, BTCXTransactor: BTCXTransactor{contract: contract}, BTCXFilterer: BTCXFilterer{contract: contract}}, nil -} - -// BTCX is an auto generated Go binding around an Ethereum contract. -type BTCX struct { - BTCXCaller // Read-only binding to the contract - BTCXTransactor // Write-only binding to the contract - BTCXFilterer // Log filterer for contract events -} - -// BTCXCaller is an auto generated read-only Go binding around an Ethereum contract. -type BTCXCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BTCXTransactor is an auto generated write-only Go binding around an Ethereum contract. -type BTCXTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BTCXFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type BTCXFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BTCXSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type BTCXSession struct { - Contract *BTCX // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// BTCXCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type BTCXCallerSession struct { - Contract *BTCXCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// BTCXTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type BTCXTransactorSession struct { - Contract *BTCXTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// BTCXRaw is an auto generated low-level Go binding around an Ethereum contract. -type BTCXRaw struct { - Contract *BTCX // Generic contract binding to access the raw methods on -} - -// BTCXCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type BTCXCallerRaw struct { - Contract *BTCXCaller // Generic read-only contract binding to access the raw methods on -} - -// BTCXTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type BTCXTransactorRaw struct { - Contract *BTCXTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewBTCX creates a new instance of BTCX, bound to a specific deployed contract. -func NewBTCX(address common.Address, backend bind.ContractBackend) (*BTCX, error) { - contract, err := bindBTCX(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &BTCX{BTCXCaller: BTCXCaller{contract: contract}, BTCXTransactor: BTCXTransactor{contract: contract}, BTCXFilterer: BTCXFilterer{contract: contract}}, nil -} - -// NewBTCXCaller creates a new read-only instance of BTCX, bound to a specific deployed contract. -func NewBTCXCaller(address common.Address, caller bind.ContractCaller) (*BTCXCaller, error) { - contract, err := bindBTCX(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &BTCXCaller{contract: contract}, nil -} - -// NewBTCXTransactor creates a new write-only instance of BTCX, bound to a specific deployed contract. -func NewBTCXTransactor(address common.Address, transactor bind.ContractTransactor) (*BTCXTransactor, error) { - contract, err := bindBTCX(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &BTCXTransactor{contract: contract}, nil -} - -// NewBTCXFilterer creates a new log filterer instance of BTCX, bound to a specific deployed contract. -func NewBTCXFilterer(address common.Address, filterer bind.ContractFilterer) (*BTCXFilterer, error) { - contract, err := bindBTCX(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &BTCXFilterer{contract: contract}, nil -} - -// bindBTCX binds a generic wrapper to an already deployed contract. -func bindBTCX(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(BTCXABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_BTCX *BTCXRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _BTCX.Contract.BTCXCaller.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 (_BTCX *BTCXRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BTCX.Contract.BTCXTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_BTCX *BTCXRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _BTCX.Contract.BTCXTransactor.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 (_BTCX *BTCXCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _BTCX.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 (_BTCX *BTCXTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BTCX.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_BTCX *BTCXTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _BTCX.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_BTCX *BTCXCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _BTCX.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_BTCX *BTCXSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _BTCX.Contract.Allowance(&_BTCX.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_BTCX *BTCXCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _BTCX.Contract.Allowance(&_BTCX.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_BTCX *BTCXCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _BTCX.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_BTCX *BTCXSession) BalanceOf(account common.Address) (*big.Int, error) { - return _BTCX.Contract.BalanceOf(&_BTCX.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_BTCX *BTCXCallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _BTCX.Contract.BalanceOf(&_BTCX.CallOpts, account) -} - -// BondAssetHashes is a free data retrieval call binding the contract method 0x888ab36a. -// -// Solidity: function bondAssetHashes(uint64 ) view returns(bytes) -func (_BTCX *BTCXCaller) BondAssetHashes(opts *bind.CallOpts, arg0 uint64) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _BTCX.contract.Call(opts, out, "bondAssetHashes", arg0) - return *ret0, err -} - -// BondAssetHashes is a free data retrieval call binding the contract method 0x888ab36a. -// -// Solidity: function bondAssetHashes(uint64 ) view returns(bytes) -func (_BTCX *BTCXSession) BondAssetHashes(arg0 uint64) ([]byte, error) { - return _BTCX.Contract.BondAssetHashes(&_BTCX.CallOpts, arg0) -} - -// BondAssetHashes is a free data retrieval call binding the contract method 0x888ab36a. -// -// Solidity: function bondAssetHashes(uint64 ) view returns(bytes) -func (_BTCX *BTCXCallerSession) BondAssetHashes(arg0 uint64) ([]byte, error) { - return _BTCX.Contract.BondAssetHashes(&_BTCX.CallOpts, arg0) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_BTCX *BTCXCaller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _BTCX.contract.Call(opts, out, "decimals") - return *ret0, err -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_BTCX *BTCXSession) Decimals() (uint8, error) { - return _BTCX.Contract.Decimals(&_BTCX.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_BTCX *BTCXCallerSession) Decimals() (uint8, error) { - return _BTCX.Contract.Decimals(&_BTCX.CallOpts) -} - -// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. -// -// Solidity: function managerProxyContract() view returns(address) -func (_BTCX *BTCXCaller) ManagerProxyContract(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _BTCX.contract.Call(opts, out, "managerProxyContract") - return *ret0, err -} - -// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. -// -// Solidity: function managerProxyContract() view returns(address) -func (_BTCX *BTCXSession) ManagerProxyContract() (common.Address, error) { - return _BTCX.Contract.ManagerProxyContract(&_BTCX.CallOpts) -} - -// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. -// -// Solidity: function managerProxyContract() view returns(address) -func (_BTCX *BTCXCallerSession) ManagerProxyContract() (common.Address, error) { - return _BTCX.Contract.ManagerProxyContract(&_BTCX.CallOpts) -} - -// MinimumLimit is a free data retrieval call binding the contract method 0x3414999c. -// -// Solidity: function minimumLimit() view returns(uint64) -func (_BTCX *BTCXCaller) MinimumLimit(opts *bind.CallOpts) (uint64, error) { - var ( - ret0 = new(uint64) - ) - out := ret0 - err := _BTCX.contract.Call(opts, out, "minimumLimit") - return *ret0, err -} - -// MinimumLimit is a free data retrieval call binding the contract method 0x3414999c. -// -// Solidity: function minimumLimit() view returns(uint64) -func (_BTCX *BTCXSession) MinimumLimit() (uint64, error) { - return _BTCX.Contract.MinimumLimit(&_BTCX.CallOpts) -} - -// MinimumLimit is a free data retrieval call binding the contract method 0x3414999c. -// -// Solidity: function minimumLimit() view returns(uint64) -func (_BTCX *BTCXCallerSession) MinimumLimit() (uint64, error) { - return _BTCX.Contract.MinimumLimit(&_BTCX.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_BTCX *BTCXCaller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _BTCX.contract.Call(opts, out, "name") - return *ret0, err -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_BTCX *BTCXSession) Name() (string, error) { - return _BTCX.Contract.Name(&_BTCX.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_BTCX *BTCXCallerSession) Name() (string, error) { - return _BTCX.Contract.Name(&_BTCX.CallOpts) -} - -// Operator is a free data retrieval call binding the contract method 0x570ca735. -// -// Solidity: function operator() view returns(address) -func (_BTCX *BTCXCaller) Operator(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _BTCX.contract.Call(opts, out, "operator") - return *ret0, err -} - -// Operator is a free data retrieval call binding the contract method 0x570ca735. -// -// Solidity: function operator() view returns(address) -func (_BTCX *BTCXSession) Operator() (common.Address, error) { - return _BTCX.Contract.Operator(&_BTCX.CallOpts) -} - -// Operator is a free data retrieval call binding the contract method 0x570ca735. -// -// Solidity: function operator() view returns(address) -func (_BTCX *BTCXCallerSession) Operator() (common.Address, error) { - return _BTCX.Contract.Operator(&_BTCX.CallOpts) -} - -// RedeemScript is a free data retrieval call binding the contract method 0xea7342e9. -// -// Solidity: function redeemScript() view returns(bytes) -func (_BTCX *BTCXCaller) RedeemScript(opts *bind.CallOpts) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _BTCX.contract.Call(opts, out, "redeemScript") - return *ret0, err -} - -// RedeemScript is a free data retrieval call binding the contract method 0xea7342e9. -// -// Solidity: function redeemScript() view returns(bytes) -func (_BTCX *BTCXSession) RedeemScript() ([]byte, error) { - return _BTCX.Contract.RedeemScript(&_BTCX.CallOpts) -} - -// RedeemScript is a free data retrieval call binding the contract method 0xea7342e9. -// -// Solidity: function redeemScript() view returns(bytes) -func (_BTCX *BTCXCallerSession) RedeemScript() ([]byte, error) { - return _BTCX.Contract.RedeemScript(&_BTCX.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_BTCX *BTCXCaller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _BTCX.contract.Call(opts, out, "symbol") - return *ret0, err -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_BTCX *BTCXSession) Symbol() (string, error) { - return _BTCX.Contract.Symbol(&_BTCX.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_BTCX *BTCXCallerSession) Symbol() (string, error) { - return _BTCX.Contract.Symbol(&_BTCX.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_BTCX *BTCXCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _BTCX.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_BTCX *BTCXSession) TotalSupply() (*big.Int, error) { - return _BTCX.Contract.TotalSupply(&_BTCX.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_BTCX *BTCXCallerSession) TotalSupply() (*big.Int, error) { - return _BTCX.Contract.TotalSupply(&_BTCX.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_BTCX *BTCXTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _BTCX.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_BTCX *BTCXSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _BTCX.Contract.Approve(&_BTCX.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_BTCX *BTCXTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _BTCX.Contract.Approve(&_BTCX.TransactOpts, spender, amount) -} - -// BindAssetHash is a paid mutator transaction binding the contract method 0xe760f18c. -// -// Solidity: function bindAssetHash(uint64 chainId, bytes contractAddr) returns() -func (_BTCX *BTCXTransactor) BindAssetHash(opts *bind.TransactOpts, chainId uint64, contractAddr []byte) (*types.Transaction, error) { - return _BTCX.contract.Transact(opts, "bindAssetHash", chainId, contractAddr) -} - -// BindAssetHash is a paid mutator transaction binding the contract method 0xe760f18c. -// -// Solidity: function bindAssetHash(uint64 chainId, bytes contractAddr) returns() -func (_BTCX *BTCXSession) BindAssetHash(chainId uint64, contractAddr []byte) (*types.Transaction, error) { - return _BTCX.Contract.BindAssetHash(&_BTCX.TransactOpts, chainId, contractAddr) -} - -// BindAssetHash is a paid mutator transaction binding the contract method 0xe760f18c. -// -// Solidity: function bindAssetHash(uint64 chainId, bytes contractAddr) returns() -func (_BTCX *BTCXTransactorSession) BindAssetHash(chainId uint64, contractAddr []byte) (*types.Transaction, error) { - return _BTCX.Contract.BindAssetHash(&_BTCX.TransactOpts, chainId, contractAddr) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 amount) returns(bool) -func (_BTCX *BTCXTransactor) Burn(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { - return _BTCX.contract.Transact(opts, "burn", amount) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 amount) returns(bool) -func (_BTCX *BTCXSession) Burn(amount *big.Int) (*types.Transaction, error) { - return _BTCX.Contract.Burn(&_BTCX.TransactOpts, amount) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 amount) returns(bool) -func (_BTCX *BTCXTransactorSession) Burn(amount *big.Int) (*types.Transaction, error) { - return _BTCX.Contract.Burn(&_BTCX.TransactOpts, amount) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_BTCX *BTCXTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _BTCX.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_BTCX *BTCXSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _BTCX.Contract.DecreaseAllowance(&_BTCX.TransactOpts, spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_BTCX *BTCXTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _BTCX.Contract.DecreaseAllowance(&_BTCX.TransactOpts, spender, subtractedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_BTCX *BTCXTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _BTCX.contract.Transact(opts, "increaseAllowance", spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_BTCX *BTCXSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _BTCX.Contract.IncreaseAllowance(&_BTCX.TransactOpts, spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_BTCX *BTCXTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _BTCX.Contract.IncreaseAllowance(&_BTCX.TransactOpts, spender, addedValue) -} - -// Lock is a paid mutator transaction binding the contract method 0x154ab7f0. -// -// Solidity: function lock(uint64 toChainId, bytes toUserAddr, uint64 amount) returns(bool) -func (_BTCX *BTCXTransactor) Lock(opts *bind.TransactOpts, toChainId uint64, toUserAddr []byte, amount uint64) (*types.Transaction, error) { - return _BTCX.contract.Transact(opts, "lock", toChainId, toUserAddr, amount) -} - -// Lock is a paid mutator transaction binding the contract method 0x154ab7f0. -// -// Solidity: function lock(uint64 toChainId, bytes toUserAddr, uint64 amount) returns(bool) -func (_BTCX *BTCXSession) Lock(toChainId uint64, toUserAddr []byte, amount uint64) (*types.Transaction, error) { - return _BTCX.Contract.Lock(&_BTCX.TransactOpts, toChainId, toUserAddr, amount) -} - -// Lock is a paid mutator transaction binding the contract method 0x154ab7f0. -// -// Solidity: function lock(uint64 toChainId, bytes toUserAddr, uint64 amount) returns(bool) -func (_BTCX *BTCXTransactorSession) Lock(toChainId uint64, toUserAddr []byte, amount uint64) (*types.Transaction, error) { - return _BTCX.Contract.Lock(&_BTCX.TransactOpts, toChainId, toUserAddr, amount) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address account, uint256 amount) returns(bool) -func (_BTCX *BTCXTransactor) Mint(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { - return _BTCX.contract.Transact(opts, "mint", account, amount) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address account, uint256 amount) returns(bool) -func (_BTCX *BTCXSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { - return _BTCX.Contract.Mint(&_BTCX.TransactOpts, account, amount) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address account, uint256 amount) returns(bool) -func (_BTCX *BTCXTransactorSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { - return _BTCX.Contract.Mint(&_BTCX.TransactOpts, account, amount) -} - -// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. -// -// Solidity: function setManagerProxy(address ethCrossChainManagerProxyAddr) returns() -func (_BTCX *BTCXTransactor) SetManagerProxy(opts *bind.TransactOpts, ethCrossChainManagerProxyAddr common.Address) (*types.Transaction, error) { - return _BTCX.contract.Transact(opts, "setManagerProxy", ethCrossChainManagerProxyAddr) -} - -// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. -// -// Solidity: function setManagerProxy(address ethCrossChainManagerProxyAddr) returns() -func (_BTCX *BTCXSession) SetManagerProxy(ethCrossChainManagerProxyAddr common.Address) (*types.Transaction, error) { - return _BTCX.Contract.SetManagerProxy(&_BTCX.TransactOpts, ethCrossChainManagerProxyAddr) -} - -// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. -// -// Solidity: function setManagerProxy(address ethCrossChainManagerProxyAddr) returns() -func (_BTCX *BTCXTransactorSession) SetManagerProxy(ethCrossChainManagerProxyAddr common.Address) (*types.Transaction, error) { - return _BTCX.Contract.SetManagerProxy(&_BTCX.TransactOpts, ethCrossChainManagerProxyAddr) -} - -// SetMinimumLimit is a paid mutator transaction binding the contract method 0xd78c6243. -// -// Solidity: function setMinimumLimit(uint64 minimumTransferLimit) returns(bool) -func (_BTCX *BTCXTransactor) SetMinimumLimit(opts *bind.TransactOpts, minimumTransferLimit uint64) (*types.Transaction, error) { - return _BTCX.contract.Transact(opts, "setMinimumLimit", minimumTransferLimit) -} - -// SetMinimumLimit is a paid mutator transaction binding the contract method 0xd78c6243. -// -// Solidity: function setMinimumLimit(uint64 minimumTransferLimit) returns(bool) -func (_BTCX *BTCXSession) SetMinimumLimit(minimumTransferLimit uint64) (*types.Transaction, error) { - return _BTCX.Contract.SetMinimumLimit(&_BTCX.TransactOpts, minimumTransferLimit) -} - -// SetMinimumLimit is a paid mutator transaction binding the contract method 0xd78c6243. -// -// Solidity: function setMinimumLimit(uint64 minimumTransferLimit) returns(bool) -func (_BTCX *BTCXTransactorSession) SetMinimumLimit(minimumTransferLimit uint64) (*types.Transaction, error) { - return _BTCX.Contract.SetMinimumLimit(&_BTCX.TransactOpts, minimumTransferLimit) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_BTCX *BTCXTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _BTCX.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_BTCX *BTCXSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _BTCX.Contract.Transfer(&_BTCX.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_BTCX *BTCXTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _BTCX.Contract.Transfer(&_BTCX.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_BTCX *BTCXTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _BTCX.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_BTCX *BTCXSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _BTCX.Contract.TransferFrom(&_BTCX.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_BTCX *BTCXTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _BTCX.Contract.TransferFrom(&_BTCX.TransactOpts, sender, recipient, amount) -} - -// Unlock is a paid mutator transaction binding the contract method 0x06af4b9f. -// -// Solidity: function unlock(bytes argsBs, bytes fromContractAddr, uint64 fromChainId) returns(bool) -func (_BTCX *BTCXTransactor) Unlock(opts *bind.TransactOpts, argsBs []byte, fromContractAddr []byte, fromChainId uint64) (*types.Transaction, error) { - return _BTCX.contract.Transact(opts, "unlock", argsBs, fromContractAddr, fromChainId) -} - -// Unlock is a paid mutator transaction binding the contract method 0x06af4b9f. -// -// Solidity: function unlock(bytes argsBs, bytes fromContractAddr, uint64 fromChainId) returns(bool) -func (_BTCX *BTCXSession) Unlock(argsBs []byte, fromContractAddr []byte, fromChainId uint64) (*types.Transaction, error) { - return _BTCX.Contract.Unlock(&_BTCX.TransactOpts, argsBs, fromContractAddr, fromChainId) -} - -// Unlock is a paid mutator transaction binding the contract method 0x06af4b9f. -// -// Solidity: function unlock(bytes argsBs, bytes fromContractAddr, uint64 fromChainId) returns(bool) -func (_BTCX *BTCXTransactorSession) Unlock(argsBs []byte, fromContractAddr []byte, fromChainId uint64) (*types.Transaction, error) { - return _BTCX.Contract.Unlock(&_BTCX.TransactOpts, argsBs, fromContractAddr, fromChainId) -} - -// BTCXApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the BTCX contract. -type BTCXApprovalIterator struct { - Event *BTCXApproval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BTCXApprovalIterator) 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(BTCXApproval) - 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(BTCXApproval) - 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 *BTCXApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BTCXApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BTCXApproval represents a Approval event raised by the BTCX contract. -type BTCXApproval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_BTCX *BTCXFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*BTCXApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _BTCX.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &BTCXApprovalIterator{contract: _BTCX.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_BTCX *BTCXFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *BTCXApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _BTCX.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BTCXApproval) - if err := _BTCX.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_BTCX *BTCXFilterer) ParseApproval(log types.Log) (*BTCXApproval, error) { - event := new(BTCXApproval) - if err := _BTCX.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// BTCXBindAssetHashIterator is returned from FilterBindAssetHash and is used to iterate over the raw logs and unpacked data for BindAssetHash events raised by the BTCX contract. -type BTCXBindAssetHashIterator struct { - Event *BTCXBindAssetHash // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BTCXBindAssetHashIterator) 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(BTCXBindAssetHash) - 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(BTCXBindAssetHash) - 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 *BTCXBindAssetHashIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BTCXBindAssetHashIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BTCXBindAssetHash represents a BindAssetHash event raised by the BTCX contract. -type BTCXBindAssetHash struct { - ChainId uint64 - ContractAddr []byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBindAssetHash is a free log retrieval operation binding the contract event 0x0c7bb21b9c9883bba0ddd55e34ec4c47bebd32dbce1192972fc4b2310f4acdb4. -// -// Solidity: event BindAssetHash(uint64 chainId, bytes contractAddr) -func (_BTCX *BTCXFilterer) FilterBindAssetHash(opts *bind.FilterOpts) (*BTCXBindAssetHashIterator, error) { - - logs, sub, err := _BTCX.contract.FilterLogs(opts, "BindAssetHash") - if err != nil { - return nil, err - } - return &BTCXBindAssetHashIterator{contract: _BTCX.contract, event: "BindAssetHash", logs: logs, sub: sub}, nil -} - -// WatchBindAssetHash is a free log subscription operation binding the contract event 0x0c7bb21b9c9883bba0ddd55e34ec4c47bebd32dbce1192972fc4b2310f4acdb4. -// -// Solidity: event BindAssetHash(uint64 chainId, bytes contractAddr) -func (_BTCX *BTCXFilterer) WatchBindAssetHash(opts *bind.WatchOpts, sink chan<- *BTCXBindAssetHash) (event.Subscription, error) { - - logs, sub, err := _BTCX.contract.WatchLogs(opts, "BindAssetHash") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BTCXBindAssetHash) - if err := _BTCX.contract.UnpackLog(event, "BindAssetHash", 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 -} - -// ParseBindAssetHash is a log parse operation binding the contract event 0x0c7bb21b9c9883bba0ddd55e34ec4c47bebd32dbce1192972fc4b2310f4acdb4. -// -// Solidity: event BindAssetHash(uint64 chainId, bytes contractAddr) -func (_BTCX *BTCXFilterer) ParseBindAssetHash(log types.Log) (*BTCXBindAssetHash, error) { - event := new(BTCXBindAssetHash) - if err := _BTCX.contract.UnpackLog(event, "BindAssetHash", log); err != nil { - return nil, err - } - return event, nil -} - -// BTCXLockEventIterator is returned from FilterLockEvent and is used to iterate over the raw logs and unpacked data for LockEvent events raised by the BTCX contract. -type BTCXLockEventIterator struct { - Event *BTCXLockEvent // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BTCXLockEventIterator) 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(BTCXLockEvent) - 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(BTCXLockEvent) - 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 *BTCXLockEventIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BTCXLockEventIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BTCXLockEvent represents a LockEvent event raised by the BTCX contract. -type BTCXLockEvent struct { - FromAssetHash common.Address - FromAddress common.Address - ToChainId uint64 - ToAssetHash []byte - ToAddress []byte - Amount uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterLockEvent is a free log retrieval operation binding the contract event 0xe225456e445c7beafac1321a85eb5707386d185a767603f3fc40a7cfe71ccefb. -// -// Solidity: event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint64 amount) -func (_BTCX *BTCXFilterer) FilterLockEvent(opts *bind.FilterOpts) (*BTCXLockEventIterator, error) { - - logs, sub, err := _BTCX.contract.FilterLogs(opts, "LockEvent") - if err != nil { - return nil, err - } - return &BTCXLockEventIterator{contract: _BTCX.contract, event: "LockEvent", logs: logs, sub: sub}, nil -} - -// WatchLockEvent is a free log subscription operation binding the contract event 0xe225456e445c7beafac1321a85eb5707386d185a767603f3fc40a7cfe71ccefb. -// -// Solidity: event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint64 amount) -func (_BTCX *BTCXFilterer) WatchLockEvent(opts *bind.WatchOpts, sink chan<- *BTCXLockEvent) (event.Subscription, error) { - - logs, sub, err := _BTCX.contract.WatchLogs(opts, "LockEvent") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BTCXLockEvent) - if err := _BTCX.contract.UnpackLog(event, "LockEvent", 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 -} - -// ParseLockEvent is a log parse operation binding the contract event 0xe225456e445c7beafac1321a85eb5707386d185a767603f3fc40a7cfe71ccefb. -// -// Solidity: event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint64 amount) -func (_BTCX *BTCXFilterer) ParseLockEvent(log types.Log) (*BTCXLockEvent, error) { - event := new(BTCXLockEvent) - if err := _BTCX.contract.UnpackLog(event, "LockEvent", log); err != nil { - return nil, err - } - return event, nil -} - -// BTCXSetManagerProxyEventIterator is returned from FilterSetManagerProxyEvent and is used to iterate over the raw logs and unpacked data for SetManagerProxyEvent events raised by the BTCX contract. -type BTCXSetManagerProxyEventIterator struct { - Event *BTCXSetManagerProxyEvent // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BTCXSetManagerProxyEventIterator) 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(BTCXSetManagerProxyEvent) - 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(BTCXSetManagerProxyEvent) - 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 *BTCXSetManagerProxyEventIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BTCXSetManagerProxyEventIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BTCXSetManagerProxyEvent represents a SetManagerProxyEvent event raised by the BTCX contract. -type BTCXSetManagerProxyEvent struct { - ManagerContract common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetManagerProxyEvent is a free log retrieval operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. -// -// Solidity: event SetManagerProxyEvent(address managerContract) -func (_BTCX *BTCXFilterer) FilterSetManagerProxyEvent(opts *bind.FilterOpts) (*BTCXSetManagerProxyEventIterator, error) { - - logs, sub, err := _BTCX.contract.FilterLogs(opts, "SetManagerProxyEvent") - if err != nil { - return nil, err - } - return &BTCXSetManagerProxyEventIterator{contract: _BTCX.contract, event: "SetManagerProxyEvent", logs: logs, sub: sub}, nil -} - -// WatchSetManagerProxyEvent is a free log subscription operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. -// -// Solidity: event SetManagerProxyEvent(address managerContract) -func (_BTCX *BTCXFilterer) WatchSetManagerProxyEvent(opts *bind.WatchOpts, sink chan<- *BTCXSetManagerProxyEvent) (event.Subscription, error) { - - logs, sub, err := _BTCX.contract.WatchLogs(opts, "SetManagerProxyEvent") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BTCXSetManagerProxyEvent) - if err := _BTCX.contract.UnpackLog(event, "SetManagerProxyEvent", 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 -} - -// ParseSetManagerProxyEvent is a log parse operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. -// -// Solidity: event SetManagerProxyEvent(address managerContract) -func (_BTCX *BTCXFilterer) ParseSetManagerProxyEvent(log types.Log) (*BTCXSetManagerProxyEvent, error) { - event := new(BTCXSetManagerProxyEvent) - if err := _BTCX.contract.UnpackLog(event, "SetManagerProxyEvent", log); err != nil { - return nil, err - } - return event, nil -} - -// BTCXTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the BTCX contract. -type BTCXTransferIterator struct { - Event *BTCXTransfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BTCXTransferIterator) 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(BTCXTransfer) - 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(BTCXTransfer) - 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 *BTCXTransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BTCXTransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BTCXTransfer represents a Transfer event raised by the BTCX contract. -type BTCXTransfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_BTCX *BTCXFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*BTCXTransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _BTCX.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &BTCXTransferIterator{contract: _BTCX.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_BTCX *BTCXFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *BTCXTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _BTCX.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BTCXTransfer) - if err := _BTCX.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_BTCX *BTCXFilterer) ParseTransfer(log types.Log) (*BTCXTransfer, error) { - event := new(BTCXTransfer) - if err := _BTCX.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// BTCXUnlockEventIterator is returned from FilterUnlockEvent and is used to iterate over the raw logs and unpacked data for UnlockEvent events raised by the BTCX contract. -type BTCXUnlockEventIterator struct { - Event *BTCXUnlockEvent // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BTCXUnlockEventIterator) 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(BTCXUnlockEvent) - 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(BTCXUnlockEvent) - 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 *BTCXUnlockEventIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BTCXUnlockEventIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BTCXUnlockEvent represents a UnlockEvent event raised by the BTCX contract. -type BTCXUnlockEvent struct { - ToAssetHash common.Address - ToAddress common.Address - Amount uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUnlockEvent is a free log retrieval operation binding the contract event 0x9de6a54a8cf32cab5e3b075705f253958091d35e16a984ff100dca79d5e381c1. -// -// Solidity: event UnlockEvent(address toAssetHash, address toAddress, uint64 amount) -func (_BTCX *BTCXFilterer) FilterUnlockEvent(opts *bind.FilterOpts) (*BTCXUnlockEventIterator, error) { - - logs, sub, err := _BTCX.contract.FilterLogs(opts, "UnlockEvent") - if err != nil { - return nil, err - } - return &BTCXUnlockEventIterator{contract: _BTCX.contract, event: "UnlockEvent", logs: logs, sub: sub}, nil -} - -// WatchUnlockEvent is a free log subscription operation binding the contract event 0x9de6a54a8cf32cab5e3b075705f253958091d35e16a984ff100dca79d5e381c1. -// -// Solidity: event UnlockEvent(address toAssetHash, address toAddress, uint64 amount) -func (_BTCX *BTCXFilterer) WatchUnlockEvent(opts *bind.WatchOpts, sink chan<- *BTCXUnlockEvent) (event.Subscription, error) { - - logs, sub, err := _BTCX.contract.WatchLogs(opts, "UnlockEvent") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BTCXUnlockEvent) - if err := _BTCX.contract.UnpackLog(event, "UnlockEvent", 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 -} - -// ParseUnlockEvent is a log parse operation binding the contract event 0x9de6a54a8cf32cab5e3b075705f253958091d35e16a984ff100dca79d5e381c1. -// -// Solidity: event UnlockEvent(address toAssetHash, address toAddress, uint64 amount) -func (_BTCX *BTCXFilterer) ParseUnlockEvent(log types.Log) (*BTCXUnlockEvent, error) { - event := new(BTCXUnlockEvent) - if err := _BTCX.contract.UnpackLog(event, "UnlockEvent", log); err != nil { - return nil, err - } - return event, nil -} - -// ContextABI is the input ABI used to generate the binding from. -const ContextABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" - -// Context is an auto generated Go binding around an Ethereum contract. -type Context struct { - ContextCaller // Read-only binding to the contract - ContextTransactor // Write-only binding to the contract - ContextFilterer // Log filterer for contract events -} - -// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. -type ContextCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ContextTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ContextFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ContextSession struct { - Contract *Context // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ContextCallerSession struct { - Contract *ContextCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ContextTransactorSession struct { - Contract *ContextTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. -type ContextRaw struct { - Contract *Context // Generic contract binding to access the raw methods on -} - -// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ContextCallerRaw struct { - Contract *ContextCaller // Generic read-only contract binding to access the raw methods on -} - -// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ContextTransactorRaw struct { - Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewContext creates a new instance of Context, bound to a specific deployed contract. -func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { - contract, err := bindContext(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil -} - -// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. -func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { - contract, err := bindContext(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ContextCaller{contract: contract}, nil -} - -// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. -func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { - contract, err := bindContext(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ContextTransactor{contract: contract}, nil -} - -// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. -func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { - contract, err := bindContext(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ContextFilterer{contract: contract}, nil -} - -// bindContext binds a generic wrapper to an already deployed contract. -func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ContextABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.Contract.ContextCaller.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 (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.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 (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.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 (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.contract.Transact(opts, method, params...) -} - -// ERC20ABI is the input ABI used to generate the binding from. -const ERC20ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20FuncSigs maps the 4-byte function signature to its string representation. -var ERC20FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "a457c2d7": "decreaseAllowance(address,uint256)", - "39509351": "increaseAllowance(address,uint256)", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20Bin is the compiled bytecode used for deploying new contracts. -var ERC20Bin = "0x608060405261083b806100136000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a0823114610149578063a457c2d71461016f578063a9059cbb1461019b578063dd62ed3e146101c757610088565b8063095ea7b31461008d57806318160ddd146100cd57806323b872dd146100e7578063395093511461011d575b600080fd5b6100b9600480360360408110156100a357600080fd5b506001600160a01b0381351690602001356101f5565b604080519115158252519081900360200190f35b6100d5610212565b60408051918252519081900360200190f35b6100b9600480360360608110156100fd57600080fd5b506001600160a01b03813581169160208101359091169060400135610218565b6100b96004803603604081101561013357600080fd5b506001600160a01b0381351690602001356102a5565b6100d56004803603602081101561015f57600080fd5b50356001600160a01b03166102f9565b6100b96004803603604081101561018557600080fd5b506001600160a01b038135169060200135610314565b6100b9600480360360408110156101b157600080fd5b506001600160a01b038135169060200135610382565b6100d5600480360360408110156101dd57600080fd5b506001600160a01b0381358116916020013516610396565b60006102096102026103c1565b84846103c5565b50600192915050565b60025490565b60006102258484846104b1565b61029b846102316103c1565b61029685604051806060016040528060288152602001610771602891396001600160a01b038a1660009081526001602052604081209061026f6103c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61060d16565b6103c5565b5060019392505050565b60006102096102b26103c1565b8461029685600160006102c36103c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6106a416565b6001600160a01b031660009081526020819052604090205490565b60006102096103216103c1565b84610296856040518060600160405280602581526020016107e2602591396001600061034b6103c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61060d16565b600061020961038f6103c1565b84846104b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661040a5760405162461bcd60e51b81526004018080602001828103825260248152602001806107be6024913960400191505060405180910390fd5b6001600160a01b03821661044f5760405162461bcd60e51b81526004018080602001828103825260228152602001806107296022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166104f65760405162461bcd60e51b81526004018080602001828103825260258152602001806107996025913960400191505060405180910390fd5b6001600160a01b03821661053b5760405162461bcd60e51b81526004018080602001828103825260238152602001806107066023913960400191505060405180910390fd5b61057e8160405180606001604052806026815260200161074b602691396001600160a01b038616600090815260208190526040902054919063ffffffff61060d16565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546105b3908263ffffffff6106a416565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561069c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610661578181015183820152602001610649565b50505050905090810190601f16801561068e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156106fe576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820dd68afc24b84623478da74ad90030d8d5b03ae431cb948a20348acf66ded867f64736f6c634300050f0032" - -// DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it. -func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20Bin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil -} - -// ERC20 is an auto generated Go binding around an Ethereum contract. -type ERC20 struct { - ERC20Caller // Read-only binding to the contract - ERC20Transactor // Write-only binding to the contract - ERC20Filterer // Log filterer for contract events -} - -// ERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20Session struct { - Contract *ERC20 // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20CallerSession struct { - Contract *ERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20TransactorSession struct { - Contract *ERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20Raw struct { - Contract *ERC20 // Generic contract binding to access the raw methods on -} - -// ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20CallerRaw struct { - Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20TransactorRaw struct { - Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20 creates a new instance of ERC20, bound to a specific deployed contract. -func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error) { - contract, err := bindERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil -} - -// NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract. -func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error) { - contract, err := bindERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20Caller{contract: contract}, nil -} - -// NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract. -func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error) { - contract, err := bindERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20Transactor{contract: contract}, nil -} - -// NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract. -func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error) { - contract, err := bindERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20Filterer{contract: contract}, nil -} - -// bindERC20 binds a generic wrapper to an already deployed contract. -func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20.Contract.ERC20Caller.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 (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20.Contract.ERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20.Contract.ERC20Transactor.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 (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20.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 (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error) { - return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error) { - return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, amount) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "increaseAllowance", spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) -} - -// ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20 contract. -type ERC20ApprovalIterator struct { - Event *ERC20Approval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20ApprovalIterator) 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(ERC20Approval) - 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(ERC20Approval) - 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 *ERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20Approval represents a Approval event raised by the ERC20 contract. -type ERC20Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC20ApprovalIterator{contract: _ERC20.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20Approval) - if err := _ERC20.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) ParseApproval(log types.Log) (*ERC20Approval, error) { - event := new(ERC20Approval) - if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20 contract. -type ERC20TransferIterator struct { - Event *ERC20Transfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20TransferIterator) 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(ERC20Transfer) - 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(ERC20Transfer) - 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 *ERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20Transfer represents a Transfer event raised by the ERC20 contract. -type ERC20Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC20TransferIterator{contract: _ERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20Transfer) - if err := _ERC20.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) ParseTransfer(log types.Log) (*ERC20Transfer, error) { - event := new(ERC20Transfer) - if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20DetailedABI is the input ABI used to generate the binding from. -const ERC20DetailedABI = "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20DetailedFuncSigs maps the 4-byte function signature to its string representation. -var ERC20DetailedFuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "313ce567": "decimals()", - "06fdde03": "name()", - "95d89b41": "symbol()", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20Detailed is an auto generated Go binding around an Ethereum contract. -type ERC20Detailed struct { - ERC20DetailedCaller // Read-only binding to the contract - ERC20DetailedTransactor // Write-only binding to the contract - ERC20DetailedFilterer // Log filterer for contract events -} - -// ERC20DetailedCaller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20DetailedCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20DetailedTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20DetailedFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20DetailedSession struct { - Contract *ERC20Detailed // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20DetailedCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20DetailedCallerSession struct { - Contract *ERC20DetailedCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20DetailedTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20DetailedTransactorSession struct { - Contract *ERC20DetailedTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20DetailedRaw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20DetailedRaw struct { - Contract *ERC20Detailed // Generic contract binding to access the raw methods on -} - -// ERC20DetailedCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20DetailedCallerRaw struct { - Contract *ERC20DetailedCaller // Generic read-only contract binding to access the raw methods on -} - -// ERC20DetailedTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20DetailedTransactorRaw struct { - Contract *ERC20DetailedTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20Detailed creates a new instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20Detailed(address common.Address, backend bind.ContractBackend) (*ERC20Detailed, error) { - contract, err := bindERC20Detailed(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20Detailed{ERC20DetailedCaller: ERC20DetailedCaller{contract: contract}, ERC20DetailedTransactor: ERC20DetailedTransactor{contract: contract}, ERC20DetailedFilterer: ERC20DetailedFilterer{contract: contract}}, nil -} - -// NewERC20DetailedCaller creates a new read-only instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedCaller(address common.Address, caller bind.ContractCaller) (*ERC20DetailedCaller, error) { - contract, err := bindERC20Detailed(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20DetailedCaller{contract: contract}, nil -} - -// NewERC20DetailedTransactor creates a new write-only instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20DetailedTransactor, error) { - contract, err := bindERC20Detailed(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20DetailedTransactor{contract: contract}, nil -} - -// NewERC20DetailedFilterer creates a new log filterer instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20DetailedFilterer, error) { - contract, err := bindERC20Detailed(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20DetailedFilterer{contract: contract}, nil -} - -// bindERC20Detailed binds a generic wrapper to an already deployed contract. -func bindERC20Detailed(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20DetailedABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20Detailed *ERC20DetailedRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20Detailed.Contract.ERC20DetailedCaller.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 (_ERC20Detailed *ERC20DetailedRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Detailed.Contract.ERC20DetailedTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Detailed *ERC20DetailedRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Detailed.Contract.ERC20DetailedTransactor.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 (_ERC20Detailed *ERC20DetailedCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20Detailed.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 (_ERC20Detailed *ERC20DetailedTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Detailed.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Detailed *ERC20DetailedTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Detailed.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.Allowance(&_ERC20Detailed.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.Allowance(&_ERC20Detailed.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.BalanceOf(&_ERC20Detailed.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.BalanceOf(&_ERC20Detailed.CallOpts, account) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedCaller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "decimals") - return *ret0, err -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedSession) Decimals() (uint8, error) { - return _ERC20Detailed.Contract.Decimals(&_ERC20Detailed.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedCallerSession) Decimals() (uint8, error) { - return _ERC20Detailed.Contract.Decimals(&_ERC20Detailed.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedCaller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "name") - return *ret0, err -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedSession) Name() (string, error) { - return _ERC20Detailed.Contract.Name(&_ERC20Detailed.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedCallerSession) Name() (string, error) { - return _ERC20Detailed.Contract.Name(&_ERC20Detailed.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedCaller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "symbol") - return *ret0, err -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedSession) Symbol() (string, error) { - return _ERC20Detailed.Contract.Symbol(&_ERC20Detailed.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedCallerSession) Symbol() (string, error) { - return _ERC20Detailed.Contract.Symbol(&_ERC20Detailed.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) TotalSupply() (*big.Int, error) { - return _ERC20Detailed.Contract.TotalSupply(&_ERC20Detailed.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) TotalSupply() (*big.Int, error) { - return _ERC20Detailed.Contract.TotalSupply(&_ERC20Detailed.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Approve(&_ERC20Detailed.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Approve(&_ERC20Detailed.TransactOpts, spender, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Transfer(&_ERC20Detailed.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Transfer(&_ERC20Detailed.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.TransferFrom(&_ERC20Detailed.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.TransferFrom(&_ERC20Detailed.TransactOpts, sender, recipient, amount) -} - -// ERC20DetailedApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20Detailed contract. -type ERC20DetailedApprovalIterator struct { - Event *ERC20DetailedApproval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20DetailedApprovalIterator) 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(ERC20DetailedApproval) - 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(ERC20DetailedApproval) - 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 *ERC20DetailedApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20DetailedApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20DetailedApproval represents a Approval event raised by the ERC20Detailed contract. -type ERC20DetailedApproval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20DetailedApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20Detailed.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC20DetailedApprovalIterator{contract: _ERC20Detailed.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20DetailedApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20Detailed.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20DetailedApproval) - if err := _ERC20Detailed.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) ParseApproval(log types.Log) (*ERC20DetailedApproval, error) { - event := new(ERC20DetailedApproval) - if err := _ERC20Detailed.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20DetailedTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20Detailed contract. -type ERC20DetailedTransferIterator struct { - Event *ERC20DetailedTransfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20DetailedTransferIterator) 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(ERC20DetailedTransfer) - 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(ERC20DetailedTransfer) - 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 *ERC20DetailedTransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20DetailedTransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20DetailedTransfer represents a Transfer event raised by the ERC20Detailed contract. -type ERC20DetailedTransfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20DetailedTransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20Detailed.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC20DetailedTransferIterator{contract: _ERC20Detailed.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20DetailedTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20Detailed.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20DetailedTransfer) - if err := _ERC20Detailed.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) ParseTransfer(log types.Log) (*ERC20DetailedTransfer, error) { - event := new(ERC20DetailedTransfer) - if err := _ERC20Detailed.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20ExtendedV3ABI is the input ABI used to generate the binding from. -const ERC20ExtendedV3ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"contractAddr\",\"type\":\"bytes\"}],\"name\":\"BindAssetHash\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"managerContract\",\"type\":\"address\"}],\"name\":\"SetManagerProxyEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"contractAddr\",\"type\":\"bytes\"}],\"name\":\"bindAssetHash\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"bondAssetHashes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"managerProxyContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"operator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"ethCrossChainManagerProxyAddr\",\"type\":\"address\"}],\"name\":\"setManagerProxy\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20ExtendedV3FuncSigs maps the 4-byte function signature to its string representation. -var ERC20ExtendedV3FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "e760f18c": "bindAssetHash(uint64,bytes)", - "888ab36a": "bondAssetHashes(uint64)", - "42966c68": "burn(uint256)", - "313ce567": "decimals()", - "a457c2d7": "decreaseAllowance(address,uint256)", - "39509351": "increaseAllowance(address,uint256)", - "d798f881": "managerProxyContract()", - "40c10f19": "mint(address,uint256)", - "06fdde03": "name()", - "570ca735": "operator()", - "af9980f0": "setManagerProxy(address)", - "95d89b41": "symbol()", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20ExtendedV3 is an auto generated Go binding around an Ethereum contract. -type ERC20ExtendedV3 struct { - ERC20ExtendedV3Caller // Read-only binding to the contract - ERC20ExtendedV3Transactor // Write-only binding to the contract - ERC20ExtendedV3Filterer // Log filterer for contract events -} - -// ERC20ExtendedV3Caller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20ExtendedV3Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20ExtendedV3Transactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20ExtendedV3Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20ExtendedV3Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20ExtendedV3Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20ExtendedV3Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20ExtendedV3Session struct { - Contract *ERC20ExtendedV3 // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20ExtendedV3CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20ExtendedV3CallerSession struct { - Contract *ERC20ExtendedV3Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20ExtendedV3TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20ExtendedV3TransactorSession struct { - Contract *ERC20ExtendedV3Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20ExtendedV3Raw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20ExtendedV3Raw struct { - Contract *ERC20ExtendedV3 // Generic contract binding to access the raw methods on -} - -// ERC20ExtendedV3CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20ExtendedV3CallerRaw struct { - Contract *ERC20ExtendedV3Caller // Generic read-only contract binding to access the raw methods on -} - -// ERC20ExtendedV3TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20ExtendedV3TransactorRaw struct { - Contract *ERC20ExtendedV3Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20ExtendedV3 creates a new instance of ERC20ExtendedV3, bound to a specific deployed contract. -func NewERC20ExtendedV3(address common.Address, backend bind.ContractBackend) (*ERC20ExtendedV3, error) { - contract, err := bindERC20ExtendedV3(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20ExtendedV3{ERC20ExtendedV3Caller: ERC20ExtendedV3Caller{contract: contract}, ERC20ExtendedV3Transactor: ERC20ExtendedV3Transactor{contract: contract}, ERC20ExtendedV3Filterer: ERC20ExtendedV3Filterer{contract: contract}}, nil -} - -// NewERC20ExtendedV3Caller creates a new read-only instance of ERC20ExtendedV3, bound to a specific deployed contract. -func NewERC20ExtendedV3Caller(address common.Address, caller bind.ContractCaller) (*ERC20ExtendedV3Caller, error) { - contract, err := bindERC20ExtendedV3(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20ExtendedV3Caller{contract: contract}, nil -} - -// NewERC20ExtendedV3Transactor creates a new write-only instance of ERC20ExtendedV3, bound to a specific deployed contract. -func NewERC20ExtendedV3Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20ExtendedV3Transactor, error) { - contract, err := bindERC20ExtendedV3(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20ExtendedV3Transactor{contract: contract}, nil -} - -// NewERC20ExtendedV3Filterer creates a new log filterer instance of ERC20ExtendedV3, bound to a specific deployed contract. -func NewERC20ExtendedV3Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20ExtendedV3Filterer, error) { - contract, err := bindERC20ExtendedV3(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20ExtendedV3Filterer{contract: contract}, nil -} - -// bindERC20ExtendedV3 binds a generic wrapper to an already deployed contract. -func bindERC20ExtendedV3(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ExtendedV3ABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20ExtendedV3 *ERC20ExtendedV3Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20ExtendedV3.Contract.ERC20ExtendedV3Caller.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 (_ERC20ExtendedV3 *ERC20ExtendedV3Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.ERC20ExtendedV3Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20ExtendedV3 *ERC20ExtendedV3Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.ERC20ExtendedV3Transactor.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 (_ERC20ExtendedV3 *ERC20ExtendedV3CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20ExtendedV3.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 (_ERC20ExtendedV3 *ERC20ExtendedV3TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20ExtendedV3 *ERC20ExtendedV3TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20ExtendedV3.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20ExtendedV3.Contract.Allowance(&_ERC20ExtendedV3.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20ExtendedV3 *ERC20ExtendedV3CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20ExtendedV3.Contract.Allowance(&_ERC20ExtendedV3.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20ExtendedV3.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20ExtendedV3.Contract.BalanceOf(&_ERC20ExtendedV3.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20ExtendedV3 *ERC20ExtendedV3CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20ExtendedV3.Contract.BalanceOf(&_ERC20ExtendedV3.CallOpts, account) -} - -// BondAssetHashes is a free data retrieval call binding the contract method 0x888ab36a. -// -// Solidity: function bondAssetHashes(uint64 ) view returns(bytes) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Caller) BondAssetHashes(opts *bind.CallOpts, arg0 uint64) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _ERC20ExtendedV3.contract.Call(opts, out, "bondAssetHashes", arg0) - return *ret0, err -} - -// BondAssetHashes is a free data retrieval call binding the contract method 0x888ab36a. -// -// Solidity: function bondAssetHashes(uint64 ) view returns(bytes) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) BondAssetHashes(arg0 uint64) ([]byte, error) { - return _ERC20ExtendedV3.Contract.BondAssetHashes(&_ERC20ExtendedV3.CallOpts, arg0) -} - -// BondAssetHashes is a free data retrieval call binding the contract method 0x888ab36a. -// -// Solidity: function bondAssetHashes(uint64 ) view returns(bytes) -func (_ERC20ExtendedV3 *ERC20ExtendedV3CallerSession) BondAssetHashes(arg0 uint64) ([]byte, error) { - return _ERC20ExtendedV3.Contract.BondAssetHashes(&_ERC20ExtendedV3.CallOpts, arg0) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Caller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _ERC20ExtendedV3.contract.Call(opts, out, "decimals") - return *ret0, err -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) Decimals() (uint8, error) { - return _ERC20ExtendedV3.Contract.Decimals(&_ERC20ExtendedV3.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20ExtendedV3 *ERC20ExtendedV3CallerSession) Decimals() (uint8, error) { - return _ERC20ExtendedV3.Contract.Decimals(&_ERC20ExtendedV3.CallOpts) -} - -// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. -// -// Solidity: function managerProxyContract() view returns(address) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Caller) ManagerProxyContract(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _ERC20ExtendedV3.contract.Call(opts, out, "managerProxyContract") - return *ret0, err -} - -// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. -// -// Solidity: function managerProxyContract() view returns(address) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) ManagerProxyContract() (common.Address, error) { - return _ERC20ExtendedV3.Contract.ManagerProxyContract(&_ERC20ExtendedV3.CallOpts) -} - -// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. -// -// Solidity: function managerProxyContract() view returns(address) -func (_ERC20ExtendedV3 *ERC20ExtendedV3CallerSession) ManagerProxyContract() (common.Address, error) { - return _ERC20ExtendedV3.Contract.ManagerProxyContract(&_ERC20ExtendedV3.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Caller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20ExtendedV3.contract.Call(opts, out, "name") - return *ret0, err -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) Name() (string, error) { - return _ERC20ExtendedV3.Contract.Name(&_ERC20ExtendedV3.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20ExtendedV3 *ERC20ExtendedV3CallerSession) Name() (string, error) { - return _ERC20ExtendedV3.Contract.Name(&_ERC20ExtendedV3.CallOpts) -} - -// Operator is a free data retrieval call binding the contract method 0x570ca735. -// -// Solidity: function operator() view returns(address) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Caller) Operator(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _ERC20ExtendedV3.contract.Call(opts, out, "operator") - return *ret0, err -} - -// Operator is a free data retrieval call binding the contract method 0x570ca735. -// -// Solidity: function operator() view returns(address) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) Operator() (common.Address, error) { - return _ERC20ExtendedV3.Contract.Operator(&_ERC20ExtendedV3.CallOpts) -} - -// Operator is a free data retrieval call binding the contract method 0x570ca735. -// -// Solidity: function operator() view returns(address) -func (_ERC20ExtendedV3 *ERC20ExtendedV3CallerSession) Operator() (common.Address, error) { - return _ERC20ExtendedV3.Contract.Operator(&_ERC20ExtendedV3.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Caller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20ExtendedV3.contract.Call(opts, out, "symbol") - return *ret0, err -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) Symbol() (string, error) { - return _ERC20ExtendedV3.Contract.Symbol(&_ERC20ExtendedV3.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20ExtendedV3 *ERC20ExtendedV3CallerSession) Symbol() (string, error) { - return _ERC20ExtendedV3.Contract.Symbol(&_ERC20ExtendedV3.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20ExtendedV3.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) TotalSupply() (*big.Int, error) { - return _ERC20ExtendedV3.Contract.TotalSupply(&_ERC20ExtendedV3.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20ExtendedV3 *ERC20ExtendedV3CallerSession) TotalSupply() (*big.Int, error) { - return _ERC20ExtendedV3.Contract.TotalSupply(&_ERC20ExtendedV3.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.Approve(&_ERC20ExtendedV3.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.Approve(&_ERC20ExtendedV3.TransactOpts, spender, amount) -} - -// BindAssetHash is a paid mutator transaction binding the contract method 0xe760f18c. -// -// Solidity: function bindAssetHash(uint64 chainId, bytes contractAddr) returns() -func (_ERC20ExtendedV3 *ERC20ExtendedV3Transactor) BindAssetHash(opts *bind.TransactOpts, chainId uint64, contractAddr []byte) (*types.Transaction, error) { - return _ERC20ExtendedV3.contract.Transact(opts, "bindAssetHash", chainId, contractAddr) -} - -// BindAssetHash is a paid mutator transaction binding the contract method 0xe760f18c. -// -// Solidity: function bindAssetHash(uint64 chainId, bytes contractAddr) returns() -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) BindAssetHash(chainId uint64, contractAddr []byte) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.BindAssetHash(&_ERC20ExtendedV3.TransactOpts, chainId, contractAddr) -} - -// BindAssetHash is a paid mutator transaction binding the contract method 0xe760f18c. -// -// Solidity: function bindAssetHash(uint64 chainId, bytes contractAddr) returns() -func (_ERC20ExtendedV3 *ERC20ExtendedV3TransactorSession) BindAssetHash(chainId uint64, contractAddr []byte) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.BindAssetHash(&_ERC20ExtendedV3.TransactOpts, chainId, contractAddr) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Transactor) Burn(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.contract.Transact(opts, "burn", amount) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) Burn(amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.Burn(&_ERC20ExtendedV3.TransactOpts, amount) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3TransactorSession) Burn(amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.Burn(&_ERC20ExtendedV3.TransactOpts, amount) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.DecreaseAllowance(&_ERC20ExtendedV3.TransactOpts, spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.DecreaseAllowance(&_ERC20ExtendedV3.TransactOpts, spender, subtractedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.contract.Transact(opts, "increaseAllowance", spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.IncreaseAllowance(&_ERC20ExtendedV3.TransactOpts, spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.IncreaseAllowance(&_ERC20ExtendedV3.TransactOpts, spender, addedValue) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address account, uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Transactor) Mint(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.contract.Transact(opts, "mint", account, amount) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address account, uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.Mint(&_ERC20ExtendedV3.TransactOpts, account, amount) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address account, uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3TransactorSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.Mint(&_ERC20ExtendedV3.TransactOpts, account, amount) -} - -// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. -// -// Solidity: function setManagerProxy(address ethCrossChainManagerProxyAddr) returns() -func (_ERC20ExtendedV3 *ERC20ExtendedV3Transactor) SetManagerProxy(opts *bind.TransactOpts, ethCrossChainManagerProxyAddr common.Address) (*types.Transaction, error) { - return _ERC20ExtendedV3.contract.Transact(opts, "setManagerProxy", ethCrossChainManagerProxyAddr) -} - -// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. -// -// Solidity: function setManagerProxy(address ethCrossChainManagerProxyAddr) returns() -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) SetManagerProxy(ethCrossChainManagerProxyAddr common.Address) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.SetManagerProxy(&_ERC20ExtendedV3.TransactOpts, ethCrossChainManagerProxyAddr) -} - -// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. -// -// Solidity: function setManagerProxy(address ethCrossChainManagerProxyAddr) returns() -func (_ERC20ExtendedV3 *ERC20ExtendedV3TransactorSession) SetManagerProxy(ethCrossChainManagerProxyAddr common.Address) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.SetManagerProxy(&_ERC20ExtendedV3.TransactOpts, ethCrossChainManagerProxyAddr) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.Transfer(&_ERC20ExtendedV3.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.Transfer(&_ERC20ExtendedV3.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.TransferFrom(&_ERC20ExtendedV3.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20ExtendedV3 *ERC20ExtendedV3TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV3.Contract.TransferFrom(&_ERC20ExtendedV3.TransactOpts, sender, recipient, amount) -} - -// ERC20ExtendedV3ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20ExtendedV3 contract. -type ERC20ExtendedV3ApprovalIterator struct { - Event *ERC20ExtendedV3Approval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20ExtendedV3ApprovalIterator) 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(ERC20ExtendedV3Approval) - 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(ERC20ExtendedV3Approval) - 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 *ERC20ExtendedV3ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20ExtendedV3ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20ExtendedV3Approval represents a Approval event raised by the ERC20ExtendedV3 contract. -type ERC20ExtendedV3Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ExtendedV3ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20ExtendedV3.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC20ExtendedV3ApprovalIterator{contract: _ERC20ExtendedV3.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20ExtendedV3Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20ExtendedV3.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20ExtendedV3Approval) - if err := _ERC20ExtendedV3.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Filterer) ParseApproval(log types.Log) (*ERC20ExtendedV3Approval, error) { - event := new(ERC20ExtendedV3Approval) - if err := _ERC20ExtendedV3.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20ExtendedV3BindAssetHashIterator is returned from FilterBindAssetHash and is used to iterate over the raw logs and unpacked data for BindAssetHash events raised by the ERC20ExtendedV3 contract. -type ERC20ExtendedV3BindAssetHashIterator struct { - Event *ERC20ExtendedV3BindAssetHash // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20ExtendedV3BindAssetHashIterator) 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(ERC20ExtendedV3BindAssetHash) - 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(ERC20ExtendedV3BindAssetHash) - 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 *ERC20ExtendedV3BindAssetHashIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20ExtendedV3BindAssetHashIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20ExtendedV3BindAssetHash represents a BindAssetHash event raised by the ERC20ExtendedV3 contract. -type ERC20ExtendedV3BindAssetHash struct { - ChainId uint64 - ContractAddr []byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBindAssetHash is a free log retrieval operation binding the contract event 0x0c7bb21b9c9883bba0ddd55e34ec4c47bebd32dbce1192972fc4b2310f4acdb4. -// -// Solidity: event BindAssetHash(uint64 chainId, bytes contractAddr) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Filterer) FilterBindAssetHash(opts *bind.FilterOpts) (*ERC20ExtendedV3BindAssetHashIterator, error) { - - logs, sub, err := _ERC20ExtendedV3.contract.FilterLogs(opts, "BindAssetHash") - if err != nil { - return nil, err - } - return &ERC20ExtendedV3BindAssetHashIterator{contract: _ERC20ExtendedV3.contract, event: "BindAssetHash", logs: logs, sub: sub}, nil -} - -// WatchBindAssetHash is a free log subscription operation binding the contract event 0x0c7bb21b9c9883bba0ddd55e34ec4c47bebd32dbce1192972fc4b2310f4acdb4. -// -// Solidity: event BindAssetHash(uint64 chainId, bytes contractAddr) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Filterer) WatchBindAssetHash(opts *bind.WatchOpts, sink chan<- *ERC20ExtendedV3BindAssetHash) (event.Subscription, error) { - - logs, sub, err := _ERC20ExtendedV3.contract.WatchLogs(opts, "BindAssetHash") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20ExtendedV3BindAssetHash) - if err := _ERC20ExtendedV3.contract.UnpackLog(event, "BindAssetHash", 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 -} - -// ParseBindAssetHash is a log parse operation binding the contract event 0x0c7bb21b9c9883bba0ddd55e34ec4c47bebd32dbce1192972fc4b2310f4acdb4. -// -// Solidity: event BindAssetHash(uint64 chainId, bytes contractAddr) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Filterer) ParseBindAssetHash(log types.Log) (*ERC20ExtendedV3BindAssetHash, error) { - event := new(ERC20ExtendedV3BindAssetHash) - if err := _ERC20ExtendedV3.contract.UnpackLog(event, "BindAssetHash", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20ExtendedV3SetManagerProxyEventIterator is returned from FilterSetManagerProxyEvent and is used to iterate over the raw logs and unpacked data for SetManagerProxyEvent events raised by the ERC20ExtendedV3 contract. -type ERC20ExtendedV3SetManagerProxyEventIterator struct { - Event *ERC20ExtendedV3SetManagerProxyEvent // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20ExtendedV3SetManagerProxyEventIterator) 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(ERC20ExtendedV3SetManagerProxyEvent) - 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(ERC20ExtendedV3SetManagerProxyEvent) - 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 *ERC20ExtendedV3SetManagerProxyEventIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20ExtendedV3SetManagerProxyEventIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20ExtendedV3SetManagerProxyEvent represents a SetManagerProxyEvent event raised by the ERC20ExtendedV3 contract. -type ERC20ExtendedV3SetManagerProxyEvent struct { - ManagerContract common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetManagerProxyEvent is a free log retrieval operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. -// -// Solidity: event SetManagerProxyEvent(address managerContract) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Filterer) FilterSetManagerProxyEvent(opts *bind.FilterOpts) (*ERC20ExtendedV3SetManagerProxyEventIterator, error) { - - logs, sub, err := _ERC20ExtendedV3.contract.FilterLogs(opts, "SetManagerProxyEvent") - if err != nil { - return nil, err - } - return &ERC20ExtendedV3SetManagerProxyEventIterator{contract: _ERC20ExtendedV3.contract, event: "SetManagerProxyEvent", logs: logs, sub: sub}, nil -} - -// WatchSetManagerProxyEvent is a free log subscription operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. -// -// Solidity: event SetManagerProxyEvent(address managerContract) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Filterer) WatchSetManagerProxyEvent(opts *bind.WatchOpts, sink chan<- *ERC20ExtendedV3SetManagerProxyEvent) (event.Subscription, error) { - - logs, sub, err := _ERC20ExtendedV3.contract.WatchLogs(opts, "SetManagerProxyEvent") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20ExtendedV3SetManagerProxyEvent) - if err := _ERC20ExtendedV3.contract.UnpackLog(event, "SetManagerProxyEvent", 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 -} - -// ParseSetManagerProxyEvent is a log parse operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. -// -// Solidity: event SetManagerProxyEvent(address managerContract) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Filterer) ParseSetManagerProxyEvent(log types.Log) (*ERC20ExtendedV3SetManagerProxyEvent, error) { - event := new(ERC20ExtendedV3SetManagerProxyEvent) - if err := _ERC20ExtendedV3.contract.UnpackLog(event, "SetManagerProxyEvent", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20ExtendedV3TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20ExtendedV3 contract. -type ERC20ExtendedV3TransferIterator struct { - Event *ERC20ExtendedV3Transfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20ExtendedV3TransferIterator) 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(ERC20ExtendedV3Transfer) - 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(ERC20ExtendedV3Transfer) - 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 *ERC20ExtendedV3TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20ExtendedV3TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20ExtendedV3Transfer represents a Transfer event raised by the ERC20ExtendedV3 contract. -type ERC20ExtendedV3Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20ExtendedV3TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20ExtendedV3.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC20ExtendedV3TransferIterator{contract: _ERC20ExtendedV3.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20ExtendedV3Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20ExtendedV3.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20ExtendedV3Transfer) - if err := _ERC20ExtendedV3.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20ExtendedV3 *ERC20ExtendedV3Filterer) ParseTransfer(log types.Log) (*ERC20ExtendedV3Transfer, error) { - event := new(ERC20ExtendedV3Transfer) - if err := _ERC20ExtendedV3.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// IERC20ABI is the input ABI used to generate the binding from. -const IERC20ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// IERC20FuncSigs maps the 4-byte function signature to its string representation. -var IERC20FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// IERC20 is an auto generated Go binding around an Ethereum contract. -type IERC20 struct { - IERC20Caller // Read-only binding to the contract - IERC20Transactor // Write-only binding to the contract - IERC20Filterer // Log filterer for contract events -} - -// IERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type IERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type IERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IERC20Session struct { - Contract *IERC20 // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IERC20CallerSession struct { - Contract *IERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IERC20TransactorSession struct { - Contract *IERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type IERC20Raw struct { - Contract *IERC20 // Generic contract binding to access the raw methods on -} - -// IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IERC20CallerRaw struct { - Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IERC20TransactorRaw struct { - Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract. -func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) { - contract, err := bindIERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil -} - -// NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract. -func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) { - contract, err := bindIERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IERC20Caller{contract: contract}, nil -} - -// NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract. -func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) { - contract, err := bindIERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IERC20Transactor{contract: contract}, nil -} - -// NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract. -func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) { - contract, err := bindIERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IERC20Filterer{contract: contract}, nil -} - -// bindIERC20 binds a generic wrapper to an already deployed contract. -func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IERC20ABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IERC20.Contract.IERC20Caller.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 (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IERC20.Contract.IERC20Transactor.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 (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IERC20.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 (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IERC20.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) { - return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) { - return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) -} - -// IERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20 contract. -type IERC20ApprovalIterator struct { - Event *IERC20Approval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *IERC20ApprovalIterator) 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(IERC20Approval) - 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(IERC20Approval) - 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 *IERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IERC20Approval represents a Approval event raised by the IERC20 contract. -type IERC20Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &IERC20ApprovalIterator{contract: _IERC20.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _IERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(IERC20Approval) - if err := _IERC20.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) { - event := new(IERC20Approval) - if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// IERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20 contract. -type IERC20TransferIterator struct { - Event *IERC20Transfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *IERC20TransferIterator) 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(IERC20Transfer) - 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(IERC20Transfer) - 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 *IERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IERC20Transfer represents a Transfer event raised by the IERC20 contract. -type IERC20Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &IERC20TransferIterator{contract: _IERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _IERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(IERC20Transfer) - if err := _IERC20.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) { - event := new(IERC20Transfer) - if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// IEthCrossChainManagerABI is the input ABI used to generate the binding from. -const IEthCrossChainManagerABI = "[{\"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\"}]" - -// IEthCrossChainManagerFuncSigs maps the 4-byte function signature to its string representation. -var IEthCrossChainManagerFuncSigs = map[string]string{ - "bd5cf625": "crossChain(uint64,bytes,bytes,bytes)", -} - -// IEthCrossChainManager is an auto generated Go binding around an Ethereum contract. -type IEthCrossChainManager struct { - IEthCrossChainManagerCaller // Read-only binding to the contract - IEthCrossChainManagerTransactor // Write-only binding to the contract - IEthCrossChainManagerFilterer // Log filterer for contract events -} - -// IEthCrossChainManagerCaller is an auto generated read-only Go binding around an Ethereum contract. -type IEthCrossChainManagerCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IEthCrossChainManagerTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IEthCrossChainManagerFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IEthCrossChainManagerSession struct { - Contract *IEthCrossChainManager // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainManagerCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IEthCrossChainManagerCallerSession struct { - Contract *IEthCrossChainManagerCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IEthCrossChainManagerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IEthCrossChainManagerTransactorSession struct { - Contract *IEthCrossChainManagerTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainManagerRaw is an auto generated low-level Go binding around an Ethereum contract. -type IEthCrossChainManagerRaw struct { - Contract *IEthCrossChainManager // Generic contract binding to access the raw methods on -} - -// IEthCrossChainManagerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IEthCrossChainManagerCallerRaw struct { - Contract *IEthCrossChainManagerCaller // Generic read-only contract binding to access the raw methods on -} - -// IEthCrossChainManagerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IEthCrossChainManagerTransactorRaw struct { - Contract *IEthCrossChainManagerTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewIEthCrossChainManager creates a new instance of IEthCrossChainManager, bound to a specific deployed contract. -func NewIEthCrossChainManager(address common.Address, backend bind.ContractBackend) (*IEthCrossChainManager, error) { - contract, err := bindIEthCrossChainManager(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IEthCrossChainManager{IEthCrossChainManagerCaller: IEthCrossChainManagerCaller{contract: contract}, IEthCrossChainManagerTransactor: IEthCrossChainManagerTransactor{contract: contract}, IEthCrossChainManagerFilterer: IEthCrossChainManagerFilterer{contract: contract}}, nil -} - -// NewIEthCrossChainManagerCaller creates a new read-only instance of IEthCrossChainManager, bound to a specific deployed contract. -func NewIEthCrossChainManagerCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainManagerCaller, error) { - contract, err := bindIEthCrossChainManager(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerCaller{contract: contract}, nil -} - -// NewIEthCrossChainManagerTransactor creates a new write-only instance of IEthCrossChainManager, bound to a specific deployed contract. -func NewIEthCrossChainManagerTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainManagerTransactor, error) { - contract, err := bindIEthCrossChainManager(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerTransactor{contract: contract}, nil -} - -// NewIEthCrossChainManagerFilterer creates a new log filterer instance of IEthCrossChainManager, bound to a specific deployed contract. -func NewIEthCrossChainManagerFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainManagerFilterer, error) { - contract, err := bindIEthCrossChainManager(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerFilterer{contract: contract}, nil -} - -// bindIEthCrossChainManager binds a generic wrapper to an already deployed contract. -func bindIEthCrossChainManager(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IEthCrossChainManagerABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IEthCrossChainManager *IEthCrossChainManagerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainManager.Contract.IEthCrossChainManagerCaller.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 (_IEthCrossChainManager *IEthCrossChainManagerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.IEthCrossChainManagerTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainManager *IEthCrossChainManagerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.IEthCrossChainManagerTransactor.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 (_IEthCrossChainManager *IEthCrossChainManagerCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainManager.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 (_IEthCrossChainManager *IEthCrossChainManagerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainManager *IEthCrossChainManagerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.contract.Transact(opts, method, params...) -} - -// 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 (_IEthCrossChainManager *IEthCrossChainManagerTransactor) CrossChain(opts *bind.TransactOpts, _toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { - return _IEthCrossChainManager.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 (_IEthCrossChainManager *IEthCrossChainManagerSession) CrossChain(_toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.CrossChain(&_IEthCrossChainManager.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 (_IEthCrossChainManager *IEthCrossChainManagerTransactorSession) CrossChain(_toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.CrossChain(&_IEthCrossChainManager.TransactOpts, _toChainId, _toContract, _method, _txData) -} - -// IEthCrossChainManagerProxyABI is the input ABI used to generate the binding from. -const IEthCrossChainManagerProxyABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"getEthCrossChainManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" - -// IEthCrossChainManagerProxyFuncSigs maps the 4-byte function signature to its string representation. -var IEthCrossChainManagerProxyFuncSigs = map[string]string{ - "87939a7f": "getEthCrossChainManager()", -} - -// IEthCrossChainManagerProxy is an auto generated Go binding around an Ethereum contract. -type IEthCrossChainManagerProxy struct { - IEthCrossChainManagerProxyCaller // Read-only binding to the contract - IEthCrossChainManagerProxyTransactor // Write-only binding to the contract - IEthCrossChainManagerProxyFilterer // Log filterer for contract events -} - -// IEthCrossChainManagerProxyCaller is an auto generated read-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerProxyTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerProxyFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IEthCrossChainManagerProxyFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerProxySession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IEthCrossChainManagerProxySession struct { - Contract *IEthCrossChainManagerProxy // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainManagerProxyCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IEthCrossChainManagerProxyCallerSession struct { - Contract *IEthCrossChainManagerProxyCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IEthCrossChainManagerProxyTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IEthCrossChainManagerProxyTransactorSession struct { - Contract *IEthCrossChainManagerProxyTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainManagerProxyRaw is an auto generated low-level Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyRaw struct { - Contract *IEthCrossChainManagerProxy // Generic contract binding to access the raw methods on -} - -// IEthCrossChainManagerProxyCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyCallerRaw struct { - Contract *IEthCrossChainManagerProxyCaller // Generic read-only contract binding to access the raw methods on -} - -// IEthCrossChainManagerProxyTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyTransactorRaw struct { - Contract *IEthCrossChainManagerProxyTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewIEthCrossChainManagerProxy creates a new instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxy(address common.Address, backend bind.ContractBackend) (*IEthCrossChainManagerProxy, error) { - contract, err := bindIEthCrossChainManagerProxy(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxy{IEthCrossChainManagerProxyCaller: IEthCrossChainManagerProxyCaller{contract: contract}, IEthCrossChainManagerProxyTransactor: IEthCrossChainManagerProxyTransactor{contract: contract}, IEthCrossChainManagerProxyFilterer: IEthCrossChainManagerProxyFilterer{contract: contract}}, nil -} - -// NewIEthCrossChainManagerProxyCaller creates a new read-only instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxyCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainManagerProxyCaller, error) { - contract, err := bindIEthCrossChainManagerProxy(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxyCaller{contract: contract}, nil -} - -// NewIEthCrossChainManagerProxyTransactor creates a new write-only instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainManagerProxyTransactor, error) { - contract, err := bindIEthCrossChainManagerProxy(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxyTransactor{contract: contract}, nil -} - -// NewIEthCrossChainManagerProxyFilterer creates a new log filterer instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainManagerProxyFilterer, error) { - contract, err := bindIEthCrossChainManagerProxy(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxyFilterer{contract: contract}, nil -} - -// bindIEthCrossChainManagerProxy binds a generic wrapper to an already deployed contract. -func bindIEthCrossChainManagerProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IEthCrossChainManagerProxyABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyCaller.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyTransactor.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainManagerProxy.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCaller) GetEthCrossChainManager(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _IEthCrossChainManagerProxy.contract.Call(opts, out, "getEthCrossChainManager") - return *ret0, err -} - -// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. -// -// Solidity: function getEthCrossChainManager() view returns(address) -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxySession) GetEthCrossChainManager() (common.Address, error) { - return _IEthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_IEthCrossChainManagerProxy.CallOpts) -} - -// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. -// -// Solidity: function getEthCrossChainManager() view returns(address) -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCallerSession) GetEthCrossChainManager() (common.Address, error) { - return _IEthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_IEthCrossChainManagerProxy.CallOpts) -} - -// SafeMathABI is the input ABI used to generate the binding from. -const SafeMathABI = "[]" - -// SafeMathBin is the compiled bytecode used for deploying new contracts. -var SafeMathBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820db757905f1c1b49b781ddf45e615d2bbf336aeac8bb9ae61ed6fca08e24c7dc364736f6c634300050f0032" - -// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. -func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// SafeMath is an auto generated Go binding around an Ethereum contract. -type SafeMath struct { - SafeMathCaller // Read-only binding to the contract - SafeMathTransactor // Write-only binding to the contract - SafeMathFilterer // Log filterer for contract events -} - -// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. -type SafeMathCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SafeMathTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SafeMathFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SafeMathSession struct { - Contract *SafeMath // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SafeMathCallerSession struct { - Contract *SafeMathCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SafeMathTransactorSession struct { - Contract *SafeMathTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. -type SafeMathRaw struct { - Contract *SafeMath // Generic contract binding to access the raw methods on -} - -// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SafeMathCallerRaw struct { - Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on -} - -// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SafeMathTransactorRaw struct { - Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. -func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { - contract, err := bindSafeMath(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { - contract, err := bindSafeMath(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SafeMathCaller{contract: contract}, nil -} - -// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { - contract, err := bindSafeMath(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SafeMathTransactor{contract: contract}, nil -} - -// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { - contract, err := bindSafeMath(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SafeMathFilterer{contract: contract}, nil -} - -// bindSafeMath binds a generic wrapper to an already deployed contract. -func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transact(opts, method, params...) -} - -// UtilsABI is the input ABI used to generate the binding from. -const UtilsABI = "[]" - -// UtilsBin is the compiled bytecode used for deploying new contracts. -var UtilsBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820201a9a96d2544d2ec86ac31f65b49717ee12e7c08970f9a9939bd117930a7e5364736f6c634300050f0032" - -// DeployUtils deploys a new Ethereum contract, binding an instance of Utils to it. -func DeployUtils(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Utils, error) { - parsed, err := abi.JSON(strings.NewReader(UtilsABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(UtilsBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Utils{UtilsCaller: UtilsCaller{contract: contract}, UtilsTransactor: UtilsTransactor{contract: contract}, UtilsFilterer: UtilsFilterer{contract: contract}}, nil -} - -// Utils is an auto generated Go binding around an Ethereum contract. -type Utils struct { - UtilsCaller // Read-only binding to the contract - UtilsTransactor // Write-only binding to the contract - UtilsFilterer // Log filterer for contract events -} - -// UtilsCaller is an auto generated read-only Go binding around an Ethereum contract. -type UtilsCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// UtilsTransactor is an auto generated write-only Go binding around an Ethereum contract. -type UtilsTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// UtilsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type UtilsFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// UtilsSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type UtilsSession struct { - Contract *Utils // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// UtilsCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type UtilsCallerSession struct { - Contract *UtilsCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// UtilsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type UtilsTransactorSession struct { - Contract *UtilsTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// UtilsRaw is an auto generated low-level Go binding around an Ethereum contract. -type UtilsRaw struct { - Contract *Utils // Generic contract binding to access the raw methods on -} - -// UtilsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type UtilsCallerRaw struct { - Contract *UtilsCaller // Generic read-only contract binding to access the raw methods on -} - -// UtilsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type UtilsTransactorRaw struct { - Contract *UtilsTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewUtils creates a new instance of Utils, bound to a specific deployed contract. -func NewUtils(address common.Address, backend bind.ContractBackend) (*Utils, error) { - contract, err := bindUtils(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Utils{UtilsCaller: UtilsCaller{contract: contract}, UtilsTransactor: UtilsTransactor{contract: contract}, UtilsFilterer: UtilsFilterer{contract: contract}}, nil -} - -// NewUtilsCaller creates a new read-only instance of Utils, bound to a specific deployed contract. -func NewUtilsCaller(address common.Address, caller bind.ContractCaller) (*UtilsCaller, error) { - contract, err := bindUtils(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &UtilsCaller{contract: contract}, nil -} - -// NewUtilsTransactor creates a new write-only instance of Utils, bound to a specific deployed contract. -func NewUtilsTransactor(address common.Address, transactor bind.ContractTransactor) (*UtilsTransactor, error) { - contract, err := bindUtils(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &UtilsTransactor{contract: contract}, nil -} - -// NewUtilsFilterer creates a new log filterer instance of Utils, bound to a specific deployed contract. -func NewUtilsFilterer(address common.Address, filterer bind.ContractFilterer) (*UtilsFilterer, error) { - contract, err := bindUtils(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &UtilsFilterer{contract: contract}, nil -} - -// bindUtils binds a generic wrapper to an already deployed contract. -func bindUtils(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(UtilsABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Utils *UtilsRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Utils.Contract.UtilsCaller.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 (_Utils *UtilsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Utils.Contract.UtilsTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Utils *UtilsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Utils.Contract.UtilsTransactor.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 (_Utils *UtilsCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Utils.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 (_Utils *UtilsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Utils.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Utils *UtilsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Utils.Contract.contract.Transact(opts, method, params...) -} - -// ZeroCopySinkABI is the input ABI used to generate the binding from. -const ZeroCopySinkABI = "[]" - -// ZeroCopySinkBin is the compiled bytecode used for deploying new contracts. -var ZeroCopySinkBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158205a9851dd974d82a7bea8573bbead290b5daab8da233a4d6477188e9b614ca12864736f6c634300050f0032" - -// DeployZeroCopySink deploys a new Ethereum contract, binding an instance of ZeroCopySink to it. -func DeployZeroCopySink(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ZeroCopySink, error) { - parsed, err := abi.JSON(strings.NewReader(ZeroCopySinkABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ZeroCopySinkBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ZeroCopySink{ZeroCopySinkCaller: ZeroCopySinkCaller{contract: contract}, ZeroCopySinkTransactor: ZeroCopySinkTransactor{contract: contract}, ZeroCopySinkFilterer: ZeroCopySinkFilterer{contract: contract}}, nil -} - -// ZeroCopySink is an auto generated Go binding around an Ethereum contract. -type ZeroCopySink struct { - ZeroCopySinkCaller // Read-only binding to the contract - ZeroCopySinkTransactor // Write-only binding to the contract - ZeroCopySinkFilterer // Log filterer for contract events -} - -// ZeroCopySinkCaller is an auto generated read-only Go binding around an Ethereum contract. -type ZeroCopySinkCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySinkTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ZeroCopySinkTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySinkFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ZeroCopySinkFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySinkSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ZeroCopySinkSession struct { - Contract *ZeroCopySink // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZeroCopySinkCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ZeroCopySinkCallerSession struct { - Contract *ZeroCopySinkCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ZeroCopySinkTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ZeroCopySinkTransactorSession struct { - Contract *ZeroCopySinkTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZeroCopySinkRaw is an auto generated low-level Go binding around an Ethereum contract. -type ZeroCopySinkRaw struct { - Contract *ZeroCopySink // Generic contract binding to access the raw methods on -} - -// ZeroCopySinkCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ZeroCopySinkCallerRaw struct { - Contract *ZeroCopySinkCaller // Generic read-only contract binding to access the raw methods on -} - -// ZeroCopySinkTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ZeroCopySinkTransactorRaw struct { - Contract *ZeroCopySinkTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewZeroCopySink creates a new instance of ZeroCopySink, bound to a specific deployed contract. -func NewZeroCopySink(address common.Address, backend bind.ContractBackend) (*ZeroCopySink, error) { - contract, err := bindZeroCopySink(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ZeroCopySink{ZeroCopySinkCaller: ZeroCopySinkCaller{contract: contract}, ZeroCopySinkTransactor: ZeroCopySinkTransactor{contract: contract}, ZeroCopySinkFilterer: ZeroCopySinkFilterer{contract: contract}}, nil -} - -// NewZeroCopySinkCaller creates a new read-only instance of ZeroCopySink, bound to a specific deployed contract. -func NewZeroCopySinkCaller(address common.Address, caller bind.ContractCaller) (*ZeroCopySinkCaller, error) { - contract, err := bindZeroCopySink(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ZeroCopySinkCaller{contract: contract}, nil -} - -// NewZeroCopySinkTransactor creates a new write-only instance of ZeroCopySink, bound to a specific deployed contract. -func NewZeroCopySinkTransactor(address common.Address, transactor bind.ContractTransactor) (*ZeroCopySinkTransactor, error) { - contract, err := bindZeroCopySink(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ZeroCopySinkTransactor{contract: contract}, nil -} - -// NewZeroCopySinkFilterer creates a new log filterer instance of ZeroCopySink, bound to a specific deployed contract. -func NewZeroCopySinkFilterer(address common.Address, filterer bind.ContractFilterer) (*ZeroCopySinkFilterer, error) { - contract, err := bindZeroCopySink(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ZeroCopySinkFilterer{contract: contract}, nil -} - -// bindZeroCopySink binds a generic wrapper to an already deployed contract. -func bindZeroCopySink(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ZeroCopySinkABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ZeroCopySink *ZeroCopySinkRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ZeroCopySink.Contract.ZeroCopySinkCaller.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 (_ZeroCopySink *ZeroCopySinkRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZeroCopySink.Contract.ZeroCopySinkTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZeroCopySink *ZeroCopySinkRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZeroCopySink.Contract.ZeroCopySinkTransactor.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 (_ZeroCopySink *ZeroCopySinkCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ZeroCopySink.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 (_ZeroCopySink *ZeroCopySinkTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZeroCopySink.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZeroCopySink *ZeroCopySinkTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZeroCopySink.Contract.contract.Transact(opts, method, params...) -} - -// ZeroCopySourceABI is the input ABI used to generate the binding from. -const ZeroCopySourceABI = "[]" - -// ZeroCopySourceBin is the compiled bytecode used for deploying new contracts. -var ZeroCopySourceBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820e1cfaceb856ac965bfd3e9907f756338e254af4d522fba59da671d6ec16d284c64736f6c634300050f0032" - -// DeployZeroCopySource deploys a new Ethereum contract, binding an instance of ZeroCopySource to it. -func DeployZeroCopySource(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ZeroCopySource, error) { - parsed, err := abi.JSON(strings.NewReader(ZeroCopySourceABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ZeroCopySourceBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ZeroCopySource{ZeroCopySourceCaller: ZeroCopySourceCaller{contract: contract}, ZeroCopySourceTransactor: ZeroCopySourceTransactor{contract: contract}, ZeroCopySourceFilterer: ZeroCopySourceFilterer{contract: contract}}, nil -} - -// ZeroCopySource is an auto generated Go binding around an Ethereum contract. -type ZeroCopySource struct { - ZeroCopySourceCaller // Read-only binding to the contract - ZeroCopySourceTransactor // Write-only binding to the contract - ZeroCopySourceFilterer // Log filterer for contract events -} - -// ZeroCopySourceCaller is an auto generated read-only Go binding around an Ethereum contract. -type ZeroCopySourceCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySourceTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ZeroCopySourceTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySourceFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ZeroCopySourceFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySourceSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ZeroCopySourceSession struct { - Contract *ZeroCopySource // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZeroCopySourceCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ZeroCopySourceCallerSession struct { - Contract *ZeroCopySourceCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ZeroCopySourceTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ZeroCopySourceTransactorSession struct { - Contract *ZeroCopySourceTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZeroCopySourceRaw is an auto generated low-level Go binding around an Ethereum contract. -type ZeroCopySourceRaw struct { - Contract *ZeroCopySource // Generic contract binding to access the raw methods on -} - -// ZeroCopySourceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ZeroCopySourceCallerRaw struct { - Contract *ZeroCopySourceCaller // Generic read-only contract binding to access the raw methods on -} - -// ZeroCopySourceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ZeroCopySourceTransactorRaw struct { - Contract *ZeroCopySourceTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewZeroCopySource creates a new instance of ZeroCopySource, bound to a specific deployed contract. -func NewZeroCopySource(address common.Address, backend bind.ContractBackend) (*ZeroCopySource, error) { - contract, err := bindZeroCopySource(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ZeroCopySource{ZeroCopySourceCaller: ZeroCopySourceCaller{contract: contract}, ZeroCopySourceTransactor: ZeroCopySourceTransactor{contract: contract}, ZeroCopySourceFilterer: ZeroCopySourceFilterer{contract: contract}}, nil -} - -// NewZeroCopySourceCaller creates a new read-only instance of ZeroCopySource, bound to a specific deployed contract. -func NewZeroCopySourceCaller(address common.Address, caller bind.ContractCaller) (*ZeroCopySourceCaller, error) { - contract, err := bindZeroCopySource(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ZeroCopySourceCaller{contract: contract}, nil -} - -// NewZeroCopySourceTransactor creates a new write-only instance of ZeroCopySource, bound to a specific deployed contract. -func NewZeroCopySourceTransactor(address common.Address, transactor bind.ContractTransactor) (*ZeroCopySourceTransactor, error) { - contract, err := bindZeroCopySource(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ZeroCopySourceTransactor{contract: contract}, nil -} - -// NewZeroCopySourceFilterer creates a new log filterer instance of ZeroCopySource, bound to a specific deployed contract. -func NewZeroCopySourceFilterer(address common.Address, filterer bind.ContractFilterer) (*ZeroCopySourceFilterer, error) { - contract, err := bindZeroCopySource(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ZeroCopySourceFilterer{contract: contract}, nil -} - -// bindZeroCopySource binds a generic wrapper to an already deployed contract. -func bindZeroCopySource(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ZeroCopySourceABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ZeroCopySource *ZeroCopySourceRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ZeroCopySource.Contract.ZeroCopySourceCaller.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 (_ZeroCopySource *ZeroCopySourceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZeroCopySource.Contract.ZeroCopySourceTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZeroCopySource *ZeroCopySourceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZeroCopySource.Contract.ZeroCopySourceTransactor.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 (_ZeroCopySource *ZeroCopySourceCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ZeroCopySource.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 (_ZeroCopySource *ZeroCopySourceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZeroCopySource.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZeroCopySource *ZeroCopySourceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZeroCopySource.Contract.contract.Transact(opts, method, params...) -} diff --git a/chains/eth/abi/eccd/eccd_abi.go b/chains/eth/abi/eccd/eccd_abi.go deleted file mode 100644 index b85ef3e..0000000 --- a/chains/eth/abi/eccd/eccd_abi.go +++ /dev/null @@ -1,2687 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package eccd - -import ( - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// ContextABI is the input ABI used to generate the binding from. -const ContextABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" - -// Context is an auto generated Go binding around an Ethereum contract. -type Context struct { - ContextCaller // Read-only binding to the contract - ContextTransactor // Write-only binding to the contract - ContextFilterer // Log filterer for contract events -} - -// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. -type ContextCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ContextTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ContextFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ContextSession struct { - Contract *Context // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ContextCallerSession struct { - Contract *ContextCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ContextTransactorSession struct { - Contract *ContextTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. -type ContextRaw struct { - Contract *Context // Generic contract binding to access the raw methods on -} - -// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ContextCallerRaw struct { - Contract *ContextCaller // Generic read-only contract binding to access the raw methods on -} - -// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ContextTransactorRaw struct { - Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewContext creates a new instance of Context, bound to a specific deployed contract. -func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { - contract, err := bindContext(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil -} - -// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. -func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { - contract, err := bindContext(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ContextCaller{contract: contract}, nil -} - -// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. -func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { - contract, err := bindContext(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ContextTransactor{contract: contract}, nil -} - -// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. -func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { - contract, err := bindContext(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ContextFilterer{contract: contract}, nil -} - -// bindContext binds a generic wrapper to an already deployed contract. -func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ContextABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.Contract.ContextCaller.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 (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.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 (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.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 (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.contract.Transact(opts, method, params...) -} - -// EthCrossChainDataABI is the input ABI used to generate the binding from. -const EthCrossChainDataABI = "[{\"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\"}]" - -// EthCrossChainDataFuncSigs maps the 4-byte function signature to its string representation. -var EthCrossChainDataFuncSigs = map[string]string{ - "fcbdc1e0": "ConKeepersPkBytes()", - "67e31a74": "CurEpochStartHeight()", - "00c5fff8": "EthToPolyTxHashIndex()", - "529caad8": "EthToPolyTxHashMap(uint256)", - "20bbde38": "ExtraData(bytes32,bytes32)", - "0586763c": "checkIfFromChainTxExist(uint64,bytes32)", - "69d48074": "getCurEpochConPubKeyBytes()", - "5ac40790": "getCurEpochStartHeight()", - "29927875": "getEthTxHash(uint256)", - "ff3d24a1": "getEthTxHashIndex()", - "40602bb5": "getExtraData(bytes32,bytes32)", - "8f32d59b": "isOwner()", - "e90bfdcf": "markFromChainTxExist(uint64,bytes32)", - "8da5cb5b": "owner()", - "8456cb59": "pause()", - "5c975abb": "paused()", - "41973cd9": "putCurEpochConPubKeyBytes(bytes)", - "8a8bd17f": "putCurEpochStartHeight(uint32)", - "4c3ccf64": "putEthTxHash(bytes32)", - "1afe374e": "putExtraData(bytes32,bytes32,bytes)", - "715018a6": "renounceOwnership()", - "f2fde38b": "transferOwnership(address)", - "3f4ba83a": "unpause()", -} - -// EthCrossChainDataBin is the compiled bytecode used for deploying new contracts. -var EthCrossChainDataBin = "0x608060405260006100176001600160e01b0361007316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055610077565b3390565b6110f7806100866000396000f3fe608060405234801561001057600080fd5b506004361061014c5760003560e01c80635c975abb116100c35780638da5cb5b1161007c5780638da5cb5b1461048c5780638f32d59b146104b0578063e90bfdcf146104b8578063f2fde38b146104e5578063fcbdc1e01461050b578063ff3d24a1146105135761014c565b80635c975abb1461043f57806367e31a741461044757806369d480741461044f578063715018a6146104575780638456cb59146104615780638a8bd17f146104695761014c565b80633f4ba83a116101155780633f4ba83a1461031357806340602bb51461031b57806341973cd91461033e5780634c3ccf64146103e4578063529caad8146104015780635ac407901461041e5761014c565b8062c5fff8146101515780630586763c1461016b5780631afe374e146101ac57806320bbde381461025e57806329927875146102f6575b600080fd5b61015961051b565b60408051918252519081900360200190f35b6101986004803603604081101561018157600080fd5b5067ffffffffffffffff8135169060200135610521565b604080519115158252519081900360200190f35b610198600480360360608110156101c257600080fd5b8135916020810135918101906060810160408201356401000000008111156101e957600080fd5b8201836020820111156101fb57600080fd5b8035906020019184600183028401116401000000008311171561021d57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061054d945050505050565b6102816004803603604081101561027457600080fd5b5080359060200135610619565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102bb5781810151838201526020016102a3565b50505050905090810190601f1680156102e85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101596004803603602081101561030c57600080fd5b50356106bd565b6101986106cf565b6102816004803603604081101561033157600080fd5b508035906020013561077c565b6101986004803603602081101561035457600080fd5b81019060208101813564010000000081111561036f57600080fd5b82018360208201111561038157600080fd5b803590602001918460018302840111640100000000831117156103a357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610826945050505050565b610198600480360360208110156103fa57600080fd5b50356108dc565b6101596004803603602081101561041757600080fd5b5035610999565b6104266109ab565b6040805163ffffffff9092168252519081900360200190f35b6101986109b7565b6104266109c7565b6102816109d3565b61045f610a69565b005b610198610afa565b6101986004803603602081101561047f57600080fd5b503563ffffffff16610b9d565b610494610c56565b604080516001600160a01b039092168252519081900360200190f35b610198610c65565b610198600480360360408110156104ce57600080fd5b5067ffffffffffffffff8135169060200135610c89565b61045f600480360360208110156104fb57600080fd5b50356001600160a01b0316610d5a565b610281610dad565b610159610e08565b60025481565b67ffffffffffffffff919091166000908152600560209081526040808320938352929052205460ff1690565b60008054600160a01b900460ff16156105a0576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6105a8610c65565b6105e7576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b60008481526006602090815260408083208684528252909120835161060e92850190610fe4565b506001949350505050565b60066020908152600092835260408084208252918352918190208054825160026001831615610100026000190190921691909104601f8101859004850282018501909352828152929091908301828280156106b55780601f1061068a576101008083540402835291602001916106b5565b820191906000526020600020905b81548152906001019060200180831161069857829003601f168201915b505050505081565b60009081526001602052604090205490565b60006106d9610c65565b610718576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b600054600160a01b900460ff1661076d576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b610775610e0e565b5060015b90565b600082815260066020908152604080832084845282529182902080548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156108195780601f106107ee57610100808354040283529160200191610819565b820191906000526020600020905b8154815290600101906020018083116107fc57829003601f168201915b5050505050905092915050565b60008054600160a01b900460ff1615610879576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610881610c65565b6108c0576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b81516108d3906003906020850190610fe4565b50600192915050565b60008054600160a01b900460ff161561092f576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610937610c65565b610976576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b506002805460009081526001602081905260409091209290925580548201905590565b60016020526000908152604090205481565b60045463ffffffff1690565b600054600160a01b900460ff1690565b60045463ffffffff1681565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a5f5780601f10610a3457610100808354040283529160200191610a5f565b820191906000526020600020905b815481529060010190602001808311610a4257829003601f168201915b5050505050905090565b610a71610c65565b610ab0576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610b04610c65565b610b43576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b600054600160a01b900460ff1615610b95576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610775610eb6565b60008054600160a01b900460ff1615610bf0576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610bf8610c65565b610c37576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b506004805463ffffffff831663ffffffff199091161790556001919050565b6000546001600160a01b031690565b600080546001600160a01b0316610c7a610f40565b6001600160a01b031614905090565b60008054600160a01b900460ff1615610cdc576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610ce4610c65565b610d23576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b5067ffffffffffffffff91909116600090815260056020908152604080832093835292905220805460ff1916600190811790915590565b610d62610c65565b610da1576040805162461bcd60e51b815260206004820181905260248201526000805160206110a3833981519152604482015290519081900360640190fd5b610daa81610f44565b50565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156106b55780601f1061068a576101008083540402835291602001916106b5565b60025490565b600054600160a01b900460ff16610e63576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610e99610f40565b604080516001600160a01b039092168252519081900360200190a1565b600054600160a01b900460ff1615610f08576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610e995b3390565b6001600160a01b038116610f895760405162461bcd60e51b815260040180806020018281038252602681526020018061107d6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061102557805160ff1916838001178555611052565b82800160010185558215611052579182015b82811115611052578251825591602001919060010190611037565b5061105e929150611062565b5090565b61077991905b8082111561105e576000815560010161106856fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a723158200eb6a76a56ee84521b2fc487e8f8e4fad43dacfc2f087fe0bbdbc0b5c240a65a64736f6c634300050f0032" - -// DeployEthCrossChainData deploys a new Ethereum contract, binding an instance of EthCrossChainData to it. -func DeployEthCrossChainData(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *EthCrossChainData, error) { - parsed, err := abi.JSON(strings.NewReader(EthCrossChainDataABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(EthCrossChainDataBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &EthCrossChainData{EthCrossChainDataCaller: EthCrossChainDataCaller{contract: contract}, EthCrossChainDataTransactor: EthCrossChainDataTransactor{contract: contract}, EthCrossChainDataFilterer: EthCrossChainDataFilterer{contract: contract}}, nil -} - -// EthCrossChainData is an auto generated Go binding around an Ethereum 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 Ethereum contract. -type EthCrossChainDataCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// EthCrossChainDataTransactor is an auto generated write-only Go binding around an Ethereum contract. -type EthCrossChainDataTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// EthCrossChainDataFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type EthCrossChainDataFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// EthCrossChainDataSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type EthCrossChainDataSession struct { - Contract *EthCrossChainData // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// EthCrossChainDataCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type EthCrossChainDataCallerSession struct { - Contract *EthCrossChainDataCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// EthCrossChainDataTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type EthCrossChainDataTransactorSession struct { - Contract *EthCrossChainDataTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// EthCrossChainDataRaw is an auto generated low-level Go binding around an Ethereum 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 Ethereum 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 Ethereum 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(address common.Address, backend bind.ContractBackend) (*EthCrossChainData, error) { - contract, err := bindEthCrossChainData(address, backend, backend, backend) - 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(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(EthCrossChainDataABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 *bind.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 *bind.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 *bind.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 *bind.CallOpts) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _EthCrossChainData.contract.Call(opts, out, "ConKeepersPkBytes") - return *ret0, 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 *bind.CallOpts) (uint32, error) { - var ( - ret0 = new(uint32) - ) - out := ret0 - err := _EthCrossChainData.contract.Call(opts, out, "CurEpochStartHeight") - return *ret0, 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 *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _EthCrossChainData.contract.Call(opts, out, "EthToPolyTxHashIndex") - return *ret0, 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 *bind.CallOpts, arg0 *big.Int) ([32]byte, error) { - var ( - ret0 = new([32]byte) - ) - out := ret0 - err := _EthCrossChainData.contract.Call(opts, out, "EthToPolyTxHashMap", arg0) - return *ret0, 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 *bind.CallOpts, arg0 [32]byte, arg1 [32]byte) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _EthCrossChainData.contract.Call(opts, out, "ExtraData", arg0, arg1) - return *ret0, 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 *bind.CallOpts, fromChainId uint64, fromChainTx [32]byte) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _EthCrossChainData.contract.Call(opts, out, "checkIfFromChainTxExist", fromChainId, fromChainTx) - return *ret0, 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 *bind.CallOpts) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _EthCrossChainData.contract.Call(opts, out, "getCurEpochConPubKeyBytes") - return *ret0, 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 *bind.CallOpts) (uint32, error) { - var ( - ret0 = new(uint32) - ) - out := ret0 - err := _EthCrossChainData.contract.Call(opts, out, "getCurEpochStartHeight") - return *ret0, 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 *bind.CallOpts, ethTxHashIndex *big.Int) ([32]byte, error) { - var ( - ret0 = new([32]byte) - ) - out := ret0 - err := _EthCrossChainData.contract.Call(opts, out, "getEthTxHash", ethTxHashIndex) - return *ret0, 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 *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _EthCrossChainData.contract.Call(opts, out, "getEthTxHashIndex") - return *ret0, 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 *bind.CallOpts, key1 [32]byte, key2 [32]byte) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _EthCrossChainData.contract.Call(opts, out, "getExtraData", key1, key2) - return *ret0, 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 *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _EthCrossChainData.contract.Call(opts, out, "isOwner") - return *ret0, 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 *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _EthCrossChainData.contract.Call(opts, out, "owner") - return *ret0, 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 *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _EthCrossChainData.contract.Call(opts, out, "paused") - return *ret0, 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 *bind.TransactOpts, fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, 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) (*types.Transaction, 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) (*types.Transaction, 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 *bind.TransactOpts) (*types.Transaction, 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() (*types.Transaction, 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() (*types.Transaction, 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 *bind.TransactOpts, curEpochPkBytes []byte) (*types.Transaction, 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) (*types.Transaction, 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) (*types.Transaction, 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 *bind.TransactOpts, curEpochStartHeight uint32) (*types.Transaction, 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) (*types.Transaction, 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) (*types.Transaction, 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 *bind.TransactOpts, ethTxHash [32]byte) (*types.Transaction, 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) (*types.Transaction, 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) (*types.Transaction, 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 *bind.TransactOpts, key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, 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) (*types.Transaction, 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) (*types.Transaction, 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 *bind.TransactOpts) (*types.Transaction, 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() (*types.Transaction, 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() (*types.Transaction, 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 *bind.TransactOpts, newOwner common.Address) (*types.Transaction, 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) (*types.Transaction, 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) (*types.Transaction, 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 *bind.TransactOpts) (*types.Transaction, 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() (*types.Transaction, 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() (*types.Transaction, 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 *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *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 types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_EthCrossChainData *EthCrossChainDataFilterer) FilterOwnershipTransferred(opts *bind.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 *bind.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) - } - - logs, 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 := <-logs: - // 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 -} - -// 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 types.Log) (*EthCrossChainDataOwnershipTransferred, error) { - event := new(EthCrossChainDataOwnershipTransferred) - if err := _EthCrossChainData.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - 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 *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *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 types.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 *bind.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 *bind.WatchOpts, sink chan<- *EthCrossChainDataPaused) (event.Subscription, error) { - - logs, 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 := <-logs: - // 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 -} - -// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_EthCrossChainData *EthCrossChainDataFilterer) ParsePaused(log types.Log) (*EthCrossChainDataPaused, error) { - event := new(EthCrossChainDataPaused) - if err := _EthCrossChainData.contract.UnpackLog(event, "Paused", log); err != nil { - return nil, err - } - 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 *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *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 types.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 *bind.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 *bind.WatchOpts, sink chan<- *EthCrossChainDataUnpaused) (event.Subscription, error) { - - logs, 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 := <-logs: - // 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 -} - -// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_EthCrossChainData *EthCrossChainDataFilterer) ParseUnpaused(log types.Log) (*EthCrossChainDataUnpaused, error) { - event := new(EthCrossChainDataUnpaused) - if err := _EthCrossChainData.contract.UnpackLog(event, "Unpaused", log); err != nil { - return nil, err - } - return event, nil -} - -// IEthCrossChainDataABI is the input ABI used to generate the binding from. -const IEthCrossChainDataABI = "[{\"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\":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\":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\":[{\"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\"}]" - -// IEthCrossChainDataFuncSigs maps the 4-byte function signature to its string representation. -var IEthCrossChainDataFuncSigs = map[string]string{ - "0586763c": "checkIfFromChainTxExist(uint64,bytes32)", - "69d48074": "getCurEpochConPubKeyBytes()", - "5ac40790": "getCurEpochStartHeight()", - "29927875": "getEthTxHash(uint256)", - "ff3d24a1": "getEthTxHashIndex()", - "40602bb5": "getExtraData(bytes32,bytes32)", - "e90bfdcf": "markFromChainTxExist(uint64,bytes32)", - "8456cb59": "pause()", - "5c975abb": "paused()", - "41973cd9": "putCurEpochConPubKeyBytes(bytes)", - "8a8bd17f": "putCurEpochStartHeight(uint32)", - "4c3ccf64": "putEthTxHash(bytes32)", - "1afe374e": "putExtraData(bytes32,bytes32,bytes)", - "f2fde38b": "transferOwnership(address)", - "3f4ba83a": "unpause()", -} - -// IEthCrossChainData is an auto generated Go binding around an Ethereum contract. -type IEthCrossChainData struct { - IEthCrossChainDataCaller // Read-only binding to the contract - IEthCrossChainDataTransactor // Write-only binding to the contract - IEthCrossChainDataFilterer // Log filterer for contract events -} - -// IEthCrossChainDataCaller is an auto generated read-only Go binding around an Ethereum contract. -type IEthCrossChainDataCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainDataTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IEthCrossChainDataTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainDataFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IEthCrossChainDataFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainDataSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IEthCrossChainDataSession struct { - Contract *IEthCrossChainData // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainDataCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IEthCrossChainDataCallerSession struct { - Contract *IEthCrossChainDataCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IEthCrossChainDataTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IEthCrossChainDataTransactorSession struct { - Contract *IEthCrossChainDataTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainDataRaw is an auto generated low-level Go binding around an Ethereum contract. -type IEthCrossChainDataRaw struct { - Contract *IEthCrossChainData // Generic contract binding to access the raw methods on -} - -// IEthCrossChainDataCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IEthCrossChainDataCallerRaw struct { - Contract *IEthCrossChainDataCaller // Generic read-only contract binding to access the raw methods on -} - -// IEthCrossChainDataTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IEthCrossChainDataTransactorRaw struct { - Contract *IEthCrossChainDataTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewIEthCrossChainData creates a new instance of IEthCrossChainData, bound to a specific deployed contract. -func NewIEthCrossChainData(address common.Address, backend bind.ContractBackend) (*IEthCrossChainData, error) { - contract, err := bindIEthCrossChainData(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IEthCrossChainData{IEthCrossChainDataCaller: IEthCrossChainDataCaller{contract: contract}, IEthCrossChainDataTransactor: IEthCrossChainDataTransactor{contract: contract}, IEthCrossChainDataFilterer: IEthCrossChainDataFilterer{contract: contract}}, nil -} - -// NewIEthCrossChainDataCaller creates a new read-only instance of IEthCrossChainData, bound to a specific deployed contract. -func NewIEthCrossChainDataCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainDataCaller, error) { - contract, err := bindIEthCrossChainData(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainDataCaller{contract: contract}, nil -} - -// NewIEthCrossChainDataTransactor creates a new write-only instance of IEthCrossChainData, bound to a specific deployed contract. -func NewIEthCrossChainDataTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainDataTransactor, error) { - contract, err := bindIEthCrossChainData(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainDataTransactor{contract: contract}, nil -} - -// NewIEthCrossChainDataFilterer creates a new log filterer instance of IEthCrossChainData, bound to a specific deployed contract. -func NewIEthCrossChainDataFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainDataFilterer, error) { - contract, err := bindIEthCrossChainData(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IEthCrossChainDataFilterer{contract: contract}, nil -} - -// bindIEthCrossChainData binds a generic wrapper to an already deployed contract. -func bindIEthCrossChainData(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IEthCrossChainDataABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IEthCrossChainData *IEthCrossChainDataRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainData.Contract.IEthCrossChainDataCaller.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 (_IEthCrossChainData *IEthCrossChainDataRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.IEthCrossChainDataTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainData *IEthCrossChainDataRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.IEthCrossChainDataTransactor.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 (_IEthCrossChainData *IEthCrossChainDataCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainData.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 (_IEthCrossChainData *IEthCrossChainDataTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainData *IEthCrossChainDataTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.contract.Transact(opts, method, params...) -} - -// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. -// -// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataCaller) CheckIfFromChainTxExist(opts *bind.CallOpts, fromChainId uint64, fromChainTx [32]byte) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _IEthCrossChainData.contract.Call(opts, out, "checkIfFromChainTxExist", fromChainId, fromChainTx) - return *ret0, err -} - -// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. -// -// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataSession) CheckIfFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (bool, error) { - return _IEthCrossChainData.Contract.CheckIfFromChainTxExist(&_IEthCrossChainData.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 (_IEthCrossChainData *IEthCrossChainDataCallerSession) CheckIfFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (bool, error) { - return _IEthCrossChainData.Contract.CheckIfFromChainTxExist(&_IEthCrossChainData.CallOpts, fromChainId, fromChainTx) -} - -// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. -// -// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) -func (_IEthCrossChainData *IEthCrossChainDataCaller) GetCurEpochConPubKeyBytes(opts *bind.CallOpts) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _IEthCrossChainData.contract.Call(opts, out, "getCurEpochConPubKeyBytes") - return *ret0, err -} - -// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. -// -// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) -func (_IEthCrossChainData *IEthCrossChainDataSession) GetCurEpochConPubKeyBytes() ([]byte, error) { - return _IEthCrossChainData.Contract.GetCurEpochConPubKeyBytes(&_IEthCrossChainData.CallOpts) -} - -// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. -// -// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) -func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetCurEpochConPubKeyBytes() ([]byte, error) { - return _IEthCrossChainData.Contract.GetCurEpochConPubKeyBytes(&_IEthCrossChainData.CallOpts) -} - -// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. -// -// Solidity: function getCurEpochStartHeight() view returns(uint32) -func (_IEthCrossChainData *IEthCrossChainDataCaller) GetCurEpochStartHeight(opts *bind.CallOpts) (uint32, error) { - var ( - ret0 = new(uint32) - ) - out := ret0 - err := _IEthCrossChainData.contract.Call(opts, out, "getCurEpochStartHeight") - return *ret0, err -} - -// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. -// -// Solidity: function getCurEpochStartHeight() view returns(uint32) -func (_IEthCrossChainData *IEthCrossChainDataSession) GetCurEpochStartHeight() (uint32, error) { - return _IEthCrossChainData.Contract.GetCurEpochStartHeight(&_IEthCrossChainData.CallOpts) -} - -// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. -// -// Solidity: function getCurEpochStartHeight() view returns(uint32) -func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetCurEpochStartHeight() (uint32, error) { - return _IEthCrossChainData.Contract.GetCurEpochStartHeight(&_IEthCrossChainData.CallOpts) -} - -// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. -// -// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) -func (_IEthCrossChainData *IEthCrossChainDataCaller) GetEthTxHash(opts *bind.CallOpts, ethTxHashIndex *big.Int) ([32]byte, error) { - var ( - ret0 = new([32]byte) - ) - out := ret0 - err := _IEthCrossChainData.contract.Call(opts, out, "getEthTxHash", ethTxHashIndex) - return *ret0, err -} - -// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. -// -// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) -func (_IEthCrossChainData *IEthCrossChainDataSession) GetEthTxHash(ethTxHashIndex *big.Int) ([32]byte, error) { - return _IEthCrossChainData.Contract.GetEthTxHash(&_IEthCrossChainData.CallOpts, ethTxHashIndex) -} - -// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. -// -// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) -func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetEthTxHash(ethTxHashIndex *big.Int) ([32]byte, error) { - return _IEthCrossChainData.Contract.GetEthTxHash(&_IEthCrossChainData.CallOpts, ethTxHashIndex) -} - -// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. -// -// Solidity: function getEthTxHashIndex() view returns(uint256) -func (_IEthCrossChainData *IEthCrossChainDataCaller) GetEthTxHashIndex(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IEthCrossChainData.contract.Call(opts, out, "getEthTxHashIndex") - return *ret0, err -} - -// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. -// -// Solidity: function getEthTxHashIndex() view returns(uint256) -func (_IEthCrossChainData *IEthCrossChainDataSession) GetEthTxHashIndex() (*big.Int, error) { - return _IEthCrossChainData.Contract.GetEthTxHashIndex(&_IEthCrossChainData.CallOpts) -} - -// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. -// -// Solidity: function getEthTxHashIndex() view returns(uint256) -func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetEthTxHashIndex() (*big.Int, error) { - return _IEthCrossChainData.Contract.GetEthTxHashIndex(&_IEthCrossChainData.CallOpts) -} - -// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. -// -// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) -func (_IEthCrossChainData *IEthCrossChainDataCaller) GetExtraData(opts *bind.CallOpts, key1 [32]byte, key2 [32]byte) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _IEthCrossChainData.contract.Call(opts, out, "getExtraData", key1, key2) - return *ret0, err -} - -// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. -// -// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) -func (_IEthCrossChainData *IEthCrossChainDataSession) GetExtraData(key1 [32]byte, key2 [32]byte) ([]byte, error) { - return _IEthCrossChainData.Contract.GetExtraData(&_IEthCrossChainData.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 (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetExtraData(key1 [32]byte, key2 [32]byte) ([]byte, error) { - return _IEthCrossChainData.Contract.GetExtraData(&_IEthCrossChainData.CallOpts, key1, key2) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataCaller) Paused(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _IEthCrossChainData.contract.Call(opts, out, "paused") - return *ret0, err -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataSession) Paused() (bool, error) { - return _IEthCrossChainData.Contract.Paused(&_IEthCrossChainData.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataCallerSession) Paused() (bool, error) { - return _IEthCrossChainData.Contract.Paused(&_IEthCrossChainData.CallOpts) -} - -// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. -// -// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactor) MarkFromChainTxExist(opts *bind.TransactOpts, fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { - return _IEthCrossChainData.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 (_IEthCrossChainData *IEthCrossChainDataSession) MarkFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.MarkFromChainTxExist(&_IEthCrossChainData.TransactOpts, fromChainId, fromChainTx) -} - -// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. -// -// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) MarkFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.MarkFromChainTxExist(&_IEthCrossChainData.TransactOpts, fromChainId, fromChainTx) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainData.contract.Transact(opts, "pause") -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataSession) Pause() (*types.Transaction, error) { - return _IEthCrossChainData.Contract.Pause(&_IEthCrossChainData.TransactOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) Pause() (*types.Transaction, error) { - return _IEthCrossChainData.Contract.Pause(&_IEthCrossChainData.TransactOpts) -} - -// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. -// -// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactor) PutCurEpochConPubKeyBytes(opts *bind.TransactOpts, curEpochPkBytes []byte) (*types.Transaction, error) { - return _IEthCrossChainData.contract.Transact(opts, "putCurEpochConPubKeyBytes", curEpochPkBytes) -} - -// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. -// -// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataSession) PutCurEpochConPubKeyBytes(curEpochPkBytes []byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutCurEpochConPubKeyBytes(&_IEthCrossChainData.TransactOpts, curEpochPkBytes) -} - -// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. -// -// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutCurEpochConPubKeyBytes(curEpochPkBytes []byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutCurEpochConPubKeyBytes(&_IEthCrossChainData.TransactOpts, curEpochPkBytes) -} - -// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. -// -// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactor) PutCurEpochStartHeight(opts *bind.TransactOpts, curEpochStartHeight uint32) (*types.Transaction, error) { - return _IEthCrossChainData.contract.Transact(opts, "putCurEpochStartHeight", curEpochStartHeight) -} - -// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. -// -// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataSession) PutCurEpochStartHeight(curEpochStartHeight uint32) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutCurEpochStartHeight(&_IEthCrossChainData.TransactOpts, curEpochStartHeight) -} - -// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. -// -// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutCurEpochStartHeight(curEpochStartHeight uint32) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutCurEpochStartHeight(&_IEthCrossChainData.TransactOpts, curEpochStartHeight) -} - -// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. -// -// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactor) PutEthTxHash(opts *bind.TransactOpts, ethTxHash [32]byte) (*types.Transaction, error) { - return _IEthCrossChainData.contract.Transact(opts, "putEthTxHash", ethTxHash) -} - -// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. -// -// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataSession) PutEthTxHash(ethTxHash [32]byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutEthTxHash(&_IEthCrossChainData.TransactOpts, ethTxHash) -} - -// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. -// -// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutEthTxHash(ethTxHash [32]byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutEthTxHash(&_IEthCrossChainData.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 (_IEthCrossChainData *IEthCrossChainDataTransactor) PutExtraData(opts *bind.TransactOpts, key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { - return _IEthCrossChainData.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 (_IEthCrossChainData *IEthCrossChainDataSession) PutExtraData(key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutExtraData(&_IEthCrossChainData.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 (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutExtraData(key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutExtraData(&_IEthCrossChainData.TransactOpts, key1, key2, value) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_IEthCrossChainData *IEthCrossChainDataTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _IEthCrossChainData.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_IEthCrossChainData *IEthCrossChainDataSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.TransferOwnership(&_IEthCrossChainData.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.TransferOwnership(&_IEthCrossChainData.TransactOpts, newOwner) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainData.contract.Transact(opts, "unpause") -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataSession) Unpause() (*types.Transaction, error) { - return _IEthCrossChainData.Contract.Unpause(&_IEthCrossChainData.TransactOpts) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) Unpause() (*types.Transaction, error) { - return _IEthCrossChainData.Contract.Unpause(&_IEthCrossChainData.TransactOpts) -} - -// OwnableABI is the input ABI used to generate the binding from. -const OwnableABI = "[{\"inputs\":[],\"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\"},{\"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\":\"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\"}]" - -// OwnableFuncSigs maps the 4-byte function signature to its string representation. -var OwnableFuncSigs = map[string]string{ - "8f32d59b": "isOwner()", - "8da5cb5b": "owner()", - "715018a6": "renounceOwnership()", - "f2fde38b": "transferOwnership(address)", -} - -// Ownable is an auto generated Go binding around an Ethereum contract. -type Ownable struct { - OwnableCaller // Read-only binding to the contract - OwnableTransactor // Write-only binding to the contract - OwnableFilterer // Log filterer for contract events -} - -// OwnableCaller is an auto generated read-only Go binding around an Ethereum contract. -type OwnableCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// OwnableTransactor is an auto generated write-only Go binding around an Ethereum contract. -type OwnableTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// OwnableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type OwnableFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// OwnableSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type OwnableSession struct { - Contract *Ownable // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// OwnableCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type OwnableCallerSession struct { - Contract *OwnableCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// OwnableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type OwnableTransactorSession struct { - Contract *OwnableTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// OwnableRaw is an auto generated low-level Go binding around an Ethereum contract. -type OwnableRaw struct { - Contract *Ownable // Generic contract binding to access the raw methods on -} - -// OwnableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type OwnableCallerRaw struct { - Contract *OwnableCaller // Generic read-only contract binding to access the raw methods on -} - -// OwnableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type OwnableTransactorRaw struct { - Contract *OwnableTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewOwnable creates a new instance of Ownable, bound to a specific deployed contract. -func NewOwnable(address common.Address, backend bind.ContractBackend) (*Ownable, error) { - contract, err := bindOwnable(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Ownable{OwnableCaller: OwnableCaller{contract: contract}, OwnableTransactor: OwnableTransactor{contract: contract}, OwnableFilterer: OwnableFilterer{contract: contract}}, nil -} - -// NewOwnableCaller creates a new read-only instance of Ownable, bound to a specific deployed contract. -func NewOwnableCaller(address common.Address, caller bind.ContractCaller) (*OwnableCaller, error) { - contract, err := bindOwnable(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &OwnableCaller{contract: contract}, nil -} - -// NewOwnableTransactor creates a new write-only instance of Ownable, bound to a specific deployed contract. -func NewOwnableTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnableTransactor, error) { - contract, err := bindOwnable(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &OwnableTransactor{contract: contract}, nil -} - -// NewOwnableFilterer creates a new log filterer instance of Ownable, bound to a specific deployed contract. -func NewOwnableFilterer(address common.Address, filterer bind.ContractFilterer) (*OwnableFilterer, error) { - contract, err := bindOwnable(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &OwnableFilterer{contract: contract}, nil -} - -// bindOwnable binds a generic wrapper to an already deployed contract. -func bindOwnable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(OwnableABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Ownable *OwnableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Ownable.Contract.OwnableCaller.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 (_Ownable *OwnableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Ownable.Contract.OwnableTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Ownable *OwnableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Ownable.Contract.OwnableTransactor.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 (_Ownable *OwnableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Ownable.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 (_Ownable *OwnableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Ownable.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Ownable *OwnableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Ownable.Contract.contract.Transact(opts, method, params...) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_Ownable *OwnableCaller) IsOwner(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _Ownable.contract.Call(opts, out, "isOwner") - return *ret0, err -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_Ownable *OwnableSession) IsOwner() (bool, error) { - return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_Ownable *OwnableCallerSession) IsOwner() (bool, error) { - return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Ownable *OwnableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Ownable.contract.Call(opts, out, "owner") - return *ret0, err -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Ownable *OwnableSession) Owner() (common.Address, error) { - return _Ownable.Contract.Owner(&_Ownable.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Ownable *OwnableCallerSession) Owner() (common.Address, error) { - return _Ownable.Contract.Owner(&_Ownable.CallOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Ownable *OwnableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Ownable.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Ownable *OwnableSession) RenounceOwnership() (*types.Transaction, error) { - return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Ownable *OwnableTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Ownable *OwnableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _Ownable.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Ownable *OwnableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Ownable *OwnableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) -} - -// OwnableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Ownable contract. -type OwnableOwnershipTransferredIterator struct { - Event *OwnableOwnershipTransferred // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *OwnableOwnershipTransferredIterator) 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(OwnableOwnershipTransferred) - 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(OwnableOwnershipTransferred) - 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 *OwnableOwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *OwnableOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// OwnableOwnershipTransferred represents a OwnershipTransferred event raised by the Ownable contract. -type OwnableOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Ownable *OwnableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnableOwnershipTransferredIterator, 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 := _Ownable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &OwnableOwnershipTransferredIterator{contract: _Ownable.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 (_Ownable *OwnableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _Ownable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(OwnableOwnershipTransferred) - if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Ownable *OwnableFilterer) ParseOwnershipTransferred(log types.Log) (*OwnableOwnershipTransferred, error) { - event := new(OwnableOwnershipTransferred) - if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - return event, nil -} - -// PausableABI is the input ABI used to generate the binding from. -const PausableABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" - -// PausableFuncSigs maps the 4-byte function signature to its string representation. -var PausableFuncSigs = map[string]string{ - "5c975abb": "paused()", -} - -// Pausable is an auto generated Go binding around an Ethereum contract. -type Pausable struct { - PausableCaller // Read-only binding to the contract - PausableTransactor // Write-only binding to the contract - PausableFilterer // Log filterer for contract events -} - -// PausableCaller is an auto generated read-only Go binding around an Ethereum contract. -type PausableCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PausableTransactor is an auto generated write-only Go binding around an Ethereum contract. -type PausableTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PausableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type PausableFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PausableSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type PausableSession struct { - Contract *Pausable // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// PausableCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type PausableCallerSession struct { - Contract *PausableCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// PausableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type PausableTransactorSession struct { - Contract *PausableTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// PausableRaw is an auto generated low-level Go binding around an Ethereum contract. -type PausableRaw struct { - Contract *Pausable // Generic contract binding to access the raw methods on -} - -// PausableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type PausableCallerRaw struct { - Contract *PausableCaller // Generic read-only contract binding to access the raw methods on -} - -// PausableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type PausableTransactorRaw struct { - Contract *PausableTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewPausable creates a new instance of Pausable, bound to a specific deployed contract. -func NewPausable(address common.Address, backend bind.ContractBackend) (*Pausable, error) { - contract, err := bindPausable(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Pausable{PausableCaller: PausableCaller{contract: contract}, PausableTransactor: PausableTransactor{contract: contract}, PausableFilterer: PausableFilterer{contract: contract}}, nil -} - -// NewPausableCaller creates a new read-only instance of Pausable, bound to a specific deployed contract. -func NewPausableCaller(address common.Address, caller bind.ContractCaller) (*PausableCaller, error) { - contract, err := bindPausable(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &PausableCaller{contract: contract}, nil -} - -// NewPausableTransactor creates a new write-only instance of Pausable, bound to a specific deployed contract. -func NewPausableTransactor(address common.Address, transactor bind.ContractTransactor) (*PausableTransactor, error) { - contract, err := bindPausable(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &PausableTransactor{contract: contract}, nil -} - -// NewPausableFilterer creates a new log filterer instance of Pausable, bound to a specific deployed contract. -func NewPausableFilterer(address common.Address, filterer bind.ContractFilterer) (*PausableFilterer, error) { - contract, err := bindPausable(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &PausableFilterer{contract: contract}, nil -} - -// bindPausable binds a generic wrapper to an already deployed contract. -func bindPausable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(PausableABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Pausable *PausableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Pausable.Contract.PausableCaller.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 (_Pausable *PausableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Pausable.Contract.PausableTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Pausable *PausableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Pausable.Contract.PausableTransactor.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 (_Pausable *PausableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Pausable.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 (_Pausable *PausableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Pausable.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Pausable *PausableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Pausable.Contract.contract.Transact(opts, method, params...) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Pausable *PausableCaller) Paused(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _Pausable.contract.Call(opts, out, "paused") - return *ret0, err -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Pausable *PausableSession) Paused() (bool, error) { - return _Pausable.Contract.Paused(&_Pausable.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Pausable *PausableCallerSession) Paused() (bool, error) { - return _Pausable.Contract.Paused(&_Pausable.CallOpts) -} - -// PausablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Pausable contract. -type PausablePausedIterator struct { - Event *PausablePaused // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PausablePausedIterator) 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(PausablePaused) - 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(PausablePaused) - 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 *PausablePausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PausablePausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PausablePaused represents a Paused event raised by the Pausable contract. -type PausablePaused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_Pausable *PausableFilterer) FilterPaused(opts *bind.FilterOpts) (*PausablePausedIterator, error) { - - logs, sub, err := _Pausable.contract.FilterLogs(opts, "Paused") - if err != nil { - return nil, err - } - return &PausablePausedIterator{contract: _Pausable.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 (_Pausable *PausableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *PausablePaused) (event.Subscription, error) { - - logs, sub, err := _Pausable.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 := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PausablePaused) - if err := _Pausable.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 -} - -// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_Pausable *PausableFilterer) ParsePaused(log types.Log) (*PausablePaused, error) { - event := new(PausablePaused) - if err := _Pausable.contract.UnpackLog(event, "Paused", log); err != nil { - return nil, err - } - return event, nil -} - -// PausableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Pausable contract. -type PausableUnpausedIterator struct { - Event *PausableUnpaused // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PausableUnpausedIterator) 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(PausableUnpaused) - 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(PausableUnpaused) - 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 *PausableUnpausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PausableUnpausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PausableUnpaused represents a Unpaused event raised by the Pausable contract. -type PausableUnpaused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_Pausable *PausableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*PausableUnpausedIterator, error) { - - logs, sub, err := _Pausable.contract.FilterLogs(opts, "Unpaused") - if err != nil { - return nil, err - } - return &PausableUnpausedIterator{contract: _Pausable.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 (_Pausable *PausableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *PausableUnpaused) (event.Subscription, error) { - - logs, sub, err := _Pausable.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 := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PausableUnpaused) - if err := _Pausable.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 -} - -// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_Pausable *PausableFilterer) ParseUnpaused(log types.Log) (*PausableUnpaused, error) { - event := new(PausableUnpaused) - if err := _Pausable.contract.UnpackLog(event, "Unpaused", log); err != nil { - return nil, err - } - return event, nil -} diff --git a/chains/eth/abi/eccm/eccm_abi.go b/chains/eth/abi/eccm/eccm_abi.go deleted file mode 100644 index 579812a..0000000 --- a/chains/eth/abi/eccm/eccm_abi.go +++ /dev/null @@ -1,5021 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package eccm - -import ( - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// ContextABI is the input ABI used to generate the binding from. -const ContextABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" - -// Context is an auto generated Go binding around an Ethereum contract. -type Context struct { - ContextCaller // Read-only binding to the contract - ContextTransactor // Write-only binding to the contract - ContextFilterer // Log filterer for contract events -} - -// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. -type ContextCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ContextTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ContextFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ContextSession struct { - Contract *Context // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ContextCallerSession struct { - Contract *ContextCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ContextTransactorSession struct { - Contract *ContextTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. -type ContextRaw struct { - Contract *Context // Generic contract binding to access the raw methods on -} - -// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ContextCallerRaw struct { - Contract *ContextCaller // Generic read-only contract binding to access the raw methods on -} - -// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ContextTransactorRaw struct { - Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewContext creates a new instance of Context, bound to a specific deployed contract. -func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { - contract, err := bindContext(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil -} - -// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. -func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { - contract, err := bindContext(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ContextCaller{contract: contract}, nil -} - -// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. -func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { - contract, err := bindContext(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ContextTransactor{contract: contract}, nil -} - -// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. -func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { - contract, err := bindContext(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ContextFilterer{contract: contract}, nil -} - -// bindContext binds a generic wrapper to an already deployed contract. -func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ContextABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.Contract.ContextCaller.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 (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.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 (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.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 (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.contract.Transact(opts, method, params...) -} - -// ECCUtilsABI is the input ABI used to generate the binding from. -const ECCUtilsABI = "[]" - -// ECCUtilsBin is the compiled bytecode used for deploying new contracts. -var ECCUtilsBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158206fdd48bf6702d595c37f92629a04a9d70f5ee9e029b120d82056b15bc0291a9b64736f6c634300050f0032" - -// DeployECCUtils deploys a new Ethereum contract, binding an instance of ECCUtils to it. -func DeployECCUtils(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ECCUtils, error) { - parsed, err := abi.JSON(strings.NewReader(ECCUtilsABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ECCUtilsBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ECCUtils{ECCUtilsCaller: ECCUtilsCaller{contract: contract}, ECCUtilsTransactor: ECCUtilsTransactor{contract: contract}, ECCUtilsFilterer: ECCUtilsFilterer{contract: contract}}, nil -} - -// ECCUtils is an auto generated Go binding around an Ethereum contract. -type ECCUtils struct { - ECCUtilsCaller // Read-only binding to the contract - ECCUtilsTransactor // Write-only binding to the contract - ECCUtilsFilterer // Log filterer for contract events -} - -// ECCUtilsCaller is an auto generated read-only Go binding around an Ethereum contract. -type ECCUtilsCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECCUtilsTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ECCUtilsTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECCUtilsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ECCUtilsFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECCUtilsSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ECCUtilsSession struct { - Contract *ECCUtils // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ECCUtilsCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ECCUtilsCallerSession struct { - Contract *ECCUtilsCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ECCUtilsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ECCUtilsTransactorSession struct { - Contract *ECCUtilsTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ECCUtilsRaw is an auto generated low-level Go binding around an Ethereum contract. -type ECCUtilsRaw struct { - Contract *ECCUtils // Generic contract binding to access the raw methods on -} - -// ECCUtilsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ECCUtilsCallerRaw struct { - Contract *ECCUtilsCaller // Generic read-only contract binding to access the raw methods on -} - -// ECCUtilsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ECCUtilsTransactorRaw struct { - Contract *ECCUtilsTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewECCUtils creates a new instance of ECCUtils, bound to a specific deployed contract. -func NewECCUtils(address common.Address, backend bind.ContractBackend) (*ECCUtils, error) { - contract, err := bindECCUtils(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ECCUtils{ECCUtilsCaller: ECCUtilsCaller{contract: contract}, ECCUtilsTransactor: ECCUtilsTransactor{contract: contract}, ECCUtilsFilterer: ECCUtilsFilterer{contract: contract}}, nil -} - -// NewECCUtilsCaller creates a new read-only instance of ECCUtils, bound to a specific deployed contract. -func NewECCUtilsCaller(address common.Address, caller bind.ContractCaller) (*ECCUtilsCaller, error) { - contract, err := bindECCUtils(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ECCUtilsCaller{contract: contract}, nil -} - -// NewECCUtilsTransactor creates a new write-only instance of ECCUtils, bound to a specific deployed contract. -func NewECCUtilsTransactor(address common.Address, transactor bind.ContractTransactor) (*ECCUtilsTransactor, error) { - contract, err := bindECCUtils(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ECCUtilsTransactor{contract: contract}, nil -} - -// NewECCUtilsFilterer creates a new log filterer instance of ECCUtils, bound to a specific deployed contract. -func NewECCUtilsFilterer(address common.Address, filterer bind.ContractFilterer) (*ECCUtilsFilterer, error) { - contract, err := bindECCUtils(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ECCUtilsFilterer{contract: contract}, nil -} - -// bindECCUtils binds a generic wrapper to an already deployed contract. -func bindECCUtils(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ECCUtilsABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ECCUtils *ECCUtilsRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ECCUtils.Contract.ECCUtilsCaller.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 (_ECCUtils *ECCUtilsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECCUtils.Contract.ECCUtilsTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECCUtils *ECCUtilsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECCUtils.Contract.ECCUtilsTransactor.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 (_ECCUtils *ECCUtilsCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ECCUtils.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 (_ECCUtils *ECCUtilsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECCUtils.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECCUtils *ECCUtilsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECCUtils.Contract.contract.Transact(opts, method, params...) -} - -// EthCrossChainManagerABI is the input ABI used to generate the binding from. -const EthCrossChainManagerABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_eccd\",\"type\":\"address\"}],\"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\":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\":\"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\"}]" - -// EthCrossChainManagerFuncSigs maps the 4-byte function signature to its string representation. -var EthCrossChainManagerFuncSigs = map[string]string{ - "00ba1694": "EthCrossChainDataAddress()", - "29dcf4ab": "changeBookKeeper(bytes,bytes,bytes)", - "bd5cf625": "crossChain(uint64,bytes,bytes,bytes)", - "34a773eb": "initGenesisBlock(bytes,bytes)", - "8f32d59b": "isOwner()", - "8da5cb5b": "owner()", - "8456cb59": "pause()", - "5c975abb": "paused()", - "715018a6": "renounceOwnership()", - "f2fde38b": "transferOwnership(address)", - "3f4ba83a": "unpause()", - "7e724ff3": "upgradeToNew(address)", - "d450e04c": "verifyHeaderAndExecuteTx(bytes,bytes,bytes,bytes,bytes)", -} - -// EthCrossChainManagerBin is the compiled bytecode used for deploying new contracts. -var EthCrossChainManagerBin = "0x60806040523480156200001157600080fd5b5060405162004c0b38038062004c0b833981810160405260208110156200003757600080fd5b50518060006200004f6001600160e01b03620000cd16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b0319166001600160a01b039290921691909117905550620000d1565b3390565b614b2a80620000e16000396000f3fe608060405234801561001057600080fd5b50600436106100ce5760003560e01c80637e724ff31161008c5780638f32d59b116100665780638f32d59b14610432578063bd5cf6251461043a578063d450e04c14610558578063f2fde38b14610810576100ce565b80637e724ff3146103fc5780638456cb59146104225780638da5cb5b1461042a576100ce565b8062ba1694146100d357806329dcf4ab146100f757806334a773eb146102b95780633f4ba83a146103e25780635c975abb146103ea578063715018a6146103f2575b600080fd5b6100db610836565b604080516001600160a01b039092168252519081900360200190f35b6102a56004803603606081101561010d57600080fd5b810190602081018135600160201b81111561012757600080fd5b82018360208201111561013957600080fd5b803590602001918460018302840111600160201b8311171561015a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156101ac57600080fd5b8201836020820111156101be57600080fd5b803590602001918460018302840111600160201b831117156101df57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561023157600080fd5b82018360208201111561024357600080fd5b803590602001918460018302840111600160201b8311171561026457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610845945050505050565b604080519115158252519081900360200190f35b6102a5600480360360408110156102cf57600080fd5b810190602081018135600160201b8111156102e957600080fd5b8201836020820111156102fb57600080fd5b803590602001918460018302840111600160201b8311171561031c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561036e57600080fd5b82018360208201111561038057600080fd5b803590602001918460018302840111600160201b831117156103a157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610e67945050505050565b6102a561133d565b6102a56114bc565b6103fa6114cc565b005b6102a56004803603602081101561041257600080fd5b50356001600160a01b031661155d565b6102a561166e565b6100db6117e3565b6102a56117f2565b6102a56004803603608081101561045057600080fd5b6001600160401b038235169190810190604081016020820135600160201b81111561047a57600080fd5b82018360208201111561048c57600080fd5b803590602001918460018302840111600160201b831117156104ad57600080fd5b919390929091602081019035600160201b8111156104ca57600080fd5b8201836020820111156104dc57600080fd5b803590602001918460018302840111600160201b831117156104fd57600080fd5b919390929091602081019035600160201b81111561051a57600080fd5b82018360208201111561052c57600080fd5b803590602001918460018302840111600160201b8311171561054d57600080fd5b509092509050611816565b6102a5600480360360a081101561056e57600080fd5b810190602081018135600160201b81111561058857600080fd5b82018360208201111561059a57600080fd5b803590602001918460018302840111600160201b831117156105bb57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561060d57600080fd5b82018360208201111561061f57600080fd5b803590602001918460018302840111600160201b8311171561064057600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561069257600080fd5b8201836020820111156106a457600080fd5b803590602001918460018302840111600160201b831117156106c557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561071757600080fd5b82018360208201111561072957600080fd5b803590602001918460018302840111600160201b8311171561074a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561079c57600080fd5b8201836020820111156107ae57600080fd5b803590602001918460018302840111600160201b831117156107cf57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611f55945050505050565b6103fa6004803603602081101561082657600080fd5b50356001600160a01b0316612635565b6001546001600160a01b031681565b60008054600160a01b900460ff1615610898576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6108a0614553565b6108a985612688565b90506000600160009054906101000a90046001600160a01b031690506000816001600160a01b0316635ac407906040518163ffffffff1660e01b815260040160206040518083038186803b15801561090057600080fd5b505afa158015610914573d6000803e3d6000fd5b505050506040513d602081101561092a57600080fd5b505160e084015163ffffffff91821692501681106109795760405162461bcd60e51b815260040180806020018281038252603e81526020018061476e603e913960400191505060405180910390fd5b6101408301516bffffffffffffffffffffffff19166109c95760405162461bcd60e51b81526004018080602001828103825260258152602001806146406025913960400191505060405180910390fd5b6060610af7836001600160a01b03166369d480746040518163ffffffff1660e01b815260040160006040518083038186803b158015610a0757600080fd5b505afa158015610a1b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610a4457600080fd5b8101908080516040519392919084600160201b821115610a6357600080fd5b908301906020820185811115610a7857600080fd5b8251600160201b811182820188101715610a9157600080fd5b82525081516020918201929091019080838360005b83811015610abe578181015183820152602001610aa6565b50505050905090810190601f168015610aeb5780820380516001836020036101000a031916815260200191505b506040525050506127a7565b8051909150610b12898884600360001986015b04850361285a565b610b63576040805162461bcd60e51b815260206004820152601860248201527f566572696679207369676e6174757265206661696c6564210000000000000000604482015290519081900360640190fd5b60006060610b708a612a24565b91509150816001600160601b0319168761014001516001600160601b03191614610bd7576040805162461bcd60e51b815260206004820152601360248201527213995e1d109bdbdad95c9cc81a5b1b1959d85b606a1b604482015290519081900360640190fd5b856001600160a01b0316638a8bd17f8860e001516040518263ffffffff1660e01b8152600401808263ffffffff1663ffffffff168152602001915050602060405180830381600087803b158015610c2d57600080fd5b505af1158015610c41573d6000803e3d6000fd5b505050506040513d6020811015610c5757600080fd5b5051610c945760405162461bcd60e51b815260040180806020018281038252602d815260200180614888602d913960400191505060405180910390fd5b856001600160a01b03166341973cd9610cac83612ab4565b6040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610cf8578181015183820152602001610ce0565b50505050905090810190601f168015610d255780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b158015610d4457600080fd5b505af1158015610d58573d6000803e3d6000fd5b505050506040513d6020811015610d6e57600080fd5b5051610dab5760405162461bcd60e51b815260040180806020018281038252603b8152602001806147d7603b913960400191505060405180910390fd5b7fe60d33488cba3977bf65766cd2f8ac9617f64bf3b3198aff6240ce5c7d43b6908760e001518c604051808363ffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610e1b578181015183820152602001610e03565b50505050905090810190601f168015610e485780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15060019a9950505050505050505050565b60008054600160a01b900460ff1615610eba576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60015460408051631a75201d60e21b815290516001600160a01b039092169182916369d48074916004808301926000929190829003018186803b158015610f0057600080fd5b505afa158015610f14573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610f3d57600080fd5b8101908080516040519392919084600160201b821115610f5c57600080fd5b908301906020820185811115610f7157600080fd5b8251600160201b811182820188101715610f8a57600080fd5b82525081516020918201929091019080838360005b83811015610fb7578181015183820152602001610f9f565b50505050905090810190601f168015610fe45780820380516001836020036101000a031916815260200191505b506040525050505160001461102a5760405162461bcd60e51b815260040180806020018281038252603881526020018061496d6038913960400191505060405180910390fd5b611032614553565b61103b85612688565b90506000606061104a86612a24565b91509150816001600160601b0319168361014001516001600160601b031916146110b1576040805162461bcd60e51b815260206004820152601360248201527213995e1d109bdbdad95c9cc81a5b1b1959d85b606a1b604482015290519081900360640190fd5b836001600160a01b0316638a8bd17f8460e001516040518263ffffffff1660e01b8152600401808263ffffffff1663ffffffff168152602001915050602060405180830381600087803b15801561110757600080fd5b505af115801561111b573d6000803e3d6000fd5b505050506040513d602081101561113157600080fd5b505161116e5760405162461bcd60e51b81526004018080602001828103825260438152602001806146d76043913960600191505060405180910390fd5b836001600160a01b03166341973cd961118683612ab4565b6040518263ffffffff1660e01b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111d25781810151838201526020016111ba565b50505050905090810190601f1680156111ff5780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15801561121e57600080fd5b505af1158015611232573d6000803e3d6000fd5b505050506040513d602081101561124857600080fd5b50516112855760405162461bcd60e51b81526004018080602001828103825260438152602001806149a56043913960600191505060405180910390fd5b7ff01968fc3a2655cf1b5144cb32de6dc898f91b9239c103744e8457152ab2fbde8360e0015188604051808363ffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156112f55781810151838201526020016112dd565b50505050905090810190601f1680156113225780820380516001836020036101000a031916815260200191505b50935050505060405180910390a15060019695505050505050565b60006113476117f2565b611386576040805162461bcd60e51b81526020600482018190526024820152600080516020614812833981519152604482015290519081900360640190fd5b61138e6114bc565b1561139b5761139b612bb6565b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b1580156113e157600080fd5b505afa1580156113f5573d6000803e3d6000fd5b505050506040513d602081101561140b57600080fd5b5051156114b457806001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561144d57600080fd5b505af1158015611461573d6000803e3d6000fd5b505050506040513d602081101561147757600080fd5b50516114b45760405162461bcd60e51b81526004018080602001828103825260298152602001806146656029913960400191505060405180910390fd5b600191505090565b600054600160a01b900460ff1690565b6114d46117f2565b611513576040805162461bcd60e51b81526020600482018190526024820152600080516020614812833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60008054600160a01b900460ff166115b3576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6115bb6117f2565b6115fa576040805162461bcd60e51b81526020600482018190526024820152600080516020614812833981519152604482015290519081900360640190fd5b6001546040805163f2fde38b60e01b81526001600160a01b03858116600483015291519190921691829163f2fde38b9160248082019260009290919082900301818387803b15801561164b57600080fd5b505af115801561165f573d6000803e3d6000fd5b5050505060019150505b919050565b60006116786117f2565b6116b7576040805162461bcd60e51b81526020600482018190526024820152600080516020614812833981519152604482015290519081900360640190fd5b6116bf6114bc565b6116cb576116cb612c5e565b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561171157600080fd5b505afa158015611725573d6000803e3d6000fd5b505050506040513d602081101561173b57600080fd5b50516114b457806001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561177c57600080fd5b505af1158015611790573d6000803e3d6000fd5b505050506040513d60208110156117a657600080fd5b50516114b45760405162461bcd60e51b81526004018080602001828103825260278152602001806146196027913960400191505060405180910390fd5b6000546001600160a01b031690565b600080546001600160a01b0316611807612ce8565b6001600160a01b031614905090565b60008054600160a01b900460ff1615611869576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60015460408051600162c2db5f60e01b0319815290516001600160a01b0390921691600091839163ff3d24a191600480820192602092909190829003018186803b1580156118b657600080fd5b505afa1580156118ca573d6000803e3d6000fd5b505050506040513d60208110156118e057600080fd5b5051905060606118ef82612cec565b905060606118fc82612d65565b611a2a6002308560405160200180836001600160a01b03166001600160a01b031660601b815260140182805190602001908083835b602083106119505780518252601f199092019160209182019101611931565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b602083106119b45780518252601f199092019160209182019101611995565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa1580156119f3573d6000803e3d6000fd5b5050506040513d6020811015611a0857600080fd5b5051604080516020818101939093528151808203909301835281019052612d65565b611a3b611a3633612e2b565b612d65565b611a448f612e46565b611a838f8f8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612d6592505050565b611ac28e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612d6592505050565b611b018d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612d6592505050565b6040516020018088805190602001908083835b60208310611b335780518252601f199092019160209182019101611b14565b51815160209384036101000a60001901801990921691161790528a5191909301928a0191508083835b60208310611b7b5780518252601f199092019160209182019101611b5c565b51815160209384036101000a600019018019909216911617905289519190930192890191508083835b60208310611bc35780518252601f199092019160209182019101611ba4565b51815160209384036101000a600019018019909216911617905288519190930192880191508083835b60208310611c0b5780518252601f199092019160209182019101611bec565b51815160209384036101000a600019018019909216911617905287519190930192870191508083835b60208310611c535780518252601f199092019160209182019101611c34565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b60208310611c9b5780518252601f199092019160209182019101611c7c565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611ce35780518252601f199092019160209182019101611cc4565b6001836020036101000a0380198251168184511680821785525050505050509050019750505050505050506040516020818303038152906040529050836001600160a01b0316634c3ccf6482805190602001206040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b158015611d6c57600080fd5b505af1158015611d80573d6000803e3d6000fd5b505050506040513d6020811015611d9657600080fd5b5051611dd35760405162461bcd60e51b8152600401808060200182810382526030815260200180614a2c6030913960400191505060405180910390fd5b326001600160a01b03167f6ad3bf15c1988bc04bc153490cab16db8efb9a3990215bf1c64ea6e28be8848383338f8f8f876040518080602001876001600160a01b03166001600160a01b03168152602001866001600160401b03166001600160401b03168152602001806020018060200184810384528a818151815260200191508051906020019080838360005b83811015611e79578181015183820152602001611e61565b50505050905090810190601f168015611ea65780820380516001836020036101000a031916815260200191505b5084810383528681526020018787808284376000838201819052601f909101601f191690920186810384528751815287516020918201939189019250908190849084905b83811015611f02578181015183820152602001611eea565b50505050905090810190601f168015611f2f5780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390a25060019b9a5050505050505050505050565b60008054600160a01b900460ff1615611fa8576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b611fb0614553565b611fb986612688565b90506000600160009054906101000a90046001600160a01b031690506060612013826001600160a01b03166369d480746040518163ffffffff1660e01b815260040160006040518083038186803b158015610a0757600080fd5b90506000826001600160a01b0316635ac407906040518163ffffffff1660e01b815260040160206040518083038186803b15801561205057600080fd5b505afa158015612064573d6000803e3d6000fd5b505050506040513d602081101561207a57600080fd5b5051825160e086015163ffffffff928316935090911682116120e8576120a88a888560036000198601610b0a565b6120e35760405162461bcd60e51b815260040180806020018281038252602a815260200180614acc602a913960400191505060405180910390fd5b6121c1565b6120fa88888560036000198601610b0a565b6121355760405162461bcd60e51b81526004018080602001828103825260388152602001806148b56038913960400191505060405180910390fd5b61213d614553565b61214689612688565b905060606121588b8360a00151612e89565b905061216381612faf565b61216c8d61300f565b146121be576040805162461bcd60e51b815260206004820152601b60248201527f766572696679206865616465722070726f6f66206661696c6564210000000000604482015290519081900360640190fd5b50505b60606121d18c8760800151612e89565b90506121db6145ae565b6121e482613140565b9050856001600160a01b0316630586763c82602001516122078460000151612faf565b6040518363ffffffff1660e01b815260040180836001600160401b03166001600160401b031681526020018281526020019250505060206040518083038186803b15801561225457600080fd5b505afa158015612268573d6000803e3d6000fd5b505050506040513d602081101561227e57600080fd5b5051156122bc5760405162461bcd60e51b8152600401808060200182810382526022815260200180614a0a6022913960400191505060405180910390fd5b856001600160a01b031663e90bfdcf82602001516122dd8460000151612faf565b6040518363ffffffff1660e01b815260040180836001600160401b03166001600160401b0316815260200182815260200192505050602060405180830381600087803b15801561232c57600080fd5b505af1158015612340573d6000803e3d6000fd5b505050506040513d602081101561235657600080fd5b50516123a9576040805162461bcd60e51b815260206004820181905260248201527f536176652063726f7373636861696e207478206578697374206661696c656421604482015290519081900360640190fd5b6040810151606001516001600160401b03166002146123f95760405162461bcd60e51b815260040180806020018281038252602a815260200180614a5c602a913960400191505060405180910390fd5b600061240c82604001516080015161321c565b905061243781836040015160a00151846040015160c001518560400151604001518660200151613266565b612488576040805162461bcd60e51b815260206004820152601d60248201527f457865637574652043726f7373436861696e205478206661696c656421000000604482015290519081900360640190fd5b7f8a4a2663ce60ce4955c595da2894de0415240f1ace024cfbff85f513b656bdae8260200151836040015160800151846000015185604001516000015160405180856001600160401b03166001600160401b03168152602001806020018060200180602001848103845287818151815260200191508051906020019080838360005b8381101561252257818101518382015260200161250a565b50505050905090810190601f16801561254f5780820380516001836020036101000a031916815260200191505b50848103835286518152865160209182019188019080838360005b8381101561258257818101518382015260200161256a565b50505050905090810190601f1680156125af5780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b838110156125e25781810151838201526020016125ca565b50505050905090810190601f16801561260f5780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a15060019d9c50505050505050505050505050565b61263d6117f2565b61267c576040805162461bcd60e51b81526020600482018190526024820152600080516020614812833981519152604482015290519081900360640190fd5b6126858161363d565b50565b612690614553565b612698614553565b60006126a484826136dd565b63ffffffff909116835290506126ba8482613777565b6001600160401b03909116602084015290506126d6848261380f565b604084019190915290506126ea848261380f565b606084019190915290506126fe848261380f565b60808401919091529050612712848261380f565b60a0840191909152905061272684826136dd565b63ffffffff90911660c0840152905061273f84826136dd565b63ffffffff90911660e084015290506127588482613777565b6001600160401b039091166101008401529050612775848261387b565b610120840191909152905061278a8482613941565b506bffffffffffffffffffffffff19166101408301525092915050565b60606000806127b68482613777565b80935081925050506060816001600160401b03166040519080825280602002602001820160405280156127f3578160200160208202803883390190505b509050606060005b836001600160401b031681101561284f57612816878661387b565b955091506128238261321c565b83828151811061282f57fe5b6001600160a01b03909216602092830291909101909101526001016127fb565b509095945050505050565b6000806128668661300f565b905060008090506000604187518161287a57fe5b04905060005b81811015612a155760006128a161289c8a60418502602061399b565b612faf565b905060006128ba61289c8b60418602602001602061399b565b905060008a60418502604001815181106128d057fe5b602001015160f81c60f81b60f81c601b01905060006001600289604051602001808281526020019150506040516020818303038152906040526040518082805190602001908083835b602083106129385780518252601f199092019160209182019101612919565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015612977573d6000803e3d6000fd5b5050506040513d602081101561298c57600080fd5b5051604080516000815260208181018084529390935260ff8616818301526060810188905260808101879052905160a08083019392601f198301929081900390910190855afa1580156129e3573d6000803e3d6000fd5b5050506020604051035190506129f98b82613a1b565b15612a05576001870196505b5050600190920191506128809050565b50509092111595945050505050565b600060606043835181612a3357fe5b0615612a86576040805162461bcd60e51b815260206004820152601b60248201527f5f7075624b65794c697374206c656e67746820696c6c6567616c210000000000604482015290519081900360640190fd5b60006043845181612a9357fe5b049050612aaa816003600019820104830386613a6d565b9250925050915091565b805160609081612ac382612e46565b905060005b82811015612bae5781612af0611a36878481518110612ae357fe5b6020026020010151612e2b565b6040516020018083805190602001908083835b60208310612b225780518252601f199092019160209182019101612b03565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612b6a5780518252601f199092019160209182019101612b4b565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405291508080600101915050612ac8565b509392505050565b600054600160a01b900460ff16612c0b576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612c41612ce8565b604080516001600160a01b039092168252519081900360200190a1565b600054600160a01b900460ff1615612cb0576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612c415b3390565b60606001600160ff1b03821115612d4a576040805162461bcd60e51b815260206004820152601760248201527f56616c75652065786365656473207468652072616e6765000000000000000000604482015290519081900360640190fd5b60405190506020815281602082015260408101604052919050565b8051606090612d7381613e73565b836040516020018083805190602001908083835b60208310612da65780518252601f199092019160209182019101612d87565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612dee5780518252601f199092019160209182019101612dcf565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050919050565b604080516014815260609290921b6020830152818101905290565b6040516008808252606091906000601f5b82821015612e795785811a826020860101536001919091019060001901612e57565b5050506040818101905292915050565b6060600081612e98858361387b565b925090506000612ea782613fb9565b9050600060208488510381612eb857fe5b049050600080805b83811015612f6357612ed28a88614060565b97509150612ee08a8861380f565b975092506001600160f81b03198216612f0457612efd83866140d0565b9450612f5b565b600160f81b6001600160f81b031983161415612f2457612efd85846140d0565b60405162461bcd60e51b815260040180806020018281038252602e815260200180614832602e913960400191505060405180910390fd5b600101612ec0565b50878414612fa25760405162461bcd60e51b815260040180806020018281038252603181526020018061473d6031913960400191505060405180910390fd5b5092979650505050505050565b60008151602014613007576040805162461bcd60e51b815260206004820152601760248201527f6279746573206c656e677468206973206e6f742033322e000000000000000000604482015290519081900360640190fd5b506020015190565b6000600280836040518082805190602001908083835b602083106130445780518252601f199092019160209182019101613025565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015613083573d6000803e3d6000fd5b5050506040513d602081101561309857600080fd5b50516040805160208181019390935281518082038401815290820191829052805190928291908401908083835b602083106130e45780518252601f1990920191602091820191016130c5565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015613123573d6000803e3d6000fd5b5050506040513d602081101561313857600080fd5b505192915050565b6131486145ae565b6131506145ae565b600061315c848261387b565b908352905061316b8482613777565b6001600160401b03909116602084015290506131856145d2565b61318f858361387b565b908252915061319e858361387b565b602083019190915291506131b2858361387b565b604083019190915291506131c68583613777565b6001600160401b03909116606083015291506131e2858361387b565b608083019190915291506131f6858361387b565b60a0830191909152915061320a858361387b565b5060c082015260408301525092915050565b6000815160141461325e5760405162461bcd60e51b815260040180806020018281038252602381526020018061468e6023913960400191505060405180910390fd5b506014015190565b600061327186614194565b6132ac5760405162461bcd60e51b81526004018080602001828103825260288152602001806148606028913960400191505060405180910390fd5b60606000876001600160a01b0316876040516020018082805190602001908083835b602083106132ed5780518252601f1990920191602091820191016132ce565b51815160001960209485036101000a01908116901991909116179052732862797465732c62797465732c75696e7436342960601b9390910192835260408051600b19818603018152601485019091528051908201206001600160401b038b1660748501526060603485019081528d5160948601528d519196508d95508c948c945090928392605483019260b4019188019080838360005b8381101561339c578181015183820152602001613384565b50505050905090810190601f1680156133c95780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156133fc5781810151838201526020016133e4565b50505050905090810190601f1680156134295780820380516001836020036101000a031916815260200191505b509550505050505060405160208183030381529060405260405160200180836001600160e01b0319166001600160e01b031916815260040182805190602001908083835b6020831061348c5780518252601f19909201916020918201910161346d565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b602083106134f05780518252601f1990920191602091820191016134d1565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613552576040519150601f19603f3d011682016040523d82523d6000602084013e613557565b606091505b509250905060018115151461359d5760405162461bcd60e51b815260040180806020018281038252602b8152602001806147ac602b913960400191505060405180910390fd5b60008251116135dd5760405162461bcd60e51b81526004018080602001828103825260278152602001806148ed6027913960400191505060405180910390fd5b60006135ea83601f6141d0565b50905060018115151461362e5760405162461bcd60e51b81526004018080602001828103825260378152602001806149146037913960400191505060405180910390fd5b50600198975050505050505050565b6001600160a01b0381166136825760405162461bcd60e51b81526004018080602001828103825260268152602001806146b16026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008083518360040111156137235760405162461bcd60e51b8152600401808060200182810382526022815260200180614a866022913960400191505060405180910390fd5b600060405160046000600182038760208a0101515b838310156137585780821a83860153600183019250600182039150613738565b50505080820160405260200390035192505050600482015b9250929050565b60008083518360080111156137bd5760405162461bcd60e51b81526004018080602001828103825260228152602001806149e86022913960400191505060405180910390fd5b600060405160086000600182038760208a0101515b838310156137f25780821a838601536001830192506001820391506137d2565b505050808201604052602003900351956008949094019450505050565b600080835183602001111561386b576040805162461bcd60e51b815260206004820181905260248201527f4e657874486173682c206f66667365742065786365656473206d6178696d756d604482015290519081900360640190fd5b5050602091810182015192910190565b606060008061388a85856142b3565b865190955090915081850111156138d25760405162461bcd60e51b8152600401808060200182810382526024815260200180614aa86024913960400191505060405180910390fd5b6060811580156138ed57604051915060208201604052613937565b6040519150601f8316801560200281840101848101888315602002848c0101015b8183101561392657805183526020928301920161390e565b5050848452601f01601f1916604052505b5095930193505050565b60008083518360140111156139875760405162461bcd60e51b815260040180806020018281038252602381526020018061471a6023913960400191505060405180910390fd5b505081810160200151601482019250929050565b6060818301845110156139ad57600080fd5b6060821580156139c857604051915060208201604052613a12565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015613a015780518352602092830192016139e9565b5050858452601f01601f1916604052505b50949350505050565b6000805b8351811015613a6657838181518110613a3457fe5b60200260200101516001600160a01b0316836001600160a01b03161415613a5e5760019150613a66565b600101613a1f565b5092915050565b600060608080613a7c87614369565b6040516020018083805190602001908083835b60208310613aae5780518252601f199092019160209182019101613a8f565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310613af65780518252601f199092019160209182019101613ad7565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529050606086604051908082528060200260200182016040528015613b59578160200160208202803883390190505b50905060005b87811015613c8a5782613b82611a36613b7d8960438602604361399b565b614392565b6040516020018083805190602001908083835b60208310613bb45780518252601f199092019160209182019101613b95565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310613bfc5780518252601f199092019160209182019101613bdd565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292506000613c50613c478860438502604361399b565b6003604061399b565b8051906020012090508060001c838381518110613c6957fe5b6001600160a01b039092166020928302919091019091015250600101613b5f565b5081613c9587614369565b6040516020018083805190602001908083835b60208310613cc75780518252601f199092019160209182019101613ca8565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310613d0f5780518252601f199092019160209182019101613cf0565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529150600060036002846040518082805190602001908083835b60208310613d7c5780518252601f199092019160209182019101613d5d565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015613dbb573d6000803e3d6000fd5b5050506040513d6020811015613dd057600080fd5b50516040805160208181019390935281518082038401815290820191829052805190928291908401908083835b60208310613e1c5780518252601f199092019160209182019101613dfd565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015613e5b573d6000803e3d6000fd5b50506040515160601b99929850919650505050505050565b606060fd826001600160401b03161015613e9757613e9082614480565b9050611669565b61ffff826001600160401b031611613f7557613eb660fd60f81b61449b565b613ebf83614369565b6040516020018083805190602001908083835b60208310613ef15780518252601f199092019160209182019101613ed2565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310613f395780518252601f199092019160209182019101613f1a565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529050611669565b63ffffffff826001600160401b031611613f9f57613f96607f60f91b61449b565b613ebf836144af565b613fb06001600160f81b031961449b565b613ebf83612e46565b6040516000602080830182815284519293600293859387939260210191908401908083835b60208310613ffd5780518252601f199092019160209182019101613fde565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052604051808280519060200190808383602083106130e45780518252601f1990920191602091820191016130c5565b60008083518360010111156140bc576040805162461bcd60e51b815260206004820181905260248201527f4e657874427974652c204f66667365742065786365656473206d6178696d756d604482015290519081900360640190fd5b505081810160200151600182019250929050565b60408051600160f81b60208083019190915260218201859052604180830185905283518084039091018152606190920192839052815160009360029392909182918401908083835b602083106141375780518252601f199092019160209182019101614118565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015614176573d6000803e3d6000fd5b5050506040513d602081101561418b57600080fd5b50519392505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906141c85750808214155b949350505050565b6000808351836001011115614223576040805162461bcd60e51b815260206004820152601460248201527313d9999cd95d08195e18d959591cc81b1a5b5a5d60621b604482015290519081900360640190fd5b838301602001516000600160f81b6001600160f81b03198316141561424a575060016142a5565b6001600160f81b03198216614261575060006142a5565b6040805162461bcd60e51b81526020600482015260146024820152732732bc3a2137b7b6103b30b63ab29032b93937b960611b604482015290519081900360640190fd5b956001949094019450505050565b60008060006142c28585614060565b9450905060fd60f81b6001600160f81b0319821614156142f7576142e685856144d8565b8161ffff1691509250925050613770565b607f60f91b6001600160f81b03198216141561432a5761431785856136dd565b8163ffffffff1691509250925050613770565b6001600160f81b0319808216141561435c576143468585613777565b816001600160401b031691509250925050613770565b60f81c9150829050613770565b6040516002808252606091906000601f60ff861660208501536001919091019060001901612e57565b60606022825110156143eb576040805162461bcd60e51b815260206004820152601760248201527f6b6579206c656e67676820697320746f6f2073686f7274000000000000000000604482015290519081900360640190fd5b6143f8826000602361399b565b905060028260428151811061440957fe5b016020015160f81c8161441857fe5b0660ff166000141561445257600260f81b8160028151811061443657fe5b60200101906001600160f81b031916908160001a905350611669565b600360f81b8160028151811061446457fe5b60200101906001600160f81b031916908160001a905350919050565b604080516001815260f89290921b6020830152818101905290565b60606144a98260f81c614480565b92915050565b6040516004808252606091906000601f60ff861660208501536001919091019060001901612e57565b600080835183600201111561451e5760405162461bcd60e51b815260040180806020018281038252602281526020018061494b6022913960400191505060405180910390fd5b6000604051846020870101518060011a82538060001a6001830153506002818101604052601d19909101519694019450505050565b604080516101608101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e08201839052610100820183905261012082015261014081019190915290565b60408051606080820183528152600060208201529081016145cd6145d2565b905290565b6040518060e0016040528060608152602001606081526020016060815260200160006001600160401b03168152602001606081526020016060815260200160608152509056fe70617573652045746843726f7373436861696e4461746120636f6e7472616374206661696c6564546865206e657874426f6f6b4b6565706572206f662068656164657220697320656d707479756e70617573652045746843726f7373436861696e4461746120636f6e7472616374206661696c65646279746573206c656e67746820646f6573206e6f74206d6174636820616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735361766520506f6c7920636861696e2063757272656e742065706f63682073746172742068656967687420746f204461746120636f6e7472616374206661696c6564214e657874427974657332302c206f66667365742065786365656473206d6178696d756d6d65726b6c6550726f76652c2065787065637420726f6f74206973206e6f7420657175616c2061637475616c20726f6f7454686520686569676874206f6620686561646572206973206c6f776572207468616e2063757272656e742065706f6368207374617274206865696768742145746843726f7373436861696e2063616c6c20627573696e65737320636f6e7472616374206661696c65645361766520506f6c7920636861696e20626f6f6b206b65657065727320627974657320746f204461746120636f6e7472616374206661696c6564214f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726d65726b6c6550726f76652c204e6578744279746520666f7220706f736974696f6e20696e666f206661696c65645468652070617373656420696e2061646472657373206973206e6f74206120636f6e74726163742153617665204d43204c617465737448656967687420746f204461746120636f6e7472616374206661696c65642156657269667920706f6c7920636861696e2063757272656e742065706f636820686561646572207369676e6174757265206661696c6564214e6f2072657475726e2076616c75652066726f6d20627573696e65737320636f6e74726163742145746843726f7373436861696e2063616c6c20627573696e65737320636f6e74726163742072657475726e206973206e6f7420747275654e65787455696e7431362c206f66667365742065786365656473206d6178696d756d45746843726f7373436861696e4461746120636f6e74726163742068617320616c7265616479206265656e20696e697469616c697a6564215361766520506f6c7920636861696e2063757272656e742065706f636820626f6f6b206b65657065727320746f204461746120636f6e7472616374206661696c6564214e65787455696e7436342c206f66667365742065786365656473206d6178696d756d746865207472616e73616374696f6e20686173206265656e20657865637574656421536176652065746854784861736820627920696e64657820746f204461746120636f6e7472616374206661696c65642154686973205478206973206e6f742061696d696e6720617420457468657265756d206e6574776f726b214e65787455696e7433322c206f66667365742065786365656473206d6178696d756d4e65787456617242797465732c206f66667365742065786365656473206d6178696d756d56657269667920706f6c7920636861696e20686561646572207369676e6174757265206661696c656421a265627a7a72315820bbc304196457c1b04925d7bfb3a19d8f93a0c3b1dfad880533a4365d238de95c64736f6c634300050f0032" - -// DeployEthCrossChainManager deploys a new Ethereum contract, binding an instance of EthCrossChainManager to it. -func DeployEthCrossChainManager(auth *bind.TransactOpts, backend bind.ContractBackend, _eccd common.Address) (common.Address, *types.Transaction, *EthCrossChainManager, error) { - parsed, err := abi.JSON(strings.NewReader(EthCrossChainManagerABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(EthCrossChainManagerBin), backend, _eccd) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &EthCrossChainManager{EthCrossChainManagerCaller: EthCrossChainManagerCaller{contract: contract}, EthCrossChainManagerTransactor: EthCrossChainManagerTransactor{contract: contract}, EthCrossChainManagerFilterer: EthCrossChainManagerFilterer{contract: contract}}, nil -} - -// EthCrossChainManager is an auto generated Go binding around an Ethereum 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 Ethereum contract. -type EthCrossChainManagerCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// EthCrossChainManagerTransactor is an auto generated write-only Go binding around an Ethereum contract. -type EthCrossChainManagerTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// EthCrossChainManagerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type EthCrossChainManagerFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// EthCrossChainManagerSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type EthCrossChainManagerSession struct { - Contract *EthCrossChainManager // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// EthCrossChainManagerCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type EthCrossChainManagerCallerSession struct { - Contract *EthCrossChainManagerCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// EthCrossChainManagerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type EthCrossChainManagerTransactorSession struct { - Contract *EthCrossChainManagerTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// EthCrossChainManagerRaw is an auto generated low-level Go binding around an Ethereum 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 Ethereum 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 Ethereum 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(address common.Address, backend bind.ContractBackend) (*EthCrossChainManager, error) { - contract, err := bindEthCrossChainManager(address, backend, backend, backend) - 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(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(EthCrossChainManagerABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 *bind.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 *bind.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 *bind.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 *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _EthCrossChainManager.contract.Call(opts, out, "EthCrossChainDataAddress") - return *ret0, 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) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_EthCrossChainManager *EthCrossChainManagerCaller) IsOwner(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _EthCrossChainManager.contract.Call(opts, out, "isOwner") - return *ret0, 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 *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _EthCrossChainManager.contract.Call(opts, out, "owner") - return *ret0, 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 *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _EthCrossChainManager.contract.Call(opts, out, "paused") - return *ret0, 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 *bind.TransactOpts, rawHeader []byte, pubKeyList []byte, sigList []byte) (*types.Transaction, 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) (*types.Transaction, 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) (*types.Transaction, 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 *bind.TransactOpts, toChainId uint64, toContract []byte, method []byte, txData []byte) (*types.Transaction, 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) (*types.Transaction, 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) (*types.Transaction, 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 *bind.TransactOpts, rawHeader []byte, pubKeyList []byte) (*types.Transaction, 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) (*types.Transaction, 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) (*types.Transaction, 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 *bind.TransactOpts) (*types.Transaction, 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() (*types.Transaction, 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() (*types.Transaction, 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 *bind.TransactOpts) (*types.Transaction, 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() (*types.Transaction, 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() (*types.Transaction, error) { - return _EthCrossChainManager.Contract.RenounceOwnership(&_EthCrossChainManager.TransactOpts) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_EthCrossChainManager *EthCrossChainManagerTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, 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) (*types.Transaction, 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) (*types.Transaction, 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 *bind.TransactOpts) (*types.Transaction, 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() (*types.Transaction, 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() (*types.Transaction, 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 *bind.TransactOpts, newEthCrossChainManagerAddress common.Address) (*types.Transaction, 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) (*types.Transaction, 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) (*types.Transaction, 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 *bind.TransactOpts, proof []byte, rawHeader []byte, headerProof []byte, curRawHeader []byte, headerSig []byte) (*types.Transaction, 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) (*types.Transaction, 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) (*types.Transaction, 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 *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *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 types.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 *bind.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 *bind.WatchOpts, sink chan<- *EthCrossChainManagerChangeBookKeeperEvent) (event.Subscription, error) { - - logs, 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 := <-logs: - // 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 -} - -// ParseChangeBookKeeperEvent is a log parse operation binding the contract event 0xe60d33488cba3977bf65766cd2f8ac9617f64bf3b3198aff6240ce5c7d43b690. -// -// Solidity: event ChangeBookKeeperEvent(uint256 height, bytes rawHeader) -func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseChangeBookKeeperEvent(log types.Log) (*EthCrossChainManagerChangeBookKeeperEvent, error) { - event := new(EthCrossChainManagerChangeBookKeeperEvent) - if err := _EthCrossChainManager.contract.UnpackLog(event, "ChangeBookKeeperEvent", log); err != nil { - return nil, err - } - 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 *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *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 types.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 *bind.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 *bind.WatchOpts, sink chan<- *EthCrossChainManagerCrossChainEvent, sender []common.Address) (event.Subscription, error) { - - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, 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 := <-logs: - // 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 -} - -// 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 types.Log) (*EthCrossChainManagerCrossChainEvent, error) { - event := new(EthCrossChainManagerCrossChainEvent) - if err := _EthCrossChainManager.contract.UnpackLog(event, "CrossChainEvent", log); err != nil { - return nil, err - } - 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 *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *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 types.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 *bind.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 *bind.WatchOpts, sink chan<- *EthCrossChainManagerInitGenesisBlockEvent) (event.Subscription, error) { - - logs, 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 := <-logs: - // 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 -} - -// ParseInitGenesisBlockEvent is a log parse operation binding the contract event 0xf01968fc3a2655cf1b5144cb32de6dc898f91b9239c103744e8457152ab2fbde. -// -// Solidity: event InitGenesisBlockEvent(uint256 height, bytes rawHeader) -func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseInitGenesisBlockEvent(log types.Log) (*EthCrossChainManagerInitGenesisBlockEvent, error) { - event := new(EthCrossChainManagerInitGenesisBlockEvent) - if err := _EthCrossChainManager.contract.UnpackLog(event, "InitGenesisBlockEvent", log); err != nil { - return nil, err - } - 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 *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *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 types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_EthCrossChainManager *EthCrossChainManagerFilterer) FilterOwnershipTransferred(opts *bind.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 *bind.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) - } - - logs, 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 := <-logs: - // 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 -} - -// 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 types.Log) (*EthCrossChainManagerOwnershipTransferred, error) { - event := new(EthCrossChainManagerOwnershipTransferred) - if err := _EthCrossChainManager.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - 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 *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *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 types.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 *bind.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 *bind.WatchOpts, sink chan<- *EthCrossChainManagerPaused) (event.Subscription, error) { - - logs, 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 := <-logs: - // 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 -} - -// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParsePaused(log types.Log) (*EthCrossChainManagerPaused, error) { - event := new(EthCrossChainManagerPaused) - if err := _EthCrossChainManager.contract.UnpackLog(event, "Paused", log); err != nil { - return nil, err - } - 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 *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *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 types.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 *bind.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 *bind.WatchOpts, sink chan<- *EthCrossChainManagerUnpaused) (event.Subscription, error) { - - logs, 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 := <-logs: - // 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 -} - -// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_EthCrossChainManager *EthCrossChainManagerFilterer) ParseUnpaused(log types.Log) (*EthCrossChainManagerUnpaused, error) { - event := new(EthCrossChainManagerUnpaused) - if err := _EthCrossChainManager.contract.UnpackLog(event, "Unpaused", log); err != nil { - return nil, err - } - 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 *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *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 types.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 *bind.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 *bind.WatchOpts, sink chan<- *EthCrossChainManagerVerifyHeaderAndExecuteTxEvent) (event.Subscription, error) { - - logs, 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 := <-logs: - // 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 -} - -// 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 types.Log) (*EthCrossChainManagerVerifyHeaderAndExecuteTxEvent, error) { - event := new(EthCrossChainManagerVerifyHeaderAndExecuteTxEvent) - if err := _EthCrossChainManager.contract.UnpackLog(event, "VerifyHeaderAndExecuteTxEvent", log); err != nil { - return nil, err - } - return event, nil -} - -// IEthCrossChainDataABI is the input ABI used to generate the binding from. -const IEthCrossChainDataABI = "[{\"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\":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\":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\":[{\"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\"}]" - -// IEthCrossChainDataFuncSigs maps the 4-byte function signature to its string representation. -var IEthCrossChainDataFuncSigs = map[string]string{ - "0586763c": "checkIfFromChainTxExist(uint64,bytes32)", - "69d48074": "getCurEpochConPubKeyBytes()", - "5ac40790": "getCurEpochStartHeight()", - "29927875": "getEthTxHash(uint256)", - "ff3d24a1": "getEthTxHashIndex()", - "40602bb5": "getExtraData(bytes32,bytes32)", - "e90bfdcf": "markFromChainTxExist(uint64,bytes32)", - "8456cb59": "pause()", - "5c975abb": "paused()", - "41973cd9": "putCurEpochConPubKeyBytes(bytes)", - "8a8bd17f": "putCurEpochStartHeight(uint32)", - "4c3ccf64": "putEthTxHash(bytes32)", - "1afe374e": "putExtraData(bytes32,bytes32,bytes)", - "f2fde38b": "transferOwnership(address)", - "3f4ba83a": "unpause()", -} - -// IEthCrossChainData is an auto generated Go binding around an Ethereum contract. -type IEthCrossChainData struct { - IEthCrossChainDataCaller // Read-only binding to the contract - IEthCrossChainDataTransactor // Write-only binding to the contract - IEthCrossChainDataFilterer // Log filterer for contract events -} - -// IEthCrossChainDataCaller is an auto generated read-only Go binding around an Ethereum contract. -type IEthCrossChainDataCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainDataTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IEthCrossChainDataTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainDataFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IEthCrossChainDataFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainDataSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IEthCrossChainDataSession struct { - Contract *IEthCrossChainData // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainDataCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IEthCrossChainDataCallerSession struct { - Contract *IEthCrossChainDataCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IEthCrossChainDataTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IEthCrossChainDataTransactorSession struct { - Contract *IEthCrossChainDataTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainDataRaw is an auto generated low-level Go binding around an Ethereum contract. -type IEthCrossChainDataRaw struct { - Contract *IEthCrossChainData // Generic contract binding to access the raw methods on -} - -// IEthCrossChainDataCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IEthCrossChainDataCallerRaw struct { - Contract *IEthCrossChainDataCaller // Generic read-only contract binding to access the raw methods on -} - -// IEthCrossChainDataTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IEthCrossChainDataTransactorRaw struct { - Contract *IEthCrossChainDataTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewIEthCrossChainData creates a new instance of IEthCrossChainData, bound to a specific deployed contract. -func NewIEthCrossChainData(address common.Address, backend bind.ContractBackend) (*IEthCrossChainData, error) { - contract, err := bindIEthCrossChainData(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IEthCrossChainData{IEthCrossChainDataCaller: IEthCrossChainDataCaller{contract: contract}, IEthCrossChainDataTransactor: IEthCrossChainDataTransactor{contract: contract}, IEthCrossChainDataFilterer: IEthCrossChainDataFilterer{contract: contract}}, nil -} - -// NewIEthCrossChainDataCaller creates a new read-only instance of IEthCrossChainData, bound to a specific deployed contract. -func NewIEthCrossChainDataCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainDataCaller, error) { - contract, err := bindIEthCrossChainData(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainDataCaller{contract: contract}, nil -} - -// NewIEthCrossChainDataTransactor creates a new write-only instance of IEthCrossChainData, bound to a specific deployed contract. -func NewIEthCrossChainDataTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainDataTransactor, error) { - contract, err := bindIEthCrossChainData(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainDataTransactor{contract: contract}, nil -} - -// NewIEthCrossChainDataFilterer creates a new log filterer instance of IEthCrossChainData, bound to a specific deployed contract. -func NewIEthCrossChainDataFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainDataFilterer, error) { - contract, err := bindIEthCrossChainData(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IEthCrossChainDataFilterer{contract: contract}, nil -} - -// bindIEthCrossChainData binds a generic wrapper to an already deployed contract. -func bindIEthCrossChainData(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IEthCrossChainDataABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IEthCrossChainData *IEthCrossChainDataRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainData.Contract.IEthCrossChainDataCaller.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 (_IEthCrossChainData *IEthCrossChainDataRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.IEthCrossChainDataTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainData *IEthCrossChainDataRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.IEthCrossChainDataTransactor.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 (_IEthCrossChainData *IEthCrossChainDataCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainData.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 (_IEthCrossChainData *IEthCrossChainDataTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainData *IEthCrossChainDataTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.contract.Transact(opts, method, params...) -} - -// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. -// -// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataCaller) CheckIfFromChainTxExist(opts *bind.CallOpts, fromChainId uint64, fromChainTx [32]byte) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _IEthCrossChainData.contract.Call(opts, out, "checkIfFromChainTxExist", fromChainId, fromChainTx) - return *ret0, err -} - -// CheckIfFromChainTxExist is a free data retrieval call binding the contract method 0x0586763c. -// -// Solidity: function checkIfFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) view returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataSession) CheckIfFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (bool, error) { - return _IEthCrossChainData.Contract.CheckIfFromChainTxExist(&_IEthCrossChainData.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 (_IEthCrossChainData *IEthCrossChainDataCallerSession) CheckIfFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (bool, error) { - return _IEthCrossChainData.Contract.CheckIfFromChainTxExist(&_IEthCrossChainData.CallOpts, fromChainId, fromChainTx) -} - -// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. -// -// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) -func (_IEthCrossChainData *IEthCrossChainDataCaller) GetCurEpochConPubKeyBytes(opts *bind.CallOpts) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _IEthCrossChainData.contract.Call(opts, out, "getCurEpochConPubKeyBytes") - return *ret0, err -} - -// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. -// -// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) -func (_IEthCrossChainData *IEthCrossChainDataSession) GetCurEpochConPubKeyBytes() ([]byte, error) { - return _IEthCrossChainData.Contract.GetCurEpochConPubKeyBytes(&_IEthCrossChainData.CallOpts) -} - -// GetCurEpochConPubKeyBytes is a free data retrieval call binding the contract method 0x69d48074. -// -// Solidity: function getCurEpochConPubKeyBytes() view returns(bytes) -func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetCurEpochConPubKeyBytes() ([]byte, error) { - return _IEthCrossChainData.Contract.GetCurEpochConPubKeyBytes(&_IEthCrossChainData.CallOpts) -} - -// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. -// -// Solidity: function getCurEpochStartHeight() view returns(uint32) -func (_IEthCrossChainData *IEthCrossChainDataCaller) GetCurEpochStartHeight(opts *bind.CallOpts) (uint32, error) { - var ( - ret0 = new(uint32) - ) - out := ret0 - err := _IEthCrossChainData.contract.Call(opts, out, "getCurEpochStartHeight") - return *ret0, err -} - -// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. -// -// Solidity: function getCurEpochStartHeight() view returns(uint32) -func (_IEthCrossChainData *IEthCrossChainDataSession) GetCurEpochStartHeight() (uint32, error) { - return _IEthCrossChainData.Contract.GetCurEpochStartHeight(&_IEthCrossChainData.CallOpts) -} - -// GetCurEpochStartHeight is a free data retrieval call binding the contract method 0x5ac40790. -// -// Solidity: function getCurEpochStartHeight() view returns(uint32) -func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetCurEpochStartHeight() (uint32, error) { - return _IEthCrossChainData.Contract.GetCurEpochStartHeight(&_IEthCrossChainData.CallOpts) -} - -// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. -// -// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) -func (_IEthCrossChainData *IEthCrossChainDataCaller) GetEthTxHash(opts *bind.CallOpts, ethTxHashIndex *big.Int) ([32]byte, error) { - var ( - ret0 = new([32]byte) - ) - out := ret0 - err := _IEthCrossChainData.contract.Call(opts, out, "getEthTxHash", ethTxHashIndex) - return *ret0, err -} - -// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. -// -// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) -func (_IEthCrossChainData *IEthCrossChainDataSession) GetEthTxHash(ethTxHashIndex *big.Int) ([32]byte, error) { - return _IEthCrossChainData.Contract.GetEthTxHash(&_IEthCrossChainData.CallOpts, ethTxHashIndex) -} - -// GetEthTxHash is a free data retrieval call binding the contract method 0x29927875. -// -// Solidity: function getEthTxHash(uint256 ethTxHashIndex) view returns(bytes32) -func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetEthTxHash(ethTxHashIndex *big.Int) ([32]byte, error) { - return _IEthCrossChainData.Contract.GetEthTxHash(&_IEthCrossChainData.CallOpts, ethTxHashIndex) -} - -// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. -// -// Solidity: function getEthTxHashIndex() view returns(uint256) -func (_IEthCrossChainData *IEthCrossChainDataCaller) GetEthTxHashIndex(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IEthCrossChainData.contract.Call(opts, out, "getEthTxHashIndex") - return *ret0, err -} - -// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. -// -// Solidity: function getEthTxHashIndex() view returns(uint256) -func (_IEthCrossChainData *IEthCrossChainDataSession) GetEthTxHashIndex() (*big.Int, error) { - return _IEthCrossChainData.Contract.GetEthTxHashIndex(&_IEthCrossChainData.CallOpts) -} - -// GetEthTxHashIndex is a free data retrieval call binding the contract method 0xff3d24a1. -// -// Solidity: function getEthTxHashIndex() view returns(uint256) -func (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetEthTxHashIndex() (*big.Int, error) { - return _IEthCrossChainData.Contract.GetEthTxHashIndex(&_IEthCrossChainData.CallOpts) -} - -// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. -// -// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) -func (_IEthCrossChainData *IEthCrossChainDataCaller) GetExtraData(opts *bind.CallOpts, key1 [32]byte, key2 [32]byte) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _IEthCrossChainData.contract.Call(opts, out, "getExtraData", key1, key2) - return *ret0, err -} - -// GetExtraData is a free data retrieval call binding the contract method 0x40602bb5. -// -// Solidity: function getExtraData(bytes32 key1, bytes32 key2) view returns(bytes) -func (_IEthCrossChainData *IEthCrossChainDataSession) GetExtraData(key1 [32]byte, key2 [32]byte) ([]byte, error) { - return _IEthCrossChainData.Contract.GetExtraData(&_IEthCrossChainData.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 (_IEthCrossChainData *IEthCrossChainDataCallerSession) GetExtraData(key1 [32]byte, key2 [32]byte) ([]byte, error) { - return _IEthCrossChainData.Contract.GetExtraData(&_IEthCrossChainData.CallOpts, key1, key2) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataCaller) Paused(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _IEthCrossChainData.contract.Call(opts, out, "paused") - return *ret0, err -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataSession) Paused() (bool, error) { - return _IEthCrossChainData.Contract.Paused(&_IEthCrossChainData.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataCallerSession) Paused() (bool, error) { - return _IEthCrossChainData.Contract.Paused(&_IEthCrossChainData.CallOpts) -} - -// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. -// -// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactor) MarkFromChainTxExist(opts *bind.TransactOpts, fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { - return _IEthCrossChainData.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 (_IEthCrossChainData *IEthCrossChainDataSession) MarkFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.MarkFromChainTxExist(&_IEthCrossChainData.TransactOpts, fromChainId, fromChainTx) -} - -// MarkFromChainTxExist is a paid mutator transaction binding the contract method 0xe90bfdcf. -// -// Solidity: function markFromChainTxExist(uint64 fromChainId, bytes32 fromChainTx) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) MarkFromChainTxExist(fromChainId uint64, fromChainTx [32]byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.MarkFromChainTxExist(&_IEthCrossChainData.TransactOpts, fromChainId, fromChainTx) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainData.contract.Transact(opts, "pause") -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataSession) Pause() (*types.Transaction, error) { - return _IEthCrossChainData.Contract.Pause(&_IEthCrossChainData.TransactOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) Pause() (*types.Transaction, error) { - return _IEthCrossChainData.Contract.Pause(&_IEthCrossChainData.TransactOpts) -} - -// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. -// -// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactor) PutCurEpochConPubKeyBytes(opts *bind.TransactOpts, curEpochPkBytes []byte) (*types.Transaction, error) { - return _IEthCrossChainData.contract.Transact(opts, "putCurEpochConPubKeyBytes", curEpochPkBytes) -} - -// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. -// -// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataSession) PutCurEpochConPubKeyBytes(curEpochPkBytes []byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutCurEpochConPubKeyBytes(&_IEthCrossChainData.TransactOpts, curEpochPkBytes) -} - -// PutCurEpochConPubKeyBytes is a paid mutator transaction binding the contract method 0x41973cd9. -// -// Solidity: function putCurEpochConPubKeyBytes(bytes curEpochPkBytes) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutCurEpochConPubKeyBytes(curEpochPkBytes []byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutCurEpochConPubKeyBytes(&_IEthCrossChainData.TransactOpts, curEpochPkBytes) -} - -// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. -// -// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactor) PutCurEpochStartHeight(opts *bind.TransactOpts, curEpochStartHeight uint32) (*types.Transaction, error) { - return _IEthCrossChainData.contract.Transact(opts, "putCurEpochStartHeight", curEpochStartHeight) -} - -// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. -// -// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataSession) PutCurEpochStartHeight(curEpochStartHeight uint32) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutCurEpochStartHeight(&_IEthCrossChainData.TransactOpts, curEpochStartHeight) -} - -// PutCurEpochStartHeight is a paid mutator transaction binding the contract method 0x8a8bd17f. -// -// Solidity: function putCurEpochStartHeight(uint32 curEpochStartHeight) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutCurEpochStartHeight(curEpochStartHeight uint32) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutCurEpochStartHeight(&_IEthCrossChainData.TransactOpts, curEpochStartHeight) -} - -// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. -// -// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactor) PutEthTxHash(opts *bind.TransactOpts, ethTxHash [32]byte) (*types.Transaction, error) { - return _IEthCrossChainData.contract.Transact(opts, "putEthTxHash", ethTxHash) -} - -// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. -// -// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataSession) PutEthTxHash(ethTxHash [32]byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutEthTxHash(&_IEthCrossChainData.TransactOpts, ethTxHash) -} - -// PutEthTxHash is a paid mutator transaction binding the contract method 0x4c3ccf64. -// -// Solidity: function putEthTxHash(bytes32 ethTxHash) returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutEthTxHash(ethTxHash [32]byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutEthTxHash(&_IEthCrossChainData.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 (_IEthCrossChainData *IEthCrossChainDataTransactor) PutExtraData(opts *bind.TransactOpts, key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { - return _IEthCrossChainData.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 (_IEthCrossChainData *IEthCrossChainDataSession) PutExtraData(key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutExtraData(&_IEthCrossChainData.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 (_IEthCrossChainData *IEthCrossChainDataTransactorSession) PutExtraData(key1 [32]byte, key2 [32]byte, value []byte) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.PutExtraData(&_IEthCrossChainData.TransactOpts, key1, key2, value) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_IEthCrossChainData *IEthCrossChainDataTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _IEthCrossChainData.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_IEthCrossChainData *IEthCrossChainDataSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.TransferOwnership(&_IEthCrossChainData.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _IEthCrossChainData.Contract.TransferOwnership(&_IEthCrossChainData.TransactOpts, newOwner) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainData.contract.Transact(opts, "unpause") -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataSession) Unpause() (*types.Transaction, error) { - return _IEthCrossChainData.Contract.Unpause(&_IEthCrossChainData.TransactOpts) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_IEthCrossChainData *IEthCrossChainDataTransactorSession) Unpause() (*types.Transaction, error) { - return _IEthCrossChainData.Contract.Unpause(&_IEthCrossChainData.TransactOpts) -} - -// IEthCrossChainManagerABI is the input ABI used to generate the binding from. -const IEthCrossChainManagerABI = "[{\"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\"}]" - -// IEthCrossChainManagerFuncSigs maps the 4-byte function signature to its string representation. -var IEthCrossChainManagerFuncSigs = map[string]string{ - "bd5cf625": "crossChain(uint64,bytes,bytes,bytes)", -} - -// IEthCrossChainManager is an auto generated Go binding around an Ethereum contract. -type IEthCrossChainManager struct { - IEthCrossChainManagerCaller // Read-only binding to the contract - IEthCrossChainManagerTransactor // Write-only binding to the contract - IEthCrossChainManagerFilterer // Log filterer for contract events -} - -// IEthCrossChainManagerCaller is an auto generated read-only Go binding around an Ethereum contract. -type IEthCrossChainManagerCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IEthCrossChainManagerTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IEthCrossChainManagerFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IEthCrossChainManagerSession struct { - Contract *IEthCrossChainManager // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainManagerCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IEthCrossChainManagerCallerSession struct { - Contract *IEthCrossChainManagerCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IEthCrossChainManagerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IEthCrossChainManagerTransactorSession struct { - Contract *IEthCrossChainManagerTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainManagerRaw is an auto generated low-level Go binding around an Ethereum contract. -type IEthCrossChainManagerRaw struct { - Contract *IEthCrossChainManager // Generic contract binding to access the raw methods on -} - -// IEthCrossChainManagerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IEthCrossChainManagerCallerRaw struct { - Contract *IEthCrossChainManagerCaller // Generic read-only contract binding to access the raw methods on -} - -// IEthCrossChainManagerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IEthCrossChainManagerTransactorRaw struct { - Contract *IEthCrossChainManagerTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewIEthCrossChainManager creates a new instance of IEthCrossChainManager, bound to a specific deployed contract. -func NewIEthCrossChainManager(address common.Address, backend bind.ContractBackend) (*IEthCrossChainManager, error) { - contract, err := bindIEthCrossChainManager(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IEthCrossChainManager{IEthCrossChainManagerCaller: IEthCrossChainManagerCaller{contract: contract}, IEthCrossChainManagerTransactor: IEthCrossChainManagerTransactor{contract: contract}, IEthCrossChainManagerFilterer: IEthCrossChainManagerFilterer{contract: contract}}, nil -} - -// NewIEthCrossChainManagerCaller creates a new read-only instance of IEthCrossChainManager, bound to a specific deployed contract. -func NewIEthCrossChainManagerCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainManagerCaller, error) { - contract, err := bindIEthCrossChainManager(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerCaller{contract: contract}, nil -} - -// NewIEthCrossChainManagerTransactor creates a new write-only instance of IEthCrossChainManager, bound to a specific deployed contract. -func NewIEthCrossChainManagerTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainManagerTransactor, error) { - contract, err := bindIEthCrossChainManager(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerTransactor{contract: contract}, nil -} - -// NewIEthCrossChainManagerFilterer creates a new log filterer instance of IEthCrossChainManager, bound to a specific deployed contract. -func NewIEthCrossChainManagerFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainManagerFilterer, error) { - contract, err := bindIEthCrossChainManager(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerFilterer{contract: contract}, nil -} - -// bindIEthCrossChainManager binds a generic wrapper to an already deployed contract. -func bindIEthCrossChainManager(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IEthCrossChainManagerABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IEthCrossChainManager *IEthCrossChainManagerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainManager.Contract.IEthCrossChainManagerCaller.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 (_IEthCrossChainManager *IEthCrossChainManagerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.IEthCrossChainManagerTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainManager *IEthCrossChainManagerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.IEthCrossChainManagerTransactor.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 (_IEthCrossChainManager *IEthCrossChainManagerCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainManager.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 (_IEthCrossChainManager *IEthCrossChainManagerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainManager *IEthCrossChainManagerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.contract.Transact(opts, method, params...) -} - -// 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 (_IEthCrossChainManager *IEthCrossChainManagerTransactor) CrossChain(opts *bind.TransactOpts, _toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { - return _IEthCrossChainManager.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 (_IEthCrossChainManager *IEthCrossChainManagerSession) CrossChain(_toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.CrossChain(&_IEthCrossChainManager.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 (_IEthCrossChainManager *IEthCrossChainManagerTransactorSession) CrossChain(_toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.CrossChain(&_IEthCrossChainManager.TransactOpts, _toChainId, _toContract, _method, _txData) -} - -// IUpgradableECCMABI is the input ABI used to generate the binding from. -const IUpgradableECCMABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// IUpgradableECCMFuncSigs maps the 4-byte function signature to its string representation. -var IUpgradableECCMFuncSigs = map[string]string{ - "8f32d59b": "isOwner()", - "8456cb59": "pause()", - "5c975abb": "paused()", - "3f4ba83a": "unpause()", - "7e724ff3": "upgradeToNew(address)", -} - -// IUpgradableECCM is an auto generated Go binding around an Ethereum contract. -type IUpgradableECCM struct { - IUpgradableECCMCaller // Read-only binding to the contract - IUpgradableECCMTransactor // Write-only binding to the contract - IUpgradableECCMFilterer // Log filterer for contract events -} - -// IUpgradableECCMCaller is an auto generated read-only Go binding around an Ethereum contract. -type IUpgradableECCMCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IUpgradableECCMTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IUpgradableECCMTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IUpgradableECCMFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IUpgradableECCMFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IUpgradableECCMSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IUpgradableECCMSession struct { - Contract *IUpgradableECCM // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IUpgradableECCMCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IUpgradableECCMCallerSession struct { - Contract *IUpgradableECCMCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IUpgradableECCMTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IUpgradableECCMTransactorSession struct { - Contract *IUpgradableECCMTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IUpgradableECCMRaw is an auto generated low-level Go binding around an Ethereum contract. -type IUpgradableECCMRaw struct { - Contract *IUpgradableECCM // Generic contract binding to access the raw methods on -} - -// IUpgradableECCMCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IUpgradableECCMCallerRaw struct { - Contract *IUpgradableECCMCaller // Generic read-only contract binding to access the raw methods on -} - -// IUpgradableECCMTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IUpgradableECCMTransactorRaw struct { - Contract *IUpgradableECCMTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewIUpgradableECCM creates a new instance of IUpgradableECCM, bound to a specific deployed contract. -func NewIUpgradableECCM(address common.Address, backend bind.ContractBackend) (*IUpgradableECCM, error) { - contract, err := bindIUpgradableECCM(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IUpgradableECCM{IUpgradableECCMCaller: IUpgradableECCMCaller{contract: contract}, IUpgradableECCMTransactor: IUpgradableECCMTransactor{contract: contract}, IUpgradableECCMFilterer: IUpgradableECCMFilterer{contract: contract}}, nil -} - -// NewIUpgradableECCMCaller creates a new read-only instance of IUpgradableECCM, bound to a specific deployed contract. -func NewIUpgradableECCMCaller(address common.Address, caller bind.ContractCaller) (*IUpgradableECCMCaller, error) { - contract, err := bindIUpgradableECCM(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IUpgradableECCMCaller{contract: contract}, nil -} - -// NewIUpgradableECCMTransactor creates a new write-only instance of IUpgradableECCM, bound to a specific deployed contract. -func NewIUpgradableECCMTransactor(address common.Address, transactor bind.ContractTransactor) (*IUpgradableECCMTransactor, error) { - contract, err := bindIUpgradableECCM(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IUpgradableECCMTransactor{contract: contract}, nil -} - -// NewIUpgradableECCMFilterer creates a new log filterer instance of IUpgradableECCM, bound to a specific deployed contract. -func NewIUpgradableECCMFilterer(address common.Address, filterer bind.ContractFilterer) (*IUpgradableECCMFilterer, error) { - contract, err := bindIUpgradableECCM(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IUpgradableECCMFilterer{contract: contract}, nil -} - -// bindIUpgradableECCM binds a generic wrapper to an already deployed contract. -func bindIUpgradableECCM(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IUpgradableECCMABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IUpgradableECCM *IUpgradableECCMRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IUpgradableECCM.Contract.IUpgradableECCMCaller.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 (_IUpgradableECCM *IUpgradableECCMRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IUpgradableECCM.Contract.IUpgradableECCMTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IUpgradableECCM *IUpgradableECCMRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IUpgradableECCM.Contract.IUpgradableECCMTransactor.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 (_IUpgradableECCM *IUpgradableECCMCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IUpgradableECCM.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 (_IUpgradableECCM *IUpgradableECCMTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IUpgradableECCM.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IUpgradableECCM *IUpgradableECCMTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IUpgradableECCM.Contract.contract.Transact(opts, method, params...) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_IUpgradableECCM *IUpgradableECCMCaller) IsOwner(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _IUpgradableECCM.contract.Call(opts, out, "isOwner") - return *ret0, err -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_IUpgradableECCM *IUpgradableECCMSession) IsOwner() (bool, error) { - return _IUpgradableECCM.Contract.IsOwner(&_IUpgradableECCM.CallOpts) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_IUpgradableECCM *IUpgradableECCMCallerSession) IsOwner() (bool, error) { - return _IUpgradableECCM.Contract.IsOwner(&_IUpgradableECCM.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_IUpgradableECCM *IUpgradableECCMCaller) Paused(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _IUpgradableECCM.contract.Call(opts, out, "paused") - return *ret0, err -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_IUpgradableECCM *IUpgradableECCMSession) Paused() (bool, error) { - return _IUpgradableECCM.Contract.Paused(&_IUpgradableECCM.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_IUpgradableECCM *IUpgradableECCMCallerSession) Paused() (bool, error) { - return _IUpgradableECCM.Contract.Paused(&_IUpgradableECCM.CallOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_IUpgradableECCM *IUpgradableECCMTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IUpgradableECCM.contract.Transact(opts, "pause") -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_IUpgradableECCM *IUpgradableECCMSession) Pause() (*types.Transaction, error) { - return _IUpgradableECCM.Contract.Pause(&_IUpgradableECCM.TransactOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_IUpgradableECCM *IUpgradableECCMTransactorSession) Pause() (*types.Transaction, error) { - return _IUpgradableECCM.Contract.Pause(&_IUpgradableECCM.TransactOpts) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_IUpgradableECCM *IUpgradableECCMTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IUpgradableECCM.contract.Transact(opts, "unpause") -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_IUpgradableECCM *IUpgradableECCMSession) Unpause() (*types.Transaction, error) { - return _IUpgradableECCM.Contract.Unpause(&_IUpgradableECCM.TransactOpts) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_IUpgradableECCM *IUpgradableECCMTransactorSession) Unpause() (*types.Transaction, error) { - return _IUpgradableECCM.Contract.Unpause(&_IUpgradableECCM.TransactOpts) -} - -// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. -// -// Solidity: function upgradeToNew(address ) returns(bool) -func (_IUpgradableECCM *IUpgradableECCMTransactor) UpgradeToNew(opts *bind.TransactOpts, arg0 common.Address) (*types.Transaction, error) { - return _IUpgradableECCM.contract.Transact(opts, "upgradeToNew", arg0) -} - -// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. -// -// Solidity: function upgradeToNew(address ) returns(bool) -func (_IUpgradableECCM *IUpgradableECCMSession) UpgradeToNew(arg0 common.Address) (*types.Transaction, error) { - return _IUpgradableECCM.Contract.UpgradeToNew(&_IUpgradableECCM.TransactOpts, arg0) -} - -// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. -// -// Solidity: function upgradeToNew(address ) returns(bool) -func (_IUpgradableECCM *IUpgradableECCMTransactorSession) UpgradeToNew(arg0 common.Address) (*types.Transaction, error) { - return _IUpgradableECCM.Contract.UpgradeToNew(&_IUpgradableECCM.TransactOpts, arg0) -} - -// OwnableABI is the input ABI used to generate the binding from. -const OwnableABI = "[{\"inputs\":[],\"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\"},{\"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\":\"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\"}]" - -// OwnableFuncSigs maps the 4-byte function signature to its string representation. -var OwnableFuncSigs = map[string]string{ - "8f32d59b": "isOwner()", - "8da5cb5b": "owner()", - "715018a6": "renounceOwnership()", - "f2fde38b": "transferOwnership(address)", -} - -// Ownable is an auto generated Go binding around an Ethereum contract. -type Ownable struct { - OwnableCaller // Read-only binding to the contract - OwnableTransactor // Write-only binding to the contract - OwnableFilterer // Log filterer for contract events -} - -// OwnableCaller is an auto generated read-only Go binding around an Ethereum contract. -type OwnableCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// OwnableTransactor is an auto generated write-only Go binding around an Ethereum contract. -type OwnableTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// OwnableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type OwnableFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// OwnableSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type OwnableSession struct { - Contract *Ownable // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// OwnableCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type OwnableCallerSession struct { - Contract *OwnableCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// OwnableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type OwnableTransactorSession struct { - Contract *OwnableTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// OwnableRaw is an auto generated low-level Go binding around an Ethereum contract. -type OwnableRaw struct { - Contract *Ownable // Generic contract binding to access the raw methods on -} - -// OwnableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type OwnableCallerRaw struct { - Contract *OwnableCaller // Generic read-only contract binding to access the raw methods on -} - -// OwnableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type OwnableTransactorRaw struct { - Contract *OwnableTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewOwnable creates a new instance of Ownable, bound to a specific deployed contract. -func NewOwnable(address common.Address, backend bind.ContractBackend) (*Ownable, error) { - contract, err := bindOwnable(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Ownable{OwnableCaller: OwnableCaller{contract: contract}, OwnableTransactor: OwnableTransactor{contract: contract}, OwnableFilterer: OwnableFilterer{contract: contract}}, nil -} - -// NewOwnableCaller creates a new read-only instance of Ownable, bound to a specific deployed contract. -func NewOwnableCaller(address common.Address, caller bind.ContractCaller) (*OwnableCaller, error) { - contract, err := bindOwnable(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &OwnableCaller{contract: contract}, nil -} - -// NewOwnableTransactor creates a new write-only instance of Ownable, bound to a specific deployed contract. -func NewOwnableTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnableTransactor, error) { - contract, err := bindOwnable(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &OwnableTransactor{contract: contract}, nil -} - -// NewOwnableFilterer creates a new log filterer instance of Ownable, bound to a specific deployed contract. -func NewOwnableFilterer(address common.Address, filterer bind.ContractFilterer) (*OwnableFilterer, error) { - contract, err := bindOwnable(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &OwnableFilterer{contract: contract}, nil -} - -// bindOwnable binds a generic wrapper to an already deployed contract. -func bindOwnable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(OwnableABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Ownable *OwnableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Ownable.Contract.OwnableCaller.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 (_Ownable *OwnableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Ownable.Contract.OwnableTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Ownable *OwnableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Ownable.Contract.OwnableTransactor.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 (_Ownable *OwnableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Ownable.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 (_Ownable *OwnableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Ownable.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Ownable *OwnableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Ownable.Contract.contract.Transact(opts, method, params...) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_Ownable *OwnableCaller) IsOwner(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _Ownable.contract.Call(opts, out, "isOwner") - return *ret0, err -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_Ownable *OwnableSession) IsOwner() (bool, error) { - return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_Ownable *OwnableCallerSession) IsOwner() (bool, error) { - return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Ownable *OwnableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Ownable.contract.Call(opts, out, "owner") - return *ret0, err -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Ownable *OwnableSession) Owner() (common.Address, error) { - return _Ownable.Contract.Owner(&_Ownable.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Ownable *OwnableCallerSession) Owner() (common.Address, error) { - return _Ownable.Contract.Owner(&_Ownable.CallOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Ownable *OwnableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Ownable.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Ownable *OwnableSession) RenounceOwnership() (*types.Transaction, error) { - return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Ownable *OwnableTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Ownable *OwnableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _Ownable.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Ownable *OwnableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Ownable *OwnableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) -} - -// OwnableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Ownable contract. -type OwnableOwnershipTransferredIterator struct { - Event *OwnableOwnershipTransferred // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *OwnableOwnershipTransferredIterator) 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(OwnableOwnershipTransferred) - 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(OwnableOwnershipTransferred) - 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 *OwnableOwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *OwnableOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// OwnableOwnershipTransferred represents a OwnershipTransferred event raised by the Ownable contract. -type OwnableOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Ownable *OwnableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnableOwnershipTransferredIterator, 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 := _Ownable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &OwnableOwnershipTransferredIterator{contract: _Ownable.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 (_Ownable *OwnableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _Ownable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(OwnableOwnershipTransferred) - if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Ownable *OwnableFilterer) ParseOwnershipTransferred(log types.Log) (*OwnableOwnershipTransferred, error) { - event := new(OwnableOwnershipTransferred) - if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - return event, nil -} - -// PausableABI is the input ABI used to generate the binding from. -const PausableABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" - -// PausableFuncSigs maps the 4-byte function signature to its string representation. -var PausableFuncSigs = map[string]string{ - "5c975abb": "paused()", -} - -// Pausable is an auto generated Go binding around an Ethereum contract. -type Pausable struct { - PausableCaller // Read-only binding to the contract - PausableTransactor // Write-only binding to the contract - PausableFilterer // Log filterer for contract events -} - -// PausableCaller is an auto generated read-only Go binding around an Ethereum contract. -type PausableCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PausableTransactor is an auto generated write-only Go binding around an Ethereum contract. -type PausableTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PausableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type PausableFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PausableSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type PausableSession struct { - Contract *Pausable // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// PausableCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type PausableCallerSession struct { - Contract *PausableCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// PausableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type PausableTransactorSession struct { - Contract *PausableTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// PausableRaw is an auto generated low-level Go binding around an Ethereum contract. -type PausableRaw struct { - Contract *Pausable // Generic contract binding to access the raw methods on -} - -// PausableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type PausableCallerRaw struct { - Contract *PausableCaller // Generic read-only contract binding to access the raw methods on -} - -// PausableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type PausableTransactorRaw struct { - Contract *PausableTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewPausable creates a new instance of Pausable, bound to a specific deployed contract. -func NewPausable(address common.Address, backend bind.ContractBackend) (*Pausable, error) { - contract, err := bindPausable(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Pausable{PausableCaller: PausableCaller{contract: contract}, PausableTransactor: PausableTransactor{contract: contract}, PausableFilterer: PausableFilterer{contract: contract}}, nil -} - -// NewPausableCaller creates a new read-only instance of Pausable, bound to a specific deployed contract. -func NewPausableCaller(address common.Address, caller bind.ContractCaller) (*PausableCaller, error) { - contract, err := bindPausable(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &PausableCaller{contract: contract}, nil -} - -// NewPausableTransactor creates a new write-only instance of Pausable, bound to a specific deployed contract. -func NewPausableTransactor(address common.Address, transactor bind.ContractTransactor) (*PausableTransactor, error) { - contract, err := bindPausable(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &PausableTransactor{contract: contract}, nil -} - -// NewPausableFilterer creates a new log filterer instance of Pausable, bound to a specific deployed contract. -func NewPausableFilterer(address common.Address, filterer bind.ContractFilterer) (*PausableFilterer, error) { - contract, err := bindPausable(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &PausableFilterer{contract: contract}, nil -} - -// bindPausable binds a generic wrapper to an already deployed contract. -func bindPausable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(PausableABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Pausable *PausableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Pausable.Contract.PausableCaller.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 (_Pausable *PausableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Pausable.Contract.PausableTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Pausable *PausableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Pausable.Contract.PausableTransactor.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 (_Pausable *PausableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Pausable.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 (_Pausable *PausableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Pausable.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Pausable *PausableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Pausable.Contract.contract.Transact(opts, method, params...) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Pausable *PausableCaller) Paused(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _Pausable.contract.Call(opts, out, "paused") - return *ret0, err -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Pausable *PausableSession) Paused() (bool, error) { - return _Pausable.Contract.Paused(&_Pausable.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Pausable *PausableCallerSession) Paused() (bool, error) { - return _Pausable.Contract.Paused(&_Pausable.CallOpts) -} - -// PausablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Pausable contract. -type PausablePausedIterator struct { - Event *PausablePaused // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PausablePausedIterator) 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(PausablePaused) - 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(PausablePaused) - 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 *PausablePausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PausablePausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PausablePaused represents a Paused event raised by the Pausable contract. -type PausablePaused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_Pausable *PausableFilterer) FilterPaused(opts *bind.FilterOpts) (*PausablePausedIterator, error) { - - logs, sub, err := _Pausable.contract.FilterLogs(opts, "Paused") - if err != nil { - return nil, err - } - return &PausablePausedIterator{contract: _Pausable.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 (_Pausable *PausableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *PausablePaused) (event.Subscription, error) { - - logs, sub, err := _Pausable.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 := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PausablePaused) - if err := _Pausable.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 -} - -// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_Pausable *PausableFilterer) ParsePaused(log types.Log) (*PausablePaused, error) { - event := new(PausablePaused) - if err := _Pausable.contract.UnpackLog(event, "Paused", log); err != nil { - return nil, err - } - return event, nil -} - -// PausableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Pausable contract. -type PausableUnpausedIterator struct { - Event *PausableUnpaused // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PausableUnpausedIterator) 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(PausableUnpaused) - 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(PausableUnpaused) - 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 *PausableUnpausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PausableUnpausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PausableUnpaused represents a Unpaused event raised by the Pausable contract. -type PausableUnpaused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_Pausable *PausableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*PausableUnpausedIterator, error) { - - logs, sub, err := _Pausable.contract.FilterLogs(opts, "Unpaused") - if err != nil { - return nil, err - } - return &PausableUnpausedIterator{contract: _Pausable.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 (_Pausable *PausableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *PausableUnpaused) (event.Subscription, error) { - - logs, sub, err := _Pausable.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 := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PausableUnpaused) - if err := _Pausable.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 -} - -// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_Pausable *PausableFilterer) ParseUnpaused(log types.Log) (*PausableUnpaused, error) { - event := new(PausableUnpaused) - if err := _Pausable.contract.UnpackLog(event, "Unpaused", log); err != nil { - return nil, err - } - return event, nil -} - -// SafeMathABI is the input ABI used to generate the binding from. -const SafeMathABI = "[]" - -// SafeMathBin is the compiled bytecode used for deploying new contracts. -var SafeMathBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820db757905f1c1b49b781ddf45e615d2bbf336aeac8bb9ae61ed6fca08e24c7dc364736f6c634300050f0032" - -// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. -func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// SafeMath is an auto generated Go binding around an Ethereum contract. -type SafeMath struct { - SafeMathCaller // Read-only binding to the contract - SafeMathTransactor // Write-only binding to the contract - SafeMathFilterer // Log filterer for contract events -} - -// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. -type SafeMathCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SafeMathTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SafeMathFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SafeMathSession struct { - Contract *SafeMath // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SafeMathCallerSession struct { - Contract *SafeMathCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SafeMathTransactorSession struct { - Contract *SafeMathTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. -type SafeMathRaw struct { - Contract *SafeMath // Generic contract binding to access the raw methods on -} - -// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SafeMathCallerRaw struct { - Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on -} - -// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SafeMathTransactorRaw struct { - Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. -func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { - contract, err := bindSafeMath(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { - contract, err := bindSafeMath(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SafeMathCaller{contract: contract}, nil -} - -// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { - contract, err := bindSafeMath(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SafeMathTransactor{contract: contract}, nil -} - -// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { - contract, err := bindSafeMath(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SafeMathFilterer{contract: contract}, nil -} - -// bindSafeMath binds a generic wrapper to an already deployed contract. -func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transact(opts, method, params...) -} - -// UpgradableECCMABI is the input ABI used to generate the binding from. -const UpgradableECCMABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"ethCrossChainDataAddr\",\"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\":true,\"inputs\":[],\"name\":\"EthCrossChainDataAddress\",\"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\":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\":[{\"internalType\":\"address\",\"name\":\"newEthCrossChainManagerAddress\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// UpgradableECCMFuncSigs maps the 4-byte function signature to its string representation. -var UpgradableECCMFuncSigs = map[string]string{ - "00ba1694": "EthCrossChainDataAddress()", - "8f32d59b": "isOwner()", - "8da5cb5b": "owner()", - "8456cb59": "pause()", - "5c975abb": "paused()", - "715018a6": "renounceOwnership()", - "f2fde38b": "transferOwnership(address)", - "3f4ba83a": "unpause()", - "7e724ff3": "upgradeToNew(address)", -} - -// UpgradableECCMBin is the compiled bytecode used for deploying new contracts. -var UpgradableECCMBin = "0x608060405234801561001057600080fd5b506040516109fe3803806109fe8339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100c416565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b0319166001600160a01b03929092169190911790556100c8565b3390565b610927806100d76000396000f3fe608060405234801561001057600080fd5b50600436106100925760003560e01c80637e724ff3116100665780637e724ff3146100e95780638456cb591461010f5780638da5cb5b146101175780638f32d59b1461011f578063f2fde38b1461012757610092565b8062ba1694146100975780633f4ba83a146100bb5780635c975abb146100d7578063715018a6146100df575b600080fd5b61009f61014d565b604080516001600160a01b039092168252519081900360200190f35b6100c361015c565b604080519115158252519081900360200190f35b6100c36102db565b6100e76102eb565b005b6100c3600480360360208110156100ff57600080fd5b50356001600160a01b031661037c565b6100c361048b565b61009f610600565b6100c361060f565b6100e76004803603602081101561013d57600080fd5b50356001600160a01b0316610633565b6001546001600160a01b031681565b600061016661060f565b6101a5576040805162461bcd60e51b815260206004820181905260248201526000805160206108d3833981519152604482015290519081900360640190fd5b6101ad6102db565b156101ba576101ba610686565b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561020057600080fd5b505afa158015610214573d6000803e3d6000fd5b505050506040513d602081101561022a57600080fd5b5051156102d357806001600160a01b0316633f4ba83a6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561026c57600080fd5b505af1158015610280573d6000803e3d6000fd5b505050506040513d602081101561029657600080fd5b50516102d35760405162461bcd60e51b81526004018080602001828103825260298152602001806108846029913960400191505060405180910390fd5b600191505090565b600054600160a01b900460ff1690565b6102f361060f565b610332576040805162461bcd60e51b815260206004820181905260248201526000805160206108d3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60008054600160a01b900460ff166103d2576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6103da61060f565b610419576040805162461bcd60e51b815260206004820181905260248201526000805160206108d3833981519152604482015290519081900360640190fd5b6001546040805163f2fde38b60e01b81526001600160a01b03858116600483015291519190921691829163f2fde38b9160248082019260009290919082900301818387803b15801561046a57600080fd5b505af115801561047e573d6000803e3d6000fd5b5060019695505050505050565b600061049561060f565b6104d4576040805162461bcd60e51b815260206004820181905260248201526000805160206108d3833981519152604482015290519081900360640190fd5b6104dc6102db565b6104e8576104e861072e565b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561052e57600080fd5b505afa158015610542573d6000803e3d6000fd5b505050506040513d602081101561055857600080fd5b50516102d357806001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561059957600080fd5b505af11580156105ad573d6000803e3d6000fd5b505050506040513d60208110156105c357600080fd5b50516102d35760405162461bcd60e51b815260040180806020018281038252602781526020018061085d6027913960400191505060405180910390fd5b6000546001600160a01b031690565b600080546001600160a01b03166106246107b8565b6001600160a01b031614905090565b61063b61060f565b61067a576040805162461bcd60e51b815260206004820181905260248201526000805160206108d3833981519152604482015290519081900360640190fd5b610683816107bc565b50565b600054600160a01b900460ff166106db576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6107116107b8565b604080516001600160a01b039092168252519081900360200190a1565b600054600160a01b900460ff1615610780576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586107115b3390565b6001600160a01b0381166108015760405162461bcd60e51b81526004018080602001828103825260268152602001806108ad6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe70617573652045746843726f7373436861696e4461746120636f6e7472616374206661696c6564756e70617573652045746843726f7373436861696e4461746120636f6e7472616374206661696c65644f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a72315820e7cfa27a29cfdb06151f876baa38fd4f477144028f99f0e0d9d0f02b88ae0c8b64736f6c634300050f0032" - -// DeployUpgradableECCM deploys a new Ethereum contract, binding an instance of UpgradableECCM to it. -func DeployUpgradableECCM(auth *bind.TransactOpts, backend bind.ContractBackend, ethCrossChainDataAddr common.Address) (common.Address, *types.Transaction, *UpgradableECCM, error) { - parsed, err := abi.JSON(strings.NewReader(UpgradableECCMABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(UpgradableECCMBin), backend, ethCrossChainDataAddr) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &UpgradableECCM{UpgradableECCMCaller: UpgradableECCMCaller{contract: contract}, UpgradableECCMTransactor: UpgradableECCMTransactor{contract: contract}, UpgradableECCMFilterer: UpgradableECCMFilterer{contract: contract}}, nil -} - -// UpgradableECCM is an auto generated Go binding around an Ethereum contract. -type UpgradableECCM struct { - UpgradableECCMCaller // Read-only binding to the contract - UpgradableECCMTransactor // Write-only binding to the contract - UpgradableECCMFilterer // Log filterer for contract events -} - -// UpgradableECCMCaller is an auto generated read-only Go binding around an Ethereum contract. -type UpgradableECCMCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// UpgradableECCMTransactor is an auto generated write-only Go binding around an Ethereum contract. -type UpgradableECCMTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// UpgradableECCMFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type UpgradableECCMFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// UpgradableECCMSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type UpgradableECCMSession struct { - Contract *UpgradableECCM // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// UpgradableECCMCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type UpgradableECCMCallerSession struct { - Contract *UpgradableECCMCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// UpgradableECCMTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type UpgradableECCMTransactorSession struct { - Contract *UpgradableECCMTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// UpgradableECCMRaw is an auto generated low-level Go binding around an Ethereum contract. -type UpgradableECCMRaw struct { - Contract *UpgradableECCM // Generic contract binding to access the raw methods on -} - -// UpgradableECCMCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type UpgradableECCMCallerRaw struct { - Contract *UpgradableECCMCaller // Generic read-only contract binding to access the raw methods on -} - -// UpgradableECCMTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type UpgradableECCMTransactorRaw struct { - Contract *UpgradableECCMTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewUpgradableECCM creates a new instance of UpgradableECCM, bound to a specific deployed contract. -func NewUpgradableECCM(address common.Address, backend bind.ContractBackend) (*UpgradableECCM, error) { - contract, err := bindUpgradableECCM(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &UpgradableECCM{UpgradableECCMCaller: UpgradableECCMCaller{contract: contract}, UpgradableECCMTransactor: UpgradableECCMTransactor{contract: contract}, UpgradableECCMFilterer: UpgradableECCMFilterer{contract: contract}}, nil -} - -// NewUpgradableECCMCaller creates a new read-only instance of UpgradableECCM, bound to a specific deployed contract. -func NewUpgradableECCMCaller(address common.Address, caller bind.ContractCaller) (*UpgradableECCMCaller, error) { - contract, err := bindUpgradableECCM(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &UpgradableECCMCaller{contract: contract}, nil -} - -// NewUpgradableECCMTransactor creates a new write-only instance of UpgradableECCM, bound to a specific deployed contract. -func NewUpgradableECCMTransactor(address common.Address, transactor bind.ContractTransactor) (*UpgradableECCMTransactor, error) { - contract, err := bindUpgradableECCM(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &UpgradableECCMTransactor{contract: contract}, nil -} - -// NewUpgradableECCMFilterer creates a new log filterer instance of UpgradableECCM, bound to a specific deployed contract. -func NewUpgradableECCMFilterer(address common.Address, filterer bind.ContractFilterer) (*UpgradableECCMFilterer, error) { - contract, err := bindUpgradableECCM(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &UpgradableECCMFilterer{contract: contract}, nil -} - -// bindUpgradableECCM binds a generic wrapper to an already deployed contract. -func bindUpgradableECCM(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(UpgradableECCMABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_UpgradableECCM *UpgradableECCMRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _UpgradableECCM.Contract.UpgradableECCMCaller.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 (_UpgradableECCM *UpgradableECCMRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _UpgradableECCM.Contract.UpgradableECCMTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_UpgradableECCM *UpgradableECCMRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _UpgradableECCM.Contract.UpgradableECCMTransactor.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 (_UpgradableECCM *UpgradableECCMCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _UpgradableECCM.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 (_UpgradableECCM *UpgradableECCMTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _UpgradableECCM.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_UpgradableECCM *UpgradableECCMTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _UpgradableECCM.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 (_UpgradableECCM *UpgradableECCMCaller) EthCrossChainDataAddress(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _UpgradableECCM.contract.Call(opts, out, "EthCrossChainDataAddress") - return *ret0, err -} - -// EthCrossChainDataAddress is a free data retrieval call binding the contract method 0x00ba1694. -// -// Solidity: function EthCrossChainDataAddress() view returns(address) -func (_UpgradableECCM *UpgradableECCMSession) EthCrossChainDataAddress() (common.Address, error) { - return _UpgradableECCM.Contract.EthCrossChainDataAddress(&_UpgradableECCM.CallOpts) -} - -// EthCrossChainDataAddress is a free data retrieval call binding the contract method 0x00ba1694. -// -// Solidity: function EthCrossChainDataAddress() view returns(address) -func (_UpgradableECCM *UpgradableECCMCallerSession) EthCrossChainDataAddress() (common.Address, error) { - return _UpgradableECCM.Contract.EthCrossChainDataAddress(&_UpgradableECCM.CallOpts) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_UpgradableECCM *UpgradableECCMCaller) IsOwner(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _UpgradableECCM.contract.Call(opts, out, "isOwner") - return *ret0, err -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_UpgradableECCM *UpgradableECCMSession) IsOwner() (bool, error) { - return _UpgradableECCM.Contract.IsOwner(&_UpgradableECCM.CallOpts) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_UpgradableECCM *UpgradableECCMCallerSession) IsOwner() (bool, error) { - return _UpgradableECCM.Contract.IsOwner(&_UpgradableECCM.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_UpgradableECCM *UpgradableECCMCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _UpgradableECCM.contract.Call(opts, out, "owner") - return *ret0, err -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_UpgradableECCM *UpgradableECCMSession) Owner() (common.Address, error) { - return _UpgradableECCM.Contract.Owner(&_UpgradableECCM.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_UpgradableECCM *UpgradableECCMCallerSession) Owner() (common.Address, error) { - return _UpgradableECCM.Contract.Owner(&_UpgradableECCM.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_UpgradableECCM *UpgradableECCMCaller) Paused(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _UpgradableECCM.contract.Call(opts, out, "paused") - return *ret0, err -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_UpgradableECCM *UpgradableECCMSession) Paused() (bool, error) { - return _UpgradableECCM.Contract.Paused(&_UpgradableECCM.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_UpgradableECCM *UpgradableECCMCallerSession) Paused() (bool, error) { - return _UpgradableECCM.Contract.Paused(&_UpgradableECCM.CallOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_UpgradableECCM *UpgradableECCMTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _UpgradableECCM.contract.Transact(opts, "pause") -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_UpgradableECCM *UpgradableECCMSession) Pause() (*types.Transaction, error) { - return _UpgradableECCM.Contract.Pause(&_UpgradableECCM.TransactOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_UpgradableECCM *UpgradableECCMTransactorSession) Pause() (*types.Transaction, error) { - return _UpgradableECCM.Contract.Pause(&_UpgradableECCM.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_UpgradableECCM *UpgradableECCMTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _UpgradableECCM.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_UpgradableECCM *UpgradableECCMSession) RenounceOwnership() (*types.Transaction, error) { - return _UpgradableECCM.Contract.RenounceOwnership(&_UpgradableECCM.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_UpgradableECCM *UpgradableECCMTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _UpgradableECCM.Contract.RenounceOwnership(&_UpgradableECCM.TransactOpts) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_UpgradableECCM *UpgradableECCMTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _UpgradableECCM.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_UpgradableECCM *UpgradableECCMSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _UpgradableECCM.Contract.TransferOwnership(&_UpgradableECCM.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_UpgradableECCM *UpgradableECCMTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _UpgradableECCM.Contract.TransferOwnership(&_UpgradableECCM.TransactOpts, newOwner) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_UpgradableECCM *UpgradableECCMTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _UpgradableECCM.contract.Transact(opts, "unpause") -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_UpgradableECCM *UpgradableECCMSession) Unpause() (*types.Transaction, error) { - return _UpgradableECCM.Contract.Unpause(&_UpgradableECCM.TransactOpts) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_UpgradableECCM *UpgradableECCMTransactorSession) Unpause() (*types.Transaction, error) { - return _UpgradableECCM.Contract.Unpause(&_UpgradableECCM.TransactOpts) -} - -// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. -// -// Solidity: function upgradeToNew(address newEthCrossChainManagerAddress) returns(bool) -func (_UpgradableECCM *UpgradableECCMTransactor) UpgradeToNew(opts *bind.TransactOpts, newEthCrossChainManagerAddress common.Address) (*types.Transaction, error) { - return _UpgradableECCM.contract.Transact(opts, "upgradeToNew", newEthCrossChainManagerAddress) -} - -// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. -// -// Solidity: function upgradeToNew(address newEthCrossChainManagerAddress) returns(bool) -func (_UpgradableECCM *UpgradableECCMSession) UpgradeToNew(newEthCrossChainManagerAddress common.Address) (*types.Transaction, error) { - return _UpgradableECCM.Contract.UpgradeToNew(&_UpgradableECCM.TransactOpts, newEthCrossChainManagerAddress) -} - -// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. -// -// Solidity: function upgradeToNew(address newEthCrossChainManagerAddress) returns(bool) -func (_UpgradableECCM *UpgradableECCMTransactorSession) UpgradeToNew(newEthCrossChainManagerAddress common.Address) (*types.Transaction, error) { - return _UpgradableECCM.Contract.UpgradeToNew(&_UpgradableECCM.TransactOpts, newEthCrossChainManagerAddress) -} - -// UpgradableECCMOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the UpgradableECCM contract. -type UpgradableECCMOwnershipTransferredIterator struct { - Event *UpgradableECCMOwnershipTransferred // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *UpgradableECCMOwnershipTransferredIterator) 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(UpgradableECCMOwnershipTransferred) - 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(UpgradableECCMOwnershipTransferred) - 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 *UpgradableECCMOwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *UpgradableECCMOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// UpgradableECCMOwnershipTransferred represents a OwnershipTransferred event raised by the UpgradableECCM contract. -type UpgradableECCMOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_UpgradableECCM *UpgradableECCMFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*UpgradableECCMOwnershipTransferredIterator, 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 := _UpgradableECCM.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &UpgradableECCMOwnershipTransferredIterator{contract: _UpgradableECCM.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 (_UpgradableECCM *UpgradableECCMFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *UpgradableECCMOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _UpgradableECCM.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(UpgradableECCMOwnershipTransferred) - if err := _UpgradableECCM.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_UpgradableECCM *UpgradableECCMFilterer) ParseOwnershipTransferred(log types.Log) (*UpgradableECCMOwnershipTransferred, error) { - event := new(UpgradableECCMOwnershipTransferred) - if err := _UpgradableECCM.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - return event, nil -} - -// UpgradableECCMPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the UpgradableECCM contract. -type UpgradableECCMPausedIterator struct { - Event *UpgradableECCMPaused // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *UpgradableECCMPausedIterator) 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(UpgradableECCMPaused) - 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(UpgradableECCMPaused) - 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 *UpgradableECCMPausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *UpgradableECCMPausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// UpgradableECCMPaused represents a Paused event raised by the UpgradableECCM contract. -type UpgradableECCMPaused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_UpgradableECCM *UpgradableECCMFilterer) FilterPaused(opts *bind.FilterOpts) (*UpgradableECCMPausedIterator, error) { - - logs, sub, err := _UpgradableECCM.contract.FilterLogs(opts, "Paused") - if err != nil { - return nil, err - } - return &UpgradableECCMPausedIterator{contract: _UpgradableECCM.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 (_UpgradableECCM *UpgradableECCMFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *UpgradableECCMPaused) (event.Subscription, error) { - - logs, sub, err := _UpgradableECCM.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 := <-logs: - // New log arrived, parse the event and forward to the user - event := new(UpgradableECCMPaused) - if err := _UpgradableECCM.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 -} - -// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_UpgradableECCM *UpgradableECCMFilterer) ParsePaused(log types.Log) (*UpgradableECCMPaused, error) { - event := new(UpgradableECCMPaused) - if err := _UpgradableECCM.contract.UnpackLog(event, "Paused", log); err != nil { - return nil, err - } - return event, nil -} - -// UpgradableECCMUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the UpgradableECCM contract. -type UpgradableECCMUnpausedIterator struct { - Event *UpgradableECCMUnpaused // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *UpgradableECCMUnpausedIterator) 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(UpgradableECCMUnpaused) - 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(UpgradableECCMUnpaused) - 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 *UpgradableECCMUnpausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *UpgradableECCMUnpausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// UpgradableECCMUnpaused represents a Unpaused event raised by the UpgradableECCM contract. -type UpgradableECCMUnpaused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_UpgradableECCM *UpgradableECCMFilterer) FilterUnpaused(opts *bind.FilterOpts) (*UpgradableECCMUnpausedIterator, error) { - - logs, sub, err := _UpgradableECCM.contract.FilterLogs(opts, "Unpaused") - if err != nil { - return nil, err - } - return &UpgradableECCMUnpausedIterator{contract: _UpgradableECCM.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 (_UpgradableECCM *UpgradableECCMFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *UpgradableECCMUnpaused) (event.Subscription, error) { - - logs, sub, err := _UpgradableECCM.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 := <-logs: - // New log arrived, parse the event and forward to the user - event := new(UpgradableECCMUnpaused) - if err := _UpgradableECCM.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 -} - -// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_UpgradableECCM *UpgradableECCMFilterer) ParseUnpaused(log types.Log) (*UpgradableECCMUnpaused, error) { - event := new(UpgradableECCMUnpaused) - if err := _UpgradableECCM.contract.UnpackLog(event, "Unpaused", log); err != nil { - return nil, err - } - return event, nil -} - -// UtilsABI is the input ABI used to generate the binding from. -const UtilsABI = "[]" - -// UtilsBin is the compiled bytecode used for deploying new contracts. -var UtilsBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820201a9a96d2544d2ec86ac31f65b49717ee12e7c08970f9a9939bd117930a7e5364736f6c634300050f0032" - -// DeployUtils deploys a new Ethereum contract, binding an instance of Utils to it. -func DeployUtils(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Utils, error) { - parsed, err := abi.JSON(strings.NewReader(UtilsABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(UtilsBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Utils{UtilsCaller: UtilsCaller{contract: contract}, UtilsTransactor: UtilsTransactor{contract: contract}, UtilsFilterer: UtilsFilterer{contract: contract}}, nil -} - -// Utils is an auto generated Go binding around an Ethereum contract. -type Utils struct { - UtilsCaller // Read-only binding to the contract - UtilsTransactor // Write-only binding to the contract - UtilsFilterer // Log filterer for contract events -} - -// UtilsCaller is an auto generated read-only Go binding around an Ethereum contract. -type UtilsCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// UtilsTransactor is an auto generated write-only Go binding around an Ethereum contract. -type UtilsTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// UtilsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type UtilsFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// UtilsSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type UtilsSession struct { - Contract *Utils // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// UtilsCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type UtilsCallerSession struct { - Contract *UtilsCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// UtilsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type UtilsTransactorSession struct { - Contract *UtilsTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// UtilsRaw is an auto generated low-level Go binding around an Ethereum contract. -type UtilsRaw struct { - Contract *Utils // Generic contract binding to access the raw methods on -} - -// UtilsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type UtilsCallerRaw struct { - Contract *UtilsCaller // Generic read-only contract binding to access the raw methods on -} - -// UtilsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type UtilsTransactorRaw struct { - Contract *UtilsTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewUtils creates a new instance of Utils, bound to a specific deployed contract. -func NewUtils(address common.Address, backend bind.ContractBackend) (*Utils, error) { - contract, err := bindUtils(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Utils{UtilsCaller: UtilsCaller{contract: contract}, UtilsTransactor: UtilsTransactor{contract: contract}, UtilsFilterer: UtilsFilterer{contract: contract}}, nil -} - -// NewUtilsCaller creates a new read-only instance of Utils, bound to a specific deployed contract. -func NewUtilsCaller(address common.Address, caller bind.ContractCaller) (*UtilsCaller, error) { - contract, err := bindUtils(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &UtilsCaller{contract: contract}, nil -} - -// NewUtilsTransactor creates a new write-only instance of Utils, bound to a specific deployed contract. -func NewUtilsTransactor(address common.Address, transactor bind.ContractTransactor) (*UtilsTransactor, error) { - contract, err := bindUtils(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &UtilsTransactor{contract: contract}, nil -} - -// NewUtilsFilterer creates a new log filterer instance of Utils, bound to a specific deployed contract. -func NewUtilsFilterer(address common.Address, filterer bind.ContractFilterer) (*UtilsFilterer, error) { - contract, err := bindUtils(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &UtilsFilterer{contract: contract}, nil -} - -// bindUtils binds a generic wrapper to an already deployed contract. -func bindUtils(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(UtilsABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Utils *UtilsRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Utils.Contract.UtilsCaller.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 (_Utils *UtilsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Utils.Contract.UtilsTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Utils *UtilsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Utils.Contract.UtilsTransactor.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 (_Utils *UtilsCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Utils.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 (_Utils *UtilsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Utils.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Utils *UtilsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Utils.Contract.contract.Transact(opts, method, params...) -} - -// ZeroCopySinkABI is the input ABI used to generate the binding from. -const ZeroCopySinkABI = "[]" - -// ZeroCopySinkBin is the compiled bytecode used for deploying new contracts. -var ZeroCopySinkBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158205a9851dd974d82a7bea8573bbead290b5daab8da233a4d6477188e9b614ca12864736f6c634300050f0032" - -// DeployZeroCopySink deploys a new Ethereum contract, binding an instance of ZeroCopySink to it. -func DeployZeroCopySink(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ZeroCopySink, error) { - parsed, err := abi.JSON(strings.NewReader(ZeroCopySinkABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ZeroCopySinkBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ZeroCopySink{ZeroCopySinkCaller: ZeroCopySinkCaller{contract: contract}, ZeroCopySinkTransactor: ZeroCopySinkTransactor{contract: contract}, ZeroCopySinkFilterer: ZeroCopySinkFilterer{contract: contract}}, nil -} - -// ZeroCopySink is an auto generated Go binding around an Ethereum contract. -type ZeroCopySink struct { - ZeroCopySinkCaller // Read-only binding to the contract - ZeroCopySinkTransactor // Write-only binding to the contract - ZeroCopySinkFilterer // Log filterer for contract events -} - -// ZeroCopySinkCaller is an auto generated read-only Go binding around an Ethereum contract. -type ZeroCopySinkCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySinkTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ZeroCopySinkTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySinkFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ZeroCopySinkFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySinkSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ZeroCopySinkSession struct { - Contract *ZeroCopySink // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZeroCopySinkCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ZeroCopySinkCallerSession struct { - Contract *ZeroCopySinkCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ZeroCopySinkTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ZeroCopySinkTransactorSession struct { - Contract *ZeroCopySinkTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZeroCopySinkRaw is an auto generated low-level Go binding around an Ethereum contract. -type ZeroCopySinkRaw struct { - Contract *ZeroCopySink // Generic contract binding to access the raw methods on -} - -// ZeroCopySinkCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ZeroCopySinkCallerRaw struct { - Contract *ZeroCopySinkCaller // Generic read-only contract binding to access the raw methods on -} - -// ZeroCopySinkTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ZeroCopySinkTransactorRaw struct { - Contract *ZeroCopySinkTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewZeroCopySink creates a new instance of ZeroCopySink, bound to a specific deployed contract. -func NewZeroCopySink(address common.Address, backend bind.ContractBackend) (*ZeroCopySink, error) { - contract, err := bindZeroCopySink(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ZeroCopySink{ZeroCopySinkCaller: ZeroCopySinkCaller{contract: contract}, ZeroCopySinkTransactor: ZeroCopySinkTransactor{contract: contract}, ZeroCopySinkFilterer: ZeroCopySinkFilterer{contract: contract}}, nil -} - -// NewZeroCopySinkCaller creates a new read-only instance of ZeroCopySink, bound to a specific deployed contract. -func NewZeroCopySinkCaller(address common.Address, caller bind.ContractCaller) (*ZeroCopySinkCaller, error) { - contract, err := bindZeroCopySink(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ZeroCopySinkCaller{contract: contract}, nil -} - -// NewZeroCopySinkTransactor creates a new write-only instance of ZeroCopySink, bound to a specific deployed contract. -func NewZeroCopySinkTransactor(address common.Address, transactor bind.ContractTransactor) (*ZeroCopySinkTransactor, error) { - contract, err := bindZeroCopySink(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ZeroCopySinkTransactor{contract: contract}, nil -} - -// NewZeroCopySinkFilterer creates a new log filterer instance of ZeroCopySink, bound to a specific deployed contract. -func NewZeroCopySinkFilterer(address common.Address, filterer bind.ContractFilterer) (*ZeroCopySinkFilterer, error) { - contract, err := bindZeroCopySink(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ZeroCopySinkFilterer{contract: contract}, nil -} - -// bindZeroCopySink binds a generic wrapper to an already deployed contract. -func bindZeroCopySink(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ZeroCopySinkABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ZeroCopySink *ZeroCopySinkRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ZeroCopySink.Contract.ZeroCopySinkCaller.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 (_ZeroCopySink *ZeroCopySinkRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZeroCopySink.Contract.ZeroCopySinkTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZeroCopySink *ZeroCopySinkRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZeroCopySink.Contract.ZeroCopySinkTransactor.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 (_ZeroCopySink *ZeroCopySinkCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ZeroCopySink.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 (_ZeroCopySink *ZeroCopySinkTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZeroCopySink.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZeroCopySink *ZeroCopySinkTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZeroCopySink.Contract.contract.Transact(opts, method, params...) -} - -// ZeroCopySourceABI is the input ABI used to generate the binding from. -const ZeroCopySourceABI = "[]" - -// ZeroCopySourceBin is the compiled bytecode used for deploying new contracts. -var ZeroCopySourceBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820526b4a6ab6b8edc7fba2a923452094e31e1bc475271a7bb3c4f92cc3f2b4589464736f6c634300050f0032" - -// DeployZeroCopySource deploys a new Ethereum contract, binding an instance of ZeroCopySource to it. -func DeployZeroCopySource(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ZeroCopySource, error) { - parsed, err := abi.JSON(strings.NewReader(ZeroCopySourceABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ZeroCopySourceBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ZeroCopySource{ZeroCopySourceCaller: ZeroCopySourceCaller{contract: contract}, ZeroCopySourceTransactor: ZeroCopySourceTransactor{contract: contract}, ZeroCopySourceFilterer: ZeroCopySourceFilterer{contract: contract}}, nil -} - -// ZeroCopySource is an auto generated Go binding around an Ethereum contract. -type ZeroCopySource struct { - ZeroCopySourceCaller // Read-only binding to the contract - ZeroCopySourceTransactor // Write-only binding to the contract - ZeroCopySourceFilterer // Log filterer for contract events -} - -// ZeroCopySourceCaller is an auto generated read-only Go binding around an Ethereum contract. -type ZeroCopySourceCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySourceTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ZeroCopySourceTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySourceFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ZeroCopySourceFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySourceSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ZeroCopySourceSession struct { - Contract *ZeroCopySource // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZeroCopySourceCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ZeroCopySourceCallerSession struct { - Contract *ZeroCopySourceCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ZeroCopySourceTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ZeroCopySourceTransactorSession struct { - Contract *ZeroCopySourceTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZeroCopySourceRaw is an auto generated low-level Go binding around an Ethereum contract. -type ZeroCopySourceRaw struct { - Contract *ZeroCopySource // Generic contract binding to access the raw methods on -} - -// ZeroCopySourceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ZeroCopySourceCallerRaw struct { - Contract *ZeroCopySourceCaller // Generic read-only contract binding to access the raw methods on -} - -// ZeroCopySourceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ZeroCopySourceTransactorRaw struct { - Contract *ZeroCopySourceTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewZeroCopySource creates a new instance of ZeroCopySource, bound to a specific deployed contract. -func NewZeroCopySource(address common.Address, backend bind.ContractBackend) (*ZeroCopySource, error) { - contract, err := bindZeroCopySource(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ZeroCopySource{ZeroCopySourceCaller: ZeroCopySourceCaller{contract: contract}, ZeroCopySourceTransactor: ZeroCopySourceTransactor{contract: contract}, ZeroCopySourceFilterer: ZeroCopySourceFilterer{contract: contract}}, nil -} - -// NewZeroCopySourceCaller creates a new read-only instance of ZeroCopySource, bound to a specific deployed contract. -func NewZeroCopySourceCaller(address common.Address, caller bind.ContractCaller) (*ZeroCopySourceCaller, error) { - contract, err := bindZeroCopySource(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ZeroCopySourceCaller{contract: contract}, nil -} - -// NewZeroCopySourceTransactor creates a new write-only instance of ZeroCopySource, bound to a specific deployed contract. -func NewZeroCopySourceTransactor(address common.Address, transactor bind.ContractTransactor) (*ZeroCopySourceTransactor, error) { - contract, err := bindZeroCopySource(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ZeroCopySourceTransactor{contract: contract}, nil -} - -// NewZeroCopySourceFilterer creates a new log filterer instance of ZeroCopySource, bound to a specific deployed contract. -func NewZeroCopySourceFilterer(address common.Address, filterer bind.ContractFilterer) (*ZeroCopySourceFilterer, error) { - contract, err := bindZeroCopySource(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ZeroCopySourceFilterer{contract: contract}, nil -} - -// bindZeroCopySource binds a generic wrapper to an already deployed contract. -func bindZeroCopySource(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ZeroCopySourceABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ZeroCopySource *ZeroCopySourceRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ZeroCopySource.Contract.ZeroCopySourceCaller.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 (_ZeroCopySource *ZeroCopySourceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZeroCopySource.Contract.ZeroCopySourceTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZeroCopySource *ZeroCopySourceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZeroCopySource.Contract.ZeroCopySourceTransactor.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 (_ZeroCopySource *ZeroCopySourceCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ZeroCopySource.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 (_ZeroCopySource *ZeroCopySourceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZeroCopySource.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZeroCopySource *ZeroCopySourceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZeroCopySource.Contract.contract.Transact(opts, method, params...) -} diff --git a/chains/eth/abi/eccmp/eccmp_abi.go b/chains/eth/abi/eccmp/eccmp_abi.go deleted file mode 100644 index 1a2e636..0000000 --- a/chains/eth/abi/eccmp/eccmp_abi.go +++ /dev/null @@ -1,2304 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package eccmp - -import ( - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// ContextABI is the input ABI used to generate the binding from. -const ContextABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" - -// Context is an auto generated Go binding around an Ethereum contract. -type Context struct { - ContextCaller // Read-only binding to the contract - ContextTransactor // Write-only binding to the contract - ContextFilterer // Log filterer for contract events -} - -// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. -type ContextCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ContextTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ContextFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ContextSession struct { - Contract *Context // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ContextCallerSession struct { - Contract *ContextCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ContextTransactorSession struct { - Contract *ContextTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. -type ContextRaw struct { - Contract *Context // Generic contract binding to access the raw methods on -} - -// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ContextCallerRaw struct { - Contract *ContextCaller // Generic read-only contract binding to access the raw methods on -} - -// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ContextTransactorRaw struct { - Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewContext creates a new instance of Context, bound to a specific deployed contract. -func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { - contract, err := bindContext(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil -} - -// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. -func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { - contract, err := bindContext(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ContextCaller{contract: contract}, nil -} - -// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. -func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { - contract, err := bindContext(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ContextTransactor{contract: contract}, nil -} - -// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. -func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { - contract, err := bindContext(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ContextFilterer{contract: contract}, nil -} - -// bindContext binds a generic wrapper to an already deployed contract. -func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ContextABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.Contract.ContextCaller.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 (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.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 (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.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 (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.contract.Transact(opts, method, params...) -} - -// EthCrossChainManagerProxyABI is the input ABI used to generate the binding from. -const EthCrossChainManagerProxyABI = "[{\"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\":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\"}]" - -// EthCrossChainManagerProxyFuncSigs maps the 4-byte function signature to its string representation. -var EthCrossChainManagerProxyFuncSigs = map[string]string{ - "87939a7f": "getEthCrossChainManager()", - "8f32d59b": "isOwner()", - "8da5cb5b": "owner()", - "8456cb59": "pause()", - "3b9a80b8": "pauseEthCrossChainManager()", - "5c975abb": "paused()", - "715018a6": "renounceOwnership()", - "f2fde38b": "transferOwnership(address)", - "3f4ba83a": "unpause()", - "4390c707": "unpauseEthCrossChainManager()", - "ab59d32d": "upgradeEthCrossChainManager(address)", -} - -// EthCrossChainManagerProxyBin is the compiled bytecode used for deploying new contracts. -var EthCrossChainManagerProxyBin = "0x608060405234801561001057600080fd5b50604051610eb5380380610eb58339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100c416565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b0319166001600160a01b03929092169190911790556100c8565b3390565b610dde806100d76000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80638456cb59116100715780638456cb59146100ec57806387939a7f146100f45780638da5cb5b146101185780638f32d59b14610120578063ab59d32d14610128578063f2fde38b1461014e576100a9565b80633b9a80b8146100ae5780633f4ba83a146100ca5780634390c707146100d25780635c975abb146100da578063715018a6146100e2575b600080fd5b6100b6610174565b604080519115158252519081900360200190f35b6100b6610304565b6100b6610370565b6100b6610500565b6100ea610510565b005b6100b66105a1565b6100fc610607565b604080516001600160a01b039092168252519081900360200190f35b6100fc61066a565b6100b6610679565b6100b66004803603602081101561013e57600080fd5b50356001600160a01b031661069d565b6100ea6004803603602081101561016457600080fd5b50356001600160a01b03166109dd565b600061017e610679565b6101bd576040805162461bcd60e51b81526020600482018190526024820152600080516020610d5f833981519152604482015290519081900360640190fd5b600054600160a01b900460ff161561020f576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001546001600160a01b03166102236105a1565b61025e5760405162461bcd60e51b8152600401808060200182810382526030815260200180610cd36030913960400191505060405180910390fd5b806001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561029957600080fd5b505af11580156102ad573d6000803e3d6000fd5b505050506040513d60208110156102c357600080fd5b50516103005760405162461bcd60e51b815260040180806020018281038252602b815260200180610d7f602b913960400191505060405180910390fd5b5090565b600061030e610679565b61034d576040805162461bcd60e51b81526020600482018190526024820152600080516020610d5f833981519152604482015290519081900360640190fd5b610355610500565b6103615750600161036d565b610369610a30565b5060015b90565b600061037a610679565b6103b9576040805162461bcd60e51b81526020600482018190526024820152600080516020610d5f833981519152604482015290519081900360640190fd5b600054600160a01b900460ff1661040e576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b60015460408051631fa5d41d60e11b815290516001600160a01b03909216918291633f4ba83a9160048083019260209291908290030181600087803b15801561045657600080fd5b505af115801561046a573d6000803e3d6000fd5b505050506040513d602081101561048057600080fd5b50516104bd5760405162461bcd60e51b815260040180806020018281038252602d815260200180610d32602d913960400191505060405180910390fd5b6104c5610304565b6103005760405162461bcd60e51b8152600401808060200182810382526032815260200180610ca16032913960400191505060405180910390fd5b600054600160a01b900460ff1690565b610518610679565b610557576040805162461bcd60e51b81526020600482018190526024820152600080516020610d5f833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006105ab610679565b6105ea576040805162461bcd60e51b81526020600482018190526024820152600080516020610d5f833981519152604482015290519081900360640190fd5b6105f2610500565b156105ff5750600161036d565b610369610ad8565b60008054600160a01b900460ff161561065a576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b506001546001600160a01b031690565b6000546001600160a01b031690565b600080546001600160a01b031661068e610b62565b6001600160a01b031614905090565b60006106a7610679565b6106e6576040805162461bcd60e51b81526020600482018190526024820152600080516020610d5f833981519152604482015290519081900360640190fd5b600054600160a01b900460ff1661073b576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b60015460408051635c975abb60e01b815290516001600160a01b03909216918291635c975abb916004808301926020929190829003018186803b15801561078157600080fd5b505afa158015610795573d6000803e3d6000fd5b505050506040513d60208110156107ab57600080fd5b505161085357806001600160a01b0316638456cb596040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156107ec57600080fd5b505af1158015610800573d6000803e3d6000fd5b505050506040513d602081101561081657600080fd5b50516108535760405162461bcd60e51b815260040180806020018281038252602f815260200180610d03602f913960400191505060405180910390fd5b806001600160a01b0316637e724ff3846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050602060405180830381600087803b1580156108ab57600080fd5b505af11580156108bf573d6000803e3d6000fd5b505050506040513d60208110156108d557600080fd5b50516109125760405162461bcd60e51b8152600401808060200182810382526029815260200180610c526029913960400191505060405180910390fd5b6000839050806001600160a01b0316638f32d59b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561095057600080fd5b505afa158015610964573d6000803e3d6000fd5b505050506040513d602081101561097a57600080fd5b50516109b75760405162461bcd60e51b815260040180806020018281038252604b815260200180610c07604b913960600191505060405180910390fd5b5050600180546001600160a01b0319166001600160a01b03939093169290921790915590565b6109e5610679565b610a24576040805162461bcd60e51b81526020600482018190526024820152600080516020610d5f833981519152604482015290519081900360640190fd5b610a2d81610b66565b50565b600054600160a01b900460ff16610a85576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610abb610b62565b604080516001600160a01b039092168252519081900360200190a1565b600054600160a01b900460ff1615610b2a576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610abb5b3390565b6001600160a01b038116610bab5760405162461bcd60e51b8152600401808060200182810382526026815260200180610c7b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b039290921691909117905556fe45746843726f7373436861696e4d616e6167657250726f7879206973206e6f74206f776e6572206f66206e65772045746843726f7373436861696e4d616e6167657220636f6e747261637445746843726f7373436861696e4d616e616765722075706772616465546f4e6577206661696c6564214f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373756e70617573652045746843726f7373436861696e4d616e6167657250726f787920636f6e7472616374206661696c65642170617573652045746843726f7373436861696e4d616e6167657250726f787920636f6e7472616374206661696c6564215061757365206f6c642045746843726f7373436861696e4d616e6167657220636f6e7472616374206661696c656421756e70617573652045746843726f7373436861696e4d616e6167657220636f6e7472616374206661696c6564214f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657270617573652045746843726f7373436861696e4d616e6167657220636f6e7472616374206661696c656421a265627a7a72315820b030bae42ef27559773fcac534baf8f077c77b7aa4dc521648eef8974746569a64736f6c634300050f0032" - -// DeployEthCrossChainManagerProxy deploys a new Ethereum contract, binding an instance of EthCrossChainManagerProxy to it. -func DeployEthCrossChainManagerProxy(auth *bind.TransactOpts, backend bind.ContractBackend, _ethCrossChainManagerAddr common.Address) (common.Address, *types.Transaction, *EthCrossChainManagerProxy, error) { - parsed, err := abi.JSON(strings.NewReader(EthCrossChainManagerProxyABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(EthCrossChainManagerProxyBin), backend, _ethCrossChainManagerAddr) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &EthCrossChainManagerProxy{EthCrossChainManagerProxyCaller: EthCrossChainManagerProxyCaller{contract: contract}, EthCrossChainManagerProxyTransactor: EthCrossChainManagerProxyTransactor{contract: contract}, EthCrossChainManagerProxyFilterer: EthCrossChainManagerProxyFilterer{contract: contract}}, nil -} - -// EthCrossChainManagerProxy is an auto generated Go binding around an Ethereum contract. -type EthCrossChainManagerProxy struct { - EthCrossChainManagerProxyCaller // Read-only binding to the contract - EthCrossChainManagerProxyTransactor // Write-only binding to the contract - EthCrossChainManagerProxyFilterer // Log filterer for contract events -} - -// EthCrossChainManagerProxyCaller is an auto generated read-only Go binding around an Ethereum contract. -type EthCrossChainManagerProxyCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// EthCrossChainManagerProxyTransactor is an auto generated write-only Go binding around an Ethereum contract. -type EthCrossChainManagerProxyTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// EthCrossChainManagerProxyFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type EthCrossChainManagerProxyFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// EthCrossChainManagerProxySession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type EthCrossChainManagerProxySession struct { - Contract *EthCrossChainManagerProxy // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// EthCrossChainManagerProxyCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type EthCrossChainManagerProxyCallerSession struct { - Contract *EthCrossChainManagerProxyCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// EthCrossChainManagerProxyTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type EthCrossChainManagerProxyTransactorSession struct { - Contract *EthCrossChainManagerProxyTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// EthCrossChainManagerProxyRaw is an auto generated low-level Go binding around an Ethereum contract. -type EthCrossChainManagerProxyRaw struct { - Contract *EthCrossChainManagerProxy // Generic contract binding to access the raw methods on -} - -// EthCrossChainManagerProxyCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type EthCrossChainManagerProxyCallerRaw struct { - Contract *EthCrossChainManagerProxyCaller // Generic read-only contract binding to access the raw methods on -} - -// EthCrossChainManagerProxyTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type EthCrossChainManagerProxyTransactorRaw struct { - Contract *EthCrossChainManagerProxyTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewEthCrossChainManagerProxy creates a new instance of EthCrossChainManagerProxy, bound to a specific deployed contract. -func NewEthCrossChainManagerProxy(address common.Address, backend bind.ContractBackend) (*EthCrossChainManagerProxy, error) { - contract, err := bindEthCrossChainManagerProxy(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &EthCrossChainManagerProxy{EthCrossChainManagerProxyCaller: EthCrossChainManagerProxyCaller{contract: contract}, EthCrossChainManagerProxyTransactor: EthCrossChainManagerProxyTransactor{contract: contract}, EthCrossChainManagerProxyFilterer: EthCrossChainManagerProxyFilterer{contract: contract}}, nil -} - -// NewEthCrossChainManagerProxyCaller creates a new read-only instance of EthCrossChainManagerProxy, bound to a specific deployed contract. -func NewEthCrossChainManagerProxyCaller(address common.Address, caller bind.ContractCaller) (*EthCrossChainManagerProxyCaller, error) { - contract, err := bindEthCrossChainManagerProxy(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &EthCrossChainManagerProxyCaller{contract: contract}, nil -} - -// NewEthCrossChainManagerProxyTransactor creates a new write-only instance of EthCrossChainManagerProxy, bound to a specific deployed contract. -func NewEthCrossChainManagerProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*EthCrossChainManagerProxyTransactor, error) { - contract, err := bindEthCrossChainManagerProxy(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &EthCrossChainManagerProxyTransactor{contract: contract}, nil -} - -// NewEthCrossChainManagerProxyFilterer creates a new log filterer instance of EthCrossChainManagerProxy, bound to a specific deployed contract. -func NewEthCrossChainManagerProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*EthCrossChainManagerProxyFilterer, error) { - contract, err := bindEthCrossChainManagerProxy(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &EthCrossChainManagerProxyFilterer{contract: contract}, nil -} - -// bindEthCrossChainManagerProxy binds a generic wrapper to an already deployed contract. -func bindEthCrossChainManagerProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(EthCrossChainManagerProxyABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_EthCrossChainManagerProxy *EthCrossChainManagerProxyRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _EthCrossChainManagerProxy.Contract.EthCrossChainManagerProxyCaller.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 (_EthCrossChainManagerProxy *EthCrossChainManagerProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.EthCrossChainManagerProxyTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.EthCrossChainManagerProxyTransactor.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 (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _EthCrossChainManagerProxy.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 (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.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 (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCaller) GetEthCrossChainManager(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _EthCrossChainManagerProxy.contract.Call(opts, out, "getEthCrossChainManager") - return *ret0, err -} - -// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. -// -// Solidity: function getEthCrossChainManager() view returns(address) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) GetEthCrossChainManager() (common.Address, error) { - return _EthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_EthCrossChainManagerProxy.CallOpts) -} - -// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. -// -// Solidity: function getEthCrossChainManager() view returns(address) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCallerSession) GetEthCrossChainManager() (common.Address, error) { - return _EthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_EthCrossChainManagerProxy.CallOpts) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCaller) IsOwner(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _EthCrossChainManagerProxy.contract.Call(opts, out, "isOwner") - return *ret0, err -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) IsOwner() (bool, error) { - return _EthCrossChainManagerProxy.Contract.IsOwner(&_EthCrossChainManagerProxy.CallOpts) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCallerSession) IsOwner() (bool, error) { - return _EthCrossChainManagerProxy.Contract.IsOwner(&_EthCrossChainManagerProxy.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _EthCrossChainManagerProxy.contract.Call(opts, out, "owner") - return *ret0, err -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) Owner() (common.Address, error) { - return _EthCrossChainManagerProxy.Contract.Owner(&_EthCrossChainManagerProxy.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCallerSession) Owner() (common.Address, error) { - return _EthCrossChainManagerProxy.Contract.Owner(&_EthCrossChainManagerProxy.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCaller) Paused(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _EthCrossChainManagerProxy.contract.Call(opts, out, "paused") - return *ret0, err -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) Paused() (bool, error) { - return _EthCrossChainManagerProxy.Contract.Paused(&_EthCrossChainManagerProxy.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyCallerSession) Paused() (bool, error) { - return _EthCrossChainManagerProxy.Contract.Paused(&_EthCrossChainManagerProxy.CallOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.contract.Transact(opts, "pause") -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) Pause() (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.Pause(&_EthCrossChainManagerProxy.TransactOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) Pause() (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.Pause(&_EthCrossChainManagerProxy.TransactOpts) -} - -// PauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x3b9a80b8. -// -// Solidity: function pauseEthCrossChainManager() returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) PauseEthCrossChainManager(opts *bind.TransactOpts) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.contract.Transact(opts, "pauseEthCrossChainManager") -} - -// PauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x3b9a80b8. -// -// Solidity: function pauseEthCrossChainManager() returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) PauseEthCrossChainManager() (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.PauseEthCrossChainManager(&_EthCrossChainManagerProxy.TransactOpts) -} - -// PauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x3b9a80b8. -// -// Solidity: function pauseEthCrossChainManager() returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) PauseEthCrossChainManager() (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.PauseEthCrossChainManager(&_EthCrossChainManagerProxy.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) RenounceOwnership() (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.RenounceOwnership(&_EthCrossChainManagerProxy.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.RenounceOwnership(&_EthCrossChainManagerProxy.TransactOpts) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.TransferOwnership(&_EthCrossChainManagerProxy.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.TransferOwnership(&_EthCrossChainManagerProxy.TransactOpts, newOwner) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.contract.Transact(opts, "unpause") -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) Unpause() (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.Unpause(&_EthCrossChainManagerProxy.TransactOpts) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) Unpause() (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.Unpause(&_EthCrossChainManagerProxy.TransactOpts) -} - -// UnpauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x4390c707. -// -// Solidity: function unpauseEthCrossChainManager() returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) UnpauseEthCrossChainManager(opts *bind.TransactOpts) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.contract.Transact(opts, "unpauseEthCrossChainManager") -} - -// UnpauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x4390c707. -// -// Solidity: function unpauseEthCrossChainManager() returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) UnpauseEthCrossChainManager() (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.UnpauseEthCrossChainManager(&_EthCrossChainManagerProxy.TransactOpts) -} - -// UnpauseEthCrossChainManager is a paid mutator transaction binding the contract method 0x4390c707. -// -// Solidity: function unpauseEthCrossChainManager() returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) UnpauseEthCrossChainManager() (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.UnpauseEthCrossChainManager(&_EthCrossChainManagerProxy.TransactOpts) -} - -// UpgradeEthCrossChainManager is a paid mutator transaction binding the contract method 0xab59d32d. -// -// Solidity: function upgradeEthCrossChainManager(address _newEthCrossChainManagerAddr) returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactor) UpgradeEthCrossChainManager(opts *bind.TransactOpts, _newEthCrossChainManagerAddr common.Address) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.contract.Transact(opts, "upgradeEthCrossChainManager", _newEthCrossChainManagerAddr) -} - -// UpgradeEthCrossChainManager is a paid mutator transaction binding the contract method 0xab59d32d. -// -// Solidity: function upgradeEthCrossChainManager(address _newEthCrossChainManagerAddr) returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxySession) UpgradeEthCrossChainManager(_newEthCrossChainManagerAddr common.Address) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.UpgradeEthCrossChainManager(&_EthCrossChainManagerProxy.TransactOpts, _newEthCrossChainManagerAddr) -} - -// UpgradeEthCrossChainManager is a paid mutator transaction binding the contract method 0xab59d32d. -// -// Solidity: function upgradeEthCrossChainManager(address _newEthCrossChainManagerAddr) returns(bool) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyTransactorSession) UpgradeEthCrossChainManager(_newEthCrossChainManagerAddr common.Address) (*types.Transaction, error) { - return _EthCrossChainManagerProxy.Contract.UpgradeEthCrossChainManager(&_EthCrossChainManagerProxy.TransactOpts, _newEthCrossChainManagerAddr) -} - -// EthCrossChainManagerProxyOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the EthCrossChainManagerProxy contract. -type EthCrossChainManagerProxyOwnershipTransferredIterator struct { - Event *EthCrossChainManagerProxyOwnershipTransferred // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *EthCrossChainManagerProxyOwnershipTransferredIterator) 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(EthCrossChainManagerProxyOwnershipTransferred) - 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(EthCrossChainManagerProxyOwnershipTransferred) - 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 *EthCrossChainManagerProxyOwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *EthCrossChainManagerProxyOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// EthCrossChainManagerProxyOwnershipTransferred represents a OwnershipTransferred event raised by the EthCrossChainManagerProxy contract. -type EthCrossChainManagerProxyOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*EthCrossChainManagerProxyOwnershipTransferredIterator, 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 := _EthCrossChainManagerProxy.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &EthCrossChainManagerProxyOwnershipTransferredIterator{contract: _EthCrossChainManagerProxy.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 (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *EthCrossChainManagerProxyOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _EthCrossChainManagerProxy.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(EthCrossChainManagerProxyOwnershipTransferred) - if err := _EthCrossChainManagerProxy.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) ParseOwnershipTransferred(log types.Log) (*EthCrossChainManagerProxyOwnershipTransferred, error) { - event := new(EthCrossChainManagerProxyOwnershipTransferred) - if err := _EthCrossChainManagerProxy.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - return event, nil -} - -// EthCrossChainManagerProxyPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the EthCrossChainManagerProxy contract. -type EthCrossChainManagerProxyPausedIterator struct { - Event *EthCrossChainManagerProxyPaused // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *EthCrossChainManagerProxyPausedIterator) 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(EthCrossChainManagerProxyPaused) - 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(EthCrossChainManagerProxyPaused) - 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 *EthCrossChainManagerProxyPausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *EthCrossChainManagerProxyPausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// EthCrossChainManagerProxyPaused represents a Paused event raised by the EthCrossChainManagerProxy contract. -type EthCrossChainManagerProxyPaused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) FilterPaused(opts *bind.FilterOpts) (*EthCrossChainManagerProxyPausedIterator, error) { - - logs, sub, err := _EthCrossChainManagerProxy.contract.FilterLogs(opts, "Paused") - if err != nil { - return nil, err - } - return &EthCrossChainManagerProxyPausedIterator{contract: _EthCrossChainManagerProxy.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 (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *EthCrossChainManagerProxyPaused) (event.Subscription, error) { - - logs, sub, err := _EthCrossChainManagerProxy.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 := <-logs: - // New log arrived, parse the event and forward to the user - event := new(EthCrossChainManagerProxyPaused) - if err := _EthCrossChainManagerProxy.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 -} - -// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) ParsePaused(log types.Log) (*EthCrossChainManagerProxyPaused, error) { - event := new(EthCrossChainManagerProxyPaused) - if err := _EthCrossChainManagerProxy.contract.UnpackLog(event, "Paused", log); err != nil { - return nil, err - } - return event, nil -} - -// EthCrossChainManagerProxyUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the EthCrossChainManagerProxy contract. -type EthCrossChainManagerProxyUnpausedIterator struct { - Event *EthCrossChainManagerProxyUnpaused // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *EthCrossChainManagerProxyUnpausedIterator) 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(EthCrossChainManagerProxyUnpaused) - 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(EthCrossChainManagerProxyUnpaused) - 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 *EthCrossChainManagerProxyUnpausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *EthCrossChainManagerProxyUnpausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// EthCrossChainManagerProxyUnpaused represents a Unpaused event raised by the EthCrossChainManagerProxy contract. -type EthCrossChainManagerProxyUnpaused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) FilterUnpaused(opts *bind.FilterOpts) (*EthCrossChainManagerProxyUnpausedIterator, error) { - - logs, sub, err := _EthCrossChainManagerProxy.contract.FilterLogs(opts, "Unpaused") - if err != nil { - return nil, err - } - return &EthCrossChainManagerProxyUnpausedIterator{contract: _EthCrossChainManagerProxy.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 (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *EthCrossChainManagerProxyUnpaused) (event.Subscription, error) { - - logs, sub, err := _EthCrossChainManagerProxy.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 := <-logs: - // New log arrived, parse the event and forward to the user - event := new(EthCrossChainManagerProxyUnpaused) - if err := _EthCrossChainManagerProxy.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 -} - -// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_EthCrossChainManagerProxy *EthCrossChainManagerProxyFilterer) ParseUnpaused(log types.Log) (*EthCrossChainManagerProxyUnpaused, error) { - event := new(EthCrossChainManagerProxyUnpaused) - if err := _EthCrossChainManagerProxy.contract.UnpackLog(event, "Unpaused", log); err != nil { - return nil, err - } - return event, nil -} - -// IEthCrossChainManagerProxyABI is the input ABI used to generate the binding from. -const IEthCrossChainManagerProxyABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"getEthCrossChainManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" - -// IEthCrossChainManagerProxyFuncSigs maps the 4-byte function signature to its string representation. -var IEthCrossChainManagerProxyFuncSigs = map[string]string{ - "87939a7f": "getEthCrossChainManager()", -} - -// IEthCrossChainManagerProxy is an auto generated Go binding around an Ethereum contract. -type IEthCrossChainManagerProxy struct { - IEthCrossChainManagerProxyCaller // Read-only binding to the contract - IEthCrossChainManagerProxyTransactor // Write-only binding to the contract - IEthCrossChainManagerProxyFilterer // Log filterer for contract events -} - -// IEthCrossChainManagerProxyCaller is an auto generated read-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerProxyTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerProxyFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IEthCrossChainManagerProxyFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerProxySession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IEthCrossChainManagerProxySession struct { - Contract *IEthCrossChainManagerProxy // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainManagerProxyCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IEthCrossChainManagerProxyCallerSession struct { - Contract *IEthCrossChainManagerProxyCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IEthCrossChainManagerProxyTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IEthCrossChainManagerProxyTransactorSession struct { - Contract *IEthCrossChainManagerProxyTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainManagerProxyRaw is an auto generated low-level Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyRaw struct { - Contract *IEthCrossChainManagerProxy // Generic contract binding to access the raw methods on -} - -// IEthCrossChainManagerProxyCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyCallerRaw struct { - Contract *IEthCrossChainManagerProxyCaller // Generic read-only contract binding to access the raw methods on -} - -// IEthCrossChainManagerProxyTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyTransactorRaw struct { - Contract *IEthCrossChainManagerProxyTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewIEthCrossChainManagerProxy creates a new instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxy(address common.Address, backend bind.ContractBackend) (*IEthCrossChainManagerProxy, error) { - contract, err := bindIEthCrossChainManagerProxy(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxy{IEthCrossChainManagerProxyCaller: IEthCrossChainManagerProxyCaller{contract: contract}, IEthCrossChainManagerProxyTransactor: IEthCrossChainManagerProxyTransactor{contract: contract}, IEthCrossChainManagerProxyFilterer: IEthCrossChainManagerProxyFilterer{contract: contract}}, nil -} - -// NewIEthCrossChainManagerProxyCaller creates a new read-only instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxyCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainManagerProxyCaller, error) { - contract, err := bindIEthCrossChainManagerProxy(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxyCaller{contract: contract}, nil -} - -// NewIEthCrossChainManagerProxyTransactor creates a new write-only instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainManagerProxyTransactor, error) { - contract, err := bindIEthCrossChainManagerProxy(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxyTransactor{contract: contract}, nil -} - -// NewIEthCrossChainManagerProxyFilterer creates a new log filterer instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainManagerProxyFilterer, error) { - contract, err := bindIEthCrossChainManagerProxy(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxyFilterer{contract: contract}, nil -} - -// bindIEthCrossChainManagerProxy binds a generic wrapper to an already deployed contract. -func bindIEthCrossChainManagerProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IEthCrossChainManagerProxyABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyCaller.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyTransactor.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainManagerProxy.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCaller) GetEthCrossChainManager(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _IEthCrossChainManagerProxy.contract.Call(opts, out, "getEthCrossChainManager") - return *ret0, err -} - -// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. -// -// Solidity: function getEthCrossChainManager() view returns(address) -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxySession) GetEthCrossChainManager() (common.Address, error) { - return _IEthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_IEthCrossChainManagerProxy.CallOpts) -} - -// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. -// -// Solidity: function getEthCrossChainManager() view returns(address) -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCallerSession) GetEthCrossChainManager() (common.Address, error) { - return _IEthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_IEthCrossChainManagerProxy.CallOpts) -} - -// IUpgradableECCMABI is the input ABI used to generate the binding from. -const IUpgradableECCMABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"unpause\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"upgradeToNew\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// IUpgradableECCMFuncSigs maps the 4-byte function signature to its string representation. -var IUpgradableECCMFuncSigs = map[string]string{ - "8f32d59b": "isOwner()", - "8456cb59": "pause()", - "5c975abb": "paused()", - "3f4ba83a": "unpause()", - "7e724ff3": "upgradeToNew(address)", -} - -// IUpgradableECCM is an auto generated Go binding around an Ethereum contract. -type IUpgradableECCM struct { - IUpgradableECCMCaller // Read-only binding to the contract - IUpgradableECCMTransactor // Write-only binding to the contract - IUpgradableECCMFilterer // Log filterer for contract events -} - -// IUpgradableECCMCaller is an auto generated read-only Go binding around an Ethereum contract. -type IUpgradableECCMCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IUpgradableECCMTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IUpgradableECCMTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IUpgradableECCMFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IUpgradableECCMFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IUpgradableECCMSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IUpgradableECCMSession struct { - Contract *IUpgradableECCM // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IUpgradableECCMCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IUpgradableECCMCallerSession struct { - Contract *IUpgradableECCMCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IUpgradableECCMTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IUpgradableECCMTransactorSession struct { - Contract *IUpgradableECCMTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IUpgradableECCMRaw is an auto generated low-level Go binding around an Ethereum contract. -type IUpgradableECCMRaw struct { - Contract *IUpgradableECCM // Generic contract binding to access the raw methods on -} - -// IUpgradableECCMCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IUpgradableECCMCallerRaw struct { - Contract *IUpgradableECCMCaller // Generic read-only contract binding to access the raw methods on -} - -// IUpgradableECCMTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IUpgradableECCMTransactorRaw struct { - Contract *IUpgradableECCMTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewIUpgradableECCM creates a new instance of IUpgradableECCM, bound to a specific deployed contract. -func NewIUpgradableECCM(address common.Address, backend bind.ContractBackend) (*IUpgradableECCM, error) { - contract, err := bindIUpgradableECCM(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IUpgradableECCM{IUpgradableECCMCaller: IUpgradableECCMCaller{contract: contract}, IUpgradableECCMTransactor: IUpgradableECCMTransactor{contract: contract}, IUpgradableECCMFilterer: IUpgradableECCMFilterer{contract: contract}}, nil -} - -// NewIUpgradableECCMCaller creates a new read-only instance of IUpgradableECCM, bound to a specific deployed contract. -func NewIUpgradableECCMCaller(address common.Address, caller bind.ContractCaller) (*IUpgradableECCMCaller, error) { - contract, err := bindIUpgradableECCM(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IUpgradableECCMCaller{contract: contract}, nil -} - -// NewIUpgradableECCMTransactor creates a new write-only instance of IUpgradableECCM, bound to a specific deployed contract. -func NewIUpgradableECCMTransactor(address common.Address, transactor bind.ContractTransactor) (*IUpgradableECCMTransactor, error) { - contract, err := bindIUpgradableECCM(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IUpgradableECCMTransactor{contract: contract}, nil -} - -// NewIUpgradableECCMFilterer creates a new log filterer instance of IUpgradableECCM, bound to a specific deployed contract. -func NewIUpgradableECCMFilterer(address common.Address, filterer bind.ContractFilterer) (*IUpgradableECCMFilterer, error) { - contract, err := bindIUpgradableECCM(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IUpgradableECCMFilterer{contract: contract}, nil -} - -// bindIUpgradableECCM binds a generic wrapper to an already deployed contract. -func bindIUpgradableECCM(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IUpgradableECCMABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IUpgradableECCM *IUpgradableECCMRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IUpgradableECCM.Contract.IUpgradableECCMCaller.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 (_IUpgradableECCM *IUpgradableECCMRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IUpgradableECCM.Contract.IUpgradableECCMTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IUpgradableECCM *IUpgradableECCMRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IUpgradableECCM.Contract.IUpgradableECCMTransactor.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 (_IUpgradableECCM *IUpgradableECCMCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IUpgradableECCM.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 (_IUpgradableECCM *IUpgradableECCMTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IUpgradableECCM.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IUpgradableECCM *IUpgradableECCMTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IUpgradableECCM.Contract.contract.Transact(opts, method, params...) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_IUpgradableECCM *IUpgradableECCMCaller) IsOwner(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _IUpgradableECCM.contract.Call(opts, out, "isOwner") - return *ret0, err -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_IUpgradableECCM *IUpgradableECCMSession) IsOwner() (bool, error) { - return _IUpgradableECCM.Contract.IsOwner(&_IUpgradableECCM.CallOpts) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_IUpgradableECCM *IUpgradableECCMCallerSession) IsOwner() (bool, error) { - return _IUpgradableECCM.Contract.IsOwner(&_IUpgradableECCM.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_IUpgradableECCM *IUpgradableECCMCaller) Paused(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _IUpgradableECCM.contract.Call(opts, out, "paused") - return *ret0, err -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_IUpgradableECCM *IUpgradableECCMSession) Paused() (bool, error) { - return _IUpgradableECCM.Contract.Paused(&_IUpgradableECCM.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_IUpgradableECCM *IUpgradableECCMCallerSession) Paused() (bool, error) { - return _IUpgradableECCM.Contract.Paused(&_IUpgradableECCM.CallOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_IUpgradableECCM *IUpgradableECCMTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IUpgradableECCM.contract.Transact(opts, "pause") -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_IUpgradableECCM *IUpgradableECCMSession) Pause() (*types.Transaction, error) { - return _IUpgradableECCM.Contract.Pause(&_IUpgradableECCM.TransactOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns(bool) -func (_IUpgradableECCM *IUpgradableECCMTransactorSession) Pause() (*types.Transaction, error) { - return _IUpgradableECCM.Contract.Pause(&_IUpgradableECCM.TransactOpts) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_IUpgradableECCM *IUpgradableECCMTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IUpgradableECCM.contract.Transact(opts, "unpause") -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_IUpgradableECCM *IUpgradableECCMSession) Unpause() (*types.Transaction, error) { - return _IUpgradableECCM.Contract.Unpause(&_IUpgradableECCM.TransactOpts) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns(bool) -func (_IUpgradableECCM *IUpgradableECCMTransactorSession) Unpause() (*types.Transaction, error) { - return _IUpgradableECCM.Contract.Unpause(&_IUpgradableECCM.TransactOpts) -} - -// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. -// -// Solidity: function upgradeToNew(address ) returns(bool) -func (_IUpgradableECCM *IUpgradableECCMTransactor) UpgradeToNew(opts *bind.TransactOpts, arg0 common.Address) (*types.Transaction, error) { - return _IUpgradableECCM.contract.Transact(opts, "upgradeToNew", arg0) -} - -// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. -// -// Solidity: function upgradeToNew(address ) returns(bool) -func (_IUpgradableECCM *IUpgradableECCMSession) UpgradeToNew(arg0 common.Address) (*types.Transaction, error) { - return _IUpgradableECCM.Contract.UpgradeToNew(&_IUpgradableECCM.TransactOpts, arg0) -} - -// UpgradeToNew is a paid mutator transaction binding the contract method 0x7e724ff3. -// -// Solidity: function upgradeToNew(address ) returns(bool) -func (_IUpgradableECCM *IUpgradableECCMTransactorSession) UpgradeToNew(arg0 common.Address) (*types.Transaction, error) { - return _IUpgradableECCM.Contract.UpgradeToNew(&_IUpgradableECCM.TransactOpts, arg0) -} - -// OwnableABI is the input ABI used to generate the binding from. -const OwnableABI = "[{\"inputs\":[],\"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\"},{\"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\":\"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\"}]" - -// OwnableFuncSigs maps the 4-byte function signature to its string representation. -var OwnableFuncSigs = map[string]string{ - "8f32d59b": "isOwner()", - "8da5cb5b": "owner()", - "715018a6": "renounceOwnership()", - "f2fde38b": "transferOwnership(address)", -} - -// Ownable is an auto generated Go binding around an Ethereum contract. -type Ownable struct { - OwnableCaller // Read-only binding to the contract - OwnableTransactor // Write-only binding to the contract - OwnableFilterer // Log filterer for contract events -} - -// OwnableCaller is an auto generated read-only Go binding around an Ethereum contract. -type OwnableCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// OwnableTransactor is an auto generated write-only Go binding around an Ethereum contract. -type OwnableTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// OwnableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type OwnableFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// OwnableSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type OwnableSession struct { - Contract *Ownable // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// OwnableCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type OwnableCallerSession struct { - Contract *OwnableCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// OwnableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type OwnableTransactorSession struct { - Contract *OwnableTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// OwnableRaw is an auto generated low-level Go binding around an Ethereum contract. -type OwnableRaw struct { - Contract *Ownable // Generic contract binding to access the raw methods on -} - -// OwnableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type OwnableCallerRaw struct { - Contract *OwnableCaller // Generic read-only contract binding to access the raw methods on -} - -// OwnableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type OwnableTransactorRaw struct { - Contract *OwnableTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewOwnable creates a new instance of Ownable, bound to a specific deployed contract. -func NewOwnable(address common.Address, backend bind.ContractBackend) (*Ownable, error) { - contract, err := bindOwnable(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Ownable{OwnableCaller: OwnableCaller{contract: contract}, OwnableTransactor: OwnableTransactor{contract: contract}, OwnableFilterer: OwnableFilterer{contract: contract}}, nil -} - -// NewOwnableCaller creates a new read-only instance of Ownable, bound to a specific deployed contract. -func NewOwnableCaller(address common.Address, caller bind.ContractCaller) (*OwnableCaller, error) { - contract, err := bindOwnable(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &OwnableCaller{contract: contract}, nil -} - -// NewOwnableTransactor creates a new write-only instance of Ownable, bound to a specific deployed contract. -func NewOwnableTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnableTransactor, error) { - contract, err := bindOwnable(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &OwnableTransactor{contract: contract}, nil -} - -// NewOwnableFilterer creates a new log filterer instance of Ownable, bound to a specific deployed contract. -func NewOwnableFilterer(address common.Address, filterer bind.ContractFilterer) (*OwnableFilterer, error) { - contract, err := bindOwnable(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &OwnableFilterer{contract: contract}, nil -} - -// bindOwnable binds a generic wrapper to an already deployed contract. -func bindOwnable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(OwnableABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Ownable *OwnableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Ownable.Contract.OwnableCaller.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 (_Ownable *OwnableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Ownable.Contract.OwnableTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Ownable *OwnableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Ownable.Contract.OwnableTransactor.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 (_Ownable *OwnableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Ownable.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 (_Ownable *OwnableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Ownable.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Ownable *OwnableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Ownable.Contract.contract.Transact(opts, method, params...) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_Ownable *OwnableCaller) IsOwner(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _Ownable.contract.Call(opts, out, "isOwner") - return *ret0, err -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_Ownable *OwnableSession) IsOwner() (bool, error) { - return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) -} - -// IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. -// -// Solidity: function isOwner() view returns(bool) -func (_Ownable *OwnableCallerSession) IsOwner() (bool, error) { - return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Ownable *OwnableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Ownable.contract.Call(opts, out, "owner") - return *ret0, err -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Ownable *OwnableSession) Owner() (common.Address, error) { - return _Ownable.Contract.Owner(&_Ownable.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Ownable *OwnableCallerSession) Owner() (common.Address, error) { - return _Ownable.Contract.Owner(&_Ownable.CallOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Ownable *OwnableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Ownable.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Ownable *OwnableSession) RenounceOwnership() (*types.Transaction, error) { - return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Ownable *OwnableTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Ownable *OwnableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _Ownable.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Ownable *OwnableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Ownable *OwnableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) -} - -// OwnableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Ownable contract. -type OwnableOwnershipTransferredIterator struct { - Event *OwnableOwnershipTransferred // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *OwnableOwnershipTransferredIterator) 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(OwnableOwnershipTransferred) - 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(OwnableOwnershipTransferred) - 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 *OwnableOwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *OwnableOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// OwnableOwnershipTransferred represents a OwnershipTransferred event raised by the Ownable contract. -type OwnableOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Ownable *OwnableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnableOwnershipTransferredIterator, 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 := _Ownable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &OwnableOwnershipTransferredIterator{contract: _Ownable.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 (_Ownable *OwnableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _Ownable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(OwnableOwnershipTransferred) - if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Ownable *OwnableFilterer) ParseOwnershipTransferred(log types.Log) (*OwnableOwnershipTransferred, error) { - event := new(OwnableOwnershipTransferred) - if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - return event, nil -} - -// PausableABI is the input ABI used to generate the binding from. -const PausableABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" - -// PausableFuncSigs maps the 4-byte function signature to its string representation. -var PausableFuncSigs = map[string]string{ - "5c975abb": "paused()", -} - -// Pausable is an auto generated Go binding around an Ethereum contract. -type Pausable struct { - PausableCaller // Read-only binding to the contract - PausableTransactor // Write-only binding to the contract - PausableFilterer // Log filterer for contract events -} - -// PausableCaller is an auto generated read-only Go binding around an Ethereum contract. -type PausableCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PausableTransactor is an auto generated write-only Go binding around an Ethereum contract. -type PausableTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PausableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type PausableFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PausableSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type PausableSession struct { - Contract *Pausable // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// PausableCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type PausableCallerSession struct { - Contract *PausableCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// PausableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type PausableTransactorSession struct { - Contract *PausableTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// PausableRaw is an auto generated low-level Go binding around an Ethereum contract. -type PausableRaw struct { - Contract *Pausable // Generic contract binding to access the raw methods on -} - -// PausableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type PausableCallerRaw struct { - Contract *PausableCaller // Generic read-only contract binding to access the raw methods on -} - -// PausableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type PausableTransactorRaw struct { - Contract *PausableTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewPausable creates a new instance of Pausable, bound to a specific deployed contract. -func NewPausable(address common.Address, backend bind.ContractBackend) (*Pausable, error) { - contract, err := bindPausable(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Pausable{PausableCaller: PausableCaller{contract: contract}, PausableTransactor: PausableTransactor{contract: contract}, PausableFilterer: PausableFilterer{contract: contract}}, nil -} - -// NewPausableCaller creates a new read-only instance of Pausable, bound to a specific deployed contract. -func NewPausableCaller(address common.Address, caller bind.ContractCaller) (*PausableCaller, error) { - contract, err := bindPausable(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &PausableCaller{contract: contract}, nil -} - -// NewPausableTransactor creates a new write-only instance of Pausable, bound to a specific deployed contract. -func NewPausableTransactor(address common.Address, transactor bind.ContractTransactor) (*PausableTransactor, error) { - contract, err := bindPausable(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &PausableTransactor{contract: contract}, nil -} - -// NewPausableFilterer creates a new log filterer instance of Pausable, bound to a specific deployed contract. -func NewPausableFilterer(address common.Address, filterer bind.ContractFilterer) (*PausableFilterer, error) { - contract, err := bindPausable(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &PausableFilterer{contract: contract}, nil -} - -// bindPausable binds a generic wrapper to an already deployed contract. -func bindPausable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(PausableABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Pausable *PausableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Pausable.Contract.PausableCaller.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 (_Pausable *PausableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Pausable.Contract.PausableTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Pausable *PausableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Pausable.Contract.PausableTransactor.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 (_Pausable *PausableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Pausable.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 (_Pausable *PausableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Pausable.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Pausable *PausableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Pausable.Contract.contract.Transact(opts, method, params...) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Pausable *PausableCaller) Paused(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _Pausable.contract.Call(opts, out, "paused") - return *ret0, err -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Pausable *PausableSession) Paused() (bool, error) { - return _Pausable.Contract.Paused(&_Pausable.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Pausable *PausableCallerSession) Paused() (bool, error) { - return _Pausable.Contract.Paused(&_Pausable.CallOpts) -} - -// PausablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Pausable contract. -type PausablePausedIterator struct { - Event *PausablePaused // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PausablePausedIterator) 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(PausablePaused) - 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(PausablePaused) - 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 *PausablePausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PausablePausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PausablePaused represents a Paused event raised by the Pausable contract. -type PausablePaused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_Pausable *PausableFilterer) FilterPaused(opts *bind.FilterOpts) (*PausablePausedIterator, error) { - - logs, sub, err := _Pausable.contract.FilterLogs(opts, "Paused") - if err != nil { - return nil, err - } - return &PausablePausedIterator{contract: _Pausable.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 (_Pausable *PausableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *PausablePaused) (event.Subscription, error) { - - logs, sub, err := _Pausable.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 := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PausablePaused) - if err := _Pausable.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 -} - -// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. -// -// Solidity: event Paused(address account) -func (_Pausable *PausableFilterer) ParsePaused(log types.Log) (*PausablePaused, error) { - event := new(PausablePaused) - if err := _Pausable.contract.UnpackLog(event, "Paused", log); err != nil { - return nil, err - } - return event, nil -} - -// PausableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Pausable contract. -type PausableUnpausedIterator struct { - Event *PausableUnpaused // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PausableUnpausedIterator) 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(PausableUnpaused) - 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(PausableUnpaused) - 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 *PausableUnpausedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PausableUnpausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PausableUnpaused represents a Unpaused event raised by the Pausable contract. -type PausableUnpaused struct { - Account common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_Pausable *PausableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*PausableUnpausedIterator, error) { - - logs, sub, err := _Pausable.contract.FilterLogs(opts, "Unpaused") - if err != nil { - return nil, err - } - return &PausableUnpausedIterator{contract: _Pausable.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 (_Pausable *PausableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *PausableUnpaused) (event.Subscription, error) { - - logs, sub, err := _Pausable.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 := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PausableUnpaused) - if err := _Pausable.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 -} - -// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. -// -// Solidity: event Unpaused(address account) -func (_Pausable *PausableFilterer) ParseUnpaused(log types.Log) (*PausableUnpaused, error) { - event := new(PausableUnpaused) - if err := _Pausable.contract.UnpackLog(event, "Unpaused", log); err != nil { - return nil, err - } - return event, nil -} diff --git a/chains/eth/abi/erc20/erc20_abi.go b/chains/eth/abi/erc20/erc20_abi.go deleted file mode 100644 index a5ac033..0000000 --- a/chains/eth/abi/erc20/erc20_abi.go +++ /dev/null @@ -1,4365 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package erc20 - -import ( - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// ContextABI is the input ABI used to generate the binding from. -const ContextABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" - -// Context is an auto generated Go binding around an Ethereum contract. -type Context struct { - ContextCaller // Read-only binding to the contract - ContextTransactor // Write-only binding to the contract - ContextFilterer // Log filterer for contract events -} - -// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. -type ContextCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ContextTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ContextFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ContextSession struct { - Contract *Context // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ContextCallerSession struct { - Contract *ContextCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ContextTransactorSession struct { - Contract *ContextTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. -type ContextRaw struct { - Contract *Context // Generic contract binding to access the raw methods on -} - -// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ContextCallerRaw struct { - Contract *ContextCaller // Generic read-only contract binding to access the raw methods on -} - -// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ContextTransactorRaw struct { - Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewContext creates a new instance of Context, bound to a specific deployed contract. -func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { - contract, err := bindContext(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil -} - -// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. -func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { - contract, err := bindContext(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ContextCaller{contract: contract}, nil -} - -// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. -func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { - contract, err := bindContext(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ContextTransactor{contract: contract}, nil -} - -// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. -func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { - contract, err := bindContext(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ContextFilterer{contract: contract}, nil -} - -// bindContext binds a generic wrapper to an already deployed contract. -func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ContextABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.Contract.ContextCaller.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 (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.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 (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.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 (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.contract.Transact(opts, method, params...) -} - -// ERC20ABI is the input ABI used to generate the binding from. -const ERC20ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20FuncSigs maps the 4-byte function signature to its string representation. -var ERC20FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "a457c2d7": "decreaseAllowance(address,uint256)", - "39509351": "increaseAllowance(address,uint256)", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20Bin is the compiled bytecode used for deploying new contracts. -var ERC20Bin = "0x608060405261083b806100136000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a0823114610149578063a457c2d71461016f578063a9059cbb1461019b578063dd62ed3e146101c757610088565b8063095ea7b31461008d57806318160ddd146100cd57806323b872dd146100e7578063395093511461011d575b600080fd5b6100b9600480360360408110156100a357600080fd5b506001600160a01b0381351690602001356101f5565b604080519115158252519081900360200190f35b6100d5610212565b60408051918252519081900360200190f35b6100b9600480360360608110156100fd57600080fd5b506001600160a01b03813581169160208101359091169060400135610218565b6100b96004803603604081101561013357600080fd5b506001600160a01b0381351690602001356102a5565b6100d56004803603602081101561015f57600080fd5b50356001600160a01b03166102f9565b6100b96004803603604081101561018557600080fd5b506001600160a01b038135169060200135610314565b6100b9600480360360408110156101b157600080fd5b506001600160a01b038135169060200135610382565b6100d5600480360360408110156101dd57600080fd5b506001600160a01b0381358116916020013516610396565b60006102096102026103c1565b84846103c5565b50600192915050565b60025490565b60006102258484846104b1565b61029b846102316103c1565b61029685604051806060016040528060288152602001610771602891396001600160a01b038a1660009081526001602052604081209061026f6103c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61060d16565b6103c5565b5060019392505050565b60006102096102b26103c1565b8461029685600160006102c36103c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6106a416565b6001600160a01b031660009081526020819052604090205490565b60006102096103216103c1565b84610296856040518060600160405280602581526020016107e2602591396001600061034b6103c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61060d16565b600061020961038f6103c1565b84846104b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661040a5760405162461bcd60e51b81526004018080602001828103825260248152602001806107be6024913960400191505060405180910390fd5b6001600160a01b03821661044f5760405162461bcd60e51b81526004018080602001828103825260228152602001806107296022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166104f65760405162461bcd60e51b81526004018080602001828103825260258152602001806107996025913960400191505060405180910390fd5b6001600160a01b03821661053b5760405162461bcd60e51b81526004018080602001828103825260238152602001806107066023913960400191505060405180910390fd5b61057e8160405180606001604052806026815260200161074b602691396001600160a01b038616600090815260208190526040902054919063ffffffff61060d16565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546105b3908263ffffffff6106a416565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561069c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610661578181015183820152602001610649565b50505050905090810190601f16801561068e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156106fe576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820dd68afc24b84623478da74ad90030d8d5b03ae431cb948a20348acf66ded867f64736f6c634300050f0032" - -// DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it. -func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20Bin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil -} - -// ERC20 is an auto generated Go binding around an Ethereum contract. -type ERC20 struct { - ERC20Caller // Read-only binding to the contract - ERC20Transactor // Write-only binding to the contract - ERC20Filterer // Log filterer for contract events -} - -// ERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20Session struct { - Contract *ERC20 // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20CallerSession struct { - Contract *ERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20TransactorSession struct { - Contract *ERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20Raw struct { - Contract *ERC20 // Generic contract binding to access the raw methods on -} - -// ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20CallerRaw struct { - Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20TransactorRaw struct { - Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20 creates a new instance of ERC20, bound to a specific deployed contract. -func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error) { - contract, err := bindERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil -} - -// NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract. -func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error) { - contract, err := bindERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20Caller{contract: contract}, nil -} - -// NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract. -func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error) { - contract, err := bindERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20Transactor{contract: contract}, nil -} - -// NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract. -func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error) { - contract, err := bindERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20Filterer{contract: contract}, nil -} - -// bindERC20 binds a generic wrapper to an already deployed contract. -func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20.Contract.ERC20Caller.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 (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20.Contract.ERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20.Contract.ERC20Transactor.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 (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20.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 (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error) { - return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error) { - return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, amount) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "increaseAllowance", spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) -} - -// ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20 contract. -type ERC20ApprovalIterator struct { - Event *ERC20Approval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20ApprovalIterator) 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(ERC20Approval) - 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(ERC20Approval) - 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 *ERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20Approval represents a Approval event raised by the ERC20 contract. -type ERC20Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC20ApprovalIterator{contract: _ERC20.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20Approval) - if err := _ERC20.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) ParseApproval(log types.Log) (*ERC20Approval, error) { - event := new(ERC20Approval) - if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20 contract. -type ERC20TransferIterator struct { - Event *ERC20Transfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20TransferIterator) 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(ERC20Transfer) - 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(ERC20Transfer) - 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 *ERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20Transfer represents a Transfer event raised by the ERC20 contract. -type ERC20Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC20TransferIterator{contract: _ERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20Transfer) - if err := _ERC20.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) ParseTransfer(log types.Log) (*ERC20Transfer, error) { - event := new(ERC20Transfer) - if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20DetailedABI is the input ABI used to generate the binding from. -const ERC20DetailedABI = "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20DetailedFuncSigs maps the 4-byte function signature to its string representation. -var ERC20DetailedFuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "313ce567": "decimals()", - "06fdde03": "name()", - "95d89b41": "symbol()", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20Detailed is an auto generated Go binding around an Ethereum contract. -type ERC20Detailed struct { - ERC20DetailedCaller // Read-only binding to the contract - ERC20DetailedTransactor // Write-only binding to the contract - ERC20DetailedFilterer // Log filterer for contract events -} - -// ERC20DetailedCaller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20DetailedCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20DetailedTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20DetailedFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20DetailedSession struct { - Contract *ERC20Detailed // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20DetailedCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20DetailedCallerSession struct { - Contract *ERC20DetailedCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20DetailedTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20DetailedTransactorSession struct { - Contract *ERC20DetailedTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20DetailedRaw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20DetailedRaw struct { - Contract *ERC20Detailed // Generic contract binding to access the raw methods on -} - -// ERC20DetailedCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20DetailedCallerRaw struct { - Contract *ERC20DetailedCaller // Generic read-only contract binding to access the raw methods on -} - -// ERC20DetailedTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20DetailedTransactorRaw struct { - Contract *ERC20DetailedTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20Detailed creates a new instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20Detailed(address common.Address, backend bind.ContractBackend) (*ERC20Detailed, error) { - contract, err := bindERC20Detailed(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20Detailed{ERC20DetailedCaller: ERC20DetailedCaller{contract: contract}, ERC20DetailedTransactor: ERC20DetailedTransactor{contract: contract}, ERC20DetailedFilterer: ERC20DetailedFilterer{contract: contract}}, nil -} - -// NewERC20DetailedCaller creates a new read-only instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedCaller(address common.Address, caller bind.ContractCaller) (*ERC20DetailedCaller, error) { - contract, err := bindERC20Detailed(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20DetailedCaller{contract: contract}, nil -} - -// NewERC20DetailedTransactor creates a new write-only instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20DetailedTransactor, error) { - contract, err := bindERC20Detailed(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20DetailedTransactor{contract: contract}, nil -} - -// NewERC20DetailedFilterer creates a new log filterer instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20DetailedFilterer, error) { - contract, err := bindERC20Detailed(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20DetailedFilterer{contract: contract}, nil -} - -// bindERC20Detailed binds a generic wrapper to an already deployed contract. -func bindERC20Detailed(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20DetailedABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20Detailed *ERC20DetailedRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20Detailed.Contract.ERC20DetailedCaller.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 (_ERC20Detailed *ERC20DetailedRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Detailed.Contract.ERC20DetailedTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Detailed *ERC20DetailedRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Detailed.Contract.ERC20DetailedTransactor.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 (_ERC20Detailed *ERC20DetailedCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20Detailed.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 (_ERC20Detailed *ERC20DetailedTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Detailed.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Detailed *ERC20DetailedTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Detailed.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.Allowance(&_ERC20Detailed.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.Allowance(&_ERC20Detailed.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.BalanceOf(&_ERC20Detailed.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.BalanceOf(&_ERC20Detailed.CallOpts, account) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedCaller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "decimals") - return *ret0, err -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedSession) Decimals() (uint8, error) { - return _ERC20Detailed.Contract.Decimals(&_ERC20Detailed.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedCallerSession) Decimals() (uint8, error) { - return _ERC20Detailed.Contract.Decimals(&_ERC20Detailed.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedCaller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "name") - return *ret0, err -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedSession) Name() (string, error) { - return _ERC20Detailed.Contract.Name(&_ERC20Detailed.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedCallerSession) Name() (string, error) { - return _ERC20Detailed.Contract.Name(&_ERC20Detailed.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedCaller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "symbol") - return *ret0, err -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedSession) Symbol() (string, error) { - return _ERC20Detailed.Contract.Symbol(&_ERC20Detailed.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedCallerSession) Symbol() (string, error) { - return _ERC20Detailed.Contract.Symbol(&_ERC20Detailed.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) TotalSupply() (*big.Int, error) { - return _ERC20Detailed.Contract.TotalSupply(&_ERC20Detailed.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) TotalSupply() (*big.Int, error) { - return _ERC20Detailed.Contract.TotalSupply(&_ERC20Detailed.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Approve(&_ERC20Detailed.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Approve(&_ERC20Detailed.TransactOpts, spender, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Transfer(&_ERC20Detailed.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Transfer(&_ERC20Detailed.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.TransferFrom(&_ERC20Detailed.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.TransferFrom(&_ERC20Detailed.TransactOpts, sender, recipient, amount) -} - -// ERC20DetailedApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20Detailed contract. -type ERC20DetailedApprovalIterator struct { - Event *ERC20DetailedApproval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20DetailedApprovalIterator) 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(ERC20DetailedApproval) - 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(ERC20DetailedApproval) - 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 *ERC20DetailedApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20DetailedApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20DetailedApproval represents a Approval event raised by the ERC20Detailed contract. -type ERC20DetailedApproval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20DetailedApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20Detailed.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC20DetailedApprovalIterator{contract: _ERC20Detailed.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20DetailedApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20Detailed.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20DetailedApproval) - if err := _ERC20Detailed.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) ParseApproval(log types.Log) (*ERC20DetailedApproval, error) { - event := new(ERC20DetailedApproval) - if err := _ERC20Detailed.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20DetailedTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20Detailed contract. -type ERC20DetailedTransferIterator struct { - Event *ERC20DetailedTransfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20DetailedTransferIterator) 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(ERC20DetailedTransfer) - 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(ERC20DetailedTransfer) - 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 *ERC20DetailedTransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20DetailedTransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20DetailedTransfer represents a Transfer event raised by the ERC20Detailed contract. -type ERC20DetailedTransfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20DetailedTransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20Detailed.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC20DetailedTransferIterator{contract: _ERC20Detailed.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20DetailedTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20Detailed.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20DetailedTransfer) - if err := _ERC20Detailed.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) ParseTransfer(log types.Log) (*ERC20DetailedTransfer, error) { - event := new(ERC20DetailedTransfer) - if err := _ERC20Detailed.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20ExtendedV2ABI is the input ABI used to generate the binding from. -const ERC20ExtendedV2ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"contractAddr\",\"type\":\"bytes\"}],\"name\":\"BindContractAddrWithChainIdEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"managerContract\",\"type\":\"address\"}],\"name\":\"SetManagerProxyEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"contractAddr\",\"type\":\"bytes\"}],\"name\":\"bindContractAddrWithChainId\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"contractAddrBindChainId\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"managerProxyContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"operator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"ethCrossChainManagerProxyAddr\",\"type\":\"address\"}],\"name\":\"setManagerProxy\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20ExtendedV2FuncSigs maps the 4-byte function signature to its string representation. -var ERC20ExtendedV2FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "b8527682": "bindContractAddrWithChainId(uint64,bytes)", - "42966c68": "burn(uint256)", - "d88c2999": "contractAddrBindChainId(uint64)", - "313ce567": "decimals()", - "a457c2d7": "decreaseAllowance(address,uint256)", - "39509351": "increaseAllowance(address,uint256)", - "d798f881": "managerProxyContract()", - "40c10f19": "mint(address,uint256)", - "06fdde03": "name()", - "570ca735": "operator()", - "af9980f0": "setManagerProxy(address)", - "95d89b41": "symbol()", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20ExtendedV2 is an auto generated Go binding around an Ethereum contract. -type ERC20ExtendedV2 struct { - ERC20ExtendedV2Caller // Read-only binding to the contract - ERC20ExtendedV2Transactor // Write-only binding to the contract - ERC20ExtendedV2Filterer // Log filterer for contract events -} - -// ERC20ExtendedV2Caller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20ExtendedV2Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20ExtendedV2Transactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20ExtendedV2Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20ExtendedV2Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20ExtendedV2Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20ExtendedV2Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20ExtendedV2Session struct { - Contract *ERC20ExtendedV2 // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20ExtendedV2CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20ExtendedV2CallerSession struct { - Contract *ERC20ExtendedV2Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20ExtendedV2TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20ExtendedV2TransactorSession struct { - Contract *ERC20ExtendedV2Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20ExtendedV2Raw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20ExtendedV2Raw struct { - Contract *ERC20ExtendedV2 // Generic contract binding to access the raw methods on -} - -// ERC20ExtendedV2CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20ExtendedV2CallerRaw struct { - Contract *ERC20ExtendedV2Caller // Generic read-only contract binding to access the raw methods on -} - -// ERC20ExtendedV2TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20ExtendedV2TransactorRaw struct { - Contract *ERC20ExtendedV2Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20ExtendedV2 creates a new instance of ERC20ExtendedV2, bound to a specific deployed contract. -func NewERC20ExtendedV2(address common.Address, backend bind.ContractBackend) (*ERC20ExtendedV2, error) { - contract, err := bindERC20ExtendedV2(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20ExtendedV2{ERC20ExtendedV2Caller: ERC20ExtendedV2Caller{contract: contract}, ERC20ExtendedV2Transactor: ERC20ExtendedV2Transactor{contract: contract}, ERC20ExtendedV2Filterer: ERC20ExtendedV2Filterer{contract: contract}}, nil -} - -// NewERC20ExtendedV2Caller creates a new read-only instance of ERC20ExtendedV2, bound to a specific deployed contract. -func NewERC20ExtendedV2Caller(address common.Address, caller bind.ContractCaller) (*ERC20ExtendedV2Caller, error) { - contract, err := bindERC20ExtendedV2(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20ExtendedV2Caller{contract: contract}, nil -} - -// NewERC20ExtendedV2Transactor creates a new write-only instance of ERC20ExtendedV2, bound to a specific deployed contract. -func NewERC20ExtendedV2Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20ExtendedV2Transactor, error) { - contract, err := bindERC20ExtendedV2(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20ExtendedV2Transactor{contract: contract}, nil -} - -// NewERC20ExtendedV2Filterer creates a new log filterer instance of ERC20ExtendedV2, bound to a specific deployed contract. -func NewERC20ExtendedV2Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20ExtendedV2Filterer, error) { - contract, err := bindERC20ExtendedV2(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20ExtendedV2Filterer{contract: contract}, nil -} - -// bindERC20ExtendedV2 binds a generic wrapper to an already deployed contract. -func bindERC20ExtendedV2(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ExtendedV2ABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20ExtendedV2 *ERC20ExtendedV2Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20ExtendedV2.Contract.ERC20ExtendedV2Caller.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 (_ERC20ExtendedV2 *ERC20ExtendedV2Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.ERC20ExtendedV2Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20ExtendedV2 *ERC20ExtendedV2Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.ERC20ExtendedV2Transactor.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 (_ERC20ExtendedV2 *ERC20ExtendedV2CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20ExtendedV2.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 (_ERC20ExtendedV2 *ERC20ExtendedV2TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20ExtendedV2 *ERC20ExtendedV2TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20ExtendedV2.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20ExtendedV2.Contract.Allowance(&_ERC20ExtendedV2.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20ExtendedV2 *ERC20ExtendedV2CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20ExtendedV2.Contract.Allowance(&_ERC20ExtendedV2.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20ExtendedV2.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20ExtendedV2.Contract.BalanceOf(&_ERC20ExtendedV2.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20ExtendedV2 *ERC20ExtendedV2CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20ExtendedV2.Contract.BalanceOf(&_ERC20ExtendedV2.CallOpts, account) -} - -// ContractAddrBindChainId is a free data retrieval call binding the contract method 0xd88c2999. -// -// Solidity: function contractAddrBindChainId(uint64 ) view returns(bytes) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Caller) ContractAddrBindChainId(opts *bind.CallOpts, arg0 uint64) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _ERC20ExtendedV2.contract.Call(opts, out, "contractAddrBindChainId", arg0) - return *ret0, err -} - -// ContractAddrBindChainId is a free data retrieval call binding the contract method 0xd88c2999. -// -// Solidity: function contractAddrBindChainId(uint64 ) view returns(bytes) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) ContractAddrBindChainId(arg0 uint64) ([]byte, error) { - return _ERC20ExtendedV2.Contract.ContractAddrBindChainId(&_ERC20ExtendedV2.CallOpts, arg0) -} - -// ContractAddrBindChainId is a free data retrieval call binding the contract method 0xd88c2999. -// -// Solidity: function contractAddrBindChainId(uint64 ) view returns(bytes) -func (_ERC20ExtendedV2 *ERC20ExtendedV2CallerSession) ContractAddrBindChainId(arg0 uint64) ([]byte, error) { - return _ERC20ExtendedV2.Contract.ContractAddrBindChainId(&_ERC20ExtendedV2.CallOpts, arg0) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Caller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _ERC20ExtendedV2.contract.Call(opts, out, "decimals") - return *ret0, err -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) Decimals() (uint8, error) { - return _ERC20ExtendedV2.Contract.Decimals(&_ERC20ExtendedV2.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20ExtendedV2 *ERC20ExtendedV2CallerSession) Decimals() (uint8, error) { - return _ERC20ExtendedV2.Contract.Decimals(&_ERC20ExtendedV2.CallOpts) -} - -// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. -// -// Solidity: function managerProxyContract() view returns(address) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Caller) ManagerProxyContract(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _ERC20ExtendedV2.contract.Call(opts, out, "managerProxyContract") - return *ret0, err -} - -// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. -// -// Solidity: function managerProxyContract() view returns(address) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) ManagerProxyContract() (common.Address, error) { - return _ERC20ExtendedV2.Contract.ManagerProxyContract(&_ERC20ExtendedV2.CallOpts) -} - -// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. -// -// Solidity: function managerProxyContract() view returns(address) -func (_ERC20ExtendedV2 *ERC20ExtendedV2CallerSession) ManagerProxyContract() (common.Address, error) { - return _ERC20ExtendedV2.Contract.ManagerProxyContract(&_ERC20ExtendedV2.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Caller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20ExtendedV2.contract.Call(opts, out, "name") - return *ret0, err -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) Name() (string, error) { - return _ERC20ExtendedV2.Contract.Name(&_ERC20ExtendedV2.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20ExtendedV2 *ERC20ExtendedV2CallerSession) Name() (string, error) { - return _ERC20ExtendedV2.Contract.Name(&_ERC20ExtendedV2.CallOpts) -} - -// Operator is a free data retrieval call binding the contract method 0x570ca735. -// -// Solidity: function operator() view returns(address) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Caller) Operator(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _ERC20ExtendedV2.contract.Call(opts, out, "operator") - return *ret0, err -} - -// Operator is a free data retrieval call binding the contract method 0x570ca735. -// -// Solidity: function operator() view returns(address) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) Operator() (common.Address, error) { - return _ERC20ExtendedV2.Contract.Operator(&_ERC20ExtendedV2.CallOpts) -} - -// Operator is a free data retrieval call binding the contract method 0x570ca735. -// -// Solidity: function operator() view returns(address) -func (_ERC20ExtendedV2 *ERC20ExtendedV2CallerSession) Operator() (common.Address, error) { - return _ERC20ExtendedV2.Contract.Operator(&_ERC20ExtendedV2.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Caller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20ExtendedV2.contract.Call(opts, out, "symbol") - return *ret0, err -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) Symbol() (string, error) { - return _ERC20ExtendedV2.Contract.Symbol(&_ERC20ExtendedV2.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20ExtendedV2 *ERC20ExtendedV2CallerSession) Symbol() (string, error) { - return _ERC20ExtendedV2.Contract.Symbol(&_ERC20ExtendedV2.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20ExtendedV2.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) TotalSupply() (*big.Int, error) { - return _ERC20ExtendedV2.Contract.TotalSupply(&_ERC20ExtendedV2.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20ExtendedV2 *ERC20ExtendedV2CallerSession) TotalSupply() (*big.Int, error) { - return _ERC20ExtendedV2.Contract.TotalSupply(&_ERC20ExtendedV2.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.Approve(&_ERC20ExtendedV2.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.Approve(&_ERC20ExtendedV2.TransactOpts, spender, amount) -} - -// BindContractAddrWithChainId is a paid mutator transaction binding the contract method 0xb8527682. -// -// Solidity: function bindContractAddrWithChainId(uint64 chainId, bytes contractAddr) returns() -func (_ERC20ExtendedV2 *ERC20ExtendedV2Transactor) BindContractAddrWithChainId(opts *bind.TransactOpts, chainId uint64, contractAddr []byte) (*types.Transaction, error) { - return _ERC20ExtendedV2.contract.Transact(opts, "bindContractAddrWithChainId", chainId, contractAddr) -} - -// BindContractAddrWithChainId is a paid mutator transaction binding the contract method 0xb8527682. -// -// Solidity: function bindContractAddrWithChainId(uint64 chainId, bytes contractAddr) returns() -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) BindContractAddrWithChainId(chainId uint64, contractAddr []byte) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.BindContractAddrWithChainId(&_ERC20ExtendedV2.TransactOpts, chainId, contractAddr) -} - -// BindContractAddrWithChainId is a paid mutator transaction binding the contract method 0xb8527682. -// -// Solidity: function bindContractAddrWithChainId(uint64 chainId, bytes contractAddr) returns() -func (_ERC20ExtendedV2 *ERC20ExtendedV2TransactorSession) BindContractAddrWithChainId(chainId uint64, contractAddr []byte) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.BindContractAddrWithChainId(&_ERC20ExtendedV2.TransactOpts, chainId, contractAddr) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Transactor) Burn(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.contract.Transact(opts, "burn", amount) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) Burn(amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.Burn(&_ERC20ExtendedV2.TransactOpts, amount) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2TransactorSession) Burn(amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.Burn(&_ERC20ExtendedV2.TransactOpts, amount) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.DecreaseAllowance(&_ERC20ExtendedV2.TransactOpts, spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.DecreaseAllowance(&_ERC20ExtendedV2.TransactOpts, spender, subtractedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.contract.Transact(opts, "increaseAllowance", spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.IncreaseAllowance(&_ERC20ExtendedV2.TransactOpts, spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.IncreaseAllowance(&_ERC20ExtendedV2.TransactOpts, spender, addedValue) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address account, uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Transactor) Mint(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.contract.Transact(opts, "mint", account, amount) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address account, uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.Mint(&_ERC20ExtendedV2.TransactOpts, account, amount) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address account, uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2TransactorSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.Mint(&_ERC20ExtendedV2.TransactOpts, account, amount) -} - -// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. -// -// Solidity: function setManagerProxy(address ethCrossChainManagerProxyAddr) returns() -func (_ERC20ExtendedV2 *ERC20ExtendedV2Transactor) SetManagerProxy(opts *bind.TransactOpts, ethCrossChainManagerProxyAddr common.Address) (*types.Transaction, error) { - return _ERC20ExtendedV2.contract.Transact(opts, "setManagerProxy", ethCrossChainManagerProxyAddr) -} - -// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. -// -// Solidity: function setManagerProxy(address ethCrossChainManagerProxyAddr) returns() -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) SetManagerProxy(ethCrossChainManagerProxyAddr common.Address) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.SetManagerProxy(&_ERC20ExtendedV2.TransactOpts, ethCrossChainManagerProxyAddr) -} - -// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. -// -// Solidity: function setManagerProxy(address ethCrossChainManagerProxyAddr) returns() -func (_ERC20ExtendedV2 *ERC20ExtendedV2TransactorSession) SetManagerProxy(ethCrossChainManagerProxyAddr common.Address) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.SetManagerProxy(&_ERC20ExtendedV2.TransactOpts, ethCrossChainManagerProxyAddr) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.Transfer(&_ERC20ExtendedV2.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.Transfer(&_ERC20ExtendedV2.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.TransferFrom(&_ERC20ExtendedV2.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20ExtendedV2 *ERC20ExtendedV2TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20ExtendedV2.Contract.TransferFrom(&_ERC20ExtendedV2.TransactOpts, sender, recipient, amount) -} - -// ERC20ExtendedV2ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20ExtendedV2 contract. -type ERC20ExtendedV2ApprovalIterator struct { - Event *ERC20ExtendedV2Approval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20ExtendedV2ApprovalIterator) 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(ERC20ExtendedV2Approval) - 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(ERC20ExtendedV2Approval) - 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 *ERC20ExtendedV2ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20ExtendedV2ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20ExtendedV2Approval represents a Approval event raised by the ERC20ExtendedV2 contract. -type ERC20ExtendedV2Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ExtendedV2ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20ExtendedV2.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC20ExtendedV2ApprovalIterator{contract: _ERC20ExtendedV2.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20ExtendedV2Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20ExtendedV2.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20ExtendedV2Approval) - if err := _ERC20ExtendedV2.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Filterer) ParseApproval(log types.Log) (*ERC20ExtendedV2Approval, error) { - event := new(ERC20ExtendedV2Approval) - if err := _ERC20ExtendedV2.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20ExtendedV2BindContractAddrWithChainIdEventIterator is returned from FilterBindContractAddrWithChainIdEvent and is used to iterate over the raw logs and unpacked data for BindContractAddrWithChainIdEvent events raised by the ERC20ExtendedV2 contract. -type ERC20ExtendedV2BindContractAddrWithChainIdEventIterator struct { - Event *ERC20ExtendedV2BindContractAddrWithChainIdEvent // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20ExtendedV2BindContractAddrWithChainIdEventIterator) 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(ERC20ExtendedV2BindContractAddrWithChainIdEvent) - 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(ERC20ExtendedV2BindContractAddrWithChainIdEvent) - 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 *ERC20ExtendedV2BindContractAddrWithChainIdEventIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20ExtendedV2BindContractAddrWithChainIdEventIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20ExtendedV2BindContractAddrWithChainIdEvent represents a BindContractAddrWithChainIdEvent event raised by the ERC20ExtendedV2 contract. -type ERC20ExtendedV2BindContractAddrWithChainIdEvent struct { - ChainId uint64 - ContractAddr []byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBindContractAddrWithChainIdEvent is a free log retrieval operation binding the contract event 0xcc0c014035338c3e1395681793b8b3a5fb0a3d4aa40c9d667da3e92257252f4c. -// -// Solidity: event BindContractAddrWithChainIdEvent(uint64 chainId, bytes contractAddr) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Filterer) FilterBindContractAddrWithChainIdEvent(opts *bind.FilterOpts) (*ERC20ExtendedV2BindContractAddrWithChainIdEventIterator, error) { - - logs, sub, err := _ERC20ExtendedV2.contract.FilterLogs(opts, "BindContractAddrWithChainIdEvent") - if err != nil { - return nil, err - } - return &ERC20ExtendedV2BindContractAddrWithChainIdEventIterator{contract: _ERC20ExtendedV2.contract, event: "BindContractAddrWithChainIdEvent", logs: logs, sub: sub}, nil -} - -// WatchBindContractAddrWithChainIdEvent is a free log subscription operation binding the contract event 0xcc0c014035338c3e1395681793b8b3a5fb0a3d4aa40c9d667da3e92257252f4c. -// -// Solidity: event BindContractAddrWithChainIdEvent(uint64 chainId, bytes contractAddr) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Filterer) WatchBindContractAddrWithChainIdEvent(opts *bind.WatchOpts, sink chan<- *ERC20ExtendedV2BindContractAddrWithChainIdEvent) (event.Subscription, error) { - - logs, sub, err := _ERC20ExtendedV2.contract.WatchLogs(opts, "BindContractAddrWithChainIdEvent") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20ExtendedV2BindContractAddrWithChainIdEvent) - if err := _ERC20ExtendedV2.contract.UnpackLog(event, "BindContractAddrWithChainIdEvent", 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 -} - -// ParseBindContractAddrWithChainIdEvent is a log parse operation binding the contract event 0xcc0c014035338c3e1395681793b8b3a5fb0a3d4aa40c9d667da3e92257252f4c. -// -// Solidity: event BindContractAddrWithChainIdEvent(uint64 chainId, bytes contractAddr) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Filterer) ParseBindContractAddrWithChainIdEvent(log types.Log) (*ERC20ExtendedV2BindContractAddrWithChainIdEvent, error) { - event := new(ERC20ExtendedV2BindContractAddrWithChainIdEvent) - if err := _ERC20ExtendedV2.contract.UnpackLog(event, "BindContractAddrWithChainIdEvent", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20ExtendedV2SetManagerProxyEventIterator is returned from FilterSetManagerProxyEvent and is used to iterate over the raw logs and unpacked data for SetManagerProxyEvent events raised by the ERC20ExtendedV2 contract. -type ERC20ExtendedV2SetManagerProxyEventIterator struct { - Event *ERC20ExtendedV2SetManagerProxyEvent // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20ExtendedV2SetManagerProxyEventIterator) 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(ERC20ExtendedV2SetManagerProxyEvent) - 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(ERC20ExtendedV2SetManagerProxyEvent) - 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 *ERC20ExtendedV2SetManagerProxyEventIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20ExtendedV2SetManagerProxyEventIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20ExtendedV2SetManagerProxyEvent represents a SetManagerProxyEvent event raised by the ERC20ExtendedV2 contract. -type ERC20ExtendedV2SetManagerProxyEvent struct { - ManagerContract common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetManagerProxyEvent is a free log retrieval operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. -// -// Solidity: event SetManagerProxyEvent(address managerContract) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Filterer) FilterSetManagerProxyEvent(opts *bind.FilterOpts) (*ERC20ExtendedV2SetManagerProxyEventIterator, error) { - - logs, sub, err := _ERC20ExtendedV2.contract.FilterLogs(opts, "SetManagerProxyEvent") - if err != nil { - return nil, err - } - return &ERC20ExtendedV2SetManagerProxyEventIterator{contract: _ERC20ExtendedV2.contract, event: "SetManagerProxyEvent", logs: logs, sub: sub}, nil -} - -// WatchSetManagerProxyEvent is a free log subscription operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. -// -// Solidity: event SetManagerProxyEvent(address managerContract) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Filterer) WatchSetManagerProxyEvent(opts *bind.WatchOpts, sink chan<- *ERC20ExtendedV2SetManagerProxyEvent) (event.Subscription, error) { - - logs, sub, err := _ERC20ExtendedV2.contract.WatchLogs(opts, "SetManagerProxyEvent") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20ExtendedV2SetManagerProxyEvent) - if err := _ERC20ExtendedV2.contract.UnpackLog(event, "SetManagerProxyEvent", 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 -} - -// ParseSetManagerProxyEvent is a log parse operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. -// -// Solidity: event SetManagerProxyEvent(address managerContract) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Filterer) ParseSetManagerProxyEvent(log types.Log) (*ERC20ExtendedV2SetManagerProxyEvent, error) { - event := new(ERC20ExtendedV2SetManagerProxyEvent) - if err := _ERC20ExtendedV2.contract.UnpackLog(event, "SetManagerProxyEvent", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20ExtendedV2TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20ExtendedV2 contract. -type ERC20ExtendedV2TransferIterator struct { - Event *ERC20ExtendedV2Transfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20ExtendedV2TransferIterator) 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(ERC20ExtendedV2Transfer) - 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(ERC20ExtendedV2Transfer) - 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 *ERC20ExtendedV2TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20ExtendedV2TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20ExtendedV2Transfer represents a Transfer event raised by the ERC20ExtendedV2 contract. -type ERC20ExtendedV2Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20ExtendedV2TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20ExtendedV2.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC20ExtendedV2TransferIterator{contract: _ERC20ExtendedV2.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20ExtendedV2Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20ExtendedV2.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20ExtendedV2Transfer) - if err := _ERC20ExtendedV2.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20ExtendedV2 *ERC20ExtendedV2Filterer) ParseTransfer(log types.Log) (*ERC20ExtendedV2Transfer, error) { - event := new(ERC20ExtendedV2Transfer) - if err := _ERC20ExtendedV2.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20TemplateABI is the input ABI used to generate the binding from. -const ERC20TemplateABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20TemplateFuncSigs maps the 4-byte function signature to its string representation. -var ERC20TemplateFuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "313ce567": "decimals()", - "a457c2d7": "decreaseAllowance(address,uint256)", - "39509351": "increaseAllowance(address,uint256)", - "06fdde03": "name()", - "95d89b41": "symbol()", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20TemplateBin is the compiled bytecode used for deploying new contracts. -var ERC20TemplateBin = "0x60806040523480156200001157600080fd5b50604080518082018252600e81526d45524332302054656d706c61746560901b602080830191825283518085019094526006845265115490cc8c1560d21b9084015281519192916009916200006a91600391906200022a565b508151620000809060049060208501906200022a565b506005805460ff191660ff9290921691909117905550620000bc9050620000a6620000c2565b6509184e72a0006001600160e01b03620000c716565b620002cc565b335b90565b6001600160a01b03821662000123576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6200013f81600254620001c860201b620008681790919060201c565b6002556001600160a01b038216600090815260208181526040909120546200017291839062000868620001c8821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008282018381101562000223576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200026d57805160ff19168380011785556200029d565b828001600101855582156200029d579182015b828111156200029d57825182559160200191906001019062000280565b50620002ab929150620002af565b5090565b620000c491905b80821115620002ab5760008155600101620002b6565b6109ff80620002dc6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063395093511161007157806339509351146101d957806370a082311461020557806395d89b411461022b578063a457c2d714610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561034f565b604080519115158252519081900360200190f35b61017361036c565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b03813581169160208101359091169060400135610372565b6101c36103ff565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b038135169060200135610408565b6101736004803603602081101561021b57600080fd5b50356001600160a01b031661045c565b6100b6610477565b6101576004803603604081101561024957600080fd5b506001600160a01b0381351690602001356104d8565b6101576004803603604081101561027557600080fd5b506001600160a01b038135169060200135610546565b610173600480360360408110156102a157600080fd5b506001600160a01b038135811691602001351661055a565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b820191906000526020600020905b81548152906001019060200180831161032857829003601f168201915b5050505050905090565b600061036361035c610585565b8484610589565b50600192915050565b60025490565b600061037f848484610675565b6103f58461038b610585565b6103f085604051806060016040528060288152602001610935602891396001600160a01b038a166000908152600160205260408120906103c9610585565b6001600160a01b03168152602081019190915260400160002054919063ffffffff6107d116565b610589565b5060019392505050565b60055460ff1690565b6000610363610415610585565b846103f08560016000610426610585565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff61086816565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b60006103636104e5610585565b846103f0856040518060600160405280602581526020016109a6602591396001600061050f610585565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff6107d116565b6000610363610553610585565b8484610675565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166105ce5760405162461bcd60e51b81526004018080602001828103825260248152602001806109826024913960400191505060405180910390fd5b6001600160a01b0382166106135760405162461bcd60e51b81526004018080602001828103825260228152602001806108ed6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106ba5760405162461bcd60e51b815260040180806020018281038252602581526020018061095d6025913960400191505060405180910390fd5b6001600160a01b0382166106ff5760405162461bcd60e51b81526004018080602001828103825260238152602001806108ca6023913960400191505060405180910390fd5b6107428160405180606001604052806026815260200161090f602691396001600160a01b038616600090815260208190526040902054919063ffffffff6107d116565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610777908263ffffffff61086816565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108605760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561082557818101518382015260200161080d565b50505050905090810190601f1680156108525780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156108c2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820400cda7af9902f63040ee45efc8428101d379b51a2519c0659d35603e429c02464736f6c634300050f0032" - -// DeployERC20Template deploys a new Ethereum contract, binding an instance of ERC20Template to it. -func DeployERC20Template(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20Template, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20TemplateABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20TemplateBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ERC20Template{ERC20TemplateCaller: ERC20TemplateCaller{contract: contract}, ERC20TemplateTransactor: ERC20TemplateTransactor{contract: contract}, ERC20TemplateFilterer: ERC20TemplateFilterer{contract: contract}}, nil -} - -// ERC20Template is an auto generated Go binding around an Ethereum contract. -type ERC20Template struct { - ERC20TemplateCaller // Read-only binding to the contract - ERC20TemplateTransactor // Write-only binding to the contract - ERC20TemplateFilterer // Log filterer for contract events -} - -// ERC20TemplateCaller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20TemplateCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20TemplateTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20TemplateTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20TemplateFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20TemplateFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20TemplateSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20TemplateSession struct { - Contract *ERC20Template // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20TemplateCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20TemplateCallerSession struct { - Contract *ERC20TemplateCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20TemplateTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20TemplateTransactorSession struct { - Contract *ERC20TemplateTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20TemplateRaw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20TemplateRaw struct { - Contract *ERC20Template // Generic contract binding to access the raw methods on -} - -// ERC20TemplateCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20TemplateCallerRaw struct { - Contract *ERC20TemplateCaller // Generic read-only contract binding to access the raw methods on -} - -// ERC20TemplateTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20TemplateTransactorRaw struct { - Contract *ERC20TemplateTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20Template creates a new instance of ERC20Template, bound to a specific deployed contract. -func NewERC20Template(address common.Address, backend bind.ContractBackend) (*ERC20Template, error) { - contract, err := bindERC20Template(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20Template{ERC20TemplateCaller: ERC20TemplateCaller{contract: contract}, ERC20TemplateTransactor: ERC20TemplateTransactor{contract: contract}, ERC20TemplateFilterer: ERC20TemplateFilterer{contract: contract}}, nil -} - -// NewERC20TemplateCaller creates a new read-only instance of ERC20Template, bound to a specific deployed contract. -func NewERC20TemplateCaller(address common.Address, caller bind.ContractCaller) (*ERC20TemplateCaller, error) { - contract, err := bindERC20Template(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20TemplateCaller{contract: contract}, nil -} - -// NewERC20TemplateTransactor creates a new write-only instance of ERC20Template, bound to a specific deployed contract. -func NewERC20TemplateTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20TemplateTransactor, error) { - contract, err := bindERC20Template(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20TemplateTransactor{contract: contract}, nil -} - -// NewERC20TemplateFilterer creates a new log filterer instance of ERC20Template, bound to a specific deployed contract. -func NewERC20TemplateFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20TemplateFilterer, error) { - contract, err := bindERC20Template(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20TemplateFilterer{contract: contract}, nil -} - -// bindERC20Template binds a generic wrapper to an already deployed contract. -func bindERC20Template(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20TemplateABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20Template *ERC20TemplateRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20Template.Contract.ERC20TemplateCaller.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 (_ERC20Template *ERC20TemplateRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Template.Contract.ERC20TemplateTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Template *ERC20TemplateRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Template.Contract.ERC20TemplateTransactor.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 (_ERC20Template *ERC20TemplateCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20Template.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 (_ERC20Template *ERC20TemplateTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Template.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Template *ERC20TemplateTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Template.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Template *ERC20TemplateCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Template.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Template *ERC20TemplateSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20Template.Contract.Allowance(&_ERC20Template.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Template *ERC20TemplateCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20Template.Contract.Allowance(&_ERC20Template.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Template *ERC20TemplateCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Template.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Template *ERC20TemplateSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20Template.Contract.BalanceOf(&_ERC20Template.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Template *ERC20TemplateCallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20Template.Contract.BalanceOf(&_ERC20Template.CallOpts, account) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Template *ERC20TemplateCaller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _ERC20Template.contract.Call(opts, out, "decimals") - return *ret0, err -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Template *ERC20TemplateSession) Decimals() (uint8, error) { - return _ERC20Template.Contract.Decimals(&_ERC20Template.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Template *ERC20TemplateCallerSession) Decimals() (uint8, error) { - return _ERC20Template.Contract.Decimals(&_ERC20Template.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Template *ERC20TemplateCaller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20Template.contract.Call(opts, out, "name") - return *ret0, err -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Template *ERC20TemplateSession) Name() (string, error) { - return _ERC20Template.Contract.Name(&_ERC20Template.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Template *ERC20TemplateCallerSession) Name() (string, error) { - return _ERC20Template.Contract.Name(&_ERC20Template.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Template *ERC20TemplateCaller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20Template.contract.Call(opts, out, "symbol") - return *ret0, err -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Template *ERC20TemplateSession) Symbol() (string, error) { - return _ERC20Template.Contract.Symbol(&_ERC20Template.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Template *ERC20TemplateCallerSession) Symbol() (string, error) { - return _ERC20Template.Contract.Symbol(&_ERC20Template.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Template *ERC20TemplateCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Template.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Template *ERC20TemplateSession) TotalSupply() (*big.Int, error) { - return _ERC20Template.Contract.TotalSupply(&_ERC20Template.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Template *ERC20TemplateCallerSession) TotalSupply() (*big.Int, error) { - return _ERC20Template.Contract.TotalSupply(&_ERC20Template.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Template *ERC20TemplateTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Template.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Template *ERC20TemplateSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Template.Contract.Approve(&_ERC20Template.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Template *ERC20TemplateTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Template.Contract.Approve(&_ERC20Template.TransactOpts, spender, amount) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20Template *ERC20TemplateTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20Template.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20Template *ERC20TemplateSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20Template.Contract.DecreaseAllowance(&_ERC20Template.TransactOpts, spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20Template *ERC20TemplateTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20Template.Contract.DecreaseAllowance(&_ERC20Template.TransactOpts, spender, subtractedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20Template *ERC20TemplateTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20Template.contract.Transact(opts, "increaseAllowance", spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20Template *ERC20TemplateSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20Template.Contract.IncreaseAllowance(&_ERC20Template.TransactOpts, spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20Template *ERC20TemplateTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20Template.Contract.IncreaseAllowance(&_ERC20Template.TransactOpts, spender, addedValue) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Template *ERC20TemplateTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Template.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Template *ERC20TemplateSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Template.Contract.Transfer(&_ERC20Template.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Template *ERC20TemplateTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Template.Contract.Transfer(&_ERC20Template.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Template *ERC20TemplateTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Template.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Template *ERC20TemplateSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Template.Contract.TransferFrom(&_ERC20Template.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Template *ERC20TemplateTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Template.Contract.TransferFrom(&_ERC20Template.TransactOpts, sender, recipient, amount) -} - -// ERC20TemplateApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20Template contract. -type ERC20TemplateApprovalIterator struct { - Event *ERC20TemplateApproval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20TemplateApprovalIterator) 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(ERC20TemplateApproval) - 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(ERC20TemplateApproval) - 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 *ERC20TemplateApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20TemplateApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20TemplateApproval represents a Approval event raised by the ERC20Template contract. -type ERC20TemplateApproval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Template *ERC20TemplateFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20TemplateApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20Template.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC20TemplateApprovalIterator{contract: _ERC20Template.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Template *ERC20TemplateFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20TemplateApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20Template.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20TemplateApproval) - if err := _ERC20Template.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Template *ERC20TemplateFilterer) ParseApproval(log types.Log) (*ERC20TemplateApproval, error) { - event := new(ERC20TemplateApproval) - if err := _ERC20Template.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20TemplateTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20Template contract. -type ERC20TemplateTransferIterator struct { - Event *ERC20TemplateTransfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20TemplateTransferIterator) 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(ERC20TemplateTransfer) - 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(ERC20TemplateTransfer) - 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 *ERC20TemplateTransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20TemplateTransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20TemplateTransfer represents a Transfer event raised by the ERC20Template contract. -type ERC20TemplateTransfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Template *ERC20TemplateFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TemplateTransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20Template.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC20TemplateTransferIterator{contract: _ERC20Template.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Template *ERC20TemplateFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20TemplateTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20Template.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20TemplateTransfer) - if err := _ERC20Template.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Template *ERC20TemplateFilterer) ParseTransfer(log types.Log) (*ERC20TemplateTransfer, error) { - event := new(ERC20TemplateTransfer) - if err := _ERC20Template.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// IERC20ABI is the input ABI used to generate the binding from. -const IERC20ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// IERC20FuncSigs maps the 4-byte function signature to its string representation. -var IERC20FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// IERC20 is an auto generated Go binding around an Ethereum contract. -type IERC20 struct { - IERC20Caller // Read-only binding to the contract - IERC20Transactor // Write-only binding to the contract - IERC20Filterer // Log filterer for contract events -} - -// IERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type IERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type IERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IERC20Session struct { - Contract *IERC20 // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IERC20CallerSession struct { - Contract *IERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IERC20TransactorSession struct { - Contract *IERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type IERC20Raw struct { - Contract *IERC20 // Generic contract binding to access the raw methods on -} - -// IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IERC20CallerRaw struct { - Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IERC20TransactorRaw struct { - Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract. -func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) { - contract, err := bindIERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil -} - -// NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract. -func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) { - contract, err := bindIERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IERC20Caller{contract: contract}, nil -} - -// NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract. -func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) { - contract, err := bindIERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IERC20Transactor{contract: contract}, nil -} - -// NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract. -func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) { - contract, err := bindIERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IERC20Filterer{contract: contract}, nil -} - -// bindIERC20 binds a generic wrapper to an already deployed contract. -func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IERC20ABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IERC20.Contract.IERC20Caller.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 (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IERC20.Contract.IERC20Transactor.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 (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IERC20.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 (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IERC20.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) { - return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) { - return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) -} - -// IERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20 contract. -type IERC20ApprovalIterator struct { - Event *IERC20Approval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *IERC20ApprovalIterator) 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(IERC20Approval) - 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(IERC20Approval) - 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 *IERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IERC20Approval represents a Approval event raised by the IERC20 contract. -type IERC20Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &IERC20ApprovalIterator{contract: _IERC20.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _IERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(IERC20Approval) - if err := _IERC20.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) { - event := new(IERC20Approval) - if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// IERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20 contract. -type IERC20TransferIterator struct { - Event *IERC20Transfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *IERC20TransferIterator) 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(IERC20Transfer) - 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(IERC20Transfer) - 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 *IERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IERC20Transfer represents a Transfer event raised by the IERC20 contract. -type IERC20Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &IERC20TransferIterator{contract: _IERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _IERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(IERC20Transfer) - if err := _IERC20.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) { - event := new(IERC20Transfer) - if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// IEthCrossChainManagerProxyABI is the input ABI used to generate the binding from. -const IEthCrossChainManagerProxyABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"getEthCrossChainManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" - -// IEthCrossChainManagerProxyFuncSigs maps the 4-byte function signature to its string representation. -var IEthCrossChainManagerProxyFuncSigs = map[string]string{ - "87939a7f": "getEthCrossChainManager()", -} - -// IEthCrossChainManagerProxy is an auto generated Go binding around an Ethereum contract. -type IEthCrossChainManagerProxy struct { - IEthCrossChainManagerProxyCaller // Read-only binding to the contract - IEthCrossChainManagerProxyTransactor // Write-only binding to the contract - IEthCrossChainManagerProxyFilterer // Log filterer for contract events -} - -// IEthCrossChainManagerProxyCaller is an auto generated read-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerProxyTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerProxyFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IEthCrossChainManagerProxyFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerProxySession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IEthCrossChainManagerProxySession struct { - Contract *IEthCrossChainManagerProxy // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainManagerProxyCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IEthCrossChainManagerProxyCallerSession struct { - Contract *IEthCrossChainManagerProxyCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IEthCrossChainManagerProxyTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IEthCrossChainManagerProxyTransactorSession struct { - Contract *IEthCrossChainManagerProxyTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainManagerProxyRaw is an auto generated low-level Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyRaw struct { - Contract *IEthCrossChainManagerProxy // Generic contract binding to access the raw methods on -} - -// IEthCrossChainManagerProxyCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyCallerRaw struct { - Contract *IEthCrossChainManagerProxyCaller // Generic read-only contract binding to access the raw methods on -} - -// IEthCrossChainManagerProxyTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyTransactorRaw struct { - Contract *IEthCrossChainManagerProxyTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewIEthCrossChainManagerProxy creates a new instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxy(address common.Address, backend bind.ContractBackend) (*IEthCrossChainManagerProxy, error) { - contract, err := bindIEthCrossChainManagerProxy(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxy{IEthCrossChainManagerProxyCaller: IEthCrossChainManagerProxyCaller{contract: contract}, IEthCrossChainManagerProxyTransactor: IEthCrossChainManagerProxyTransactor{contract: contract}, IEthCrossChainManagerProxyFilterer: IEthCrossChainManagerProxyFilterer{contract: contract}}, nil -} - -// NewIEthCrossChainManagerProxyCaller creates a new read-only instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxyCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainManagerProxyCaller, error) { - contract, err := bindIEthCrossChainManagerProxy(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxyCaller{contract: contract}, nil -} - -// NewIEthCrossChainManagerProxyTransactor creates a new write-only instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainManagerProxyTransactor, error) { - contract, err := bindIEthCrossChainManagerProxy(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxyTransactor{contract: contract}, nil -} - -// NewIEthCrossChainManagerProxyFilterer creates a new log filterer instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainManagerProxyFilterer, error) { - contract, err := bindIEthCrossChainManagerProxy(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxyFilterer{contract: contract}, nil -} - -// bindIEthCrossChainManagerProxy binds a generic wrapper to an already deployed contract. -func bindIEthCrossChainManagerProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IEthCrossChainManagerProxyABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyCaller.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyTransactor.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainManagerProxy.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCaller) GetEthCrossChainManager(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _IEthCrossChainManagerProxy.contract.Call(opts, out, "getEthCrossChainManager") - return *ret0, err -} - -// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. -// -// Solidity: function getEthCrossChainManager() view returns(address) -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxySession) GetEthCrossChainManager() (common.Address, error) { - return _IEthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_IEthCrossChainManagerProxy.CallOpts) -} - -// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. -// -// Solidity: function getEthCrossChainManager() view returns(address) -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCallerSession) GetEthCrossChainManager() (common.Address, error) { - return _IEthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_IEthCrossChainManagerProxy.CallOpts) -} - -// SafeMathABI is the input ABI used to generate the binding from. -const SafeMathABI = "[]" - -// SafeMathBin is the compiled bytecode used for deploying new contracts. -var SafeMathBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820db757905f1c1b49b781ddf45e615d2bbf336aeac8bb9ae61ed6fca08e24c7dc364736f6c634300050f0032" - -// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. -func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// SafeMath is an auto generated Go binding around an Ethereum contract. -type SafeMath struct { - SafeMathCaller // Read-only binding to the contract - SafeMathTransactor // Write-only binding to the contract - SafeMathFilterer // Log filterer for contract events -} - -// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. -type SafeMathCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SafeMathTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SafeMathFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SafeMathSession struct { - Contract *SafeMath // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SafeMathCallerSession struct { - Contract *SafeMathCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SafeMathTransactorSession struct { - Contract *SafeMathTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. -type SafeMathRaw struct { - Contract *SafeMath // Generic contract binding to access the raw methods on -} - -// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SafeMathCallerRaw struct { - Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on -} - -// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SafeMathTransactorRaw struct { - Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. -func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { - contract, err := bindSafeMath(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { - contract, err := bindSafeMath(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SafeMathCaller{contract: contract}, nil -} - -// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { - contract, err := bindSafeMath(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SafeMathTransactor{contract: contract}, nil -} - -// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { - contract, err := bindSafeMath(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SafeMathFilterer{contract: contract}, nil -} - -// bindSafeMath binds a generic wrapper to an already deployed contract. -func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transact(opts, method, params...) -} diff --git a/chains/eth/abi/lockproxy/lock_proxy.go b/chains/eth/abi/lockproxy/lock_proxy.go deleted file mode 100644 index 401ac1f..0000000 --- a/chains/eth/abi/lockproxy/lock_proxy.go +++ /dev/null @@ -1,2474 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package lock_proxy - -import ( - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// ContextABI is the input ABI used to generate the binding from. -const ContextABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" - -// Context is an auto generated Go binding around an Ethereum contract. -type Context struct { - ContextCaller // Read-only binding to the contract - ContextTransactor // Write-only binding to the contract - ContextFilterer // Log filterer for contract events -} - -// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. -type ContextCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ContextTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ContextFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ContextSession struct { - Contract *Context // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ContextCallerSession struct { - Contract *ContextCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ContextTransactorSession struct { - Contract *ContextTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. -type ContextRaw struct { - Contract *Context // Generic contract binding to access the raw methods on -} - -// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ContextCallerRaw struct { - Contract *ContextCaller // Generic read-only contract binding to access the raw methods on -} - -// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ContextTransactorRaw struct { - Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewContext creates a new instance of Context, bound to a specific deployed contract. -func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { - contract, err := bindContext(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil -} - -// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. -func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { - contract, err := bindContext(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ContextCaller{contract: contract}, nil -} - -// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. -func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { - contract, err := bindContext(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ContextTransactor{contract: contract}, nil -} - -// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. -func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { - contract, err := bindContext(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ContextFilterer{contract: contract}, nil -} - -// bindContext binds a generic wrapper to an already deployed contract. -func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ContextABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.Contract.ContextCaller.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 (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.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 (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.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 (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.contract.Transact(opts, method, params...) -} - -// ERC20InterfaceABI is the input ABI used to generate the binding from. -const ERC20InterfaceABI = "[{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20InterfaceFuncSigs maps the 4-byte function signature to its string representation. -var ERC20InterfaceFuncSigs = map[string]string{ - "70a08231": "balanceOf(address)", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20Interface is an auto generated Go binding around an Ethereum contract. -type ERC20Interface struct { - ERC20InterfaceCaller // Read-only binding to the contract - ERC20InterfaceTransactor // Write-only binding to the contract - ERC20InterfaceFilterer // Log filterer for contract events -} - -// ERC20InterfaceCaller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20InterfaceCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20InterfaceTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20InterfaceTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20InterfaceFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20InterfaceFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20InterfaceSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20InterfaceSession struct { - Contract *ERC20Interface // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20InterfaceCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20InterfaceCallerSession struct { - Contract *ERC20InterfaceCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20InterfaceTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20InterfaceTransactorSession struct { - Contract *ERC20InterfaceTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20InterfaceRaw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20InterfaceRaw struct { - Contract *ERC20Interface // Generic contract binding to access the raw methods on -} - -// ERC20InterfaceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20InterfaceCallerRaw struct { - Contract *ERC20InterfaceCaller // Generic read-only contract binding to access the raw methods on -} - -// ERC20InterfaceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20InterfaceTransactorRaw struct { - Contract *ERC20InterfaceTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20Interface creates a new instance of ERC20Interface, bound to a specific deployed contract. -func NewERC20Interface(address common.Address, backend bind.ContractBackend) (*ERC20Interface, error) { - contract, err := bindERC20Interface(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20Interface{ERC20InterfaceCaller: ERC20InterfaceCaller{contract: contract}, ERC20InterfaceTransactor: ERC20InterfaceTransactor{contract: contract}, ERC20InterfaceFilterer: ERC20InterfaceFilterer{contract: contract}}, nil -} - -// NewERC20InterfaceCaller creates a new read-only instance of ERC20Interface, bound to a specific deployed contract. -func NewERC20InterfaceCaller(address common.Address, caller bind.ContractCaller) (*ERC20InterfaceCaller, error) { - contract, err := bindERC20Interface(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20InterfaceCaller{contract: contract}, nil -} - -// NewERC20InterfaceTransactor creates a new write-only instance of ERC20Interface, bound to a specific deployed contract. -func NewERC20InterfaceTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20InterfaceTransactor, error) { - contract, err := bindERC20Interface(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20InterfaceTransactor{contract: contract}, nil -} - -// NewERC20InterfaceFilterer creates a new log filterer instance of ERC20Interface, bound to a specific deployed contract. -func NewERC20InterfaceFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20InterfaceFilterer, error) { - contract, err := bindERC20Interface(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20InterfaceFilterer{contract: contract}, nil -} - -// bindERC20Interface binds a generic wrapper to an already deployed contract. -func bindERC20Interface(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20InterfaceABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20Interface *ERC20InterfaceRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20Interface.Contract.ERC20InterfaceCaller.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 (_ERC20Interface *ERC20InterfaceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Interface.Contract.ERC20InterfaceTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Interface *ERC20InterfaceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Interface.Contract.ERC20InterfaceTransactor.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 (_ERC20Interface *ERC20InterfaceCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20Interface.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 (_ERC20Interface *ERC20InterfaceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Interface.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Interface *ERC20InterfaceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Interface.Contract.contract.Transact(opts, method, params...) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Interface *ERC20InterfaceCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Interface.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Interface *ERC20InterfaceSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20Interface.Contract.BalanceOf(&_ERC20Interface.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Interface *ERC20InterfaceCallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20Interface.Contract.BalanceOf(&_ERC20Interface.CallOpts, account) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address _to, uint256 _value) returns(bool) -func (_ERC20Interface *ERC20InterfaceTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { - return _ERC20Interface.contract.Transact(opts, "transfer", _to, _value) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address _to, uint256 _value) returns(bool) -func (_ERC20Interface *ERC20InterfaceSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { - return _ERC20Interface.Contract.Transfer(&_ERC20Interface.TransactOpts, _to, _value) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address _to, uint256 _value) returns(bool) -func (_ERC20Interface *ERC20InterfaceTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { - return _ERC20Interface.Contract.Transfer(&_ERC20Interface.TransactOpts, _to, _value) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success) -func (_ERC20Interface *ERC20InterfaceTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { - return _ERC20Interface.contract.Transact(opts, "transferFrom", _from, _to, _value) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success) -func (_ERC20Interface *ERC20InterfaceSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { - return _ERC20Interface.Contract.TransferFrom(&_ERC20Interface.TransactOpts, _from, _to, _value) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success) -func (_ERC20Interface *ERC20InterfaceTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { - return _ERC20Interface.Contract.TransferFrom(&_ERC20Interface.TransactOpts, _from, _to, _value) -} - -// IEthCrossChainManagerABI is the input ABI used to generate the binding from. -const IEthCrossChainManagerABI = "[{\"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\"}]" - -// IEthCrossChainManagerFuncSigs maps the 4-byte function signature to its string representation. -var IEthCrossChainManagerFuncSigs = map[string]string{ - "bd5cf625": "crossChain(uint64,bytes,bytes,bytes)", -} - -// IEthCrossChainManager is an auto generated Go binding around an Ethereum contract. -type IEthCrossChainManager struct { - IEthCrossChainManagerCaller // Read-only binding to the contract - IEthCrossChainManagerTransactor // Write-only binding to the contract - IEthCrossChainManagerFilterer // Log filterer for contract events -} - -// IEthCrossChainManagerCaller is an auto generated read-only Go binding around an Ethereum contract. -type IEthCrossChainManagerCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IEthCrossChainManagerTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IEthCrossChainManagerFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IEthCrossChainManagerSession struct { - Contract *IEthCrossChainManager // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainManagerCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IEthCrossChainManagerCallerSession struct { - Contract *IEthCrossChainManagerCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IEthCrossChainManagerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IEthCrossChainManagerTransactorSession struct { - Contract *IEthCrossChainManagerTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainManagerRaw is an auto generated low-level Go binding around an Ethereum contract. -type IEthCrossChainManagerRaw struct { - Contract *IEthCrossChainManager // Generic contract binding to access the raw methods on -} - -// IEthCrossChainManagerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IEthCrossChainManagerCallerRaw struct { - Contract *IEthCrossChainManagerCaller // Generic read-only contract binding to access the raw methods on -} - -// IEthCrossChainManagerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IEthCrossChainManagerTransactorRaw struct { - Contract *IEthCrossChainManagerTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewIEthCrossChainManager creates a new instance of IEthCrossChainManager, bound to a specific deployed contract. -func NewIEthCrossChainManager(address common.Address, backend bind.ContractBackend) (*IEthCrossChainManager, error) { - contract, err := bindIEthCrossChainManager(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IEthCrossChainManager{IEthCrossChainManagerCaller: IEthCrossChainManagerCaller{contract: contract}, IEthCrossChainManagerTransactor: IEthCrossChainManagerTransactor{contract: contract}, IEthCrossChainManagerFilterer: IEthCrossChainManagerFilterer{contract: contract}}, nil -} - -// NewIEthCrossChainManagerCaller creates a new read-only instance of IEthCrossChainManager, bound to a specific deployed contract. -func NewIEthCrossChainManagerCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainManagerCaller, error) { - contract, err := bindIEthCrossChainManager(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerCaller{contract: contract}, nil -} - -// NewIEthCrossChainManagerTransactor creates a new write-only instance of IEthCrossChainManager, bound to a specific deployed contract. -func NewIEthCrossChainManagerTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainManagerTransactor, error) { - contract, err := bindIEthCrossChainManager(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerTransactor{contract: contract}, nil -} - -// NewIEthCrossChainManagerFilterer creates a new log filterer instance of IEthCrossChainManager, bound to a specific deployed contract. -func NewIEthCrossChainManagerFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainManagerFilterer, error) { - contract, err := bindIEthCrossChainManager(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerFilterer{contract: contract}, nil -} - -// bindIEthCrossChainManager binds a generic wrapper to an already deployed contract. -func bindIEthCrossChainManager(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IEthCrossChainManagerABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IEthCrossChainManager *IEthCrossChainManagerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainManager.Contract.IEthCrossChainManagerCaller.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 (_IEthCrossChainManager *IEthCrossChainManagerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.IEthCrossChainManagerTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainManager *IEthCrossChainManagerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.IEthCrossChainManagerTransactor.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 (_IEthCrossChainManager *IEthCrossChainManagerCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainManager.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 (_IEthCrossChainManager *IEthCrossChainManagerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainManager *IEthCrossChainManagerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.contract.Transact(opts, method, params...) -} - -// 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 (_IEthCrossChainManager *IEthCrossChainManagerTransactor) CrossChain(opts *bind.TransactOpts, _toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { - return _IEthCrossChainManager.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 (_IEthCrossChainManager *IEthCrossChainManagerSession) CrossChain(_toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.CrossChain(&_IEthCrossChainManager.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 (_IEthCrossChainManager *IEthCrossChainManagerTransactorSession) CrossChain(_toChainId uint64, _toContract []byte, _method []byte, _txData []byte) (*types.Transaction, error) { - return _IEthCrossChainManager.Contract.CrossChain(&_IEthCrossChainManager.TransactOpts, _toChainId, _toContract, _method, _txData) -} - -// IEthCrossChainManagerProxyABI is the input ABI used to generate the binding from. -const IEthCrossChainManagerProxyABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"getEthCrossChainManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" - -// IEthCrossChainManagerProxyFuncSigs maps the 4-byte function signature to its string representation. -var IEthCrossChainManagerProxyFuncSigs = map[string]string{ - "87939a7f": "getEthCrossChainManager()", -} - -// IEthCrossChainManagerProxy is an auto generated Go binding around an Ethereum contract. -type IEthCrossChainManagerProxy struct { - IEthCrossChainManagerProxyCaller // Read-only binding to the contract - IEthCrossChainManagerProxyTransactor // Write-only binding to the contract - IEthCrossChainManagerProxyFilterer // Log filterer for contract events -} - -// IEthCrossChainManagerProxyCaller is an auto generated read-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerProxyTransactor is an auto generated write-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerProxyFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IEthCrossChainManagerProxyFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IEthCrossChainManagerProxySession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IEthCrossChainManagerProxySession struct { - Contract *IEthCrossChainManagerProxy // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainManagerProxyCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IEthCrossChainManagerProxyCallerSession struct { - Contract *IEthCrossChainManagerProxyCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IEthCrossChainManagerProxyTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IEthCrossChainManagerProxyTransactorSession struct { - Contract *IEthCrossChainManagerProxyTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IEthCrossChainManagerProxyRaw is an auto generated low-level Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyRaw struct { - Contract *IEthCrossChainManagerProxy // Generic contract binding to access the raw methods on -} - -// IEthCrossChainManagerProxyCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyCallerRaw struct { - Contract *IEthCrossChainManagerProxyCaller // Generic read-only contract binding to access the raw methods on -} - -// IEthCrossChainManagerProxyTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IEthCrossChainManagerProxyTransactorRaw struct { - Contract *IEthCrossChainManagerProxyTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewIEthCrossChainManagerProxy creates a new instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxy(address common.Address, backend bind.ContractBackend) (*IEthCrossChainManagerProxy, error) { - contract, err := bindIEthCrossChainManagerProxy(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxy{IEthCrossChainManagerProxyCaller: IEthCrossChainManagerProxyCaller{contract: contract}, IEthCrossChainManagerProxyTransactor: IEthCrossChainManagerProxyTransactor{contract: contract}, IEthCrossChainManagerProxyFilterer: IEthCrossChainManagerProxyFilterer{contract: contract}}, nil -} - -// NewIEthCrossChainManagerProxyCaller creates a new read-only instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxyCaller(address common.Address, caller bind.ContractCaller) (*IEthCrossChainManagerProxyCaller, error) { - contract, err := bindIEthCrossChainManagerProxy(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxyCaller{contract: contract}, nil -} - -// NewIEthCrossChainManagerProxyTransactor creates a new write-only instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*IEthCrossChainManagerProxyTransactor, error) { - contract, err := bindIEthCrossChainManagerProxy(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxyTransactor{contract: contract}, nil -} - -// NewIEthCrossChainManagerProxyFilterer creates a new log filterer instance of IEthCrossChainManagerProxy, bound to a specific deployed contract. -func NewIEthCrossChainManagerProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*IEthCrossChainManagerProxyFilterer, error) { - contract, err := bindIEthCrossChainManagerProxy(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IEthCrossChainManagerProxyFilterer{contract: contract}, nil -} - -// bindIEthCrossChainManagerProxy binds a generic wrapper to an already deployed contract. -func bindIEthCrossChainManagerProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IEthCrossChainManagerProxyABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyCaller.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.Contract.IEthCrossChainManagerProxyTransactor.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IEthCrossChainManagerProxy.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IEthCrossChainManagerProxy.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 (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCaller) GetEthCrossChainManager(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _IEthCrossChainManagerProxy.contract.Call(opts, out, "getEthCrossChainManager") - return *ret0, err -} - -// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. -// -// Solidity: function getEthCrossChainManager() view returns(address) -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxySession) GetEthCrossChainManager() (common.Address, error) { - return _IEthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_IEthCrossChainManagerProxy.CallOpts) -} - -// GetEthCrossChainManager is a free data retrieval call binding the contract method 0x87939a7f. -// -// Solidity: function getEthCrossChainManager() view returns(address) -func (_IEthCrossChainManagerProxy *IEthCrossChainManagerProxyCallerSession) GetEthCrossChainManager() (common.Address, error) { - return _IEthCrossChainManagerProxy.Contract.GetEthCrossChainManager(&_IEthCrossChainManagerProxy.CallOpts) -} - -// LockProxyABI is the input ABI used to generate the binding from. -const LockProxyABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fromAssetHash\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"targetProxyHash\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialAmount\",\"type\":\"uint256\"}],\"name\":\"BindAssetEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"targetProxyHash\",\"type\":\"bytes\"}],\"name\":\"BindProxyEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fromAssetHash\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fromAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"toAssetHash\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"toAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"LockEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"manager\",\"type\":\"address\"}],\"name\":\"SetManagerProxyEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"toAssetHash\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnlockEvent\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"assetHashMap\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"fromAssetHash\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"toAssetHash\",\"type\":\"bytes\"}],\"name\":\"bindAssetHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"targetProxyHash\",\"type\":\"bytes\"}],\"name\":\"bindProxyHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"fromAssetHash\",\"type\":\"address\"}],\"name\":\"getBalanceFor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"fromAssetHash\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"toChainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"lock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"managerProxyContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"operator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"proxyHashMap\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"ethCCMProxyAddr\",\"type\":\"address\"}],\"name\":\"setManagerProxy\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"argsBs\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"fromContractAddr\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"fromChainId\",\"type\":\"uint64\"}],\"name\":\"unlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// LockProxyFuncSigs maps the 4-byte function signature to its string representation. -var LockProxyFuncSigs = map[string]string{ - "4f7d9808": "assetHashMap(address,uint64)", - "3348f63b": "bindAssetHash(address,uint64,bytes)", - "379b98f6": "bindProxyHash(uint64,bytes)", - "59c589a1": "getBalanceFor(address)", - "84a6d055": "lock(address,uint64,bytes,uint256)", - "d798f881": "managerProxyContract()", - "570ca735": "operator()", - "9e5767aa": "proxyHashMap(uint64)", - "af9980f0": "setManagerProxy(address)", - "06af4b9f": "unlock(bytes,bytes,uint64)", -} - -// LockProxyBin is the compiled bytecode used for deploying new contracts. -var LockProxyBin = "0x608060405234801561001057600080fd5b506100226001600160e01b0361004716565b600080546001600160a01b0319166001600160a01b039290921691909117905561004b565b3390565b6123ea8061005a6000396000f3fe6080604052600436106100915760003560e01c806359c589a11161005957806359c589a11461046357806384a6d055146104a85780639e5767aa1461056c578063af9980f01461059f578063d798f881146105d457610091565b806306af4b9f146100965780633348f63b146101eb578063379b98f6146102ba5780634f7d98081461037b578063570ca73514610432575b600080fd5b3480156100a257600080fd5b506101d7600480360360608110156100b957600080fd5b810190602081018135600160201b8111156100d357600080fd5b8201836020820111156100e557600080fd5b803590602001918460018302840111600160201b8311171561010657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561015857600080fd5b82018360208201111561016a57600080fd5b803590602001918460018302840111600160201b8311171561018b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160401b031691506105e99050565b604080519115158252519081900360200190f35b3480156101f757600080fd5b506101d76004803603606081101561020e57600080fd5b6001600160a01b03823516916001600160401b0360208201351691810190606081016040820135600160201b81111561024657600080fd5b82018360208201111561025857600080fd5b803590602001918460018302840111600160201b8311171561027957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506108da945050505050565b3480156102c657600080fd5b506101d7600480360360408110156102dd57600080fd5b6001600160401b038235169190810190604081016020820135600160201b81111561030757600080fd5b82018360208201111561031957600080fd5b803590602001918460018302840111600160201b8311171561033a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610a24945050505050565b34801561038757600080fd5b506103bd6004803603604081101561039e57600080fd5b5080356001600160a01b031690602001356001600160401b0316610b32565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103f75781810151838201526020016103df565b50505050905090810190601f1680156104245780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561043e57600080fd5b50610447610bd6565b604080516001600160a01b039092168252519081900360200190f35b34801561046f57600080fd5b506104966004803603602081101561048657600080fd5b50356001600160a01b0316610be5565b60408051918252519081900360200190f35b6101d7600480360360808110156104be57600080fd5b6001600160a01b03823516916001600160401b0360208201351691810190606081016040820135600160201b8111156104f657600080fd5b82018360208201111561050857600080fd5b803590602001918460018302840111600160201b8311171561052957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610c80915050565b34801561057857600080fd5b506103bd6004803603602081101561058f57600080fd5b50356001600160401b03166112aa565b3480156105ab57600080fd5b506105d2600480360360208110156105c257600080fd5b50356001600160a01b0316611310565b005b3480156105e057600080fd5b50610447611391565b600154604080516387939a7f60e01b815290516000926001600160a01b03169182916387939a7f91600480820192602092909190829003018186803b15801561063157600080fd5b505afa158015610645573d6000803e3d6000fd5b505050506040513d602081101561065b57600080fd5b50516001600160a01b031661066e6113a0565b6001600160a01b0316146106b35760405162461bcd60e51b815260040180806020018281038252602d8152602001806122a5602d913960400191505060405180910390fd5b6106bb612159565b6106c4866113a5565b905060008551116107065760405162461bcd60e51b815260040180806020018281038252602b8152602001806122d2602b913960400191505060405180910390fd5b6001600160401b038416600090815260026020526040902061072890866113f1565b6107635760405162461bcd60e51b81526004018080602001828103825260228152602001806123946022913960400191505060405180910390fd5b8051516107b7576040805162461bcd60e51b815260206004820152601b60248201527f746f4173736574486173682063616e6e6f7420626520656d7074790000000000604482015290519081900360640190fd5b60006107c682600001516114a5565b9050600082602001515111610822576040805162461bcd60e51b815260206004820152601960248201527f746f416464726573732063616e6e6f7420626520656d70747900000000000000604482015290519081900360640190fd5b600061083183602001516114a5565b9050610842828285604001516114ef565b61087d5760405162461bcd60e51b815260040180806020018281038252603c815260200180612269603c913960400191505060405180910390fd5b60408084015181516001600160a01b038086168252841660208201528083019190915290517fd90288730b87c2b8e0c45bd82260fd22478aba30ae1c4d578b8daba9261604df9181900360600190a1506001979650505050505050565b600080546001600160a01b03166108ef6113a0565b6001600160a01b03161461090257600080fd5b6001600160a01b03841660009081526003602090815260408083206001600160401b03871684528252909120835161093c9285019061217a565b507f1628c8374c1bdfeb2275fd9f4c90562fd3fae974783dc522c8234e36abcfc58e84848461096a88610be5565b60405180856001600160a01b03166001600160a01b03168152602001846001600160401b03166001600160401b0316815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b838110156109dd5781810151838201526020016109c5565b50505050905090810190601f168015610a0a5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a15060019392505050565b600080546001600160a01b0316610a396113a0565b6001600160a01b031614610a4c57600080fd5b6001600160401b03831660009081526002602090815260409091208351610a759285019061217a565b507fdacd7d303272a3b58aec6620d6d1fb588f4996a5b46858ed437f1c34348f2d0f838360405180836001600160401b03166001600160401b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610aee578181015183820152602001610ad6565b50505050905090810190601f168015610b1b5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a150600192915050565b60036020908152600092835260408084208252918352918190208054825160026001831615610100026000190190921691909104601f810185900485028201850190935282815292909190830182828015610bce5780601f10610ba357610100808354040283529160200191610bce565b820191906000526020600020905b815481529060010190602001808311610bb157829003601f168201915b505050505081565b6000546001600160a01b031681565b60006001600160a01b038216610bfd57503031610c7b565b604080516370a0823160e01b8152306004820152905183916001600160a01b038316916370a0823191602480820192602092909190829003018186803b158015610c4657600080fd5b505afa158015610c5a573d6000803e3d6000fd5b505050506040513d6020811015610c7057600080fd5b50519150610c7b9050565b919050565b6000610c8c858361158b565b610cc75760405162461bcd60e51b815260040180806020018281038252603f81526020018061232c603f913960400191505060405180910390fd5b6001600160a01b03851660009081526003602090815260408083206001600160401b038816845282529182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845260609392830182828015610d775780601f10610d4c57610100808354040283529160200191610d77565b820191906000526020600020905b815481529060010190602001808311610d5a57829003601f168201915b505050505090506000815111610dd4576040805162461bcd60e51b815260206004820152601960248201527f656d70747920696c6c6567616c20746f41737365744861736800000000000000604482015290519081900360640190fd5b610ddc612159565b60405180606001604052808381526020018681526020018581525090506060610e0482611643565b90506000600160009054906101000a90046001600160a01b031690506000816001600160a01b03166387939a7f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e5b57600080fd5b505afa158015610e6f573d6000803e3d6000fd5b505050506040513d6020811015610e8557600080fd5b50516001600160401b038a16600090815260026020818152604092839020805484516001821615610100026000190190911693909304601f810183900483028401830190945283835293945084936060939091830182828015610f295780601f10610efe57610100808354040283529160200191610f29565b820191906000526020600020905b815481529060010190602001808311610f0c57829003601f168201915b505050505090506000815111610f86576040805162461bcd60e51b815260206004820152601960248201527f656d70747920696c6c6567616c20746f50726f78794861736800000000000000604482015290519081900360640190fd5b816001600160a01b031663bd5cf6258c83886040518463ffffffff1660e01b815260040180846001600160401b03166001600160401b03168152602001806020018060200180602001848103845286818151815260200191508051906020019080838360005b83811015611004578181015183820152602001610fec565b50505050905090810190601f1680156110315780820380516001836020036101000a031916815260200191505b508481038352600681526020018065756e6c6f636b60d01b815250602001848103825285818151815260200191508051906020019080838360005b8381101561108457818101518382015260200161106c565b50505050905090810190601f1680156110b15780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b1580156110d457600080fd5b505af11580156110e8573d6000803e3d6000fd5b505050506040513d60208110156110fe57600080fd5b505161113b5760405162461bcd60e51b815260040180806020018281038252602f8152602001806122fd602f913960400191505060405180910390fd5b7f8636abd6d0e464fe725a13346c7ac779b73561c705506044a2e6b2cdb1295ea58c6111656113a0565b8d8a8e8e60405180876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b03168152602001856001600160401b03166001600160401b031681526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156111f85781810151838201526020016111e0565b50505050905090810190601f1680156112255780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015611258578181015183820152602001611240565b50505050905090810190601f1680156112855780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390a15060019b9a5050505050505050505050565b600260208181526000928352604092839020805484516001821615610100026000190190911693909304601f8101839004830284018301909452838352919290830182828015610bce5780601f10610ba357610100808354040283529160200191610bce565b6000546001600160a01b03166113246113a0565b6001600160a01b03161461133757600080fd5b600180546001600160a01b0319166001600160a01b03838116919091179182905560408051929091168252517f43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4916020908290030190a150565b6001546001600160a01b031681565b335b90565b6113ad612159565b6113b5612159565b60006113c18482611770565b90835290506113d08482611770565b602084019190915290506113e4848261184a565b5060408301525092915050565b600080600190508354600260018083161561010002038216048451808214600181146114205760009450611499565b821561149957602083106001811461147e57600189600052602060002060208a018581015b6002848284100114156114755781518354146114645760009950600093505b600183019250602082019150611445565b50505050611497565b6101008086040294506020880151851461149757600095505b505b50929695505050505050565b600081516014146114e75760405162461bcd60e51b81526004018080602001828103825260238152602001806122136023913960400191505060405180910390fd5b506014015190565b60006001600160a01b03841661153b576040516001600160a01b0384169083156108fc029084906000818181858888f19350505050158015611535573d6000803e3d6000fd5b50611581565b611546848484611948565b6115815760405162461bcd60e51b81526004018080602001828103825260338152602001806122366033913960400191505060405180910390fd5b5060019392505050565b60006001600160a01b0383161580156115a45750600034115b156115ec578134146115e75760405162461bcd60e51b815260040180806020018281038252602981526020018061236b6029913960400191505060405180910390fd5b61163a565b6115ff836115f86113a0565b3085611a27565b61163a5760405162461bcd60e51b81526004018080602001828103825260338152602001806122366033913960400191505060405180910390fd5b50600192915050565b6060806116538360000151611b0f565b6116608460200151611b0f565b61166d8560400151611bd5565b6040516020018084805190602001908083835b6020831061169f5780518252601f199092019160209182019101611680565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b602083106116e75780518252601f1990920191602091820191016116c8565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b6020831061172f5780518252601f199092019160209182019101611710565b6001836020036101000a0380198251168184511680821785525050505050509050019350505050604051602081830303815290604052905080915050919050565b606060008061177f8585611c72565b865190955090915081850111156117d6576040805162461bcd60e51b81526020600482015260166024820152756f66667365742065786365656473206d6178696d756d60501b604482015290519081900360640190fd5b6060811580156117f15760405191506020820160405261183b565b6040519150601f8316801560200281840101848101888315602002848c0101015b8183101561182a578051835260209283019201611812565b5050848452601f01601f1916604052505b509250830190505b9250929050565b600080835183602001111561189f576040805162461bcd60e51b81526020600482015260166024820152756f66667365742065786365656473206d6178696d756d60501b604482015290519081900360640190fd5b600060405160206000600182038760208a0101515b838310156118d45780821a838601536001830192506001820391506118b4565b50505081016040525190506001600160ff1b0381111561193b576040805162461bcd60e51b815260206004820152601760248201527f56616c75652065786365656473207468652072616e6765000000000000000000604482015290519081900360640190fd5b9460209390930193505050565b6040805163a9059cbb60e01b81526001600160a01b03848116600483015260248201849052915160009286929083169163a9059cbb9160448082019260209290919082900301818887803b15801561199f57600080fd5b505af11580156119b3573d6000803e3d6000fd5b505050506040513d60208110156119c957600080fd5b5051611a1c576040805162461bcd60e51b815260206004820152601c60248201527f747261736e66657220455243323020546f6b656e206661696c65642100000000604482015290519081900360640190fd5b506001949350505050565b604080516323b872dd60e01b81526001600160a01b03858116600483015284811660248301526044820184905291516000928792908316916323b872dd9160648082019260209290919082900301818887803b158015611a8657600080fd5b505af1158015611a9a573d6000803e3d6000fd5b505050506040513d6020811015611ab057600080fd5b5051611b03576040805162461bcd60e51b815260206004820152601c60248201527f747261736e66657220455243323020546f6b656e206661696c65642100000000604482015290519081900360640190fd5b50600195945050505050565b8051606090611b1d81611d28565b836040516020018083805190602001908083835b60208310611b505780518252601f199092019160209182019101611b31565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611b985780518252601f199092019160209182019101611b79565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052915050919050565b60606001600160ff1b03821115611c33576040805162461bcd60e51b815260206004820152601b60248201527f56616c756520657863656564732075696e743235352072616e67650000000000604482015290519081900360640190fd5b60405160208082526000601f5b82821015611c625785811a826020860101536001919091019060001901611c40565b5050506040818101905292915050565b6000806000611c818585611e6e565b9450905060fd60f81b6001600160f81b031982161415611cb657611ca58585611ed7565b8161ffff1691509250925050611843565b607f60f91b6001600160f81b031982161415611ce957611cd68585611f61565b8163ffffffff1691509250925050611843565b6001600160f81b03198082161415611d1b57611d058585612008565b816001600160401b031691509250925050611843565b60f81c9150829050611843565b606060fd826001600160401b03161015611d4c57611d45826120af565b9050610c7b565b61ffff826001600160401b031611611e2a57611d6b60fd60f81b6120ca565b611d74836120de565b6040516020018083805190602001908083835b60208310611da65780518252601f199092019160209182019101611d87565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611dee5780518252601f199092019160209182019101611dcf565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529050610c7b565b63ffffffff826001600160401b031611611e5457611e4b607f60f91b6120ca565b611d7483612107565b611e656001600160f81b03196120ca565b611d7483612130565b6000808351836001011115611ec3576040805162461bcd60e51b81526020600482015260166024820152754f66667365742065786365656473206d6178696d756d60501b604482015290519081900360640190fd5b505081810160200151600182019250929050565b6000808351836002011115611f2c576040805162461bcd60e51b81526020600482015260166024820152756f66667365742065786365656473206d6178696d756d60501b604482015290519081900360640190fd5b6000604051846020870101518060011a82538060001a6001830153506002818101604052601d19909101519694019450505050565b6000808351836004011115611fb6576040805162461bcd60e51b81526020600482015260166024820152756f66667365742065786365656473206d6178696d756d60501b604482015290519081900360640190fd5b600060405160046000600182038760208a0101515b83831015611feb5780821a83860153600183019250600182039150611fcb565b505050808201604052602003900351956004949094019450505050565b600080835183600801111561205d576040805162461bcd60e51b81526020600482015260166024820152756f66667365742065786365656473206d6178696d756d60501b604482015290519081900360640190fd5b600060405160086000600182038760208a0101515b838310156120925780821a83860153600183019250600182039150612072565b505050808201604052602003900351956008949094019450505050565b604080516001815260f89290921b6020830152818101905290565b60606120d88260f81c6120af565b92915050565b6040516002808252606091906000601f60ff861660208501536001919091019060001901611c40565b6040516004808252606091906000601f60ff861660208501536001919091019060001901611c40565b6040516008808252606091906000601f60ff861660208501536001919091019060001901611c40565b60405180606001604052806060815260200160608152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106121bb57805160ff19168380011785556121e8565b828001600101855582156121e8579182015b828111156121e85782518255916020019190600101906121cd565b506121f49291506121f8565b5090565b6113a291905b808211156121f457600081556001016121fe56fe6279746573206c656e67746820646f6573206e6f74206d6174636820616464726573737472616e7366657220657263323020617373657420746f206c6f636b5f70726f787920636f6e7472616374206661696c6564217472616e736665722061737365742066726f6d206c6f636b5f70726f787920636f6e747261637420746f20746f41646472657373206661696c6564216d736753656e646572206973206e6f742045746843726f7373436861696e4d616e61676572436f6e747261637466726f6d2070726f787920636f6e747261637420616464726573732063616e6e6f7420626520656d70747945746843726f7373436861696e4d616e616765722063726f7373436861696e206578656375746564206572726f72217472616e736665722061737365742066726f6d2066726f6d4164647265737320746f206c6f636b5f70726f787920636f6e747261637420206661696c6564217472616e73666572726564206574686572206973206e6f7420657175616c20746f20616d6f756e742146726f6d2050726f787920636f6e74726163742061646472657373206572726f7221a265627a7a72315820e269eb9075132ef19bd114ef11c536c37c91d9e9a5018ef6fa6a3282b93f376364736f6c634300050f0032" - -// DeployLockProxy deploys a new Ethereum contract, binding an instance of LockProxy to it. -func DeployLockProxy(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *LockProxy, error) { - parsed, err := abi.JSON(strings.NewReader(LockProxyABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(LockProxyBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &LockProxy{LockProxyCaller: LockProxyCaller{contract: contract}, LockProxyTransactor: LockProxyTransactor{contract: contract}, LockProxyFilterer: LockProxyFilterer{contract: contract}}, nil -} - -// LockProxy is an auto generated Go binding around an Ethereum contract. -type LockProxy struct { - LockProxyCaller // Read-only binding to the contract - LockProxyTransactor // Write-only binding to the contract - LockProxyFilterer // Log filterer for contract events -} - -// LockProxyCaller is an auto generated read-only Go binding around an Ethereum contract. -type LockProxyCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// LockProxyTransactor is an auto generated write-only Go binding around an Ethereum contract. -type LockProxyTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// LockProxyFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type LockProxyFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// LockProxySession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type LockProxySession struct { - Contract *LockProxy // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// LockProxyCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type LockProxyCallerSession struct { - Contract *LockProxyCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// LockProxyTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type LockProxyTransactorSession struct { - Contract *LockProxyTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// LockProxyRaw is an auto generated low-level Go binding around an Ethereum contract. -type LockProxyRaw struct { - Contract *LockProxy // Generic contract binding to access the raw methods on -} - -// LockProxyCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type LockProxyCallerRaw struct { - Contract *LockProxyCaller // Generic read-only contract binding to access the raw methods on -} - -// LockProxyTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type LockProxyTransactorRaw struct { - Contract *LockProxyTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewLockProxy creates a new instance of LockProxy, bound to a specific deployed contract. -func NewLockProxy(address common.Address, backend bind.ContractBackend) (*LockProxy, error) { - contract, err := bindLockProxy(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &LockProxy{LockProxyCaller: LockProxyCaller{contract: contract}, LockProxyTransactor: LockProxyTransactor{contract: contract}, LockProxyFilterer: LockProxyFilterer{contract: contract}}, nil -} - -// NewLockProxyCaller creates a new read-only instance of LockProxy, bound to a specific deployed contract. -func NewLockProxyCaller(address common.Address, caller bind.ContractCaller) (*LockProxyCaller, error) { - contract, err := bindLockProxy(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &LockProxyCaller{contract: contract}, nil -} - -// NewLockProxyTransactor creates a new write-only instance of LockProxy, bound to a specific deployed contract. -func NewLockProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*LockProxyTransactor, error) { - contract, err := bindLockProxy(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &LockProxyTransactor{contract: contract}, nil -} - -// NewLockProxyFilterer creates a new log filterer instance of LockProxy, bound to a specific deployed contract. -func NewLockProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*LockProxyFilterer, error) { - contract, err := bindLockProxy(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &LockProxyFilterer{contract: contract}, nil -} - -// bindLockProxy binds a generic wrapper to an already deployed contract. -func bindLockProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(LockProxyABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_LockProxy *LockProxyRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _LockProxy.Contract.LockProxyCaller.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 (_LockProxy *LockProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _LockProxy.Contract.LockProxyTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_LockProxy *LockProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _LockProxy.Contract.LockProxyTransactor.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 (_LockProxy *LockProxyCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _LockProxy.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 (_LockProxy *LockProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _LockProxy.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_LockProxy *LockProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _LockProxy.Contract.contract.Transact(opts, method, params...) -} - -// AssetHashMap is a free data retrieval call binding the contract method 0x4f7d9808. -// -// Solidity: function assetHashMap(address , uint64 ) view returns(bytes) -func (_LockProxy *LockProxyCaller) AssetHashMap(opts *bind.CallOpts, arg0 common.Address, arg1 uint64) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _LockProxy.contract.Call(opts, out, "assetHashMap", arg0, arg1) - return *ret0, err -} - -// AssetHashMap is a free data retrieval call binding the contract method 0x4f7d9808. -// -// Solidity: function assetHashMap(address , uint64 ) view returns(bytes) -func (_LockProxy *LockProxySession) AssetHashMap(arg0 common.Address, arg1 uint64) ([]byte, error) { - return _LockProxy.Contract.AssetHashMap(&_LockProxy.CallOpts, arg0, arg1) -} - -// AssetHashMap is a free data retrieval call binding the contract method 0x4f7d9808. -// -// Solidity: function assetHashMap(address , uint64 ) view returns(bytes) -func (_LockProxy *LockProxyCallerSession) AssetHashMap(arg0 common.Address, arg1 uint64) ([]byte, error) { - return _LockProxy.Contract.AssetHashMap(&_LockProxy.CallOpts, arg0, arg1) -} - -// GetBalanceFor is a free data retrieval call binding the contract method 0x59c589a1. -// -// Solidity: function getBalanceFor(address fromAssetHash) view returns(uint256) -func (_LockProxy *LockProxyCaller) GetBalanceFor(opts *bind.CallOpts, fromAssetHash common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _LockProxy.contract.Call(opts, out, "getBalanceFor", fromAssetHash) - return *ret0, err -} - -// GetBalanceFor is a free data retrieval call binding the contract method 0x59c589a1. -// -// Solidity: function getBalanceFor(address fromAssetHash) view returns(uint256) -func (_LockProxy *LockProxySession) GetBalanceFor(fromAssetHash common.Address) (*big.Int, error) { - return _LockProxy.Contract.GetBalanceFor(&_LockProxy.CallOpts, fromAssetHash) -} - -// GetBalanceFor is a free data retrieval call binding the contract method 0x59c589a1. -// -// Solidity: function getBalanceFor(address fromAssetHash) view returns(uint256) -func (_LockProxy *LockProxyCallerSession) GetBalanceFor(fromAssetHash common.Address) (*big.Int, error) { - return _LockProxy.Contract.GetBalanceFor(&_LockProxy.CallOpts, fromAssetHash) -} - -// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. -// -// Solidity: function managerProxyContract() view returns(address) -func (_LockProxy *LockProxyCaller) ManagerProxyContract(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _LockProxy.contract.Call(opts, out, "managerProxyContract") - return *ret0, err -} - -// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. -// -// Solidity: function managerProxyContract() view returns(address) -func (_LockProxy *LockProxySession) ManagerProxyContract() (common.Address, error) { - return _LockProxy.Contract.ManagerProxyContract(&_LockProxy.CallOpts) -} - -// ManagerProxyContract is a free data retrieval call binding the contract method 0xd798f881. -// -// Solidity: function managerProxyContract() view returns(address) -func (_LockProxy *LockProxyCallerSession) ManagerProxyContract() (common.Address, error) { - return _LockProxy.Contract.ManagerProxyContract(&_LockProxy.CallOpts) -} - -// Operator is a free data retrieval call binding the contract method 0x570ca735. -// -// Solidity: function operator() view returns(address) -func (_LockProxy *LockProxyCaller) Operator(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _LockProxy.contract.Call(opts, out, "operator") - return *ret0, err -} - -// Operator is a free data retrieval call binding the contract method 0x570ca735. -// -// Solidity: function operator() view returns(address) -func (_LockProxy *LockProxySession) Operator() (common.Address, error) { - return _LockProxy.Contract.Operator(&_LockProxy.CallOpts) -} - -// Operator is a free data retrieval call binding the contract method 0x570ca735. -// -// Solidity: function operator() view returns(address) -func (_LockProxy *LockProxyCallerSession) Operator() (common.Address, error) { - return _LockProxy.Contract.Operator(&_LockProxy.CallOpts) -} - -// ProxyHashMap is a free data retrieval call binding the contract method 0x9e5767aa. -// -// Solidity: function proxyHashMap(uint64 ) view returns(bytes) -func (_LockProxy *LockProxyCaller) ProxyHashMap(opts *bind.CallOpts, arg0 uint64) ([]byte, error) { - var ( - ret0 = new([]byte) - ) - out := ret0 - err := _LockProxy.contract.Call(opts, out, "proxyHashMap", arg0) - return *ret0, err -} - -// ProxyHashMap is a free data retrieval call binding the contract method 0x9e5767aa. -// -// Solidity: function proxyHashMap(uint64 ) view returns(bytes) -func (_LockProxy *LockProxySession) ProxyHashMap(arg0 uint64) ([]byte, error) { - return _LockProxy.Contract.ProxyHashMap(&_LockProxy.CallOpts, arg0) -} - -// ProxyHashMap is a free data retrieval call binding the contract method 0x9e5767aa. -// -// Solidity: function proxyHashMap(uint64 ) view returns(bytes) -func (_LockProxy *LockProxyCallerSession) ProxyHashMap(arg0 uint64) ([]byte, error) { - return _LockProxy.Contract.ProxyHashMap(&_LockProxy.CallOpts, arg0) -} - -// BindAssetHash is a paid mutator transaction binding the contract method 0x3348f63b. -// -// Solidity: function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes toAssetHash) returns(bool) -func (_LockProxy *LockProxyTransactor) BindAssetHash(opts *bind.TransactOpts, fromAssetHash common.Address, toChainId uint64, toAssetHash []byte) (*types.Transaction, error) { - return _LockProxy.contract.Transact(opts, "bindAssetHash", fromAssetHash, toChainId, toAssetHash) -} - -// BindAssetHash is a paid mutator transaction binding the contract method 0x3348f63b. -// -// Solidity: function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes toAssetHash) returns(bool) -func (_LockProxy *LockProxySession) BindAssetHash(fromAssetHash common.Address, toChainId uint64, toAssetHash []byte) (*types.Transaction, error) { - return _LockProxy.Contract.BindAssetHash(&_LockProxy.TransactOpts, fromAssetHash, toChainId, toAssetHash) -} - -// BindAssetHash is a paid mutator transaction binding the contract method 0x3348f63b. -// -// Solidity: function bindAssetHash(address fromAssetHash, uint64 toChainId, bytes toAssetHash) returns(bool) -func (_LockProxy *LockProxyTransactorSession) BindAssetHash(fromAssetHash common.Address, toChainId uint64, toAssetHash []byte) (*types.Transaction, error) { - return _LockProxy.Contract.BindAssetHash(&_LockProxy.TransactOpts, fromAssetHash, toChainId, toAssetHash) -} - -// BindProxyHash is a paid mutator transaction binding the contract method 0x379b98f6. -// -// Solidity: function bindProxyHash(uint64 toChainId, bytes targetProxyHash) returns(bool) -func (_LockProxy *LockProxyTransactor) BindProxyHash(opts *bind.TransactOpts, toChainId uint64, targetProxyHash []byte) (*types.Transaction, error) { - return _LockProxy.contract.Transact(opts, "bindProxyHash", toChainId, targetProxyHash) -} - -// BindProxyHash is a paid mutator transaction binding the contract method 0x379b98f6. -// -// Solidity: function bindProxyHash(uint64 toChainId, bytes targetProxyHash) returns(bool) -func (_LockProxy *LockProxySession) BindProxyHash(toChainId uint64, targetProxyHash []byte) (*types.Transaction, error) { - return _LockProxy.Contract.BindProxyHash(&_LockProxy.TransactOpts, toChainId, targetProxyHash) -} - -// BindProxyHash is a paid mutator transaction binding the contract method 0x379b98f6. -// -// Solidity: function bindProxyHash(uint64 toChainId, bytes targetProxyHash) returns(bool) -func (_LockProxy *LockProxyTransactorSession) BindProxyHash(toChainId uint64, targetProxyHash []byte) (*types.Transaction, error) { - return _LockProxy.Contract.BindProxyHash(&_LockProxy.TransactOpts, toChainId, targetProxyHash) -} - -// Lock is a paid mutator transaction binding the contract method 0x84a6d055. -// -// Solidity: function lock(address fromAssetHash, uint64 toChainId, bytes toAddress, uint256 amount) payable returns(bool) -func (_LockProxy *LockProxyTransactor) Lock(opts *bind.TransactOpts, fromAssetHash common.Address, toChainId uint64, toAddress []byte, amount *big.Int) (*types.Transaction, error) { - return _LockProxy.contract.Transact(opts, "lock", fromAssetHash, toChainId, toAddress, amount) -} - -// Lock is a paid mutator transaction binding the contract method 0x84a6d055. -// -// Solidity: function lock(address fromAssetHash, uint64 toChainId, bytes toAddress, uint256 amount) payable returns(bool) -func (_LockProxy *LockProxySession) Lock(fromAssetHash common.Address, toChainId uint64, toAddress []byte, amount *big.Int) (*types.Transaction, error) { - return _LockProxy.Contract.Lock(&_LockProxy.TransactOpts, fromAssetHash, toChainId, toAddress, amount) -} - -// Lock is a paid mutator transaction binding the contract method 0x84a6d055. -// -// Solidity: function lock(address fromAssetHash, uint64 toChainId, bytes toAddress, uint256 amount) payable returns(bool) -func (_LockProxy *LockProxyTransactorSession) Lock(fromAssetHash common.Address, toChainId uint64, toAddress []byte, amount *big.Int) (*types.Transaction, error) { - return _LockProxy.Contract.Lock(&_LockProxy.TransactOpts, fromAssetHash, toChainId, toAddress, amount) -} - -// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. -// -// Solidity: function setManagerProxy(address ethCCMProxyAddr) returns() -func (_LockProxy *LockProxyTransactor) SetManagerProxy(opts *bind.TransactOpts, ethCCMProxyAddr common.Address) (*types.Transaction, error) { - return _LockProxy.contract.Transact(opts, "setManagerProxy", ethCCMProxyAddr) -} - -// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. -// -// Solidity: function setManagerProxy(address ethCCMProxyAddr) returns() -func (_LockProxy *LockProxySession) SetManagerProxy(ethCCMProxyAddr common.Address) (*types.Transaction, error) { - return _LockProxy.Contract.SetManagerProxy(&_LockProxy.TransactOpts, ethCCMProxyAddr) -} - -// SetManagerProxy is a paid mutator transaction binding the contract method 0xaf9980f0. -// -// Solidity: function setManagerProxy(address ethCCMProxyAddr) returns() -func (_LockProxy *LockProxyTransactorSession) SetManagerProxy(ethCCMProxyAddr common.Address) (*types.Transaction, error) { - return _LockProxy.Contract.SetManagerProxy(&_LockProxy.TransactOpts, ethCCMProxyAddr) -} - -// Unlock is a paid mutator transaction binding the contract method 0x06af4b9f. -// -// Solidity: function unlock(bytes argsBs, bytes fromContractAddr, uint64 fromChainId) returns(bool) -func (_LockProxy *LockProxyTransactor) Unlock(opts *bind.TransactOpts, argsBs []byte, fromContractAddr []byte, fromChainId uint64) (*types.Transaction, error) { - return _LockProxy.contract.Transact(opts, "unlock", argsBs, fromContractAddr, fromChainId) -} - -// Unlock is a paid mutator transaction binding the contract method 0x06af4b9f. -// -// Solidity: function unlock(bytes argsBs, bytes fromContractAddr, uint64 fromChainId) returns(bool) -func (_LockProxy *LockProxySession) Unlock(argsBs []byte, fromContractAddr []byte, fromChainId uint64) (*types.Transaction, error) { - return _LockProxy.Contract.Unlock(&_LockProxy.TransactOpts, argsBs, fromContractAddr, fromChainId) -} - -// Unlock is a paid mutator transaction binding the contract method 0x06af4b9f. -// -// Solidity: function unlock(bytes argsBs, bytes fromContractAddr, uint64 fromChainId) returns(bool) -func (_LockProxy *LockProxyTransactorSession) Unlock(argsBs []byte, fromContractAddr []byte, fromChainId uint64) (*types.Transaction, error) { - return _LockProxy.Contract.Unlock(&_LockProxy.TransactOpts, argsBs, fromContractAddr, fromChainId) -} - -// LockProxyBindAssetEventIterator is returned from FilterBindAssetEvent and is used to iterate over the raw logs and unpacked data for BindAssetEvent events raised by the LockProxy contract. -type LockProxyBindAssetEventIterator struct { - Event *LockProxyBindAssetEvent // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LockProxyBindAssetEventIterator) 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(LockProxyBindAssetEvent) - 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(LockProxyBindAssetEvent) - 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 *LockProxyBindAssetEventIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LockProxyBindAssetEventIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LockProxyBindAssetEvent represents a BindAssetEvent event raised by the LockProxy contract. -type LockProxyBindAssetEvent struct { - FromAssetHash common.Address - ToChainId uint64 - TargetProxyHash []byte - InitialAmount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBindAssetEvent is a free log retrieval operation binding the contract event 0x1628c8374c1bdfeb2275fd9f4c90562fd3fae974783dc522c8234e36abcfc58e. -// -// Solidity: event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash, uint256 initialAmount) -func (_LockProxy *LockProxyFilterer) FilterBindAssetEvent(opts *bind.FilterOpts) (*LockProxyBindAssetEventIterator, error) { - - logs, sub, err := _LockProxy.contract.FilterLogs(opts, "BindAssetEvent") - if err != nil { - return nil, err - } - return &LockProxyBindAssetEventIterator{contract: _LockProxy.contract, event: "BindAssetEvent", logs: logs, sub: sub}, nil -} - -// WatchBindAssetEvent is a free log subscription operation binding the contract event 0x1628c8374c1bdfeb2275fd9f4c90562fd3fae974783dc522c8234e36abcfc58e. -// -// Solidity: event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash, uint256 initialAmount) -func (_LockProxy *LockProxyFilterer) WatchBindAssetEvent(opts *bind.WatchOpts, sink chan<- *LockProxyBindAssetEvent) (event.Subscription, error) { - - logs, sub, err := _LockProxy.contract.WatchLogs(opts, "BindAssetEvent") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LockProxyBindAssetEvent) - if err := _LockProxy.contract.UnpackLog(event, "BindAssetEvent", 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 -} - -// ParseBindAssetEvent is a log parse operation binding the contract event 0x1628c8374c1bdfeb2275fd9f4c90562fd3fae974783dc522c8234e36abcfc58e. -// -// Solidity: event BindAssetEvent(address fromAssetHash, uint64 toChainId, bytes targetProxyHash, uint256 initialAmount) -func (_LockProxy *LockProxyFilterer) ParseBindAssetEvent(log types.Log) (*LockProxyBindAssetEvent, error) { - event := new(LockProxyBindAssetEvent) - if err := _LockProxy.contract.UnpackLog(event, "BindAssetEvent", log); err != nil { - return nil, err - } - return event, nil -} - -// LockProxyBindProxyEventIterator is returned from FilterBindProxyEvent and is used to iterate over the raw logs and unpacked data for BindProxyEvent events raised by the LockProxy contract. -type LockProxyBindProxyEventIterator struct { - Event *LockProxyBindProxyEvent // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LockProxyBindProxyEventIterator) 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(LockProxyBindProxyEvent) - 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(LockProxyBindProxyEvent) - 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 *LockProxyBindProxyEventIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LockProxyBindProxyEventIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LockProxyBindProxyEvent represents a BindProxyEvent event raised by the LockProxy contract. -type LockProxyBindProxyEvent struct { - ToChainId uint64 - TargetProxyHash []byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBindProxyEvent is a free log retrieval operation binding the contract event 0xdacd7d303272a3b58aec6620d6d1fb588f4996a5b46858ed437f1c34348f2d0f. -// -// Solidity: event BindProxyEvent(uint64 toChainId, bytes targetProxyHash) -func (_LockProxy *LockProxyFilterer) FilterBindProxyEvent(opts *bind.FilterOpts) (*LockProxyBindProxyEventIterator, error) { - - logs, sub, err := _LockProxy.contract.FilterLogs(opts, "BindProxyEvent") - if err != nil { - return nil, err - } - return &LockProxyBindProxyEventIterator{contract: _LockProxy.contract, event: "BindProxyEvent", logs: logs, sub: sub}, nil -} - -// WatchBindProxyEvent is a free log subscription operation binding the contract event 0xdacd7d303272a3b58aec6620d6d1fb588f4996a5b46858ed437f1c34348f2d0f. -// -// Solidity: event BindProxyEvent(uint64 toChainId, bytes targetProxyHash) -func (_LockProxy *LockProxyFilterer) WatchBindProxyEvent(opts *bind.WatchOpts, sink chan<- *LockProxyBindProxyEvent) (event.Subscription, error) { - - logs, sub, err := _LockProxy.contract.WatchLogs(opts, "BindProxyEvent") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LockProxyBindProxyEvent) - if err := _LockProxy.contract.UnpackLog(event, "BindProxyEvent", 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 -} - -// ParseBindProxyEvent is a log parse operation binding the contract event 0xdacd7d303272a3b58aec6620d6d1fb588f4996a5b46858ed437f1c34348f2d0f. -// -// Solidity: event BindProxyEvent(uint64 toChainId, bytes targetProxyHash) -func (_LockProxy *LockProxyFilterer) ParseBindProxyEvent(log types.Log) (*LockProxyBindProxyEvent, error) { - event := new(LockProxyBindProxyEvent) - if err := _LockProxy.contract.UnpackLog(event, "BindProxyEvent", log); err != nil { - return nil, err - } - return event, nil -} - -// LockProxyLockEventIterator is returned from FilterLockEvent and is used to iterate over the raw logs and unpacked data for LockEvent events raised by the LockProxy contract. -type LockProxyLockEventIterator struct { - Event *LockProxyLockEvent // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LockProxyLockEventIterator) 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(LockProxyLockEvent) - 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(LockProxyLockEvent) - 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 *LockProxyLockEventIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LockProxyLockEventIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LockProxyLockEvent represents a LockEvent event raised by the LockProxy contract. -type LockProxyLockEvent struct { - FromAssetHash common.Address - FromAddress common.Address - ToChainId uint64 - ToAssetHash []byte - ToAddress []byte - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterLockEvent is a free log retrieval operation binding the contract event 0x8636abd6d0e464fe725a13346c7ac779b73561c705506044a2e6b2cdb1295ea5. -// -// Solidity: event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint256 amount) -func (_LockProxy *LockProxyFilterer) FilterLockEvent(opts *bind.FilterOpts) (*LockProxyLockEventIterator, error) { - - logs, sub, err := _LockProxy.contract.FilterLogs(opts, "LockEvent") - if err != nil { - return nil, err - } - return &LockProxyLockEventIterator{contract: _LockProxy.contract, event: "LockEvent", logs: logs, sub: sub}, nil -} - -// WatchLockEvent is a free log subscription operation binding the contract event 0x8636abd6d0e464fe725a13346c7ac779b73561c705506044a2e6b2cdb1295ea5. -// -// Solidity: event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint256 amount) -func (_LockProxy *LockProxyFilterer) WatchLockEvent(opts *bind.WatchOpts, sink chan<- *LockProxyLockEvent) (event.Subscription, error) { - - logs, sub, err := _LockProxy.contract.WatchLogs(opts, "LockEvent") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LockProxyLockEvent) - if err := _LockProxy.contract.UnpackLog(event, "LockEvent", 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 -} - -// ParseLockEvent is a log parse operation binding the contract event 0x8636abd6d0e464fe725a13346c7ac779b73561c705506044a2e6b2cdb1295ea5. -// -// Solidity: event LockEvent(address fromAssetHash, address fromAddress, uint64 toChainId, bytes toAssetHash, bytes toAddress, uint256 amount) -func (_LockProxy *LockProxyFilterer) ParseLockEvent(log types.Log) (*LockProxyLockEvent, error) { - event := new(LockProxyLockEvent) - if err := _LockProxy.contract.UnpackLog(event, "LockEvent", log); err != nil { - return nil, err - } - return event, nil -} - -// LockProxySetManagerProxyEventIterator is returned from FilterSetManagerProxyEvent and is used to iterate over the raw logs and unpacked data for SetManagerProxyEvent events raised by the LockProxy contract. -type LockProxySetManagerProxyEventIterator struct { - Event *LockProxySetManagerProxyEvent // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LockProxySetManagerProxyEventIterator) 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(LockProxySetManagerProxyEvent) - 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(LockProxySetManagerProxyEvent) - 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 *LockProxySetManagerProxyEventIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LockProxySetManagerProxyEventIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LockProxySetManagerProxyEvent represents a SetManagerProxyEvent event raised by the LockProxy contract. -type LockProxySetManagerProxyEvent struct { - Manager common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetManagerProxyEvent is a free log retrieval operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. -// -// Solidity: event SetManagerProxyEvent(address manager) -func (_LockProxy *LockProxyFilterer) FilterSetManagerProxyEvent(opts *bind.FilterOpts) (*LockProxySetManagerProxyEventIterator, error) { - - logs, sub, err := _LockProxy.contract.FilterLogs(opts, "SetManagerProxyEvent") - if err != nil { - return nil, err - } - return &LockProxySetManagerProxyEventIterator{contract: _LockProxy.contract, event: "SetManagerProxyEvent", logs: logs, sub: sub}, nil -} - -// WatchSetManagerProxyEvent is a free log subscription operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. -// -// Solidity: event SetManagerProxyEvent(address manager) -func (_LockProxy *LockProxyFilterer) WatchSetManagerProxyEvent(opts *bind.WatchOpts, sink chan<- *LockProxySetManagerProxyEvent) (event.Subscription, error) { - - logs, sub, err := _LockProxy.contract.WatchLogs(opts, "SetManagerProxyEvent") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LockProxySetManagerProxyEvent) - if err := _LockProxy.contract.UnpackLog(event, "SetManagerProxyEvent", 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 -} - -// ParseSetManagerProxyEvent is a log parse operation binding the contract event 0x43b1a8ec337adb61e8311ed025d99c80db65c02fe5c5027c1b6a93b40970cec4. -// -// Solidity: event SetManagerProxyEvent(address manager) -func (_LockProxy *LockProxyFilterer) ParseSetManagerProxyEvent(log types.Log) (*LockProxySetManagerProxyEvent, error) { - event := new(LockProxySetManagerProxyEvent) - if err := _LockProxy.contract.UnpackLog(event, "SetManagerProxyEvent", log); err != nil { - return nil, err - } - return event, nil -} - -// LockProxyUnlockEventIterator is returned from FilterUnlockEvent and is used to iterate over the raw logs and unpacked data for UnlockEvent events raised by the LockProxy contract. -type LockProxyUnlockEventIterator struct { - Event *LockProxyUnlockEvent // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *LockProxyUnlockEventIterator) 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(LockProxyUnlockEvent) - 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(LockProxyUnlockEvent) - 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 *LockProxyUnlockEventIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *LockProxyUnlockEventIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// LockProxyUnlockEvent represents a UnlockEvent event raised by the LockProxy contract. -type LockProxyUnlockEvent struct { - ToAssetHash common.Address - ToAddress common.Address - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUnlockEvent is a free log retrieval operation binding the contract event 0xd90288730b87c2b8e0c45bd82260fd22478aba30ae1c4d578b8daba9261604df. -// -// Solidity: event UnlockEvent(address toAssetHash, address toAddress, uint256 amount) -func (_LockProxy *LockProxyFilterer) FilterUnlockEvent(opts *bind.FilterOpts) (*LockProxyUnlockEventIterator, error) { - - logs, sub, err := _LockProxy.contract.FilterLogs(opts, "UnlockEvent") - if err != nil { - return nil, err - } - return &LockProxyUnlockEventIterator{contract: _LockProxy.contract, event: "UnlockEvent", logs: logs, sub: sub}, nil -} - -// WatchUnlockEvent is a free log subscription operation binding the contract event 0xd90288730b87c2b8e0c45bd82260fd22478aba30ae1c4d578b8daba9261604df. -// -// Solidity: event UnlockEvent(address toAssetHash, address toAddress, uint256 amount) -func (_LockProxy *LockProxyFilterer) WatchUnlockEvent(opts *bind.WatchOpts, sink chan<- *LockProxyUnlockEvent) (event.Subscription, error) { - - logs, sub, err := _LockProxy.contract.WatchLogs(opts, "UnlockEvent") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(LockProxyUnlockEvent) - if err := _LockProxy.contract.UnpackLog(event, "UnlockEvent", 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 -} - -// ParseUnlockEvent is a log parse operation binding the contract event 0xd90288730b87c2b8e0c45bd82260fd22478aba30ae1c4d578b8daba9261604df. -// -// Solidity: event UnlockEvent(address toAssetHash, address toAddress, uint256 amount) -func (_LockProxy *LockProxyFilterer) ParseUnlockEvent(log types.Log) (*LockProxyUnlockEvent, error) { - event := new(LockProxyUnlockEvent) - if err := _LockProxy.contract.UnpackLog(event, "UnlockEvent", log); err != nil { - return nil, err - } - return event, nil -} - -// SafeMathABI is the input ABI used to generate the binding from. -const SafeMathABI = "[]" - -// SafeMathBin is the compiled bytecode used for deploying new contracts. -var SafeMathBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820db757905f1c1b49b781ddf45e615d2bbf336aeac8bb9ae61ed6fca08e24c7dc364736f6c634300050f0032" - -// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. -func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// SafeMath is an auto generated Go binding around an Ethereum contract. -type SafeMath struct { - SafeMathCaller // Read-only binding to the contract - SafeMathTransactor // Write-only binding to the contract - SafeMathFilterer // Log filterer for contract events -} - -// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. -type SafeMathCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SafeMathTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SafeMathFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SafeMathSession struct { - Contract *SafeMath // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SafeMathCallerSession struct { - Contract *SafeMathCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SafeMathTransactorSession struct { - Contract *SafeMathTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. -type SafeMathRaw struct { - Contract *SafeMath // Generic contract binding to access the raw methods on -} - -// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SafeMathCallerRaw struct { - Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on -} - -// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SafeMathTransactorRaw struct { - Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. -func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { - contract, err := bindSafeMath(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { - contract, err := bindSafeMath(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SafeMathCaller{contract: contract}, nil -} - -// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { - contract, err := bindSafeMath(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SafeMathTransactor{contract: contract}, nil -} - -// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { - contract, err := bindSafeMath(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SafeMathFilterer{contract: contract}, nil -} - -// bindSafeMath binds a generic wrapper to an already deployed contract. -func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transact(opts, method, params...) -} - -// UtilsABI is the input ABI used to generate the binding from. -const UtilsABI = "[]" - -// UtilsBin is the compiled bytecode used for deploying new contracts. -var UtilsBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820201a9a96d2544d2ec86ac31f65b49717ee12e7c08970f9a9939bd117930a7e5364736f6c634300050f0032" - -// DeployUtils deploys a new Ethereum contract, binding an instance of Utils to it. -func DeployUtils(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Utils, error) { - parsed, err := abi.JSON(strings.NewReader(UtilsABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(UtilsBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Utils{UtilsCaller: UtilsCaller{contract: contract}, UtilsTransactor: UtilsTransactor{contract: contract}, UtilsFilterer: UtilsFilterer{contract: contract}}, nil -} - -// Utils is an auto generated Go binding around an Ethereum contract. -type Utils struct { - UtilsCaller // Read-only binding to the contract - UtilsTransactor // Write-only binding to the contract - UtilsFilterer // Log filterer for contract events -} - -// UtilsCaller is an auto generated read-only Go binding around an Ethereum contract. -type UtilsCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// UtilsTransactor is an auto generated write-only Go binding around an Ethereum contract. -type UtilsTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// UtilsFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type UtilsFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// UtilsSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type UtilsSession struct { - Contract *Utils // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// UtilsCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type UtilsCallerSession struct { - Contract *UtilsCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// UtilsTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type UtilsTransactorSession struct { - Contract *UtilsTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// UtilsRaw is an auto generated low-level Go binding around an Ethereum contract. -type UtilsRaw struct { - Contract *Utils // Generic contract binding to access the raw methods on -} - -// UtilsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type UtilsCallerRaw struct { - Contract *UtilsCaller // Generic read-only contract binding to access the raw methods on -} - -// UtilsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type UtilsTransactorRaw struct { - Contract *UtilsTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewUtils creates a new instance of Utils, bound to a specific deployed contract. -func NewUtils(address common.Address, backend bind.ContractBackend) (*Utils, error) { - contract, err := bindUtils(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Utils{UtilsCaller: UtilsCaller{contract: contract}, UtilsTransactor: UtilsTransactor{contract: contract}, UtilsFilterer: UtilsFilterer{contract: contract}}, nil -} - -// NewUtilsCaller creates a new read-only instance of Utils, bound to a specific deployed contract. -func NewUtilsCaller(address common.Address, caller bind.ContractCaller) (*UtilsCaller, error) { - contract, err := bindUtils(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &UtilsCaller{contract: contract}, nil -} - -// NewUtilsTransactor creates a new write-only instance of Utils, bound to a specific deployed contract. -func NewUtilsTransactor(address common.Address, transactor bind.ContractTransactor) (*UtilsTransactor, error) { - contract, err := bindUtils(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &UtilsTransactor{contract: contract}, nil -} - -// NewUtilsFilterer creates a new log filterer instance of Utils, bound to a specific deployed contract. -func NewUtilsFilterer(address common.Address, filterer bind.ContractFilterer) (*UtilsFilterer, error) { - contract, err := bindUtils(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &UtilsFilterer{contract: contract}, nil -} - -// bindUtils binds a generic wrapper to an already deployed contract. -func bindUtils(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(UtilsABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Utils *UtilsRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Utils.Contract.UtilsCaller.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 (_Utils *UtilsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Utils.Contract.UtilsTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Utils *UtilsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Utils.Contract.UtilsTransactor.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 (_Utils *UtilsCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Utils.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 (_Utils *UtilsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Utils.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Utils *UtilsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Utils.Contract.contract.Transact(opts, method, params...) -} - -// ZeroCopySinkABI is the input ABI used to generate the binding from. -const ZeroCopySinkABI = "[]" - -// ZeroCopySinkBin is the compiled bytecode used for deploying new contracts. -var ZeroCopySinkBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a723158205a9851dd974d82a7bea8573bbead290b5daab8da233a4d6477188e9b614ca12864736f6c634300050f0032" - -// DeployZeroCopySink deploys a new Ethereum contract, binding an instance of ZeroCopySink to it. -func DeployZeroCopySink(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ZeroCopySink, error) { - parsed, err := abi.JSON(strings.NewReader(ZeroCopySinkABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ZeroCopySinkBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ZeroCopySink{ZeroCopySinkCaller: ZeroCopySinkCaller{contract: contract}, ZeroCopySinkTransactor: ZeroCopySinkTransactor{contract: contract}, ZeroCopySinkFilterer: ZeroCopySinkFilterer{contract: contract}}, nil -} - -// ZeroCopySink is an auto generated Go binding around an Ethereum contract. -type ZeroCopySink struct { - ZeroCopySinkCaller // Read-only binding to the contract - ZeroCopySinkTransactor // Write-only binding to the contract - ZeroCopySinkFilterer // Log filterer for contract events -} - -// ZeroCopySinkCaller is an auto generated read-only Go binding around an Ethereum contract. -type ZeroCopySinkCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySinkTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ZeroCopySinkTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySinkFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ZeroCopySinkFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySinkSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ZeroCopySinkSession struct { - Contract *ZeroCopySink // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZeroCopySinkCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ZeroCopySinkCallerSession struct { - Contract *ZeroCopySinkCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ZeroCopySinkTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ZeroCopySinkTransactorSession struct { - Contract *ZeroCopySinkTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZeroCopySinkRaw is an auto generated low-level Go binding around an Ethereum contract. -type ZeroCopySinkRaw struct { - Contract *ZeroCopySink // Generic contract binding to access the raw methods on -} - -// ZeroCopySinkCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ZeroCopySinkCallerRaw struct { - Contract *ZeroCopySinkCaller // Generic read-only contract binding to access the raw methods on -} - -// ZeroCopySinkTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ZeroCopySinkTransactorRaw struct { - Contract *ZeroCopySinkTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewZeroCopySink creates a new instance of ZeroCopySink, bound to a specific deployed contract. -func NewZeroCopySink(address common.Address, backend bind.ContractBackend) (*ZeroCopySink, error) { - contract, err := bindZeroCopySink(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ZeroCopySink{ZeroCopySinkCaller: ZeroCopySinkCaller{contract: contract}, ZeroCopySinkTransactor: ZeroCopySinkTransactor{contract: contract}, ZeroCopySinkFilterer: ZeroCopySinkFilterer{contract: contract}}, nil -} - -// NewZeroCopySinkCaller creates a new read-only instance of ZeroCopySink, bound to a specific deployed contract. -func NewZeroCopySinkCaller(address common.Address, caller bind.ContractCaller) (*ZeroCopySinkCaller, error) { - contract, err := bindZeroCopySink(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ZeroCopySinkCaller{contract: contract}, nil -} - -// NewZeroCopySinkTransactor creates a new write-only instance of ZeroCopySink, bound to a specific deployed contract. -func NewZeroCopySinkTransactor(address common.Address, transactor bind.ContractTransactor) (*ZeroCopySinkTransactor, error) { - contract, err := bindZeroCopySink(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ZeroCopySinkTransactor{contract: contract}, nil -} - -// NewZeroCopySinkFilterer creates a new log filterer instance of ZeroCopySink, bound to a specific deployed contract. -func NewZeroCopySinkFilterer(address common.Address, filterer bind.ContractFilterer) (*ZeroCopySinkFilterer, error) { - contract, err := bindZeroCopySink(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ZeroCopySinkFilterer{contract: contract}, nil -} - -// bindZeroCopySink binds a generic wrapper to an already deployed contract. -func bindZeroCopySink(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ZeroCopySinkABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ZeroCopySink *ZeroCopySinkRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ZeroCopySink.Contract.ZeroCopySinkCaller.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 (_ZeroCopySink *ZeroCopySinkRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZeroCopySink.Contract.ZeroCopySinkTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZeroCopySink *ZeroCopySinkRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZeroCopySink.Contract.ZeroCopySinkTransactor.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 (_ZeroCopySink *ZeroCopySinkCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ZeroCopySink.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 (_ZeroCopySink *ZeroCopySinkTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZeroCopySink.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZeroCopySink *ZeroCopySinkTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZeroCopySink.Contract.contract.Transact(opts, method, params...) -} - -// ZeroCopySourceABI is the input ABI used to generate the binding from. -const ZeroCopySourceABI = "[]" - -// ZeroCopySourceBin is the compiled bytecode used for deploying new contracts. -var ZeroCopySourceBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820e1cfaceb856ac965bfd3e9907f756338e254af4d522fba59da671d6ec16d284c64736f6c634300050f0032" - -// DeployZeroCopySource deploys a new Ethereum contract, binding an instance of ZeroCopySource to it. -func DeployZeroCopySource(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ZeroCopySource, error) { - parsed, err := abi.JSON(strings.NewReader(ZeroCopySourceABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ZeroCopySourceBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ZeroCopySource{ZeroCopySourceCaller: ZeroCopySourceCaller{contract: contract}, ZeroCopySourceTransactor: ZeroCopySourceTransactor{contract: contract}, ZeroCopySourceFilterer: ZeroCopySourceFilterer{contract: contract}}, nil -} - -// ZeroCopySource is an auto generated Go binding around an Ethereum contract. -type ZeroCopySource struct { - ZeroCopySourceCaller // Read-only binding to the contract - ZeroCopySourceTransactor // Write-only binding to the contract - ZeroCopySourceFilterer // Log filterer for contract events -} - -// ZeroCopySourceCaller is an auto generated read-only Go binding around an Ethereum contract. -type ZeroCopySourceCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySourceTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ZeroCopySourceTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySourceFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ZeroCopySourceFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ZeroCopySourceSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ZeroCopySourceSession struct { - Contract *ZeroCopySource // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZeroCopySourceCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ZeroCopySourceCallerSession struct { - Contract *ZeroCopySourceCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ZeroCopySourceTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ZeroCopySourceTransactorSession struct { - Contract *ZeroCopySourceTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ZeroCopySourceRaw is an auto generated low-level Go binding around an Ethereum contract. -type ZeroCopySourceRaw struct { - Contract *ZeroCopySource // Generic contract binding to access the raw methods on -} - -// ZeroCopySourceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ZeroCopySourceCallerRaw struct { - Contract *ZeroCopySourceCaller // Generic read-only contract binding to access the raw methods on -} - -// ZeroCopySourceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ZeroCopySourceTransactorRaw struct { - Contract *ZeroCopySourceTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewZeroCopySource creates a new instance of ZeroCopySource, bound to a specific deployed contract. -func NewZeroCopySource(address common.Address, backend bind.ContractBackend) (*ZeroCopySource, error) { - contract, err := bindZeroCopySource(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ZeroCopySource{ZeroCopySourceCaller: ZeroCopySourceCaller{contract: contract}, ZeroCopySourceTransactor: ZeroCopySourceTransactor{contract: contract}, ZeroCopySourceFilterer: ZeroCopySourceFilterer{contract: contract}}, nil -} - -// NewZeroCopySourceCaller creates a new read-only instance of ZeroCopySource, bound to a specific deployed contract. -func NewZeroCopySourceCaller(address common.Address, caller bind.ContractCaller) (*ZeroCopySourceCaller, error) { - contract, err := bindZeroCopySource(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ZeroCopySourceCaller{contract: contract}, nil -} - -// NewZeroCopySourceTransactor creates a new write-only instance of ZeroCopySource, bound to a specific deployed contract. -func NewZeroCopySourceTransactor(address common.Address, transactor bind.ContractTransactor) (*ZeroCopySourceTransactor, error) { - contract, err := bindZeroCopySource(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ZeroCopySourceTransactor{contract: contract}, nil -} - -// NewZeroCopySourceFilterer creates a new log filterer instance of ZeroCopySource, bound to a specific deployed contract. -func NewZeroCopySourceFilterer(address common.Address, filterer bind.ContractFilterer) (*ZeroCopySourceFilterer, error) { - contract, err := bindZeroCopySource(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ZeroCopySourceFilterer{contract: contract}, nil -} - -// bindZeroCopySource binds a generic wrapper to an already deployed contract. -func bindZeroCopySource(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ZeroCopySourceABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ZeroCopySource *ZeroCopySourceRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ZeroCopySource.Contract.ZeroCopySourceCaller.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 (_ZeroCopySource *ZeroCopySourceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZeroCopySource.Contract.ZeroCopySourceTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZeroCopySource *ZeroCopySourceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZeroCopySource.Contract.ZeroCopySourceTransactor.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 (_ZeroCopySource *ZeroCopySourceCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ZeroCopySource.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 (_ZeroCopySource *ZeroCopySourceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ZeroCopySource.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ZeroCopySource *ZeroCopySourceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ZeroCopySource.Contract.contract.Transact(opts, method, params...) -} diff --git a/chains/eth/abi/oep4/oep4_abi.go b/chains/eth/abi/oep4/oep4_abi.go deleted file mode 100644 index 5829890..0000000 --- a/chains/eth/abi/oep4/oep4_abi.go +++ /dev/null @@ -1,3102 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package oep4 - -import ( - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// ContextABI is the input ABI used to generate the binding from. -const ContextABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" - -// Context is an auto generated Go binding around an Ethereum contract. -type Context struct { - ContextCaller // Read-only binding to the contract - ContextTransactor // Write-only binding to the contract - ContextFilterer // Log filterer for contract events -} - -// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. -type ContextCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ContextTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ContextFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ContextSession struct { - Contract *Context // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ContextCallerSession struct { - Contract *ContextCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ContextTransactorSession struct { - Contract *ContextTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. -type ContextRaw struct { - Contract *Context // Generic contract binding to access the raw methods on -} - -// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ContextCallerRaw struct { - Contract *ContextCaller // Generic read-only contract binding to access the raw methods on -} - -// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ContextTransactorRaw struct { - Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewContext creates a new instance of Context, bound to a specific deployed contract. -func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { - contract, err := bindContext(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil -} - -// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. -func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { - contract, err := bindContext(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ContextCaller{contract: contract}, nil -} - -// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. -func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { - contract, err := bindContext(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ContextTransactor{contract: contract}, nil -} - -// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. -func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { - contract, err := bindContext(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ContextFilterer{contract: contract}, nil -} - -// bindContext binds a generic wrapper to an already deployed contract. -func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ContextABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.Contract.ContextCaller.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 (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.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 (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.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 (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.contract.Transact(opts, method, params...) -} - -// ERC20ABI is the input ABI used to generate the binding from. -const ERC20ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20FuncSigs maps the 4-byte function signature to its string representation. -var ERC20FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "a457c2d7": "decreaseAllowance(address,uint256)", - "39509351": "increaseAllowance(address,uint256)", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20Bin is the compiled bytecode used for deploying new contracts. -var ERC20Bin = "0x608060405261083b806100136000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a0823114610149578063a457c2d71461016f578063a9059cbb1461019b578063dd62ed3e146101c757610088565b8063095ea7b31461008d57806318160ddd146100cd57806323b872dd146100e7578063395093511461011d575b600080fd5b6100b9600480360360408110156100a357600080fd5b506001600160a01b0381351690602001356101f5565b604080519115158252519081900360200190f35b6100d5610212565b60408051918252519081900360200190f35b6100b9600480360360608110156100fd57600080fd5b506001600160a01b03813581169160208101359091169060400135610218565b6100b96004803603604081101561013357600080fd5b506001600160a01b0381351690602001356102a5565b6100d56004803603602081101561015f57600080fd5b50356001600160a01b03166102f9565b6100b96004803603604081101561018557600080fd5b506001600160a01b038135169060200135610314565b6100b9600480360360408110156101b157600080fd5b506001600160a01b038135169060200135610382565b6100d5600480360360408110156101dd57600080fd5b506001600160a01b0381358116916020013516610396565b60006102096102026103c1565b84846103c5565b50600192915050565b60025490565b60006102258484846104b1565b61029b846102316103c1565b61029685604051806060016040528060288152602001610771602891396001600160a01b038a1660009081526001602052604081209061026f6103c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61060d16565b6103c5565b5060019392505050565b60006102096102b26103c1565b8461029685600160006102c36103c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6106a416565b6001600160a01b031660009081526020819052604090205490565b60006102096103216103c1565b84610296856040518060600160405280602581526020016107e2602591396001600061034b6103c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61060d16565b600061020961038f6103c1565b84846104b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661040a5760405162461bcd60e51b81526004018080602001828103825260248152602001806107be6024913960400191505060405180910390fd5b6001600160a01b03821661044f5760405162461bcd60e51b81526004018080602001828103825260228152602001806107296022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166104f65760405162461bcd60e51b81526004018080602001828103825260258152602001806107996025913960400191505060405180910390fd5b6001600160a01b03821661053b5760405162461bcd60e51b81526004018080602001828103825260238152602001806107066023913960400191505060405180910390fd5b61057e8160405180606001604052806026815260200161074b602691396001600160a01b038616600090815260208190526040902054919063ffffffff61060d16565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546105b3908263ffffffff6106a416565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561069c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610661578181015183820152602001610649565b50505050905090810190601f16801561068e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156106fe576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820dd68afc24b84623478da74ad90030d8d5b03ae431cb948a20348acf66ded867f64736f6c634300050f0032" - -// DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it. -func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20Bin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil -} - -// ERC20 is an auto generated Go binding around an Ethereum contract. -type ERC20 struct { - ERC20Caller // Read-only binding to the contract - ERC20Transactor // Write-only binding to the contract - ERC20Filterer // Log filterer for contract events -} - -// ERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20Session struct { - Contract *ERC20 // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20CallerSession struct { - Contract *ERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20TransactorSession struct { - Contract *ERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20Raw struct { - Contract *ERC20 // Generic contract binding to access the raw methods on -} - -// ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20CallerRaw struct { - Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20TransactorRaw struct { - Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20 creates a new instance of ERC20, bound to a specific deployed contract. -func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error) { - contract, err := bindERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil -} - -// NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract. -func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error) { - contract, err := bindERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20Caller{contract: contract}, nil -} - -// NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract. -func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error) { - contract, err := bindERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20Transactor{contract: contract}, nil -} - -// NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract. -func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error) { - contract, err := bindERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20Filterer{contract: contract}, nil -} - -// bindERC20 binds a generic wrapper to an already deployed contract. -func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20.Contract.ERC20Caller.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 (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20.Contract.ERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20.Contract.ERC20Transactor.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 (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20.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 (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error) { - return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error) { - return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, amount) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "increaseAllowance", spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) -} - -// ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20 contract. -type ERC20ApprovalIterator struct { - Event *ERC20Approval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20ApprovalIterator) 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(ERC20Approval) - 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(ERC20Approval) - 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 *ERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20Approval represents a Approval event raised by the ERC20 contract. -type ERC20Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC20ApprovalIterator{contract: _ERC20.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20Approval) - if err := _ERC20.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) ParseApproval(log types.Log) (*ERC20Approval, error) { - event := new(ERC20Approval) - if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20 contract. -type ERC20TransferIterator struct { - Event *ERC20Transfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20TransferIterator) 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(ERC20Transfer) - 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(ERC20Transfer) - 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 *ERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20Transfer represents a Transfer event raised by the ERC20 contract. -type ERC20Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC20TransferIterator{contract: _ERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20Transfer) - if err := _ERC20.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) ParseTransfer(log types.Log) (*ERC20Transfer, error) { - event := new(ERC20Transfer) - if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20DetailedABI is the input ABI used to generate the binding from. -const ERC20DetailedABI = "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20DetailedFuncSigs maps the 4-byte function signature to its string representation. -var ERC20DetailedFuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "313ce567": "decimals()", - "06fdde03": "name()", - "95d89b41": "symbol()", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20Detailed is an auto generated Go binding around an Ethereum contract. -type ERC20Detailed struct { - ERC20DetailedCaller // Read-only binding to the contract - ERC20DetailedTransactor // Write-only binding to the contract - ERC20DetailedFilterer // Log filterer for contract events -} - -// ERC20DetailedCaller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20DetailedCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20DetailedTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20DetailedFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20DetailedSession struct { - Contract *ERC20Detailed // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20DetailedCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20DetailedCallerSession struct { - Contract *ERC20DetailedCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20DetailedTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20DetailedTransactorSession struct { - Contract *ERC20DetailedTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20DetailedRaw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20DetailedRaw struct { - Contract *ERC20Detailed // Generic contract binding to access the raw methods on -} - -// ERC20DetailedCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20DetailedCallerRaw struct { - Contract *ERC20DetailedCaller // Generic read-only contract binding to access the raw methods on -} - -// ERC20DetailedTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20DetailedTransactorRaw struct { - Contract *ERC20DetailedTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20Detailed creates a new instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20Detailed(address common.Address, backend bind.ContractBackend) (*ERC20Detailed, error) { - contract, err := bindERC20Detailed(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20Detailed{ERC20DetailedCaller: ERC20DetailedCaller{contract: contract}, ERC20DetailedTransactor: ERC20DetailedTransactor{contract: contract}, ERC20DetailedFilterer: ERC20DetailedFilterer{contract: contract}}, nil -} - -// NewERC20DetailedCaller creates a new read-only instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedCaller(address common.Address, caller bind.ContractCaller) (*ERC20DetailedCaller, error) { - contract, err := bindERC20Detailed(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20DetailedCaller{contract: contract}, nil -} - -// NewERC20DetailedTransactor creates a new write-only instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20DetailedTransactor, error) { - contract, err := bindERC20Detailed(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20DetailedTransactor{contract: contract}, nil -} - -// NewERC20DetailedFilterer creates a new log filterer instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20DetailedFilterer, error) { - contract, err := bindERC20Detailed(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20DetailedFilterer{contract: contract}, nil -} - -// bindERC20Detailed binds a generic wrapper to an already deployed contract. -func bindERC20Detailed(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20DetailedABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20Detailed *ERC20DetailedRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20Detailed.Contract.ERC20DetailedCaller.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 (_ERC20Detailed *ERC20DetailedRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Detailed.Contract.ERC20DetailedTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Detailed *ERC20DetailedRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Detailed.Contract.ERC20DetailedTransactor.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 (_ERC20Detailed *ERC20DetailedCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20Detailed.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 (_ERC20Detailed *ERC20DetailedTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Detailed.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Detailed *ERC20DetailedTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Detailed.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.Allowance(&_ERC20Detailed.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.Allowance(&_ERC20Detailed.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.BalanceOf(&_ERC20Detailed.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.BalanceOf(&_ERC20Detailed.CallOpts, account) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedCaller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "decimals") - return *ret0, err -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedSession) Decimals() (uint8, error) { - return _ERC20Detailed.Contract.Decimals(&_ERC20Detailed.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedCallerSession) Decimals() (uint8, error) { - return _ERC20Detailed.Contract.Decimals(&_ERC20Detailed.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedCaller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "name") - return *ret0, err -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedSession) Name() (string, error) { - return _ERC20Detailed.Contract.Name(&_ERC20Detailed.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedCallerSession) Name() (string, error) { - return _ERC20Detailed.Contract.Name(&_ERC20Detailed.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedCaller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "symbol") - return *ret0, err -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedSession) Symbol() (string, error) { - return _ERC20Detailed.Contract.Symbol(&_ERC20Detailed.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedCallerSession) Symbol() (string, error) { - return _ERC20Detailed.Contract.Symbol(&_ERC20Detailed.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) TotalSupply() (*big.Int, error) { - return _ERC20Detailed.Contract.TotalSupply(&_ERC20Detailed.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) TotalSupply() (*big.Int, error) { - return _ERC20Detailed.Contract.TotalSupply(&_ERC20Detailed.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Approve(&_ERC20Detailed.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Approve(&_ERC20Detailed.TransactOpts, spender, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Transfer(&_ERC20Detailed.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Transfer(&_ERC20Detailed.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.TransferFrom(&_ERC20Detailed.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.TransferFrom(&_ERC20Detailed.TransactOpts, sender, recipient, amount) -} - -// ERC20DetailedApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20Detailed contract. -type ERC20DetailedApprovalIterator struct { - Event *ERC20DetailedApproval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20DetailedApprovalIterator) 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(ERC20DetailedApproval) - 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(ERC20DetailedApproval) - 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 *ERC20DetailedApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20DetailedApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20DetailedApproval represents a Approval event raised by the ERC20Detailed contract. -type ERC20DetailedApproval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20DetailedApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20Detailed.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC20DetailedApprovalIterator{contract: _ERC20Detailed.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20DetailedApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20Detailed.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20DetailedApproval) - if err := _ERC20Detailed.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) ParseApproval(log types.Log) (*ERC20DetailedApproval, error) { - event := new(ERC20DetailedApproval) - if err := _ERC20Detailed.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20DetailedTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20Detailed contract. -type ERC20DetailedTransferIterator struct { - Event *ERC20DetailedTransfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20DetailedTransferIterator) 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(ERC20DetailedTransfer) - 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(ERC20DetailedTransfer) - 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 *ERC20DetailedTransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20DetailedTransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20DetailedTransfer represents a Transfer event raised by the ERC20Detailed contract. -type ERC20DetailedTransfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20DetailedTransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20Detailed.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC20DetailedTransferIterator{contract: _ERC20Detailed.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20DetailedTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20Detailed.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20DetailedTransfer) - if err := _ERC20Detailed.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) ParseTransfer(log types.Log) (*ERC20DetailedTransfer, error) { - event := new(ERC20DetailedTransfer) - if err := _ERC20Detailed.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// IERC20ABI is the input ABI used to generate the binding from. -const IERC20ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// IERC20FuncSigs maps the 4-byte function signature to its string representation. -var IERC20FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// IERC20 is an auto generated Go binding around an Ethereum contract. -type IERC20 struct { - IERC20Caller // Read-only binding to the contract - IERC20Transactor // Write-only binding to the contract - IERC20Filterer // Log filterer for contract events -} - -// IERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type IERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type IERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IERC20Session struct { - Contract *IERC20 // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IERC20CallerSession struct { - Contract *IERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IERC20TransactorSession struct { - Contract *IERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type IERC20Raw struct { - Contract *IERC20 // Generic contract binding to access the raw methods on -} - -// IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IERC20CallerRaw struct { - Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IERC20TransactorRaw struct { - Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract. -func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) { - contract, err := bindIERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil -} - -// NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract. -func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) { - contract, err := bindIERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IERC20Caller{contract: contract}, nil -} - -// NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract. -func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) { - contract, err := bindIERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IERC20Transactor{contract: contract}, nil -} - -// NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract. -func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) { - contract, err := bindIERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IERC20Filterer{contract: contract}, nil -} - -// bindIERC20 binds a generic wrapper to an already deployed contract. -func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IERC20ABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IERC20.Contract.IERC20Caller.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 (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IERC20.Contract.IERC20Transactor.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 (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IERC20.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 (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IERC20.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) { - return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) { - return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) -} - -// IERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20 contract. -type IERC20ApprovalIterator struct { - Event *IERC20Approval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *IERC20ApprovalIterator) 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(IERC20Approval) - 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(IERC20Approval) - 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 *IERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IERC20Approval represents a Approval event raised by the IERC20 contract. -type IERC20Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &IERC20ApprovalIterator{contract: _IERC20.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _IERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(IERC20Approval) - if err := _IERC20.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) { - event := new(IERC20Approval) - if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// IERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20 contract. -type IERC20TransferIterator struct { - Event *IERC20Transfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *IERC20TransferIterator) 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(IERC20Transfer) - 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(IERC20Transfer) - 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 *IERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IERC20Transfer represents a Transfer event raised by the IERC20 contract. -type IERC20Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &IERC20TransferIterator{contract: _IERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _IERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(IERC20Transfer) - if err := _IERC20.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) { - event := new(IERC20Transfer) - if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// OEP4TemplateABI is the input ABI used to generate the binding from. -const OEP4TemplateABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proxyContractAddress\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"Operator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxyHash\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"deletageToProxy\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proxyHash\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// OEP4TemplateFuncSigs maps the 4-byte function signature to its string representation. -var OEP4TemplateFuncSigs = map[string]string{ - "2dd07fbc": "Operator()", - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "313ce567": "decimals()", - "a457c2d7": "decreaseAllowance(address,uint256)", - "f4b30f5c": "deletageToProxy(address,uint256)", - "39509351": "increaseAllowance(address,uint256)", - "06fdde03": "name()", - "809cee2f": "proxyHash()", - "95d89b41": "symbol()", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// OEP4TemplateBin is the compiled bytecode used for deploying new contracts. -var OEP4TemplateBin = "0x60806040523480156200001157600080fd5b5060405162000ff238038062000ff2833981810160405260208110156200003757600080fd5b5051604080518082018252600d81526c4f4550342054656d706c61746560981b60208281019182528351808501909452600584526413d1540d1560da1b9084015281519192916009916200008f916003919062000289565b508151620000a590600490602085019062000289565b506005805460ff191660ff9290921691909117905550620000cf9050306509184e72a00062000121565b620000e26001600160e01b036200022216565b60058054610100600160a81b0319166101006001600160a01b0393841602179055600680546001600160a01b031916929091169190911790556200032b565b6001600160a01b0382166200017d576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b62000199816002546200022760201b62000acf1790919060201c565b6002556001600160a01b03821660009081526020818152604090912054620001cc91839062000acf62000227821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b335b90565b60008282018381101562000282576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002cc57805160ff1916838001178555620002fc565b82800160010185558215620002fc579182015b82811115620002fc578251825591602001919060010190620002df565b506200030a9291506200030e565b5090565b6200022491905b808211156200030a576000815560010162000315565b610cb7806200033b6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c578063a457c2d711610066578063a457c2d7146102a0578063a9059cbb146102cc578063dd62ed3e146102f8578063f4b30f5c14610326576100ea565b806370a082311461026a578063809cee2f1461029057806395d89b4114610298576100ea565b806323b872dd116100c857806323b872dd146101c65780632dd07fbc146101fc578063313ce56714610220578063395093511461023e576100ea565b806306fdde03146100ef578063095ea7b31461016c57806318160ddd146101ac575b600080fd5b6100f7610352565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101986004803603604081101561018257600080fd5b506001600160a01b0381351690602001356103e8565b604080519115158252519081900360200190f35b6101b4610405565b60408051918252519081900360200190f35b610198600480360360608110156101dc57600080fd5b506001600160a01b0381358116916020810135909116906040013561040b565b610204610498565b604080516001600160a01b039092168252519081900360200190f35b6102286104ac565b6040805160ff9092168252519081900360200190f35b6101986004803603604081101561025457600080fd5b506001600160a01b0381351690602001356104b5565b6101b46004803603602081101561028057600080fd5b50356001600160a01b0316610509565b610204610524565b6100f7610533565b610198600480360360408110156102b657600080fd5b506001600160a01b038135169060200135610594565b610198600480360360408110156102e257600080fd5b506001600160a01b038135169060200135610602565b6101b46004803603604081101561030e57600080fd5b506001600160a01b0381358116916020013516610616565b6101986004803603604081101561033c57600080fd5b506001600160a01b038135169060200135610641565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103de5780601f106103b3576101008083540402835291602001916103de565b820191906000526020600020905b8154815290600101906020018083116103c157829003601f168201915b5050505050905090565b60006103fc6103f56107ec565b84846107f0565b50600192915050565b60025490565b60006104188484846108dc565b61048e846104246107ec565b61048985604051806060016040528060288152602001610b9c602891396001600160a01b038a166000908152600160205260408120906104626107ec565b6001600160a01b03168152602081019190915260400160002054919063ffffffff610a3816565b6107f0565b5060019392505050565b60055461010090046001600160a01b031681565b60055460ff1690565b60006103fc6104c26107ec565b8461048985600160006104d36107ec565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff610acf16565b6001600160a01b031660009081526020819052604090205490565b6006546001600160a01b031681565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103de5780601f106103b3576101008083540402835291602001916103de565b60006103fc6105a16107ec565b8461048985604051806060016040528060258152602001610c5e60259139600160006105cb6107ec565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff610a3816565b60006103fc61060f6107ec565b84846108dc565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60055460009061010090046001600160a01b031661065d6107ec565b6001600160a01b0316146106b8576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c79204f70657261746f7220686173206163636573732100000000000000604482015290519081900360640190fd5b6006546001600160a01b03161561071a576006546001600160a01b038481169116146107155760405162461bcd60e51b8152600401808060200182810382526029815260200180610c356029913960400191505060405180910390fd5b610736565b600680546001600160a01b0319166001600160a01b0385161790555b6040805163a9059cbb60e01b81526001600160a01b0385166004820152602481018490529051309163a9059cbb9160448083019260209291908290030181600087803b15801561078557600080fd5b505af1158015610799573d6000803e3d6000fd5b505050506040513d60208110156107af57600080fd5b50516103fc5760405162461bcd60e51b8152600401808060200182810382526028815260200180610be96028913960400191505060405180910390fd5b3390565b6001600160a01b0383166108355760405162461bcd60e51b8152600401808060200182810382526024815260200180610c116024913960400191505060405180910390fd5b6001600160a01b03821661087a5760405162461bcd60e51b8152600401808060200182810382526022815260200180610b546022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166109215760405162461bcd60e51b8152600401808060200182810382526025815260200180610bc46025913960400191505060405180910390fd5b6001600160a01b0382166109665760405162461bcd60e51b8152600401808060200182810382526023815260200180610b316023913960400191505060405180910390fd5b6109a981604051806060016040528060268152602001610b76602691396001600160a01b038616600090815260208190526040902054919063ffffffff610a3816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546109de908263ffffffff610acf16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610ac75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610a8c578181015183820152602001610a74565b50505050905090810190601f168015610ab95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610b29576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f20616464726573737472616e7366657220746f6b656e20746f2070726f787920636f6e7472616374206661696c65642145524332303a20617070726f76652066726f6d20746865207a65726f206164647265737370726f787920636f6e747261637420616464726573732063616e6e6f74206265206368616e6765642145524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a7231582097ac2a4ac68788417ababb77637fd7fa29fa23a0a3ab9da40fdf5a537af0195964736f6c634300050f0032" - -// DeployOEP4Template deploys a new Ethereum contract, binding an instance of OEP4Template to it. -func DeployOEP4Template(auth *bind.TransactOpts, backend bind.ContractBackend, proxyContractAddress common.Address) (common.Address, *types.Transaction, *OEP4Template, error) { - parsed, err := abi.JSON(strings.NewReader(OEP4TemplateABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(OEP4TemplateBin), backend, proxyContractAddress) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &OEP4Template{OEP4TemplateCaller: OEP4TemplateCaller{contract: contract}, OEP4TemplateTransactor: OEP4TemplateTransactor{contract: contract}, OEP4TemplateFilterer: OEP4TemplateFilterer{contract: contract}}, nil -} - -// OEP4Template is an auto generated Go binding around an Ethereum contract. -type OEP4Template struct { - OEP4TemplateCaller // Read-only binding to the contract - OEP4TemplateTransactor // Write-only binding to the contract - OEP4TemplateFilterer // Log filterer for contract events -} - -// OEP4TemplateCaller is an auto generated read-only Go binding around an Ethereum contract. -type OEP4TemplateCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// OEP4TemplateTransactor is an auto generated write-only Go binding around an Ethereum contract. -type OEP4TemplateTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// OEP4TemplateFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type OEP4TemplateFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// OEP4TemplateSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type OEP4TemplateSession struct { - Contract *OEP4Template // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// OEP4TemplateCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type OEP4TemplateCallerSession struct { - Contract *OEP4TemplateCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// OEP4TemplateTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type OEP4TemplateTransactorSession struct { - Contract *OEP4TemplateTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// OEP4TemplateRaw is an auto generated low-level Go binding around an Ethereum contract. -type OEP4TemplateRaw struct { - Contract *OEP4Template // Generic contract binding to access the raw methods on -} - -// OEP4TemplateCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type OEP4TemplateCallerRaw struct { - Contract *OEP4TemplateCaller // Generic read-only contract binding to access the raw methods on -} - -// OEP4TemplateTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type OEP4TemplateTransactorRaw struct { - Contract *OEP4TemplateTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewOEP4Template creates a new instance of OEP4Template, bound to a specific deployed contract. -func NewOEP4Template(address common.Address, backend bind.ContractBackend) (*OEP4Template, error) { - contract, err := bindOEP4Template(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &OEP4Template{OEP4TemplateCaller: OEP4TemplateCaller{contract: contract}, OEP4TemplateTransactor: OEP4TemplateTransactor{contract: contract}, OEP4TemplateFilterer: OEP4TemplateFilterer{contract: contract}}, nil -} - -// NewOEP4TemplateCaller creates a new read-only instance of OEP4Template, bound to a specific deployed contract. -func NewOEP4TemplateCaller(address common.Address, caller bind.ContractCaller) (*OEP4TemplateCaller, error) { - contract, err := bindOEP4Template(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &OEP4TemplateCaller{contract: contract}, nil -} - -// NewOEP4TemplateTransactor creates a new write-only instance of OEP4Template, bound to a specific deployed contract. -func NewOEP4TemplateTransactor(address common.Address, transactor bind.ContractTransactor) (*OEP4TemplateTransactor, error) { - contract, err := bindOEP4Template(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &OEP4TemplateTransactor{contract: contract}, nil -} - -// NewOEP4TemplateFilterer creates a new log filterer instance of OEP4Template, bound to a specific deployed contract. -func NewOEP4TemplateFilterer(address common.Address, filterer bind.ContractFilterer) (*OEP4TemplateFilterer, error) { - contract, err := bindOEP4Template(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &OEP4TemplateFilterer{contract: contract}, nil -} - -// bindOEP4Template binds a generic wrapper to an already deployed contract. -func bindOEP4Template(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(OEP4TemplateABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_OEP4Template *OEP4TemplateRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _OEP4Template.Contract.OEP4TemplateCaller.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 (_OEP4Template *OEP4TemplateRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _OEP4Template.Contract.OEP4TemplateTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_OEP4Template *OEP4TemplateRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _OEP4Template.Contract.OEP4TemplateTransactor.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 (_OEP4Template *OEP4TemplateCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _OEP4Template.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 (_OEP4Template *OEP4TemplateTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _OEP4Template.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_OEP4Template *OEP4TemplateTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _OEP4Template.Contract.contract.Transact(opts, method, params...) -} - -// Operator is a free data retrieval call binding the contract method 0x2dd07fbc. -// -// Solidity: function Operator() view returns(address) -func (_OEP4Template *OEP4TemplateCaller) Operator(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _OEP4Template.contract.Call(opts, out, "Operator") - return *ret0, err -} - -// Operator is a free data retrieval call binding the contract method 0x2dd07fbc. -// -// Solidity: function Operator() view returns(address) -func (_OEP4Template *OEP4TemplateSession) Operator() (common.Address, error) { - return _OEP4Template.Contract.Operator(&_OEP4Template.CallOpts) -} - -// Operator is a free data retrieval call binding the contract method 0x2dd07fbc. -// -// Solidity: function Operator() view returns(address) -func (_OEP4Template *OEP4TemplateCallerSession) Operator() (common.Address, error) { - return _OEP4Template.Contract.Operator(&_OEP4Template.CallOpts) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_OEP4Template *OEP4TemplateCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _OEP4Template.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_OEP4Template *OEP4TemplateSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _OEP4Template.Contract.Allowance(&_OEP4Template.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_OEP4Template *OEP4TemplateCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _OEP4Template.Contract.Allowance(&_OEP4Template.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_OEP4Template *OEP4TemplateCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _OEP4Template.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_OEP4Template *OEP4TemplateSession) BalanceOf(account common.Address) (*big.Int, error) { - return _OEP4Template.Contract.BalanceOf(&_OEP4Template.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_OEP4Template *OEP4TemplateCallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _OEP4Template.Contract.BalanceOf(&_OEP4Template.CallOpts, account) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_OEP4Template *OEP4TemplateCaller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _OEP4Template.contract.Call(opts, out, "decimals") - return *ret0, err -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_OEP4Template *OEP4TemplateSession) Decimals() (uint8, error) { - return _OEP4Template.Contract.Decimals(&_OEP4Template.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_OEP4Template *OEP4TemplateCallerSession) Decimals() (uint8, error) { - return _OEP4Template.Contract.Decimals(&_OEP4Template.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_OEP4Template *OEP4TemplateCaller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _OEP4Template.contract.Call(opts, out, "name") - return *ret0, err -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_OEP4Template *OEP4TemplateSession) Name() (string, error) { - return _OEP4Template.Contract.Name(&_OEP4Template.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_OEP4Template *OEP4TemplateCallerSession) Name() (string, error) { - return _OEP4Template.Contract.Name(&_OEP4Template.CallOpts) -} - -// ProxyHash is a free data retrieval call binding the contract method 0x809cee2f. -// -// Solidity: function proxyHash() view returns(address) -func (_OEP4Template *OEP4TemplateCaller) ProxyHash(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _OEP4Template.contract.Call(opts, out, "proxyHash") - return *ret0, err -} - -// ProxyHash is a free data retrieval call binding the contract method 0x809cee2f. -// -// Solidity: function proxyHash() view returns(address) -func (_OEP4Template *OEP4TemplateSession) ProxyHash() (common.Address, error) { - return _OEP4Template.Contract.ProxyHash(&_OEP4Template.CallOpts) -} - -// ProxyHash is a free data retrieval call binding the contract method 0x809cee2f. -// -// Solidity: function proxyHash() view returns(address) -func (_OEP4Template *OEP4TemplateCallerSession) ProxyHash() (common.Address, error) { - return _OEP4Template.Contract.ProxyHash(&_OEP4Template.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_OEP4Template *OEP4TemplateCaller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _OEP4Template.contract.Call(opts, out, "symbol") - return *ret0, err -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_OEP4Template *OEP4TemplateSession) Symbol() (string, error) { - return _OEP4Template.Contract.Symbol(&_OEP4Template.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_OEP4Template *OEP4TemplateCallerSession) Symbol() (string, error) { - return _OEP4Template.Contract.Symbol(&_OEP4Template.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_OEP4Template *OEP4TemplateCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _OEP4Template.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_OEP4Template *OEP4TemplateSession) TotalSupply() (*big.Int, error) { - return _OEP4Template.Contract.TotalSupply(&_OEP4Template.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_OEP4Template *OEP4TemplateCallerSession) TotalSupply() (*big.Int, error) { - return _OEP4Template.Contract.TotalSupply(&_OEP4Template.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_OEP4Template *OEP4TemplateTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _OEP4Template.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_OEP4Template *OEP4TemplateSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _OEP4Template.Contract.Approve(&_OEP4Template.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_OEP4Template *OEP4TemplateTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _OEP4Template.Contract.Approve(&_OEP4Template.TransactOpts, spender, amount) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_OEP4Template *OEP4TemplateTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _OEP4Template.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_OEP4Template *OEP4TemplateSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _OEP4Template.Contract.DecreaseAllowance(&_OEP4Template.TransactOpts, spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_OEP4Template *OEP4TemplateTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _OEP4Template.Contract.DecreaseAllowance(&_OEP4Template.TransactOpts, spender, subtractedValue) -} - -// DeletageToProxy is a paid mutator transaction binding the contract method 0xf4b30f5c. -// -// Solidity: function deletageToProxy(address _proxyHash, uint256 _amount) returns(bool) -func (_OEP4Template *OEP4TemplateTransactor) DeletageToProxy(opts *bind.TransactOpts, _proxyHash common.Address, _amount *big.Int) (*types.Transaction, error) { - return _OEP4Template.contract.Transact(opts, "deletageToProxy", _proxyHash, _amount) -} - -// DeletageToProxy is a paid mutator transaction binding the contract method 0xf4b30f5c. -// -// Solidity: function deletageToProxy(address _proxyHash, uint256 _amount) returns(bool) -func (_OEP4Template *OEP4TemplateSession) DeletageToProxy(_proxyHash common.Address, _amount *big.Int) (*types.Transaction, error) { - return _OEP4Template.Contract.DeletageToProxy(&_OEP4Template.TransactOpts, _proxyHash, _amount) -} - -// DeletageToProxy is a paid mutator transaction binding the contract method 0xf4b30f5c. -// -// Solidity: function deletageToProxy(address _proxyHash, uint256 _amount) returns(bool) -func (_OEP4Template *OEP4TemplateTransactorSession) DeletageToProxy(_proxyHash common.Address, _amount *big.Int) (*types.Transaction, error) { - return _OEP4Template.Contract.DeletageToProxy(&_OEP4Template.TransactOpts, _proxyHash, _amount) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_OEP4Template *OEP4TemplateTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _OEP4Template.contract.Transact(opts, "increaseAllowance", spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_OEP4Template *OEP4TemplateSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _OEP4Template.Contract.IncreaseAllowance(&_OEP4Template.TransactOpts, spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_OEP4Template *OEP4TemplateTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _OEP4Template.Contract.IncreaseAllowance(&_OEP4Template.TransactOpts, spender, addedValue) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_OEP4Template *OEP4TemplateTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _OEP4Template.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_OEP4Template *OEP4TemplateSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _OEP4Template.Contract.Transfer(&_OEP4Template.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_OEP4Template *OEP4TemplateTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _OEP4Template.Contract.Transfer(&_OEP4Template.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_OEP4Template *OEP4TemplateTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _OEP4Template.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_OEP4Template *OEP4TemplateSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _OEP4Template.Contract.TransferFrom(&_OEP4Template.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_OEP4Template *OEP4TemplateTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _OEP4Template.Contract.TransferFrom(&_OEP4Template.TransactOpts, sender, recipient, amount) -} - -// OEP4TemplateApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the OEP4Template contract. -type OEP4TemplateApprovalIterator struct { - Event *OEP4TemplateApproval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *OEP4TemplateApprovalIterator) 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(OEP4TemplateApproval) - 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(OEP4TemplateApproval) - 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 *OEP4TemplateApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *OEP4TemplateApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// OEP4TemplateApproval represents a Approval event raised by the OEP4Template contract. -type OEP4TemplateApproval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_OEP4Template *OEP4TemplateFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*OEP4TemplateApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _OEP4Template.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &OEP4TemplateApprovalIterator{contract: _OEP4Template.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_OEP4Template *OEP4TemplateFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *OEP4TemplateApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _OEP4Template.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(OEP4TemplateApproval) - if err := _OEP4Template.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_OEP4Template *OEP4TemplateFilterer) ParseApproval(log types.Log) (*OEP4TemplateApproval, error) { - event := new(OEP4TemplateApproval) - if err := _OEP4Template.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// OEP4TemplateTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the OEP4Template contract. -type OEP4TemplateTransferIterator struct { - Event *OEP4TemplateTransfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *OEP4TemplateTransferIterator) 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(OEP4TemplateTransfer) - 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(OEP4TemplateTransfer) - 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 *OEP4TemplateTransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *OEP4TemplateTransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// OEP4TemplateTransfer represents a Transfer event raised by the OEP4Template contract. -type OEP4TemplateTransfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_OEP4Template *OEP4TemplateFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*OEP4TemplateTransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _OEP4Template.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &OEP4TemplateTransferIterator{contract: _OEP4Template.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_OEP4Template *OEP4TemplateFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *OEP4TemplateTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _OEP4Template.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(OEP4TemplateTransfer) - if err := _OEP4Template.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_OEP4Template *OEP4TemplateFilterer) ParseTransfer(log types.Log) (*OEP4TemplateTransfer, error) { - event := new(OEP4TemplateTransfer) - if err := _OEP4Template.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// SafeMathABI is the input ABI used to generate the binding from. -const SafeMathABI = "[]" - -// SafeMathBin is the compiled bytecode used for deploying new contracts. -var SafeMathBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820db757905f1c1b49b781ddf45e615d2bbf336aeac8bb9ae61ed6fca08e24c7dc364736f6c634300050f0032" - -// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. -func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// SafeMath is an auto generated Go binding around an Ethereum contract. -type SafeMath struct { - SafeMathCaller // Read-only binding to the contract - SafeMathTransactor // Write-only binding to the contract - SafeMathFilterer // Log filterer for contract events -} - -// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. -type SafeMathCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SafeMathTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SafeMathFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SafeMathSession struct { - Contract *SafeMath // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SafeMathCallerSession struct { - Contract *SafeMathCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SafeMathTransactorSession struct { - Contract *SafeMathTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. -type SafeMathRaw struct { - Contract *SafeMath // Generic contract binding to access the raw methods on -} - -// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SafeMathCallerRaw struct { - Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on -} - -// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SafeMathTransactorRaw struct { - Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. -func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { - contract, err := bindSafeMath(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { - contract, err := bindSafeMath(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SafeMathCaller{contract: contract}, nil -} - -// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { - contract, err := bindSafeMath(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SafeMathTransactor{contract: contract}, nil -} - -// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { - contract, err := bindSafeMath(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SafeMathFilterer{contract: contract}, nil -} - -// bindSafeMath binds a generic wrapper to an already deployed contract. -func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transact(opts, method, params...) -} diff --git a/chains/eth/abi/ongx/ongx_abi.go b/chains/eth/abi/ongx/ongx_abi.go deleted file mode 100644 index 48f8cde..0000000 --- a/chains/eth/abi/ongx/ongx_abi.go +++ /dev/null @@ -1,3026 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package ongx - -import ( - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// ContextABI is the input ABI used to generate the binding from. -const ContextABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" - -// Context is an auto generated Go binding around an Ethereum contract. -type Context struct { - ContextCaller // Read-only binding to the contract - ContextTransactor // Write-only binding to the contract - ContextFilterer // Log filterer for contract events -} - -// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. -type ContextCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ContextTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ContextFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ContextSession struct { - Contract *Context // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ContextCallerSession struct { - Contract *ContextCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ContextTransactorSession struct { - Contract *ContextTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. -type ContextRaw struct { - Contract *Context // Generic contract binding to access the raw methods on -} - -// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ContextCallerRaw struct { - Contract *ContextCaller // Generic read-only contract binding to access the raw methods on -} - -// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ContextTransactorRaw struct { - Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewContext creates a new instance of Context, bound to a specific deployed contract. -func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { - contract, err := bindContext(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil -} - -// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. -func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { - contract, err := bindContext(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ContextCaller{contract: contract}, nil -} - -// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. -func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { - contract, err := bindContext(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ContextTransactor{contract: contract}, nil -} - -// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. -func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { - contract, err := bindContext(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ContextFilterer{contract: contract}, nil -} - -// bindContext binds a generic wrapper to an already deployed contract. -func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ContextABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.Contract.ContextCaller.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 (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.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 (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.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 (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.contract.Transact(opts, method, params...) -} - -// ERC20ABI is the input ABI used to generate the binding from. -const ERC20ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20FuncSigs maps the 4-byte function signature to its string representation. -var ERC20FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "a457c2d7": "decreaseAllowance(address,uint256)", - "39509351": "increaseAllowance(address,uint256)", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20Bin is the compiled bytecode used for deploying new contracts. -var ERC20Bin = "0x608060405261083b806100136000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a0823114610149578063a457c2d71461016f578063a9059cbb1461019b578063dd62ed3e146101c757610088565b8063095ea7b31461008d57806318160ddd146100cd57806323b872dd146100e7578063395093511461011d575b600080fd5b6100b9600480360360408110156100a357600080fd5b506001600160a01b0381351690602001356101f5565b604080519115158252519081900360200190f35b6100d5610212565b60408051918252519081900360200190f35b6100b9600480360360608110156100fd57600080fd5b506001600160a01b03813581169160208101359091169060400135610218565b6100b96004803603604081101561013357600080fd5b506001600160a01b0381351690602001356102a5565b6100d56004803603602081101561015f57600080fd5b50356001600160a01b03166102f9565b6100b96004803603604081101561018557600080fd5b506001600160a01b038135169060200135610314565b6100b9600480360360408110156101b157600080fd5b506001600160a01b038135169060200135610382565b6100d5600480360360408110156101dd57600080fd5b506001600160a01b0381358116916020013516610396565b60006102096102026103c1565b84846103c5565b50600192915050565b60025490565b60006102258484846104b1565b61029b846102316103c1565b61029685604051806060016040528060288152602001610771602891396001600160a01b038a1660009081526001602052604081209061026f6103c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61060d16565b6103c5565b5060019392505050565b60006102096102b26103c1565b8461029685600160006102c36103c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6106a416565b6001600160a01b031660009081526020819052604090205490565b60006102096103216103c1565b84610296856040518060600160405280602581526020016107e2602591396001600061034b6103c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61060d16565b600061020961038f6103c1565b84846104b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661040a5760405162461bcd60e51b81526004018080602001828103825260248152602001806107be6024913960400191505060405180910390fd5b6001600160a01b03821661044f5760405162461bcd60e51b81526004018080602001828103825260228152602001806107296022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166104f65760405162461bcd60e51b81526004018080602001828103825260258152602001806107996025913960400191505060405180910390fd5b6001600160a01b03821661053b5760405162461bcd60e51b81526004018080602001828103825260238152602001806107066023913960400191505060405180910390fd5b61057e8160405180606001604052806026815260200161074b602691396001600160a01b038616600090815260208190526040902054919063ffffffff61060d16565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546105b3908263ffffffff6106a416565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561069c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610661578181015183820152602001610649565b50505050905090810190601f16801561068e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156106fe576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820dd68afc24b84623478da74ad90030d8d5b03ae431cb948a20348acf66ded867f64736f6c634300050f0032" - -// DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it. -func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20Bin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil -} - -// ERC20 is an auto generated Go binding around an Ethereum contract. -type ERC20 struct { - ERC20Caller // Read-only binding to the contract - ERC20Transactor // Write-only binding to the contract - ERC20Filterer // Log filterer for contract events -} - -// ERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20Session struct { - Contract *ERC20 // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20CallerSession struct { - Contract *ERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20TransactorSession struct { - Contract *ERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20Raw struct { - Contract *ERC20 // Generic contract binding to access the raw methods on -} - -// ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20CallerRaw struct { - Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20TransactorRaw struct { - Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20 creates a new instance of ERC20, bound to a specific deployed contract. -func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error) { - contract, err := bindERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil -} - -// NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract. -func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error) { - contract, err := bindERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20Caller{contract: contract}, nil -} - -// NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract. -func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error) { - contract, err := bindERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20Transactor{contract: contract}, nil -} - -// NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract. -func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error) { - contract, err := bindERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20Filterer{contract: contract}, nil -} - -// bindERC20 binds a generic wrapper to an already deployed contract. -func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20.Contract.ERC20Caller.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 (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20.Contract.ERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20.Contract.ERC20Transactor.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 (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20.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 (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error) { - return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error) { - return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, amount) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "increaseAllowance", spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) -} - -// ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20 contract. -type ERC20ApprovalIterator struct { - Event *ERC20Approval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20ApprovalIterator) 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(ERC20Approval) - 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(ERC20Approval) - 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 *ERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20Approval represents a Approval event raised by the ERC20 contract. -type ERC20Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC20ApprovalIterator{contract: _ERC20.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20Approval) - if err := _ERC20.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) ParseApproval(log types.Log) (*ERC20Approval, error) { - event := new(ERC20Approval) - if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20 contract. -type ERC20TransferIterator struct { - Event *ERC20Transfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20TransferIterator) 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(ERC20Transfer) - 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(ERC20Transfer) - 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 *ERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20Transfer represents a Transfer event raised by the ERC20 contract. -type ERC20Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC20TransferIterator{contract: _ERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20Transfer) - if err := _ERC20.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) ParseTransfer(log types.Log) (*ERC20Transfer, error) { - event := new(ERC20Transfer) - if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20DetailedABI is the input ABI used to generate the binding from. -const ERC20DetailedABI = "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20DetailedFuncSigs maps the 4-byte function signature to its string representation. -var ERC20DetailedFuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "313ce567": "decimals()", - "06fdde03": "name()", - "95d89b41": "symbol()", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20Detailed is an auto generated Go binding around an Ethereum contract. -type ERC20Detailed struct { - ERC20DetailedCaller // Read-only binding to the contract - ERC20DetailedTransactor // Write-only binding to the contract - ERC20DetailedFilterer // Log filterer for contract events -} - -// ERC20DetailedCaller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20DetailedCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20DetailedTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20DetailedFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20DetailedSession struct { - Contract *ERC20Detailed // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20DetailedCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20DetailedCallerSession struct { - Contract *ERC20DetailedCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20DetailedTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20DetailedTransactorSession struct { - Contract *ERC20DetailedTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20DetailedRaw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20DetailedRaw struct { - Contract *ERC20Detailed // Generic contract binding to access the raw methods on -} - -// ERC20DetailedCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20DetailedCallerRaw struct { - Contract *ERC20DetailedCaller // Generic read-only contract binding to access the raw methods on -} - -// ERC20DetailedTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20DetailedTransactorRaw struct { - Contract *ERC20DetailedTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20Detailed creates a new instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20Detailed(address common.Address, backend bind.ContractBackend) (*ERC20Detailed, error) { - contract, err := bindERC20Detailed(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20Detailed{ERC20DetailedCaller: ERC20DetailedCaller{contract: contract}, ERC20DetailedTransactor: ERC20DetailedTransactor{contract: contract}, ERC20DetailedFilterer: ERC20DetailedFilterer{contract: contract}}, nil -} - -// NewERC20DetailedCaller creates a new read-only instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedCaller(address common.Address, caller bind.ContractCaller) (*ERC20DetailedCaller, error) { - contract, err := bindERC20Detailed(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20DetailedCaller{contract: contract}, nil -} - -// NewERC20DetailedTransactor creates a new write-only instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20DetailedTransactor, error) { - contract, err := bindERC20Detailed(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20DetailedTransactor{contract: contract}, nil -} - -// NewERC20DetailedFilterer creates a new log filterer instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20DetailedFilterer, error) { - contract, err := bindERC20Detailed(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20DetailedFilterer{contract: contract}, nil -} - -// bindERC20Detailed binds a generic wrapper to an already deployed contract. -func bindERC20Detailed(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20DetailedABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20Detailed *ERC20DetailedRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20Detailed.Contract.ERC20DetailedCaller.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 (_ERC20Detailed *ERC20DetailedRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Detailed.Contract.ERC20DetailedTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Detailed *ERC20DetailedRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Detailed.Contract.ERC20DetailedTransactor.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 (_ERC20Detailed *ERC20DetailedCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20Detailed.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 (_ERC20Detailed *ERC20DetailedTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Detailed.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Detailed *ERC20DetailedTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Detailed.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.Allowance(&_ERC20Detailed.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.Allowance(&_ERC20Detailed.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.BalanceOf(&_ERC20Detailed.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.BalanceOf(&_ERC20Detailed.CallOpts, account) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedCaller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "decimals") - return *ret0, err -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedSession) Decimals() (uint8, error) { - return _ERC20Detailed.Contract.Decimals(&_ERC20Detailed.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedCallerSession) Decimals() (uint8, error) { - return _ERC20Detailed.Contract.Decimals(&_ERC20Detailed.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedCaller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "name") - return *ret0, err -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedSession) Name() (string, error) { - return _ERC20Detailed.Contract.Name(&_ERC20Detailed.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedCallerSession) Name() (string, error) { - return _ERC20Detailed.Contract.Name(&_ERC20Detailed.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedCaller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "symbol") - return *ret0, err -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedSession) Symbol() (string, error) { - return _ERC20Detailed.Contract.Symbol(&_ERC20Detailed.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedCallerSession) Symbol() (string, error) { - return _ERC20Detailed.Contract.Symbol(&_ERC20Detailed.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) TotalSupply() (*big.Int, error) { - return _ERC20Detailed.Contract.TotalSupply(&_ERC20Detailed.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) TotalSupply() (*big.Int, error) { - return _ERC20Detailed.Contract.TotalSupply(&_ERC20Detailed.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Approve(&_ERC20Detailed.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Approve(&_ERC20Detailed.TransactOpts, spender, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Transfer(&_ERC20Detailed.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Transfer(&_ERC20Detailed.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.TransferFrom(&_ERC20Detailed.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.TransferFrom(&_ERC20Detailed.TransactOpts, sender, recipient, amount) -} - -// ERC20DetailedApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20Detailed contract. -type ERC20DetailedApprovalIterator struct { - Event *ERC20DetailedApproval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20DetailedApprovalIterator) 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(ERC20DetailedApproval) - 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(ERC20DetailedApproval) - 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 *ERC20DetailedApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20DetailedApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20DetailedApproval represents a Approval event raised by the ERC20Detailed contract. -type ERC20DetailedApproval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20DetailedApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20Detailed.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC20DetailedApprovalIterator{contract: _ERC20Detailed.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20DetailedApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20Detailed.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20DetailedApproval) - if err := _ERC20Detailed.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) ParseApproval(log types.Log) (*ERC20DetailedApproval, error) { - event := new(ERC20DetailedApproval) - if err := _ERC20Detailed.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20DetailedTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20Detailed contract. -type ERC20DetailedTransferIterator struct { - Event *ERC20DetailedTransfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20DetailedTransferIterator) 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(ERC20DetailedTransfer) - 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(ERC20DetailedTransfer) - 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 *ERC20DetailedTransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20DetailedTransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20DetailedTransfer represents a Transfer event raised by the ERC20Detailed contract. -type ERC20DetailedTransfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20DetailedTransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20Detailed.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC20DetailedTransferIterator{contract: _ERC20Detailed.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20DetailedTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20Detailed.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20DetailedTransfer) - if err := _ERC20Detailed.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) ParseTransfer(log types.Log) (*ERC20DetailedTransfer, error) { - event := new(ERC20DetailedTransfer) - if err := _ERC20Detailed.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// IERC20ABI is the input ABI used to generate the binding from. -const IERC20ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// IERC20FuncSigs maps the 4-byte function signature to its string representation. -var IERC20FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// IERC20 is an auto generated Go binding around an Ethereum contract. -type IERC20 struct { - IERC20Caller // Read-only binding to the contract - IERC20Transactor // Write-only binding to the contract - IERC20Filterer // Log filterer for contract events -} - -// IERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type IERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type IERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IERC20Session struct { - Contract *IERC20 // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IERC20CallerSession struct { - Contract *IERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IERC20TransactorSession struct { - Contract *IERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type IERC20Raw struct { - Contract *IERC20 // Generic contract binding to access the raw methods on -} - -// IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IERC20CallerRaw struct { - Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IERC20TransactorRaw struct { - Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract. -func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) { - contract, err := bindIERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil -} - -// NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract. -func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) { - contract, err := bindIERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IERC20Caller{contract: contract}, nil -} - -// NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract. -func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) { - contract, err := bindIERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IERC20Transactor{contract: contract}, nil -} - -// NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract. -func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) { - contract, err := bindIERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IERC20Filterer{contract: contract}, nil -} - -// bindIERC20 binds a generic wrapper to an already deployed contract. -func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IERC20ABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IERC20.Contract.IERC20Caller.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 (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IERC20.Contract.IERC20Transactor.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 (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IERC20.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 (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IERC20.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) { - return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) { - return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) -} - -// IERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20 contract. -type IERC20ApprovalIterator struct { - Event *IERC20Approval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *IERC20ApprovalIterator) 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(IERC20Approval) - 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(IERC20Approval) - 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 *IERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IERC20Approval represents a Approval event raised by the IERC20 contract. -type IERC20Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &IERC20ApprovalIterator{contract: _IERC20.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _IERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(IERC20Approval) - if err := _IERC20.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) { - event := new(IERC20Approval) - if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// IERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20 contract. -type IERC20TransferIterator struct { - Event *IERC20Transfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *IERC20TransferIterator) 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(IERC20Transfer) - 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(IERC20Transfer) - 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 *IERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IERC20Transfer represents a Transfer event raised by the IERC20 contract. -type IERC20Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &IERC20TransferIterator{contract: _IERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _IERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(IERC20Transfer) - if err := _IERC20.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) { - event := new(IERC20Transfer) - if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// ONGXABI is the input ABI used to generate the binding from. -const ONGXABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"proxyContractAddress\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ONGXFuncSigs maps the 4-byte function signature to its string representation. -var ONGXFuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "313ce567": "decimals()", - "a457c2d7": "decreaseAllowance(address,uint256)", - "39509351": "increaseAllowance(address,uint256)", - "06fdde03": "name()", - "95d89b41": "symbol()", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ONGXBin is the compiled bytecode used for deploying new contracts. -var ONGXBin = "0x608060405234801561001057600080fd5b5060405162000ccc38038062000ccc8339818101604052602081101561003557600080fd5b505160408051808201825260098082526827a723902a37b5b2b760b91b60208381019182528451808601909552600485526309e9c8eb60e31b90850152825192939261008391600391610222565b508151610097906004906020850190610222565b506005805460ff191660ff92909216919091179055506100c1905081670de0b6b3a76400006100c7565b506102bd565b6001600160a01b038216610122576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61013b816002546101c160201b6108681790919060201c565b6002556001600160a01b0382166000908152602081815260409091205461016b9183906108686101c1821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008282018381101561021b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061026357805160ff1916838001178555610290565b82800160010185558215610290579182015b82811115610290578251825591602001919060010190610275565b5061029c9291506102a0565b5090565b6102ba91905b8082111561029c57600081556001016102a6565b90565b6109ff80620002cd6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063395093511161007157806339509351146101d957806370a082311461020557806395d89b411461022b578063a457c2d714610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561034f565b604080519115158252519081900360200190f35b61017361036c565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b03813581169160208101359091169060400135610372565b6101c36103ff565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b038135169060200135610408565b6101736004803603602081101561021b57600080fd5b50356001600160a01b031661045c565b6100b6610477565b6101576004803603604081101561024957600080fd5b506001600160a01b0381351690602001356104d8565b6101576004803603604081101561027557600080fd5b506001600160a01b038135169060200135610546565b610173600480360360408110156102a157600080fd5b506001600160a01b038135811691602001351661055a565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b820191906000526020600020905b81548152906001019060200180831161032857829003601f168201915b5050505050905090565b600061036361035c610585565b8484610589565b50600192915050565b60025490565b600061037f848484610675565b6103f58461038b610585565b6103f085604051806060016040528060288152602001610935602891396001600160a01b038a166000908152600160205260408120906103c9610585565b6001600160a01b03168152602081019190915260400160002054919063ffffffff6107d116565b610589565b5060019392505050565b60055460ff1690565b6000610363610415610585565b846103f08560016000610426610585565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff61086816565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b60006103636104e5610585565b846103f0856040518060600160405280602581526020016109a6602591396001600061050f610585565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff6107d116565b6000610363610553610585565b8484610675565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166105ce5760405162461bcd60e51b81526004018080602001828103825260248152602001806109826024913960400191505060405180910390fd5b6001600160a01b0382166106135760405162461bcd60e51b81526004018080602001828103825260228152602001806108ed6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106ba5760405162461bcd60e51b815260040180806020018281038252602581526020018061095d6025913960400191505060405180910390fd5b6001600160a01b0382166106ff5760405162461bcd60e51b81526004018080602001828103825260238152602001806108ca6023913960400191505060405180910390fd5b6107428160405180606001604052806026815260200161090f602691396001600160a01b038616600090815260208190526040902054919063ffffffff6107d116565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610777908263ffffffff61086816565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108605760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561082557818101518382015260200161080d565b50505050905090810190601f1680156108525780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156108c2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a723158203cc3b4bc5eb4d65675af4221b7a40688e8d4b5ab61c138a31b8f92492f766c7664736f6c634300050f0032" - -// DeployONGX deploys a new Ethereum contract, binding an instance of ONGX to it. -func DeployONGX(auth *bind.TransactOpts, backend bind.ContractBackend, proxyContractAddress common.Address) (common.Address, *types.Transaction, *ONGX, error) { - parsed, err := abi.JSON(strings.NewReader(ONGXABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ONGXBin), backend, proxyContractAddress) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ONGX{ONGXCaller: ONGXCaller{contract: contract}, ONGXTransactor: ONGXTransactor{contract: contract}, ONGXFilterer: ONGXFilterer{contract: contract}}, nil -} - -// ONGX is an auto generated Go binding around an Ethereum contract. -type ONGX struct { - ONGXCaller // Read-only binding to the contract - ONGXTransactor // Write-only binding to the contract - ONGXFilterer // Log filterer for contract events -} - -// ONGXCaller is an auto generated read-only Go binding around an Ethereum contract. -type ONGXCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ONGXTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ONGXTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ONGXFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ONGXFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ONGXSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ONGXSession struct { - Contract *ONGX // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ONGXCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ONGXCallerSession struct { - Contract *ONGXCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ONGXTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ONGXTransactorSession struct { - Contract *ONGXTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ONGXRaw is an auto generated low-level Go binding around an Ethereum contract. -type ONGXRaw struct { - Contract *ONGX // Generic contract binding to access the raw methods on -} - -// ONGXCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ONGXCallerRaw struct { - Contract *ONGXCaller // Generic read-only contract binding to access the raw methods on -} - -// ONGXTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ONGXTransactorRaw struct { - Contract *ONGXTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewONGX creates a new instance of ONGX, bound to a specific deployed contract. -func NewONGX(address common.Address, backend bind.ContractBackend) (*ONGX, error) { - contract, err := bindONGX(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ONGX{ONGXCaller: ONGXCaller{contract: contract}, ONGXTransactor: ONGXTransactor{contract: contract}, ONGXFilterer: ONGXFilterer{contract: contract}}, nil -} - -// NewONGXCaller creates a new read-only instance of ONGX, bound to a specific deployed contract. -func NewONGXCaller(address common.Address, caller bind.ContractCaller) (*ONGXCaller, error) { - contract, err := bindONGX(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ONGXCaller{contract: contract}, nil -} - -// NewONGXTransactor creates a new write-only instance of ONGX, bound to a specific deployed contract. -func NewONGXTransactor(address common.Address, transactor bind.ContractTransactor) (*ONGXTransactor, error) { - contract, err := bindONGX(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ONGXTransactor{contract: contract}, nil -} - -// NewONGXFilterer creates a new log filterer instance of ONGX, bound to a specific deployed contract. -func NewONGXFilterer(address common.Address, filterer bind.ContractFilterer) (*ONGXFilterer, error) { - contract, err := bindONGX(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ONGXFilterer{contract: contract}, nil -} - -// bindONGX binds a generic wrapper to an already deployed contract. -func bindONGX(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ONGXABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ONGX *ONGXRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ONGX.Contract.ONGXCaller.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 (_ONGX *ONGXRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ONGX.Contract.ONGXTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ONGX *ONGXRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ONGX.Contract.ONGXTransactor.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 (_ONGX *ONGXCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ONGX.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 (_ONGX *ONGXTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ONGX.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ONGX *ONGXTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ONGX.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ONGX *ONGXCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ONGX.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ONGX *ONGXSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ONGX.Contract.Allowance(&_ONGX.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ONGX *ONGXCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ONGX.Contract.Allowance(&_ONGX.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ONGX *ONGXCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ONGX.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ONGX *ONGXSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ONGX.Contract.BalanceOf(&_ONGX.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ONGX *ONGXCallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ONGX.Contract.BalanceOf(&_ONGX.CallOpts, account) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ONGX *ONGXCaller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _ONGX.contract.Call(opts, out, "decimals") - return *ret0, err -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ONGX *ONGXSession) Decimals() (uint8, error) { - return _ONGX.Contract.Decimals(&_ONGX.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ONGX *ONGXCallerSession) Decimals() (uint8, error) { - return _ONGX.Contract.Decimals(&_ONGX.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ONGX *ONGXCaller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ONGX.contract.Call(opts, out, "name") - return *ret0, err -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ONGX *ONGXSession) Name() (string, error) { - return _ONGX.Contract.Name(&_ONGX.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ONGX *ONGXCallerSession) Name() (string, error) { - return _ONGX.Contract.Name(&_ONGX.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ONGX *ONGXCaller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ONGX.contract.Call(opts, out, "symbol") - return *ret0, err -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ONGX *ONGXSession) Symbol() (string, error) { - return _ONGX.Contract.Symbol(&_ONGX.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ONGX *ONGXCallerSession) Symbol() (string, error) { - return _ONGX.Contract.Symbol(&_ONGX.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ONGX *ONGXCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ONGX.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ONGX *ONGXSession) TotalSupply() (*big.Int, error) { - return _ONGX.Contract.TotalSupply(&_ONGX.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ONGX *ONGXCallerSession) TotalSupply() (*big.Int, error) { - return _ONGX.Contract.TotalSupply(&_ONGX.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ONGX *ONGXTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONGX.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ONGX *ONGXSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONGX.Contract.Approve(&_ONGX.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ONGX *ONGXTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONGX.Contract.Approve(&_ONGX.TransactOpts, spender, amount) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ONGX *ONGXTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ONGX.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ONGX *ONGXSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ONGX.Contract.DecreaseAllowance(&_ONGX.TransactOpts, spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ONGX *ONGXTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ONGX.Contract.DecreaseAllowance(&_ONGX.TransactOpts, spender, subtractedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ONGX *ONGXTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ONGX.contract.Transact(opts, "increaseAllowance", spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ONGX *ONGXSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ONGX.Contract.IncreaseAllowance(&_ONGX.TransactOpts, spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ONGX *ONGXTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ONGX.Contract.IncreaseAllowance(&_ONGX.TransactOpts, spender, addedValue) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ONGX *ONGXTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONGX.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ONGX *ONGXSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONGX.Contract.Transfer(&_ONGX.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ONGX *ONGXTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONGX.Contract.Transfer(&_ONGX.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ONGX *ONGXTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONGX.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ONGX *ONGXSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONGX.Contract.TransferFrom(&_ONGX.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ONGX *ONGXTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONGX.Contract.TransferFrom(&_ONGX.TransactOpts, sender, recipient, amount) -} - -// ONGXApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ONGX contract. -type ONGXApprovalIterator struct { - Event *ONGXApproval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ONGXApprovalIterator) 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(ONGXApproval) - 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(ONGXApproval) - 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 *ONGXApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ONGXApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ONGXApproval represents a Approval event raised by the ONGX contract. -type ONGXApproval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ONGX *ONGXFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ONGXApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ONGX.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ONGXApprovalIterator{contract: _ONGX.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ONGX *ONGXFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ONGXApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ONGX.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ONGXApproval) - if err := _ONGX.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ONGX *ONGXFilterer) ParseApproval(log types.Log) (*ONGXApproval, error) { - event := new(ONGXApproval) - if err := _ONGX.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ONGXTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ONGX contract. -type ONGXTransferIterator struct { - Event *ONGXTransfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ONGXTransferIterator) 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(ONGXTransfer) - 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(ONGXTransfer) - 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 *ONGXTransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ONGXTransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ONGXTransfer represents a Transfer event raised by the ONGX contract. -type ONGXTransfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ONGX *ONGXFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ONGXTransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ONGX.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ONGXTransferIterator{contract: _ONGX.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ONGX *ONGXFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ONGXTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ONGX.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ONGXTransfer) - if err := _ONGX.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ONGX *ONGXFilterer) ParseTransfer(log types.Log) (*ONGXTransfer, error) { - event := new(ONGXTransfer) - if err := _ONGX.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// SafeMathABI is the input ABI used to generate the binding from. -const SafeMathABI = "[]" - -// SafeMathBin is the compiled bytecode used for deploying new contracts. -var SafeMathBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820db757905f1c1b49b781ddf45e615d2bbf336aeac8bb9ae61ed6fca08e24c7dc364736f6c634300050f0032" - -// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. -func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// SafeMath is an auto generated Go binding around an Ethereum contract. -type SafeMath struct { - SafeMathCaller // Read-only binding to the contract - SafeMathTransactor // Write-only binding to the contract - SafeMathFilterer // Log filterer for contract events -} - -// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. -type SafeMathCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SafeMathTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SafeMathFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SafeMathSession struct { - Contract *SafeMath // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SafeMathCallerSession struct { - Contract *SafeMathCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SafeMathTransactorSession struct { - Contract *SafeMathTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. -type SafeMathRaw struct { - Contract *SafeMath // Generic contract binding to access the raw methods on -} - -// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SafeMathCallerRaw struct { - Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on -} - -// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SafeMathTransactorRaw struct { - Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. -func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { - contract, err := bindSafeMath(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { - contract, err := bindSafeMath(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SafeMathCaller{contract: contract}, nil -} - -// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { - contract, err := bindSafeMath(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SafeMathTransactor{contract: contract}, nil -} - -// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { - contract, err := bindSafeMath(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SafeMathFilterer{contract: contract}, nil -} - -// bindSafeMath binds a generic wrapper to an already deployed contract. -func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transact(opts, method, params...) -} diff --git a/chains/eth/abi/ontx/ontx_abi.go b/chains/eth/abi/ontx/ontx_abi.go deleted file mode 100644 index f9d4822..0000000 --- a/chains/eth/abi/ontx/ontx_abi.go +++ /dev/null @@ -1,3026 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package ontx - -import ( - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription -) - -// ContextABI is the input ABI used to generate the binding from. -const ContextABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" - -// Context is an auto generated Go binding around an Ethereum contract. -type Context struct { - ContextCaller // Read-only binding to the contract - ContextTransactor // Write-only binding to the contract - ContextFilterer // Log filterer for contract events -} - -// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. -type ContextCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ContextTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ContextFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ContextSession struct { - Contract *Context // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ContextCallerSession struct { - Contract *ContextCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ContextTransactorSession struct { - Contract *ContextTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. -type ContextRaw struct { - Contract *Context // Generic contract binding to access the raw methods on -} - -// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ContextCallerRaw struct { - Contract *ContextCaller // Generic read-only contract binding to access the raw methods on -} - -// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ContextTransactorRaw struct { - Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewContext creates a new instance of Context, bound to a specific deployed contract. -func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { - contract, err := bindContext(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil -} - -// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. -func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { - contract, err := bindContext(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ContextCaller{contract: contract}, nil -} - -// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. -func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { - contract, err := bindContext(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ContextTransactor{contract: contract}, nil -} - -// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. -func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { - contract, err := bindContext(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ContextFilterer{contract: contract}, nil -} - -// bindContext binds a generic wrapper to an already deployed contract. -func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ContextABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.Contract.ContextCaller.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 (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.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 (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _Context.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 (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.contract.Transact(opts, method, params...) -} - -// ERC20ABI is the input ABI used to generate the binding from. -const ERC20ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20FuncSigs maps the 4-byte function signature to its string representation. -var ERC20FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "a457c2d7": "decreaseAllowance(address,uint256)", - "39509351": "increaseAllowance(address,uint256)", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20Bin is the compiled bytecode used for deploying new contracts. -var ERC20Bin = "0x608060405261083b806100136000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a0823114610149578063a457c2d71461016f578063a9059cbb1461019b578063dd62ed3e146101c757610088565b8063095ea7b31461008d57806318160ddd146100cd57806323b872dd146100e7578063395093511461011d575b600080fd5b6100b9600480360360408110156100a357600080fd5b506001600160a01b0381351690602001356101f5565b604080519115158252519081900360200190f35b6100d5610212565b60408051918252519081900360200190f35b6100b9600480360360608110156100fd57600080fd5b506001600160a01b03813581169160208101359091169060400135610218565b6100b96004803603604081101561013357600080fd5b506001600160a01b0381351690602001356102a5565b6100d56004803603602081101561015f57600080fd5b50356001600160a01b03166102f9565b6100b96004803603604081101561018557600080fd5b506001600160a01b038135169060200135610314565b6100b9600480360360408110156101b157600080fd5b506001600160a01b038135169060200135610382565b6100d5600480360360408110156101dd57600080fd5b506001600160a01b0381358116916020013516610396565b60006102096102026103c1565b84846103c5565b50600192915050565b60025490565b60006102258484846104b1565b61029b846102316103c1565b61029685604051806060016040528060288152602001610771602891396001600160a01b038a1660009081526001602052604081209061026f6103c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61060d16565b6103c5565b5060019392505050565b60006102096102b26103c1565b8461029685600160006102c36103c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6106a416565b6001600160a01b031660009081526020819052604090205490565b60006102096103216103c1565b84610296856040518060600160405280602581526020016107e2602591396001600061034b6103c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61060d16565b600061020961038f6103c1565b84846104b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661040a5760405162461bcd60e51b81526004018080602001828103825260248152602001806107be6024913960400191505060405180910390fd5b6001600160a01b03821661044f5760405162461bcd60e51b81526004018080602001828103825260228152602001806107296022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166104f65760405162461bcd60e51b81526004018080602001828103825260258152602001806107996025913960400191505060405180910390fd5b6001600160a01b03821661053b5760405162461bcd60e51b81526004018080602001828103825260238152602001806107066023913960400191505060405180910390fd5b61057e8160405180606001604052806026815260200161074b602691396001600160a01b038616600090815260208190526040902054919063ffffffff61060d16565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546105b3908263ffffffff6106a416565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561069c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610661578181015183820152602001610649565b50505050905090810190601f16801561068e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156106fe576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820dd68afc24b84623478da74ad90030d8d5b03ae431cb948a20348acf66ded867f64736f6c634300050f0032" - -// DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it. -func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20Bin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil -} - -// ERC20 is an auto generated Go binding around an Ethereum contract. -type ERC20 struct { - ERC20Caller // Read-only binding to the contract - ERC20Transactor // Write-only binding to the contract - ERC20Filterer // Log filterer for contract events -} - -// ERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20Session struct { - Contract *ERC20 // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20CallerSession struct { - Contract *ERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20TransactorSession struct { - Contract *ERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20Raw struct { - Contract *ERC20 // Generic contract binding to access the raw methods on -} - -// ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20CallerRaw struct { - Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20TransactorRaw struct { - Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20 creates a new instance of ERC20, bound to a specific deployed contract. -func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error) { - contract, err := bindERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil -} - -// NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract. -func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error) { - contract, err := bindERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20Caller{contract: contract}, nil -} - -// NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract. -func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error) { - contract, err := bindERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20Transactor{contract: contract}, nil -} - -// NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract. -func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error) { - contract, err := bindERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20Filterer{contract: contract}, nil -} - -// bindERC20 binds a generic wrapper to an already deployed contract. -func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20.Contract.ERC20Caller.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 (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20.Contract.ERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20.Contract.ERC20Transactor.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 (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20.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 (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20 *ERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error) { - return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error) { - return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, amount) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "increaseAllowance", spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) -} - -// ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20 contract. -type ERC20ApprovalIterator struct { - Event *ERC20Approval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20ApprovalIterator) 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(ERC20Approval) - 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(ERC20Approval) - 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 *ERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20Approval represents a Approval event raised by the ERC20 contract. -type ERC20Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC20ApprovalIterator{contract: _ERC20.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20Approval) - if err := _ERC20.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20 *ERC20Filterer) ParseApproval(log types.Log) (*ERC20Approval, error) { - event := new(ERC20Approval) - if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20 contract. -type ERC20TransferIterator struct { - Event *ERC20Transfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20TransferIterator) 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(ERC20Transfer) - 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(ERC20Transfer) - 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 *ERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20Transfer represents a Transfer event raised by the ERC20 contract. -type ERC20Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC20TransferIterator{contract: _ERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20Transfer) - if err := _ERC20.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20 *ERC20Filterer) ParseTransfer(log types.Log) (*ERC20Transfer, error) { - event := new(ERC20Transfer) - if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20DetailedABI is the input ABI used to generate the binding from. -const ERC20DetailedABI = "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20DetailedFuncSigs maps the 4-byte function signature to its string representation. -var ERC20DetailedFuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "313ce567": "decimals()", - "06fdde03": "name()", - "95d89b41": "symbol()", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20Detailed is an auto generated Go binding around an Ethereum contract. -type ERC20Detailed struct { - ERC20DetailedCaller // Read-only binding to the contract - ERC20DetailedTransactor // Write-only binding to the contract - ERC20DetailedFilterer // Log filterer for contract events -} - -// ERC20DetailedCaller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20DetailedCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20DetailedTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20DetailedFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20DetailedSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20DetailedSession struct { - Contract *ERC20Detailed // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20DetailedCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20DetailedCallerSession struct { - Contract *ERC20DetailedCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20DetailedTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20DetailedTransactorSession struct { - Contract *ERC20DetailedTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20DetailedRaw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20DetailedRaw struct { - Contract *ERC20Detailed // Generic contract binding to access the raw methods on -} - -// ERC20DetailedCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20DetailedCallerRaw struct { - Contract *ERC20DetailedCaller // Generic read-only contract binding to access the raw methods on -} - -// ERC20DetailedTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20DetailedTransactorRaw struct { - Contract *ERC20DetailedTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20Detailed creates a new instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20Detailed(address common.Address, backend bind.ContractBackend) (*ERC20Detailed, error) { - contract, err := bindERC20Detailed(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20Detailed{ERC20DetailedCaller: ERC20DetailedCaller{contract: contract}, ERC20DetailedTransactor: ERC20DetailedTransactor{contract: contract}, ERC20DetailedFilterer: ERC20DetailedFilterer{contract: contract}}, nil -} - -// NewERC20DetailedCaller creates a new read-only instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedCaller(address common.Address, caller bind.ContractCaller) (*ERC20DetailedCaller, error) { - contract, err := bindERC20Detailed(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20DetailedCaller{contract: contract}, nil -} - -// NewERC20DetailedTransactor creates a new write-only instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20DetailedTransactor, error) { - contract, err := bindERC20Detailed(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20DetailedTransactor{contract: contract}, nil -} - -// NewERC20DetailedFilterer creates a new log filterer instance of ERC20Detailed, bound to a specific deployed contract. -func NewERC20DetailedFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20DetailedFilterer, error) { - contract, err := bindERC20Detailed(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20DetailedFilterer{contract: contract}, nil -} - -// bindERC20Detailed binds a generic wrapper to an already deployed contract. -func bindERC20Detailed(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20DetailedABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20Detailed *ERC20DetailedRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20Detailed.Contract.ERC20DetailedCaller.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 (_ERC20Detailed *ERC20DetailedRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Detailed.Contract.ERC20DetailedTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Detailed *ERC20DetailedRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Detailed.Contract.ERC20DetailedTransactor.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 (_ERC20Detailed *ERC20DetailedCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ERC20Detailed.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 (_ERC20Detailed *ERC20DetailedTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Detailed.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Detailed *ERC20DetailedTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Detailed.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.Allowance(&_ERC20Detailed.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.Allowance(&_ERC20Detailed.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.BalanceOf(&_ERC20Detailed.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20Detailed.Contract.BalanceOf(&_ERC20Detailed.CallOpts, account) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedCaller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "decimals") - return *ret0, err -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedSession) Decimals() (uint8, error) { - return _ERC20Detailed.Contract.Decimals(&_ERC20Detailed.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20Detailed *ERC20DetailedCallerSession) Decimals() (uint8, error) { - return _ERC20Detailed.Contract.Decimals(&_ERC20Detailed.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedCaller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "name") - return *ret0, err -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedSession) Name() (string, error) { - return _ERC20Detailed.Contract.Name(&_ERC20Detailed.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20Detailed *ERC20DetailedCallerSession) Name() (string, error) { - return _ERC20Detailed.Contract.Name(&_ERC20Detailed.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedCaller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "symbol") - return *ret0, err -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedSession) Symbol() (string, error) { - return _ERC20Detailed.Contract.Symbol(&_ERC20Detailed.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20Detailed *ERC20DetailedCallerSession) Symbol() (string, error) { - return _ERC20Detailed.Contract.Symbol(&_ERC20Detailed.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ERC20Detailed.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedSession) TotalSupply() (*big.Int, error) { - return _ERC20Detailed.Contract.TotalSupply(&_ERC20Detailed.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20Detailed *ERC20DetailedCallerSession) TotalSupply() (*big.Int, error) { - return _ERC20Detailed.Contract.TotalSupply(&_ERC20Detailed.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Approve(&_ERC20Detailed.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Approve(&_ERC20Detailed.TransactOpts, spender, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Transfer(&_ERC20Detailed.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.Transfer(&_ERC20Detailed.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.TransferFrom(&_ERC20Detailed.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20Detailed *ERC20DetailedTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Detailed.Contract.TransferFrom(&_ERC20Detailed.TransactOpts, sender, recipient, amount) -} - -// ERC20DetailedApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20Detailed contract. -type ERC20DetailedApprovalIterator struct { - Event *ERC20DetailedApproval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20DetailedApprovalIterator) 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(ERC20DetailedApproval) - 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(ERC20DetailedApproval) - 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 *ERC20DetailedApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20DetailedApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20DetailedApproval represents a Approval event raised by the ERC20Detailed contract. -type ERC20DetailedApproval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20DetailedApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20Detailed.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC20DetailedApprovalIterator{contract: _ERC20Detailed.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20DetailedApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ERC20Detailed.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20DetailedApproval) - if err := _ERC20Detailed.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) ParseApproval(log types.Log) (*ERC20DetailedApproval, error) { - event := new(ERC20DetailedApproval) - if err := _ERC20Detailed.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ERC20DetailedTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20Detailed contract. -type ERC20DetailedTransferIterator struct { - Event *ERC20DetailedTransfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20DetailedTransferIterator) 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(ERC20DetailedTransfer) - 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(ERC20DetailedTransfer) - 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 *ERC20DetailedTransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20DetailedTransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20DetailedTransfer represents a Transfer event raised by the ERC20Detailed contract. -type ERC20DetailedTransfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20DetailedTransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20Detailed.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC20DetailedTransferIterator{contract: _ERC20Detailed.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20DetailedTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ERC20Detailed.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20DetailedTransfer) - if err := _ERC20Detailed.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ERC20Detailed *ERC20DetailedFilterer) ParseTransfer(log types.Log) (*ERC20DetailedTransfer, error) { - event := new(ERC20DetailedTransfer) - if err := _ERC20Detailed.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// IERC20ABI is the input ABI used to generate the binding from. -const IERC20ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// IERC20FuncSigs maps the 4-byte function signature to its string representation. -var IERC20FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// IERC20 is an auto generated Go binding around an Ethereum contract. -type IERC20 struct { - IERC20Caller // Read-only binding to the contract - IERC20Transactor // Write-only binding to the contract - IERC20Filterer // Log filterer for contract events -} - -// IERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type IERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type IERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IERC20Session struct { - Contract *IERC20 // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IERC20CallerSession struct { - Contract *IERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IERC20TransactorSession struct { - Contract *IERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type IERC20Raw struct { - Contract *IERC20 // Generic contract binding to access the raw methods on -} - -// IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IERC20CallerRaw struct { - Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IERC20TransactorRaw struct { - Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract. -func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) { - contract, err := bindIERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil -} - -// NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract. -func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) { - contract, err := bindIERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IERC20Caller{contract: contract}, nil -} - -// NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract. -func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) { - contract, err := bindIERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IERC20Transactor{contract: contract}, nil -} - -// NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract. -func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) { - contract, err := bindIERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IERC20Filterer{contract: contract}, nil -} - -// bindIERC20 binds a generic wrapper to an already deployed contract. -func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IERC20ABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IERC20.Contract.IERC20Caller.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 (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IERC20.Contract.IERC20Transactor.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 (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _IERC20.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 (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IERC20.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _IERC20.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) { - return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) { - return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) -} - -// IERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20 contract. -type IERC20ApprovalIterator struct { - Event *IERC20Approval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *IERC20ApprovalIterator) 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(IERC20Approval) - 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(IERC20Approval) - 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 *IERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IERC20Approval represents a Approval event raised by the IERC20 contract. -type IERC20Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &IERC20ApprovalIterator{contract: _IERC20.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _IERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(IERC20Approval) - if err := _IERC20.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) { - event := new(IERC20Approval) - if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// IERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20 contract. -type IERC20TransferIterator struct { - Event *IERC20Transfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *IERC20TransferIterator) 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(IERC20Transfer) - 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(IERC20Transfer) - 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 *IERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IERC20Transfer represents a Transfer event raised by the IERC20 contract. -type IERC20Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &IERC20TransferIterator{contract: _IERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _IERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(IERC20Transfer) - if err := _IERC20.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) { - event := new(IERC20Transfer) - if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// ONTXABI is the input ABI used to generate the binding from. -const ONTXABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"lockProxyContractAddress\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ONTXFuncSigs maps the 4-byte function signature to its string representation. -var ONTXFuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "313ce567": "decimals()", - "a457c2d7": "decreaseAllowance(address,uint256)", - "39509351": "increaseAllowance(address,uint256)", - "06fdde03": "name()", - "95d89b41": "symbol()", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ONTXBin is the compiled bytecode used for deploying new contracts. -var ONTXBin = "0x608060405234801561001057600080fd5b5060405162000ccb38038062000ccb8339818101604052602081101561003557600080fd5b5051604080518082018252600981526827a72a102a37b5b2b760b91b60208281019182528351808501909452600484526309e9ca8b60e31b9084015281519192916000916100869160039190610221565b50815161009a906004906020850190610221565b506005805460ff191660ff92909216919091179055506100c0905081633b9aca006100c6565b506102bc565b6001600160a01b038216610121576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61013a816002546101c060201b6108681790919060201c565b6002556001600160a01b0382166000908152602081815260409091205461016a9183906108686101c0821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008282018381101561021a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061026257805160ff191683800117855561028f565b8280016001018555821561028f579182015b8281111561028f578251825591602001919060010190610274565b5061029b92915061029f565b5090565b6102b991905b8082111561029b57600081556001016102a5565b90565b6109ff80620002cc6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063395093511161007157806339509351146101d957806370a082311461020557806395d89b411461022b578063a457c2d714610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561034f565b604080519115158252519081900360200190f35b61017361036c565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b03813581169160208101359091169060400135610372565b6101c36103ff565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b038135169060200135610408565b6101736004803603602081101561021b57600080fd5b50356001600160a01b031661045c565b6100b6610477565b6101576004803603604081101561024957600080fd5b506001600160a01b0381351690602001356104d8565b6101576004803603604081101561027557600080fd5b506001600160a01b038135169060200135610546565b610173600480360360408110156102a157600080fd5b506001600160a01b038135811691602001351661055a565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b820191906000526020600020905b81548152906001019060200180831161032857829003601f168201915b5050505050905090565b600061036361035c610585565b8484610589565b50600192915050565b60025490565b600061037f848484610675565b6103f58461038b610585565b6103f085604051806060016040528060288152602001610935602891396001600160a01b038a166000908152600160205260408120906103c9610585565b6001600160a01b03168152602081019190915260400160002054919063ffffffff6107d116565b610589565b5060019392505050565b60055460ff1690565b6000610363610415610585565b846103f08560016000610426610585565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff61086816565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b60006103636104e5610585565b846103f0856040518060600160405280602581526020016109a6602591396001600061050f610585565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff6107d116565b6000610363610553610585565b8484610675565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166105ce5760405162461bcd60e51b81526004018080602001828103825260248152602001806109826024913960400191505060405180910390fd5b6001600160a01b0382166106135760405162461bcd60e51b81526004018080602001828103825260228152602001806108ed6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106ba5760405162461bcd60e51b815260040180806020018281038252602581526020018061095d6025913960400191505060405180910390fd5b6001600160a01b0382166106ff5760405162461bcd60e51b81526004018080602001828103825260238152602001806108ca6023913960400191505060405180910390fd5b6107428160405180606001604052806026815260200161090f602691396001600160a01b038616600090815260208190526040902054919063ffffffff6107d116565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610777908263ffffffff61086816565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108605760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561082557818101518382015260200161080d565b50505050905090810190601f1680156108525780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156108c2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a7231582059850016ada1b4dc8d9f601c57ebe12ef7f4d00703e18da0400a8370e4b79ff264736f6c634300050f0032" - -// DeployONTX deploys a new Ethereum contract, binding an instance of ONTX to it. -func DeployONTX(auth *bind.TransactOpts, backend bind.ContractBackend, lockProxyContractAddress common.Address) (common.Address, *types.Transaction, *ONTX, error) { - parsed, err := abi.JSON(strings.NewReader(ONTXABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ONTXBin), backend, lockProxyContractAddress) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ONTX{ONTXCaller: ONTXCaller{contract: contract}, ONTXTransactor: ONTXTransactor{contract: contract}, ONTXFilterer: ONTXFilterer{contract: contract}}, nil -} - -// ONTX is an auto generated Go binding around an Ethereum contract. -type ONTX struct { - ONTXCaller // Read-only binding to the contract - ONTXTransactor // Write-only binding to the contract - ONTXFilterer // Log filterer for contract events -} - -// ONTXCaller is an auto generated read-only Go binding around an Ethereum contract. -type ONTXCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ONTXTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ONTXTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ONTXFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ONTXFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ONTXSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ONTXSession struct { - Contract *ONTX // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ONTXCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ONTXCallerSession struct { - Contract *ONTXCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ONTXTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ONTXTransactorSession struct { - Contract *ONTXTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ONTXRaw is an auto generated low-level Go binding around an Ethereum contract. -type ONTXRaw struct { - Contract *ONTX // Generic contract binding to access the raw methods on -} - -// ONTXCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ONTXCallerRaw struct { - Contract *ONTXCaller // Generic read-only contract binding to access the raw methods on -} - -// ONTXTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ONTXTransactorRaw struct { - Contract *ONTXTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewONTX creates a new instance of ONTX, bound to a specific deployed contract. -func NewONTX(address common.Address, backend bind.ContractBackend) (*ONTX, error) { - contract, err := bindONTX(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ONTX{ONTXCaller: ONTXCaller{contract: contract}, ONTXTransactor: ONTXTransactor{contract: contract}, ONTXFilterer: ONTXFilterer{contract: contract}}, nil -} - -// NewONTXCaller creates a new read-only instance of ONTX, bound to a specific deployed contract. -func NewONTXCaller(address common.Address, caller bind.ContractCaller) (*ONTXCaller, error) { - contract, err := bindONTX(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ONTXCaller{contract: contract}, nil -} - -// NewONTXTransactor creates a new write-only instance of ONTX, bound to a specific deployed contract. -func NewONTXTransactor(address common.Address, transactor bind.ContractTransactor) (*ONTXTransactor, error) { - contract, err := bindONTX(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ONTXTransactor{contract: contract}, nil -} - -// NewONTXFilterer creates a new log filterer instance of ONTX, bound to a specific deployed contract. -func NewONTXFilterer(address common.Address, filterer bind.ContractFilterer) (*ONTXFilterer, error) { - contract, err := bindONTX(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ONTXFilterer{contract: contract}, nil -} - -// bindONTX binds a generic wrapper to an already deployed contract. -func bindONTX(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ONTXABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ONTX *ONTXRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ONTX.Contract.ONTXCaller.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 (_ONTX *ONTXRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ONTX.Contract.ONTXTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ONTX *ONTXRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ONTX.Contract.ONTXTransactor.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 (_ONTX *ONTXCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _ONTX.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 (_ONTX *ONTXTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ONTX.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ONTX *ONTXTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ONTX.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ONTX *ONTXCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ONTX.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ONTX *ONTXSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ONTX.Contract.Allowance(&_ONTX.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_ONTX *ONTXCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ONTX.Contract.Allowance(&_ONTX.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ONTX *ONTXCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ONTX.contract.Call(opts, out, "balanceOf", account) - return *ret0, err -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ONTX *ONTXSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ONTX.Contract.BalanceOf(&_ONTX.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ONTX *ONTXCallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ONTX.Contract.BalanceOf(&_ONTX.CallOpts, account) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ONTX *ONTXCaller) Decimals(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _ONTX.contract.Call(opts, out, "decimals") - return *ret0, err -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ONTX *ONTXSession) Decimals() (uint8, error) { - return _ONTX.Contract.Decimals(&_ONTX.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ONTX *ONTXCallerSession) Decimals() (uint8, error) { - return _ONTX.Contract.Decimals(&_ONTX.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ONTX *ONTXCaller) Name(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ONTX.contract.Call(opts, out, "name") - return *ret0, err -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ONTX *ONTXSession) Name() (string, error) { - return _ONTX.Contract.Name(&_ONTX.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ONTX *ONTXCallerSession) Name() (string, error) { - return _ONTX.Contract.Name(&_ONTX.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ONTX *ONTXCaller) Symbol(opts *bind.CallOpts) (string, error) { - var ( - ret0 = new(string) - ) - out := ret0 - err := _ONTX.contract.Call(opts, out, "symbol") - return *ret0, err -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ONTX *ONTXSession) Symbol() (string, error) { - return _ONTX.Contract.Symbol(&_ONTX.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ONTX *ONTXCallerSession) Symbol() (string, error) { - return _ONTX.Contract.Symbol(&_ONTX.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ONTX *ONTXCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _ONTX.contract.Call(opts, out, "totalSupply") - return *ret0, err -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ONTX *ONTXSession) TotalSupply() (*big.Int, error) { - return _ONTX.Contract.TotalSupply(&_ONTX.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ONTX *ONTXCallerSession) TotalSupply() (*big.Int, error) { - return _ONTX.Contract.TotalSupply(&_ONTX.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ONTX *ONTXTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONTX.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ONTX *ONTXSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONTX.Contract.Approve(&_ONTX.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ONTX *ONTXTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONTX.Contract.Approve(&_ONTX.TransactOpts, spender, amount) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ONTX *ONTXTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ONTX.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ONTX *ONTXSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ONTX.Contract.DecreaseAllowance(&_ONTX.TransactOpts, spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ONTX *ONTXTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ONTX.Contract.DecreaseAllowance(&_ONTX.TransactOpts, spender, subtractedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ONTX *ONTXTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ONTX.contract.Transact(opts, "increaseAllowance", spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ONTX *ONTXSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ONTX.Contract.IncreaseAllowance(&_ONTX.TransactOpts, spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ONTX *ONTXTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ONTX.Contract.IncreaseAllowance(&_ONTX.TransactOpts, spender, addedValue) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ONTX *ONTXTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONTX.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ONTX *ONTXSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONTX.Contract.Transfer(&_ONTX.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ONTX *ONTXTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONTX.Contract.Transfer(&_ONTX.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ONTX *ONTXTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONTX.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ONTX *ONTXSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONTX.Contract.TransferFrom(&_ONTX.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ONTX *ONTXTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ONTX.Contract.TransferFrom(&_ONTX.TransactOpts, sender, recipient, amount) -} - -// ONTXApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ONTX contract. -type ONTXApprovalIterator struct { - Event *ONTXApproval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ONTXApprovalIterator) 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(ONTXApproval) - 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(ONTXApproval) - 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 *ONTXApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ONTXApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ONTXApproval represents a Approval event raised by the ONTX contract. -type ONTXApproval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ONTX *ONTXFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ONTXApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ONTX.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ONTXApprovalIterator{contract: _ONTX.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ONTX *ONTXFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ONTXApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _ONTX.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ONTXApproval) - if err := _ONTX.contract.UnpackLog(event, "Approval", 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 -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_ONTX *ONTXFilterer) ParseApproval(log types.Log) (*ONTXApproval, error) { - event := new(ONTXApproval) - if err := _ONTX.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - return event, nil -} - -// ONTXTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ONTX contract. -type ONTXTransferIterator struct { - Event *ONTXTransfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ONTXTransferIterator) 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(ONTXTransfer) - 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(ONTXTransfer) - 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 *ONTXTransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ONTXTransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ONTXTransfer represents a Transfer event raised by the ONTX contract. -type ONTXTransfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ONTX *ONTXFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ONTXTransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ONTX.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ONTXTransferIterator{contract: _ONTX.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ONTX *ONTXFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ONTXTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _ONTX.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ONTXTransfer) - if err := _ONTX.contract.UnpackLog(event, "Transfer", 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 -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_ONTX *ONTXFilterer) ParseTransfer(log types.Log) (*ONTXTransfer, error) { - event := new(ONTXTransfer) - if err := _ONTX.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - return event, nil -} - -// SafeMathABI is the input ABI used to generate the binding from. -const SafeMathABI = "[]" - -// SafeMathBin is the compiled bytecode used for deploying new contracts. -var SafeMathBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820db757905f1c1b49b781ddf45e615d2bbf336aeac8bb9ae61ed6fca08e24c7dc364736f6c634300050f0032" - -// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. -func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// SafeMath is an auto generated Go binding around an Ethereum contract. -type SafeMath struct { - SafeMathCaller // Read-only binding to the contract - SafeMathTransactor // Write-only binding to the contract - SafeMathFilterer // Log filterer for contract events -} - -// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. -type SafeMathCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SafeMathTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SafeMathFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SafeMathSession struct { - Contract *SafeMath // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SafeMathCallerSession struct { - Contract *SafeMathCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SafeMathTransactorSession struct { - Contract *SafeMathTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. -type SafeMathRaw struct { - Contract *SafeMath // Generic contract binding to access the raw methods on -} - -// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SafeMathCallerRaw struct { - Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on -} - -// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SafeMathTransactorRaw struct { - Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. -func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { - contract, err := bindSafeMath(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { - contract, err := bindSafeMath(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SafeMathCaller{contract: contract}, nil -} - -// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { - contract, err := bindSafeMath(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SafeMathTransactor{contract: contract}, nil -} - -// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { - contract, err := bindSafeMath(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SafeMathFilterer{contract: contract}, nil -} - -// bindSafeMath binds a generic wrapper to an already deployed contract. -func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { - return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transact(opts, method, params...) -} diff --git a/chains/eth/dai.go b/chains/eth/dai.go new file mode 100644 index 0000000..8e533e8 --- /dev/null +++ b/chains/eth/dai.go @@ -0,0 +1,1200 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package eth + +import ( + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// DaiABI is the input ABI used to generate the binding from. +const DaiABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"usr\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"src\",\"type\":\"address\"},{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"PERMIT_TYPEHASH\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"usr\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"guy\",\"type\":\"address\"}],\"name\":\"rely\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"holder\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint256\"},{\"name\":\"expiry\",\"type\":\"uint256\"},{\"name\":\"allowed\",\"type\":\"bool\"},{\"name\":\"v\",\"type\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"guy\",\"type\":\"address\"}],\"name\":\"deny\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"usr\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"usr\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"push\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"src\",\"type\":\"address\"},{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"move\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"wards\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"usr\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"pull\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"chainId_\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":true,\"inputs\":[{\"indexed\":true,\"name\":\"sig\",\"type\":\"bytes4\"},{\"indexed\":true,\"name\":\"usr\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"arg1\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"arg2\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"LogNote\",\"type\":\"event\"}]" + +// DaiFuncSigs maps the 4-byte function signature to its string representation. +var DaiFuncSigs = map[string]string{ + "3644e515": "DOMAIN_SEPARATOR()", + "30adf81f": "PERMIT_TYPEHASH()", + "dd62ed3e": "allowance(address,address)", + "095ea7b3": "approve(address,uint256)", + "70a08231": "balanceOf(address)", + "9dc29fac": "burn(address,uint256)", + "313ce567": "decimals()", + "9c52a7f1": "deny(address)", + "40c10f19": "mint(address,uint256)", + "bb35783b": "move(address,address,uint256)", + "06fdde03": "name()", + "7ecebe00": "nonces(address)", + "8fcbaf0c": "permit(address,address,uint256,uint256,bool,uint8,bytes32,bytes32)", + "f2d5d56b": "pull(address,uint256)", + "b753a98c": "push(address,uint256)", + "65fae35e": "rely(address)", + "95d89b41": "symbol()", + "18160ddd": "totalSupply()", + "a9059cbb": "transfer(address,uint256)", + "23b872dd": "transferFrom(address,address,uint256)", + "54fd4d50": "version()", + "bf353dbb": "wards(address)", +} + +// DaiBin is the compiled bytecode used for deploying new contracts. +var DaiBin = "0x608060405234801561001057600080fd5b506040516020806114398339810160408181529151336000908152602081815290849020600190557f454950373132446f6d61696e28737472696e67206e616d652c737472696e672083527f76657273696f6e2c75696e7432353620636861696e49642c6164647265737320818401527f766572696679696e67436f6e74726163742900000000000000000000000000008484015283519283900360520183208385018552600e8085527f44616920537461626c65636f696e000000000000000000000000000000000000928501928352945192949093929182918083835b6020831061010e5780518252601f1990920191602091820191016100ef565b51815160209384036101000a600019018019909216911617905260408051929094018290038220828501855260018084527f3100000000000000000000000000000000000000000000000000000000000000928401928352945190965091945090928392508083835b602083106101965780518252601f199092019160209182019101610177565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208282019890985281840196909652606081019690965250608085018690523060a0808701919091528151808703909101815260c09095019081905284519093849350850191508083835b602083106102265780518252601f199092019160209182019101610207565b5181516000196020949094036101000a939093019283169219169190911790526040519201829003909120600555505050506111d2806102676000396000f3006080604052600436106101275763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461012c578063095ea7b3146101b857806318160ddd146101f057806323b872dd1461021757806330adf81f14610241578063313ce567146102565780633644e5151461028157806340c10f191461029657806354fd4d50146102bc57806365fae35e146102d157806370a08231146102f25780637ecebe00146103135780638fcbaf0c1461033457806395d89b41146103725780639c52a7f1146103875780639dc29fac146103a8578063a9059cbb146103cc578063b753a98c146103f0578063bb35783b14610414578063bf353dbb1461043e578063dd62ed3e1461045f578063f2d5d56b14610486575b600080fd5b34801561013857600080fd5b506101416104aa565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561017d578082015183820152602001610165565b50505050905090810190601f1680156101aa5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101c457600080fd5b506101dc600160a060020a03600435166024356104e1565b604051901515815260200160405180910390f35b3480156101fc57600080fd5b50610205610553565b60405190815260200160405180910390f35b34801561022357600080fd5b506101dc600160a060020a0360043581169060243516604435610559565b34801561024d57600080fd5b506102056107b1565b34801561026257600080fd5b5061026b6107d5565b60405160ff909116815260200160405180910390f35b34801561028d57600080fd5b506102056107da565b3480156102a257600080fd5b506102ba600160a060020a03600435166024356107e0565b005b3480156102c857600080fd5b506101416108d5565b3480156102dd57600080fd5b506102ba600160a060020a036004351661090c565b3480156102fe57600080fd5b50610205600160a060020a03600435166109c4565b34801561031f57600080fd5b50610205600160a060020a03600435166109d8565b34801561034057600080fd5b506102ba600160a060020a0360043581169060243516604435606435608435151560ff60a4351660c43560e4356109ec565b34801561037e57600080fd5b50610141610dff565b34801561039357600080fd5b506102ba600160a060020a0360043516610e36565b3480156103b457600080fd5b506102ba600160a060020a0360043516602435610eeb565b3480156103d857600080fd5b506101dc600160a060020a0360043516602435611110565b3480156103fc57600080fd5b506102ba600160a060020a0360043516602435611124565b34801561042057600080fd5b506102ba600160a060020a0360043581169060243516604435611134565b34801561044a57600080fd5b50610205600160a060020a0360043516611145565b34801561046b57600080fd5b50610205600160a060020a0360043581169060243516611159565b34801561049257600080fd5b506102ba600160a060020a036004351660243561117b565b60408051908101604052600e81527f44616920537461626c65636f696e000000000000000000000000000000000000602082015281565b33600090815260036020528160408220600160a060020a03851660009081526020919091526040902055600160a060020a038316337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405190815260200160405180910390a35060015b92915050565b60015481565b600160a060020a0383166000908152600260205281604082205410156105c85760405160e560020a62461bcd02815260206004820152601860248201527f4461692f696e73756666696369656e742d62616c616e63650000000000000000604482015260640160405180910390fd5b600160a060020a038416331480159061060c5750600160a060020a038416600090815260036020526000199060409020336000908152602091909152604090205414155b156106ee57600160a060020a03841660009081526003602052829060409020336000908152602091909152604090205410156106915760405160e560020a62461bcd02815260206004820152601a60248201527f4461692f696e73756666696369656e742d616c6c6f77616e6365000000000000604482015260640160405180910390fd5b600160a060020a038416600090815260036020526106c49060409020336000908152602091909152604090205483611186565b600160a060020a038516600090815260036020526040902033600090815260209190915260409020555b600160a060020a0384166000908152600260205261071190604090205483611186565b600160a060020a038516600090815260026020526040902055600160a060020a0383166000908152600260205261074d90604090205483611196565b600160a060020a038416600090815260026020526040902055600160a060020a038084169085167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a35060019392505050565b7fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb81565b601281565b60055481565b336000908152602081905260409020546001146108465760405160e560020a62461bcd02815260206004820152601260248201527f4461692f6e6f742d617574686f72697a65640000000000000000000000000000604482015260640160405180910390fd5b600160a060020a0382166000908152600260205261086990604090205482611196565b600160a060020a03831660009081526002602052604090205560015461088f9082611196565b600155600160a060020a03821660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405190815260200160405180910390a35050565b60408051908101604052600181527f3100000000000000000000000000000000000000000000000000000000000000602082015281565b336000908152602081905260409020546001146109725760405160e560020a62461bcd02815260206004820152601260248201527f4461692f6e6f742d617574686f72697a65640000000000000000000000000000604482015260640160405180910390fd5b600160a060020a0381166000908152602081905260019060409020555961012081016040526020815260e0602082015260e0600060408301376024356004353360003560e01c60e01b61012085a45050565b600260205280600052604060002054905081565b600460205280600052604060002054905081565b6000806005547fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb6001028b8b8b8b8b6040516020810196909652600160a060020a03948516604080880191909152939094166060860152608085019190915260a084015290151560c083015260e090910190516020818303038152906040526040518082805190602001908083835b60208310610a9a5780518252601f199092019160209182019101610a7b565b6001836020036101000a038019825116818451161790925250505091909101925060409150505180910390206040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281019290925260428201526062016040516020818303038152906040526040518082805190602001908083835b60208310610b3d5780518252601f199092019160209182019101610b1e565b6001836020036101000a038019825116818451161790925250505091909101925060409150505180910390209150600160a060020a038a161515610bca5760405160e560020a62461bcd02815260206004820152601560248201527f4461692f696e76616c69642d616464726573732d300000000000000000000000604482015260640160405180910390fd5b6001828686866040516000815260200160405260405193845260ff9092166020808501919091526040808501929092526060840192909252608090920191516020810390808403906000865af1158015610c28573d6000803e3d6000fd5b50505060206040510351600160a060020a038b8116911614610c935760405160e560020a62461bcd02815260206004820152601260248201527f4461692f696e76616c69642d7065726d69740000000000000000000000000000604482015260640160405180910390fd5b861580610ca05750864211155b1515610cf55760405160e560020a62461bcd02815260206004820152601260248201527f4461692f7065726d69742d657870697265640000000000000000000000000000604482015260640160405180910390fd5b600160a060020a038a1660009081526004602052604090208054600181019091558814610d6b5760405160e560020a62461bcd02815260206004820152601160248201527f4461692f696e76616c69642d6e6f6e6365000000000000000000000000000000604482015260640160405180910390fd5b85610d77576000610d7b565b6000195b600160a060020a038b1660009081526003602052909150819060409020600160a060020a038b1660009081526020919091526040902055600160a060020a03808a16908b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405190815260200160405180910390a350505050505050505050565b60408051908101604052600381527f4441490000000000000000000000000000000000000000000000000000000000602082015281565b33600090815260208190526040902054600114610e9c5760405160e560020a62461bcd02815260206004820152601260248201527f4461692f6e6f742d617574686f72697a65640000000000000000000000000000604482015260640160405180910390fd5b600160a060020a0381166000908152602081905260408120555961012081016040526020815260e0602082015260e0600060408301376024356004353360003560e01c60e01b61012085a45050565b600160a060020a03821660009081526002602052819060409020541015610f5b5760405160e560020a62461bcd02815260206004820152601860248201527f4461692f696e73756666696369656e742d62616c616e63650000000000000000604482015260640160405180910390fd5b600160a060020a0382163314801590610f9f5750600160a060020a038216600090815260036020526000199060409020336000908152602091909152604090205414155b1561108157600160a060020a03821660009081526003602052819060409020336000908152602091909152604090205410156110245760405160e560020a62461bcd02815260206004820152601a60248201527f4461692f696e73756666696369656e742d616c6c6f77616e6365000000000000604482015260640160405180910390fd5b600160a060020a038216600090815260036020526110579060409020336000908152602091909152604090205482611186565b600160a060020a038316600090815260036020526040902033600090815260209190915260409020555b600160a060020a038216600090815260026020526110a490604090205482611186565b600160a060020a0383166000908152600260205260409020556001546110ca9082611186565b6001556000600160a060020a0383167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405190815260200160405180910390a35050565b600061111d338484610559565b9392505050565b61112f338383610559565b505050565b61113f838383610559565b50505050565b600060205280600052604060002054905081565b6003602052816000526040600020602052806000526040600020549150829050565b61112f823383610559565b8082038281111561054d57600080fd5b8082018281101561054d57600080fd00a165627a7a72305820814685d838c3da258269bf19df60b0cd953fa297a551cd75937017bded09f05a0029" + +// DeployDai deploys a new Ethereum contract, binding an instance of Dai to it. +func DeployDai(auth *bind.TransactOpts, backend bind.ContractBackend, chainId_ *big.Int) (common.Address, *types.Transaction, *Dai, error) { + parsed, err := abi.JSON(strings.NewReader(DaiABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(DaiBin), backend, chainId_) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Dai{DaiCaller: DaiCaller{contract: contract}, DaiTransactor: DaiTransactor{contract: contract}, DaiFilterer: DaiFilterer{contract: contract}}, nil +} + +// Dai is an auto generated Go binding around an Ethereum contract. +type Dai struct { + DaiCaller // Read-only binding to the contract + DaiTransactor // Write-only binding to the contract + DaiFilterer // Log filterer for contract events +} + +// DaiCaller is an auto generated read-only Go binding around an Ethereum contract. +type DaiCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// DaiTransactor is an auto generated write-only Go binding around an Ethereum contract. +type DaiTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// DaiFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type DaiFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// DaiSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type DaiSession struct { + Contract *Dai // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// DaiCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type DaiCallerSession struct { + Contract *DaiCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// DaiTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type DaiTransactorSession struct { + Contract *DaiTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// DaiRaw is an auto generated low-level Go binding around an Ethereum contract. +type DaiRaw struct { + Contract *Dai // Generic contract binding to access the raw methods on +} + +// DaiCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type DaiCallerRaw struct { + Contract *DaiCaller // Generic read-only contract binding to access the raw methods on +} + +// DaiTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type DaiTransactorRaw struct { + Contract *DaiTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewDai creates a new instance of Dai, bound to a specific deployed contract. +func NewDai(address common.Address, backend bind.ContractBackend) (*Dai, error) { + contract, err := bindDai(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Dai{DaiCaller: DaiCaller{contract: contract}, DaiTransactor: DaiTransactor{contract: contract}, DaiFilterer: DaiFilterer{contract: contract}}, nil +} + +// NewDaiCaller creates a new read-only instance of Dai, bound to a specific deployed contract. +func NewDaiCaller(address common.Address, caller bind.ContractCaller) (*DaiCaller, error) { + contract, err := bindDai(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &DaiCaller{contract: contract}, nil +} + +// NewDaiTransactor creates a new write-only instance of Dai, bound to a specific deployed contract. +func NewDaiTransactor(address common.Address, transactor bind.ContractTransactor) (*DaiTransactor, error) { + contract, err := bindDai(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &DaiTransactor{contract: contract}, nil +} + +// NewDaiFilterer creates a new log filterer instance of Dai, bound to a specific deployed contract. +func NewDaiFilterer(address common.Address, filterer bind.ContractFilterer) (*DaiFilterer, error) { + contract, err := bindDai(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &DaiFilterer{contract: contract}, nil +} + +// bindDai binds a generic wrapper to an already deployed contract. +func bindDai(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(DaiABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Dai *DaiRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Dai.Contract.DaiCaller.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 (_Dai *DaiRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Dai.Contract.DaiTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Dai *DaiRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Dai.Contract.DaiTransactor.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 (_Dai *DaiCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Dai.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 (_Dai *DaiTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Dai.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Dai *DaiTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Dai.Contract.contract.Transact(opts, method, params...) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_Dai *DaiCaller) DOMAINSEPARATOR(opts *bind.CallOpts) ([32]byte, error) { + var ( + ret0 = new([32]byte) + ) + out := ret0 + err := _Dai.contract.Call(opts, out, "DOMAIN_SEPARATOR") + return *ret0, err +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_Dai *DaiSession) DOMAINSEPARATOR() ([32]byte, error) { + return _Dai.Contract.DOMAINSEPARATOR(&_Dai.CallOpts) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_Dai *DaiCallerSession) DOMAINSEPARATOR() ([32]byte, error) { + return _Dai.Contract.DOMAINSEPARATOR(&_Dai.CallOpts) +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_Dai *DaiCaller) PERMITTYPEHASH(opts *bind.CallOpts) ([32]byte, error) { + var ( + ret0 = new([32]byte) + ) + out := ret0 + err := _Dai.contract.Call(opts, out, "PERMIT_TYPEHASH") + return *ret0, err +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_Dai *DaiSession) PERMITTYPEHASH() ([32]byte, error) { + return _Dai.Contract.PERMITTYPEHASH(&_Dai.CallOpts) +} + +// PERMITTYPEHASH is a free data retrieval call binding the contract method 0x30adf81f. +// +// Solidity: function PERMIT_TYPEHASH() view returns(bytes32) +func (_Dai *DaiCallerSession) PERMITTYPEHASH() ([32]byte, error) { + return _Dai.Contract.PERMITTYPEHASH(&_Dai.CallOpts) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_Dai *DaiCaller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _Dai.contract.Call(opts, out, "allowance", arg0, arg1) + return *ret0, err +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_Dai *DaiSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _Dai.Contract.Allowance(&_Dai.CallOpts, arg0, arg1) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address , address ) view returns(uint256) +func (_Dai *DaiCallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _Dai.Contract.Allowance(&_Dai.CallOpts, arg0, arg1) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_Dai *DaiCaller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _Dai.contract.Call(opts, out, "balanceOf", arg0) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_Dai *DaiSession) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _Dai.Contract.BalanceOf(&_Dai.CallOpts, arg0) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address ) view returns(uint256) +func (_Dai *DaiCallerSession) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _Dai.Contract.BalanceOf(&_Dai.CallOpts, arg0) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_Dai *DaiCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var ( + ret0 = new(uint8) + ) + out := ret0 + err := _Dai.contract.Call(opts, out, "decimals") + return *ret0, err +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_Dai *DaiSession) Decimals() (uint8, error) { + return _Dai.Contract.Decimals(&_Dai.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_Dai *DaiCallerSession) Decimals() (uint8, error) { + return _Dai.Contract.Decimals(&_Dai.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_Dai *DaiCaller) Name(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _Dai.contract.Call(opts, out, "name") + return *ret0, err +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_Dai *DaiSession) Name() (string, error) { + return _Dai.Contract.Name(&_Dai.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_Dai *DaiCallerSession) Name() (string, error) { + return _Dai.Contract.Name(&_Dai.CallOpts) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_Dai *DaiCaller) Nonces(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _Dai.contract.Call(opts, out, "nonces", arg0) + return *ret0, err +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_Dai *DaiSession) Nonces(arg0 common.Address) (*big.Int, error) { + return _Dai.Contract.Nonces(&_Dai.CallOpts, arg0) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address ) view returns(uint256) +func (_Dai *DaiCallerSession) Nonces(arg0 common.Address) (*big.Int, error) { + return _Dai.Contract.Nonces(&_Dai.CallOpts, arg0) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_Dai *DaiCaller) Symbol(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _Dai.contract.Call(opts, out, "symbol") + return *ret0, err +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_Dai *DaiSession) Symbol() (string, error) { + return _Dai.Contract.Symbol(&_Dai.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_Dai *DaiCallerSession) Symbol() (string, error) { + return _Dai.Contract.Symbol(&_Dai.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_Dai *DaiCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _Dai.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_Dai *DaiSession) TotalSupply() (*big.Int, error) { + return _Dai.Contract.TotalSupply(&_Dai.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_Dai *DaiCallerSession) TotalSupply() (*big.Int, error) { + return _Dai.Contract.TotalSupply(&_Dai.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_Dai *DaiCaller) Version(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _Dai.contract.Call(opts, out, "version") + return *ret0, err +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_Dai *DaiSession) Version() (string, error) { + return _Dai.Contract.Version(&_Dai.CallOpts) +} + +// Version is a free data retrieval call binding the contract method 0x54fd4d50. +// +// Solidity: function version() view returns(string) +func (_Dai *DaiCallerSession) Version() (string, error) { + return _Dai.Contract.Version(&_Dai.CallOpts) +} + +// Wards is a free data retrieval call binding the contract method 0xbf353dbb. +// +// Solidity: function wards(address ) view returns(uint256) +func (_Dai *DaiCaller) Wards(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _Dai.contract.Call(opts, out, "wards", arg0) + return *ret0, err +} + +// Wards is a free data retrieval call binding the contract method 0xbf353dbb. +// +// Solidity: function wards(address ) view returns(uint256) +func (_Dai *DaiSession) Wards(arg0 common.Address) (*big.Int, error) { + return _Dai.Contract.Wards(&_Dai.CallOpts, arg0) +} + +// Wards is a free data retrieval call binding the contract method 0xbf353dbb. +// +// Solidity: function wards(address ) view returns(uint256) +func (_Dai *DaiCallerSession) Wards(arg0 common.Address) (*big.Int, error) { + return _Dai.Contract.Wards(&_Dai.CallOpts, arg0) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address usr, uint256 wad) returns(bool) +func (_Dai *DaiTransactor) Approve(opts *bind.TransactOpts, usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.contract.Transact(opts, "approve", usr, wad) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address usr, uint256 wad) returns(bool) +func (_Dai *DaiSession) Approve(usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.Approve(&_Dai.TransactOpts, usr, wad) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address usr, uint256 wad) returns(bool) +func (_Dai *DaiTransactorSession) Approve(usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.Approve(&_Dai.TransactOpts, usr, wad) +} + +// Burn is a paid mutator transaction binding the contract method 0x9dc29fac. +// +// Solidity: function burn(address usr, uint256 wad) returns() +func (_Dai *DaiTransactor) Burn(opts *bind.TransactOpts, usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.contract.Transact(opts, "burn", usr, wad) +} + +// Burn is a paid mutator transaction binding the contract method 0x9dc29fac. +// +// Solidity: function burn(address usr, uint256 wad) returns() +func (_Dai *DaiSession) Burn(usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.Burn(&_Dai.TransactOpts, usr, wad) +} + +// Burn is a paid mutator transaction binding the contract method 0x9dc29fac. +// +// Solidity: function burn(address usr, uint256 wad) returns() +func (_Dai *DaiTransactorSession) Burn(usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.Burn(&_Dai.TransactOpts, usr, wad) +} + +// Deny is a paid mutator transaction binding the contract method 0x9c52a7f1. +// +// Solidity: function deny(address guy) returns() +func (_Dai *DaiTransactor) Deny(opts *bind.TransactOpts, guy common.Address) (*types.Transaction, error) { + return _Dai.contract.Transact(opts, "deny", guy) +} + +// Deny is a paid mutator transaction binding the contract method 0x9c52a7f1. +// +// Solidity: function deny(address guy) returns() +func (_Dai *DaiSession) Deny(guy common.Address) (*types.Transaction, error) { + return _Dai.Contract.Deny(&_Dai.TransactOpts, guy) +} + +// Deny is a paid mutator transaction binding the contract method 0x9c52a7f1. +// +// Solidity: function deny(address guy) returns() +func (_Dai *DaiTransactorSession) Deny(guy common.Address) (*types.Transaction, error) { + return _Dai.Contract.Deny(&_Dai.TransactOpts, guy) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address usr, uint256 wad) returns() +func (_Dai *DaiTransactor) Mint(opts *bind.TransactOpts, usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.contract.Transact(opts, "mint", usr, wad) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address usr, uint256 wad) returns() +func (_Dai *DaiSession) Mint(usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.Mint(&_Dai.TransactOpts, usr, wad) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address usr, uint256 wad) returns() +func (_Dai *DaiTransactorSession) Mint(usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.Mint(&_Dai.TransactOpts, usr, wad) +} + +// Move is a paid mutator transaction binding the contract method 0xbb35783b. +// +// Solidity: function move(address src, address dst, uint256 wad) returns() +func (_Dai *DaiTransactor) Move(opts *bind.TransactOpts, src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.contract.Transact(opts, "move", src, dst, wad) +} + +// Move is a paid mutator transaction binding the contract method 0xbb35783b. +// +// Solidity: function move(address src, address dst, uint256 wad) returns() +func (_Dai *DaiSession) Move(src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.Move(&_Dai.TransactOpts, src, dst, wad) +} + +// Move is a paid mutator transaction binding the contract method 0xbb35783b. +// +// Solidity: function move(address src, address dst, uint256 wad) returns() +func (_Dai *DaiTransactorSession) Move(src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.Move(&_Dai.TransactOpts, src, dst, wad) +} + +// Permit is a paid mutator transaction binding the contract method 0x8fcbaf0c. +// +// Solidity: function permit(address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s) returns() +func (_Dai *DaiTransactor) Permit(opts *bind.TransactOpts, holder common.Address, spender common.Address, nonce *big.Int, expiry *big.Int, allowed bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Dai.contract.Transact(opts, "permit", holder, spender, nonce, expiry, allowed, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0x8fcbaf0c. +// +// Solidity: function permit(address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s) returns() +func (_Dai *DaiSession) Permit(holder common.Address, spender common.Address, nonce *big.Int, expiry *big.Int, allowed bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Dai.Contract.Permit(&_Dai.TransactOpts, holder, spender, nonce, expiry, allowed, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0x8fcbaf0c. +// +// Solidity: function permit(address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s) returns() +func (_Dai *DaiTransactorSession) Permit(holder common.Address, spender common.Address, nonce *big.Int, expiry *big.Int, allowed bool, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Dai.Contract.Permit(&_Dai.TransactOpts, holder, spender, nonce, expiry, allowed, v, r, s) +} + +// Pull is a paid mutator transaction binding the contract method 0xf2d5d56b. +// +// Solidity: function pull(address usr, uint256 wad) returns() +func (_Dai *DaiTransactor) Pull(opts *bind.TransactOpts, usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.contract.Transact(opts, "pull", usr, wad) +} + +// Pull is a paid mutator transaction binding the contract method 0xf2d5d56b. +// +// Solidity: function pull(address usr, uint256 wad) returns() +func (_Dai *DaiSession) Pull(usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.Pull(&_Dai.TransactOpts, usr, wad) +} + +// Pull is a paid mutator transaction binding the contract method 0xf2d5d56b. +// +// Solidity: function pull(address usr, uint256 wad) returns() +func (_Dai *DaiTransactorSession) Pull(usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.Pull(&_Dai.TransactOpts, usr, wad) +} + +// Push is a paid mutator transaction binding the contract method 0xb753a98c. +// +// Solidity: function push(address usr, uint256 wad) returns() +func (_Dai *DaiTransactor) Push(opts *bind.TransactOpts, usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.contract.Transact(opts, "push", usr, wad) +} + +// Push is a paid mutator transaction binding the contract method 0xb753a98c. +// +// Solidity: function push(address usr, uint256 wad) returns() +func (_Dai *DaiSession) Push(usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.Push(&_Dai.TransactOpts, usr, wad) +} + +// Push is a paid mutator transaction binding the contract method 0xb753a98c. +// +// Solidity: function push(address usr, uint256 wad) returns() +func (_Dai *DaiTransactorSession) Push(usr common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.Push(&_Dai.TransactOpts, usr, wad) +} + +// Rely is a paid mutator transaction binding the contract method 0x65fae35e. +// +// Solidity: function rely(address guy) returns() +func (_Dai *DaiTransactor) Rely(opts *bind.TransactOpts, guy common.Address) (*types.Transaction, error) { + return _Dai.contract.Transact(opts, "rely", guy) +} + +// Rely is a paid mutator transaction binding the contract method 0x65fae35e. +// +// Solidity: function rely(address guy) returns() +func (_Dai *DaiSession) Rely(guy common.Address) (*types.Transaction, error) { + return _Dai.Contract.Rely(&_Dai.TransactOpts, guy) +} + +// Rely is a paid mutator transaction binding the contract method 0x65fae35e. +// +// Solidity: function rely(address guy) returns() +func (_Dai *DaiTransactorSession) Rely(guy common.Address) (*types.Transaction, error) { + return _Dai.Contract.Rely(&_Dai.TransactOpts, guy) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address dst, uint256 wad) returns(bool) +func (_Dai *DaiTransactor) Transfer(opts *bind.TransactOpts, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.contract.Transact(opts, "transfer", dst, wad) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address dst, uint256 wad) returns(bool) +func (_Dai *DaiSession) Transfer(dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.Transfer(&_Dai.TransactOpts, dst, wad) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address dst, uint256 wad) returns(bool) +func (_Dai *DaiTransactorSession) Transfer(dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.Transfer(&_Dai.TransactOpts, dst, wad) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address src, address dst, uint256 wad) returns(bool) +func (_Dai *DaiTransactor) TransferFrom(opts *bind.TransactOpts, src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.contract.Transact(opts, "transferFrom", src, dst, wad) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address src, address dst, uint256 wad) returns(bool) +func (_Dai *DaiSession) TransferFrom(src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.TransferFrom(&_Dai.TransactOpts, src, dst, wad) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address src, address dst, uint256 wad) returns(bool) +func (_Dai *DaiTransactorSession) TransferFrom(src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _Dai.Contract.TransferFrom(&_Dai.TransactOpts, src, dst, wad) +} + +// DaiApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the Dai contract. +type DaiApprovalIterator struct { + Event *DaiApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *DaiApprovalIterator) 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(DaiApproval) + 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(DaiApproval) + 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 *DaiApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *DaiApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// DaiApproval represents a Approval event raised by the Dai contract. +type DaiApproval struct { + Src common.Address + Guy common.Address + Wad *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed src, address indexed guy, uint256 wad) +func (_Dai *DaiFilterer) FilterApproval(opts *bind.FilterOpts, src []common.Address, guy []common.Address) (*DaiApprovalIterator, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var guyRule []interface{} + for _, guyItem := range guy { + guyRule = append(guyRule, guyItem) + } + + logs, sub, err := _Dai.contract.FilterLogs(opts, "Approval", srcRule, guyRule) + if err != nil { + return nil, err + } + return &DaiApprovalIterator{contract: _Dai.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed src, address indexed guy, uint256 wad) +func (_Dai *DaiFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *DaiApproval, src []common.Address, guy []common.Address) (event.Subscription, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var guyRule []interface{} + for _, guyItem := range guy { + guyRule = append(guyRule, guyItem) + } + + logs, sub, err := _Dai.contract.WatchLogs(opts, "Approval", srcRule, guyRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(DaiApproval) + if err := _Dai.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed src, address indexed guy, uint256 wad) +func (_Dai *DaiFilterer) ParseApproval(log types.Log) (*DaiApproval, error) { + event := new(DaiApproval) + if err := _Dai.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// DaiTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the Dai contract. +type DaiTransferIterator struct { + Event *DaiTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *DaiTransferIterator) 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(DaiTransfer) + 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(DaiTransfer) + 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 *DaiTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *DaiTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// DaiTransfer represents a Transfer event raised by the Dai contract. +type DaiTransfer struct { + Src common.Address + Dst common.Address + Wad *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed src, address indexed dst, uint256 wad) +func (_Dai *DaiFilterer) FilterTransfer(opts *bind.FilterOpts, src []common.Address, dst []common.Address) (*DaiTransferIterator, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var dstRule []interface{} + for _, dstItem := range dst { + dstRule = append(dstRule, dstItem) + } + + logs, sub, err := _Dai.contract.FilterLogs(opts, "Transfer", srcRule, dstRule) + if err != nil { + return nil, err + } + return &DaiTransferIterator{contract: _Dai.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed src, address indexed dst, uint256 wad) +func (_Dai *DaiFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *DaiTransfer, src []common.Address, dst []common.Address) (event.Subscription, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var dstRule []interface{} + for _, dstItem := range dst { + dstRule = append(dstRule, dstItem) + } + + logs, sub, err := _Dai.contract.WatchLogs(opts, "Transfer", srcRule, dstRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(DaiTransfer) + if err := _Dai.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed src, address indexed dst, uint256 wad) +func (_Dai *DaiFilterer) ParseTransfer(log types.Log) (*DaiTransfer, error) { + event := new(DaiTransfer) + if err := _Dai.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// LibNoteABI is the input ABI used to generate the binding from. +const LibNoteABI = "[{\"anonymous\":true,\"inputs\":[{\"indexed\":true,\"name\":\"sig\",\"type\":\"bytes4\"},{\"indexed\":true,\"name\":\"usr\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"arg1\",\"type\":\"bytes32\"},{\"indexed\":true,\"name\":\"arg2\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"LogNote\",\"type\":\"event\"}]" + +// LibNoteBin is the compiled bytecode used for deploying new contracts. +var LibNoteBin = "0x6080604052348015600f57600080fd5b50603580601d6000396000f3006080604052600080fd00a165627a7a72305820244b0a34a434591266b0795727f04e72dbad51025b190c5620231f99c7ea717c0029" + +// DeployLibNote deploys a new Ethereum contract, binding an instance of LibNote to it. +func DeployLibNote(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *LibNote, error) { + parsed, err := abi.JSON(strings.NewReader(LibNoteABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(LibNoteBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &LibNote{LibNoteCaller: LibNoteCaller{contract: contract}, LibNoteTransactor: LibNoteTransactor{contract: contract}, LibNoteFilterer: LibNoteFilterer{contract: contract}}, nil +} + +// LibNote is an auto generated Go binding around an Ethereum contract. +type LibNote struct { + LibNoteCaller // Read-only binding to the contract + LibNoteTransactor // Write-only binding to the contract + LibNoteFilterer // Log filterer for contract events +} + +// LibNoteCaller is an auto generated read-only Go binding around an Ethereum contract. +type LibNoteCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// LibNoteTransactor is an auto generated write-only Go binding around an Ethereum contract. +type LibNoteTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// LibNoteFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type LibNoteFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// LibNoteSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type LibNoteSession struct { + Contract *LibNote // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// LibNoteCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type LibNoteCallerSession struct { + Contract *LibNoteCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// LibNoteTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type LibNoteTransactorSession struct { + Contract *LibNoteTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// LibNoteRaw is an auto generated low-level Go binding around an Ethereum contract. +type LibNoteRaw struct { + Contract *LibNote // Generic contract binding to access the raw methods on +} + +// LibNoteCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type LibNoteCallerRaw struct { + Contract *LibNoteCaller // Generic read-only contract binding to access the raw methods on +} + +// LibNoteTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type LibNoteTransactorRaw struct { + Contract *LibNoteTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewLibNote creates a new instance of LibNote, bound to a specific deployed contract. +func NewLibNote(address common.Address, backend bind.ContractBackend) (*LibNote, error) { + contract, err := bindLibNote(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &LibNote{LibNoteCaller: LibNoteCaller{contract: contract}, LibNoteTransactor: LibNoteTransactor{contract: contract}, LibNoteFilterer: LibNoteFilterer{contract: contract}}, nil +} + +// NewLibNoteCaller creates a new read-only instance of LibNote, bound to a specific deployed contract. +func NewLibNoteCaller(address common.Address, caller bind.ContractCaller) (*LibNoteCaller, error) { + contract, err := bindLibNote(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &LibNoteCaller{contract: contract}, nil +} + +// NewLibNoteTransactor creates a new write-only instance of LibNote, bound to a specific deployed contract. +func NewLibNoteTransactor(address common.Address, transactor bind.ContractTransactor) (*LibNoteTransactor, error) { + contract, err := bindLibNote(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &LibNoteTransactor{contract: contract}, nil +} + +// NewLibNoteFilterer creates a new log filterer instance of LibNote, bound to a specific deployed contract. +func NewLibNoteFilterer(address common.Address, filterer bind.ContractFilterer) (*LibNoteFilterer, error) { + contract, err := bindLibNote(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &LibNoteFilterer{contract: contract}, nil +} + +// bindLibNote binds a generic wrapper to an already deployed contract. +func bindLibNote(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(LibNoteABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_LibNote *LibNoteRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _LibNote.Contract.LibNoteCaller.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 (_LibNote *LibNoteRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _LibNote.Contract.LibNoteTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_LibNote *LibNoteRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _LibNote.Contract.LibNoteTransactor.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 (_LibNote *LibNoteCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _LibNote.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 (_LibNote *LibNoteTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _LibNote.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_LibNote *LibNoteTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _LibNote.Contract.contract.Transact(opts, method, params...) +} diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index 86a3463..6983085 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -27,15 +27,15 @@ import ( "github.com/ethereum/go-ethereum/crypto" ontcommon "github.com/ontio/ontology/common" utils2 "github.com/ontio/ontology/smartcontract/service/native/utils" - btcx_abi "github.com/polynetwork/poly-io-test/chains/eth/abi/btcx" - eccd_abi "github.com/polynetwork/poly-io-test/chains/eth/abi/eccd" - eccm_abi "github.com/polynetwork/poly-io-test/chains/eth/abi/eccm" - eccmp_abi "github.com/polynetwork/poly-io-test/chains/eth/abi/eccmp" - erc20_api "github.com/polynetwork/poly-io-test/chains/eth/abi/erc20" - lockproxy_abi "github.com/polynetwork/poly-io-test/chains/eth/abi/lockproxy" - oep4_api "github.com/polynetwork/poly-io-test/chains/eth/abi/oep4" - ongx_api "github.com/polynetwork/poly-io-test/chains/eth/abi/ongx" - ontx_api "github.com/polynetwork/poly-io-test/chains/eth/abi/ontx" + "github.com/polynetwork/eth-contracts/go_abi/btcx_abi" + "github.com/polynetwork/eth-contracts/go_abi/eccd_abi" + "github.com/polynetwork/eth-contracts/go_abi/eccm_abi" + "github.com/polynetwork/eth-contracts/go_abi/eccmp_abi" + "github.com/polynetwork/eth-contracts/go_abi/erc20_abi" + "github.com/polynetwork/eth-contracts/go_abi/lock_proxy_abi" + "github.com/polynetwork/eth-contracts/go_abi/oep4_abi" + "github.com/polynetwork/eth-contracts/go_abi/ongx_abi" + "github.com/polynetwork/eth-contracts/go_abi/ontx_abi" "github.com/polynetwork/poly-io-test/config" "log" "math/big" @@ -51,7 +51,7 @@ type EInvoker struct { } var ( - DefaultGasLimit = 8000000 + DefaultGasLimit = 5000000 ) func NewEInvoker() *EInvoker { @@ -83,7 +83,7 @@ func (ethInvoker *EInvoker) MakeSmartContractAuth() (*bind.TransactOpts, error) auth.Nonce = big.NewInt(int64(nonce)) auth.Value = big.NewInt(int64(0)) // in wei auth.GasLimit = uint64(DefaultGasLimit) // in units - auth.GasPrice = gasPrice.Mul(gasPrice, big.NewInt(10)) + auth.GasPrice = gasPrice.Mul(gasPrice, big.NewInt(1)) return auth, nil } @@ -108,7 +108,7 @@ func (ethInvoker *EInvoker) DeployECCMContract(eccdAddress string) (ethComm.Addr } address := ethComm.HexToAddress(eccdAddress) contractAddress, tx, contract, err := eccm_abi.DeployEthCrossChainManager(auth, - ethInvoker.ETHUtil.GetEthClient(), address) + ethInvoker.ETHUtil.GetEthClient(), address, config.DefConfig.EthChainID) if err != nil { return ethComm.Address{}, nil, fmt.Errorf("DeployECCMContract, err: %v", err) } @@ -128,9 +128,9 @@ func (ethInvoker *EInvoker) DeployECCMPContract(eccmAddress string) (ethComm.Add return contractAddress, contract, nil } -func (ethInvoker *EInvoker) DeployERC20() (ethComm.Address, *erc20_api.ERC20Template, error) { +func (ethInvoker *EInvoker) DeployERC20() (ethComm.Address, *erc20_abi.ERC20Template, error) { auth, _ := ethInvoker.MakeSmartContractAuth() - contractAddress, tx, contract, err := erc20_api.DeployERC20Template(auth, + contractAddress, tx, contract, err := erc20_abi.DeployERC20Template(auth, ethInvoker.ETHUtil.GetEthClient()) if err != nil { log.Fatal(err) @@ -139,10 +139,10 @@ func (ethInvoker *EInvoker) DeployERC20() (ethComm.Address, *erc20_api.ERC20Temp return contractAddress, contract, nil } -func (ethInvoker *EInvoker) DeployOEP4(lockProxy string) (ethComm.Address, *oep4_api.OEP4Template, error) { +func (ethInvoker *EInvoker) DeployOEP4(lockProxy string) (ethComm.Address, *oep4_abi.OEP4Template, error) { auth, _ := ethInvoker.MakeSmartContractAuth() lockProxyAddr := ethComm.HexToAddress(lockProxy) - contractAddress, tx, contract, err := oep4_api.DeployOEP4Template(auth, + contractAddress, tx, contract, err := oep4_abi.DeployOEP4Template(auth, ethInvoker.ETHUtil.GetEthClient(), lockProxyAddr) if err != nil { log.Fatal(err) @@ -158,11 +158,21 @@ func (ethInvoker *EInvoker) DeployOEP4(lockProxy string) (ethComm.Address, *oep4 return contractAddress, contract, nil } +// +//func (ethInvoker *EInvoker) DeployUSDT(lockProxy string) (ethComm.Address, *oep4_abi.OEP4Template, error) { +// auth, _ := ethInvoker.MakeSmartContractAuth() +// lockProxyAddr := ethComm.HexToAddress(lockProxy) +// usdt_abi.DeployTetherToken(auth, ethInvoker.ETHUtil.GetEthClient(), big.NewInt(8000000000), "USDT", "USDT", big.NewInt(6)) +//} + func (ethInvoker *EInvoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetHash string, - toChainId int, initAmt int64) (*types.Transaction, error) { + toChainId uint64, initAmt int64) (*types.Transaction, error) { auth, contract, err := ethInvoker.MakeLockProxy(lockProxyAddr) + if err != nil { + return nil, err + } var toAddr []byte - if toChainId == config.ONT_CHAIN_ID { + if uint64(toChainId) == config.DefConfig.OntChainID { addr, err := ontcommon.AddressFromHexString(toAssetHash) if err != nil { return nil, err @@ -188,7 +198,7 @@ func (ethInvoker *EInvoker) BindOntAsset(lockProxy, ontOnEth, ongOnEth, oep4OnEt txs := make([]*types.Transaction, 0) tx1, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ontOnEth), - config.ONT_CHAIN_ID, utils2.OntContractAddress[:]) + config.DefConfig.OntChainID, utils2.OntContractAddress[:]) if err != nil { return nil, err } @@ -206,7 +216,7 @@ func (ethInvoker *EInvoker) BindOntAsset(lockProxy, ontOnEth, ongOnEth, oep4OnEt auth, _ = ethInvoker.MakeSmartContractAuth() tx2, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ongOnEth), - config.ONT_CHAIN_ID, utils2.OngContractAddress[:]) + config.DefConfig.OntChainID, utils2.OngContractAddress[:]) if err != nil { return nil, err } @@ -227,7 +237,7 @@ func (ethInvoker *EInvoker) BindOntAsset(lockProxy, ontOnEth, ongOnEth, oep4OnEt return nil, err } auth, _ = ethInvoker.MakeSmartContractAuth() - tx3, err := contract.BindAssetHash(auth, ethComm.HexToAddress(oep4OnEth), config.ONT_CHAIN_ID, oep4[:]) + tx3, err := contract.BindAssetHash(auth, ethComm.HexToAddress(oep4OnEth), config.DefConfig.OntChainID, oep4[:]) if err != nil { return nil, err } @@ -245,19 +255,19 @@ func (ethInvoker *EInvoker) BindOntAsset(lockProxy, ontOnEth, ongOnEth, oep4OnEt return txs, nil } -func (ethInvoker *EInvoker) MakeLockProxy(lockProxyAddr string) (*bind.TransactOpts, *lockproxy_abi.LockProxy, error) { +func (ethInvoker *EInvoker) MakeLockProxy(lockProxyAddr string) (*bind.TransactOpts, *lock_proxy_abi.LockProxy, error) { auth, _ := ethInvoker.MakeSmartContractAuth() - contract, err := lockproxy_abi.NewLockProxy(ethComm.HexToAddress(lockProxyAddr), + contract, err := lock_proxy_abi.NewLockProxy(ethComm.HexToAddress(lockProxyAddr), ethInvoker.ETHUtil.GetEthClient()) if err != nil { - log.Fatal(err) + return nil, nil, err } - return auth, contract, err + return auth, contract, nil } -func (ethInvoker *EInvoker) DeployLockProxyContract(eccmp ethComm.Address) (ethComm.Address, *lockproxy_abi.LockProxy, error) { +func (ethInvoker *EInvoker) DeployLockProxyContract(eccmp ethComm.Address) (ethComm.Address, *lock_proxy_abi.LockProxy, error) { auth, _ := ethInvoker.MakeSmartContractAuth() - contractAddress, tx, contract, err := lockproxy_abi.DeployLockProxy(auth, + contractAddress, tx, contract, err := lock_proxy_abi.DeployLockProxy(auth, ethInvoker.ETHUtil.GetEthClient()) if err != nil { return ethComm.Address{}, nil, fmt.Errorf("DeployLockProxyContract: %v", err) @@ -291,9 +301,9 @@ func (ethInvoker *EInvoker) DeployBTCXContract(redeemscript string) (ethComm.Add return contractAddress, contract, nil } -func (ethInvoker *EInvoker) DeployONTXContract(lockProxyAddr string) (ethComm.Address, *ontx_api.ONTX, error) { +func (ethInvoker *EInvoker) DeployONTXContract(lockProxyAddr string) (ethComm.Address, *ontx_abi.ONTX, error) { auth, _ := ethInvoker.MakeSmartContractAuth() - contractAddress, tx, contract, err := ontx_api.DeployONTX(auth, + contractAddress, tx, contract, err := ontx_abi.DeployONTX(auth, ethInvoker.ETHUtil.GetEthClient(), ethComm.HexToAddress(lockProxyAddr)) if err != nil { return ethComm.Address{}, nil, fmt.Errorf("DeployONTXContract, failed to deploy: %v", err) @@ -304,9 +314,9 @@ func (ethInvoker *EInvoker) DeployONTXContract(lockProxyAddr string) (ethComm.Ad return contractAddress, contract, nil } -func (ethInvoker *EInvoker) DeployONGXContract(lockProxyAddr string) (ethComm.Address, *ongx_api.ONGX, error) { +func (ethInvoker *EInvoker) DeployONGXContract(lockProxyAddr string) (ethComm.Address, *ongx_abi.ONGX, error) { auth, _ := ethInvoker.MakeSmartContractAuth() - contractAddress, tx, contract, err := ongx_api.DeployONGX(auth, + contractAddress, tx, contract, err := ongx_abi.DeployONGX(auth, ethInvoker.ETHUtil.GetEthClient(), ethComm.HexToAddress(lockProxyAddr)) if err != nil { return ethComm.Address{}, nil, fmt.Errorf("DeployONGXContract, failed to deploy: %v", err) @@ -319,7 +329,7 @@ func (ethInvoker *EInvoker) DeployONGXContract(lockProxyAddr string) (ethComm.Ad func (ethInvoker *EInvoker) SetManagerProxyForLockProxy(lockProxyAddrHex, eccmpAddressHex string) (*types.Transaction, error) { lockProxyAddr := ethComm.HexToAddress(lockProxyAddrHex) - lockProxyContract, err := lockproxy_abi.NewLockProxy(lockProxyAddr, ethInvoker.ETHUtil.GetEthClient()) + lockProxyContract, err := lock_proxy_abi.NewLockProxy(lockProxyAddr, ethInvoker.ETHUtil.GetEthClient()) if err != nil { return nil, fmt.Errorf("SetManagerProxyForLockProxy: %v", err) } @@ -372,7 +382,7 @@ func (ethInvoker *EInvoker) GetAccInfo() (string, error) { } ethInfo := fmt.Sprintf("eth: %d", val.Uint64()) - ontx, err := ontx_api.NewONTX(ethComm.HexToAddress(ethInvoker.TConfiguration.EthOntx), ethInvoker.ETHUtil.ethclient) + ontx, err := ontx_abi.NewONTX(ethComm.HexToAddress(ethInvoker.TConfiguration.EthOntx), ethInvoker.ETHUtil.ethclient) if err != nil { return "", err } @@ -382,7 +392,7 @@ func (ethInvoker *EInvoker) GetAccInfo() (string, error) { } ontInfo := fmt.Sprintf("ontx: %d", val.Uint64()) - ongx, err := ongx_api.NewONGX(ethComm.HexToAddress(ethInvoker.TConfiguration.EthOngx), ethInvoker.ETHUtil.ethclient) + ongx, err := ongx_abi.NewONGX(ethComm.HexToAddress(ethInvoker.TConfiguration.EthOngx), ethInvoker.ETHUtil.ethclient) if err != nil { return "", err } @@ -392,7 +402,7 @@ func (ethInvoker *EInvoker) GetAccInfo() (string, error) { } ongInfo := fmt.Sprintf("ongx: %d", val.Uint64()) - oep4x, err := oep4_api.NewOEP4Template(ethComm.HexToAddress(ethInvoker.TConfiguration.EthOep4), ethInvoker.ETHUtil.ethclient) + oep4x, err := oep4_abi.NewOEP4Template(ethComm.HexToAddress(ethInvoker.TConfiguration.EthOep4), ethInvoker.ETHUtil.ethclient) if err != nil { return "", err } @@ -402,7 +412,7 @@ func (ethInvoker *EInvoker) GetAccInfo() (string, error) { } oep4Info := fmt.Sprintf("oep4x: %d", val.Uint64()) - erc20, err := erc20_api.NewERC20(ethComm.HexToAddress(ethInvoker.TConfiguration.EthErc20), ethInvoker.ETHUtil.ethclient) + erc20, err := erc20_abi.NewERC20(ethComm.HexToAddress(ethInvoker.TConfiguration.EthErc20), ethInvoker.ETHUtil.ethclient) if err != nil { return "", err } diff --git a/chains/eth/eth_test.go b/chains/eth/eth_test.go index f98bad8..6f3e8d6 100644 --- a/chains/eth/eth_test.go +++ b/chains/eth/eth_test.go @@ -1,32 +1,308 @@ package eth import ( + "bytes" + "encoding/hex" + "encoding/json" "fmt" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" - "github.com/polynetwork/poly-io-test/chains/eth/abi/ongx" + "github.com/joeqian10/neo-gogogo/wallet" + "github.com/ontio/ontology-crypto/keypair" + "github.com/ontio/ontology-go-sdk" + "github.com/ontio/ontology/consensus/vbft/config" + "github.com/polynetwork/poly-go-sdk" "github.com/polynetwork/poly-io-test/config" + "github.com/polynetwork/poly-io-test/log" + vconfig2 "github.com/polynetwork/poly/consensus/vbft/config" + common3 "github.com/polynetwork/poly/native/service/cross_chain_manager/common" + "github.com/polynetwork/poly/native/service/utils" + "math/big" "testing" + "time" ) +func MakeEthAuth(signer *EthSigner, nonce, gasPrice, gasLimit uint64) *bind.TransactOpts { + auth := bind.NewKeyedTransactor(signer.PrivateKey) + auth.Nonce = big.NewInt(int64(nonce)) + auth.Value = big.NewInt(int64(0)) // in wei + auth.GasLimit = gasLimit // in units + auth.GasPrice = big.NewInt(int64(gasPrice)) + + return auth +} + func TestNewNonceManager(t *testing.T) { - err := config.DefConfig.Init("config.json") + //err := config.DefConfig.Init("config.json") + //if err != nil { + // t.Fatal(err) + //} + // + //invoker := NewEInvoker() + // + //contract, err := ongx_abi.NewONGX(common.HexToAddress("0xFb37c160CFBd8BD4Ba6df6f70e2449b6EB83fc26"), invoker.ETHUtil.GetEthClient()) + //if err != nil { + // t.Fatal(err) + //} + // + //amt, err := contract.Allowance(nil, common.HexToAddress("0x344cFc3B8635f72F14200aAf2168d9f75df86FD3"), + // common.HexToAddress("0x388Ed8B73bd707A78034E1d157fA08Da24095c18")) + //if err != nil { + // t.Fatal(err) + //} + // + //fmt.Println(amt.Uint64(), 3%1) + + err := config.DefConfig.Init("/Users/zou/go/src/github.com/ontio/poly-io-test/config-main.json") if err != nil { t.Fatal(err) } + //poly := poly_go_sdk.NewPolySdk() + //poly.NewRpcClient().SetAddress(config.DefConfig.RchainJsonRpcAddress) + // + //raw, err := poly.GetStorage(utils.SideChainManagerContractAddress.ToHexString(), append([]byte(side_chain_manager.SIDE_CHAIN), utils.GetUint64Bytes(4)...)) + //if err != nil { + // t.Fatal(err) + //} + //sideChain := new(side_chain_manager.SideChain) + //if err := sideChain.Deserialization(common2.NewZeroCopySource(raw)); err != nil { + // t.Fatal(fmt.Errorf("getSideChain, deserialize sideChain error: %v", err)) + //} + //fmt.Println(hex.EncodeToString(sideChain.CCMCAddress)) + + nUSDTAddr := "0x2205d2F559ef91580090011Aa4E0eF68Ec33da44" + tx := "0x05a873aba68598585b0d22553de8a86a158992b2ddca77e82eea95d06205d550" + txhash := common.HexToHash(tx) + invoker := NewEInvoker() + invoker.ETHUtil.WaitTransactionConfirm(txhash) + + gasPrice := big.NewInt(100 * 1e9) - contract, err := ongx.NewONGX(common.HexToAddress("0xFb37c160CFBd8BD4Ba6df6f70e2449b6EB83fc26"), invoker.ETHUtil.GetEthClient()) + token, err := NewERC20(common.HexToAddress(nUSDTAddr), invoker.ETHUtil.GetEthClient()) if err != nil { t.Fatal(err) } - amt, err := contract.Allowance(nil, common.HexToAddress("0x344cFc3B8635f72F14200aAf2168d9f75df86FD3"), - common.HexToAddress("0x388Ed8B73bd707A78034E1d157fA08Da24095c18")) + bal, err := token.BalanceOf(nil, invoker.EthTestSigner.Address) if err != nil { t.Fatal(err) } + fmt.Println(bal.Uint64()) + + auth := MakeEthAuth(invoker.EthTestSigner, 3, gasPrice.Uint64(), uint64(80000)) + fmt.Println(auth.GasPrice.Uint64(), auth.GasLimit) + txn, err := token.Approve(auth, common.HexToAddress("0x8B083BbB4c5200fb9653F28d010e92daB71CFa71"), bal) + if err != nil { + t.Fatal(err) + } + hash := txn.Hash() + log.Infof("get ETH now and sending tx %s with gasPrice %d", hash.String(), gasPrice.Uint64()) + invoker.ETHUtil.WaitTransactionConfirm(hash) + +} - fmt.Println(amt.Uint64(), 3%1) +func Test_Scan_ONT_hegit_To_grab_latest_Consensus_Switch_Height1(t *testing.T) { + ontSdk := ontology_go_sdk.NewOntologySdk() + url := "http://dappnode1.ont.io:20336" + ontSdk.NewRpcClient().SetAddress(url) + curHeight, err := ontSdk.GetCurrentBlockHeight() + if err != nil { + fmt.Printf("ontology, get current block height error: %v\n", err) + return + } + fmt.Printf("Current ontlogy net: %s, height: %d\n", url, curHeight) + var height uint32 = 9354300 + found := false + for !found && height <= height+1000 { + block, err := ontSdk.GetBlockByHeight(height) + if err != nil { + fmt.Printf("GetBLockByHeight err: %v\n", err) + } + header := block.Header + + blkInfo := &vconfig.VbftBlockInfo{} + if err := json.Unmarshal(header.ConsensusPayload, blkInfo); err != nil { + fmt.Printf("unmarshal blockInfo error: %v\n", err) + return + } + if blkInfo.NewChainConfig != nil { + fmt.Printf("===========FOUND============at height: %d\n", height) + found = true + return + } + height++ + if height%5 == 0 { + fmt.Printf("height: %d not found\n", height) + } + } + +} + +func Test_Scan_ONT_hegit_To_grab_latest_Consensus_Switch_Height(t *testing.T) { + ontSdk := ontology_go_sdk.NewOntologySdk() + url := "http://dappnode1.ont.io:20336" + ontSdk.NewRpcClient().SetAddress(url) + curHeight, err := ontSdk.GetCurrentBlockHeight() + if err != nil { + fmt.Printf("ontology, get current block height error: %v\n", err) + return + } + fmt.Printf("Current ontlogy net: %s, height: %d\n", url, curHeight) + var height uint32 = 9295092 + found := false + oneByOne := false + + block, err := ontSdk.GetBlockByHeight(height) + if err != nil { + t.Fatalf("GetBLockByHeight err: %v\n", err) + } + header := block.Header + old := header.Bookkeepers + for !found { + block, err := ontSdk.GetBlockByHeight(height) + if err != nil { + fmt.Printf("GetBLockByHeight err: %v\n", err) + } + header := block.Header + + blkInfo := &vconfig.VbftBlockInfo{} + if err := json.Unmarshal(header.ConsensusPayload, blkInfo); err != nil { + fmt.Printf("unmarshal blockInfo error: %v\n", err) + return + } + if blkInfo.NewChainConfig != nil { + fmt.Printf("===========FOUND============at height: %d\n", height) + found = true + return + } + if !oneByOne && !EqualKeepers(old, header.Bookkeepers) { + height = height - 1000 + fmt.Printf("set %d to restart\n", height) + oneByOne = true + continue + } + + if !oneByOne { + height = height + 1000 + } else { + height++ + } + if time.Now().Second()%60 == 0 { + fmt.Printf("height: %d not found\n", height) + } + } +} + +func EqualKeepers(oldBkers, newBkers []keypair.PublicKey) bool { + if len(oldBkers) != len(newBkers) { + return false + } + idx := 0 + for _, v := range oldBkers { + rawV := keypair.SerializePublicKey(v) + for _, u := range newBkers { + rawU := keypair.SerializePublicKey(u) + if bytes.Equal(rawV, rawU) { + idx++ + break + } + } + } + if idx != len(oldBkers) { + return false + } + + return true +} + +func TestDeployBasicToken(t *testing.T) { + poly := poly_go_sdk.NewPolySdk() + poly.NewRpcClient().SetAddress("http://138.91.6.125:20336") + contractAddress := utils.CrossChainManagerContractAddress + c, _ := hex.DecodeString("0100000000000000000000000000000000000000000000000000000000000000") + key := append(append([]byte(common3.DONE_TX), utils.GetUint64Bytes(2)...), c...) + // try to get storage + + result, err := poly.GetStorage(contractAddress.ToHexString(), key) + if err != nil { + t.Fatal(err) + } + if result == nil { + t.Fatal("err") + } + fmt.Println("res", hex.EncodeToString(result)) +} + +func Test_Scan_POLY_hegit_To_grab_latest_Consensus_Switch_Height(t *testing.T) { + polySdk := poly_go_sdk.NewPolySdk() + url := "http://40.115.182.238:40336" + polySdk.NewRpcClient().SetAddress(url) + curHeight, err := polySdk.GetCurrentBlockHeight() + if err != nil { + fmt.Printf("ontology, get current block height error: %v\n", err) + return + } + wallet.NewAccount() + fmt.Printf("Current ontlogy net: %s, height: %d\n", url, curHeight) + startHeight := uint32(168168) + height := startHeight + //current scan height: 96757 -> 85185, no switch + found := false + backSearchHeight := uint32(startHeight) + backSearchThreshold := 0 + searchOneByOneFlag := false + + for !found { + block, err := polySdk.GetBlockByHeight(height) + if err != nil { + fmt.Printf("GetBLockByHeight err: %v\n", err) + } + header := block.Header + + blkInfo := &vconfig2.VbftBlockInfo{} + if err := json.Unmarshal(header.ConsensusPayload, blkInfo); err != nil { + fmt.Printf("unmarshal blockInfo error: %v\n", err) + return + } + if blkInfo.NewChainConfig != nil { + fmt.Printf("===========Switch consensus ============at height: %d\n", height) + blkInfo := &vconfig.VbftBlockInfo{} + if err := json.Unmarshal(header.ConsensusPayload, blkInfo); err != nil { + fmt.Printf("Header Unmarshal(header.ConsensusPayload, blkInfo), err: %v", err) + return + } + if blkInfo.NewChainConfig != nil { + fmt.Printf("Height: %d, blkInfo.LastConfigBlockNum is %d\n", header.Height, blkInfo.LastConfigBlockNum) + for i, p := range blkInfo.NewChainConfig.Peers { + fmt.Printf("blkInfo.NewChainConfig.Peers[%d], Index: %d, Id: %s\n", i, p.Index, p.ID) + } + } + fmt.Printf("\n\n") + + if len(blkInfo.NewChainConfig.Peers) > 1 { + fmt.Printf("===========Found ============at height: %d\n", height) + found = true + return + } + backSearchHeight = height + backSearchThreshold = 0 + searchOneByOneFlag = false + } + if backSearchThreshold > 10 && !searchOneByOneFlag { + height = backSearchHeight + fmt.Printf("back to height: %d to scan one by one", height) + searchOneByOneFlag = true + } else { + backSearchThreshold++ + } + if searchOneByOneFlag { + height++ + } else { + height = height + 1000 + } + fmt.Printf("height: %d not found\n", height) + } } diff --git a/chains/eth/eth_tools.go b/chains/eth/eth_tools.go index 806bf42..a30c4a5 100644 --- a/chains/eth/eth_tools.go +++ b/chains/eth/eth_tools.go @@ -28,7 +28,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" - "github.com/polynetwork/poly-io-test/chains/eth/abi/eccm" + "github.com/polynetwork/eth-contracts/go_abi/eccm_abi" "github.com/polynetwork/poly-io-test/log" "io/ioutil" "math/big" @@ -162,7 +162,7 @@ func (self *ETHTools) GetBlockHeader(height uint64) (*types.Header, error) { func (self *ETHTools) GetSmartContractEventByBlock(contractAddr string, height uint64) ([]*LockEvent, []*UnlockEvent, error) { eccmAddr := common.HexToAddress(contractAddr) - instance, err := eccm.NewEthCrossChainManager(eccmAddr, self.ethclient) + instance, err := eccm_abi.NewEthCrossChainManager(eccmAddr, self.ethclient) if err != nil { return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error: %s", err.Error()) } @@ -312,7 +312,7 @@ func (self *ETHTools) WaitTransactionsConfirm(hashs []common.Hash) { func (self *ETHTools) WaitTransactionConfirm(hash common.Hash) { for { - time.Sleep(time.Second * 1) + time.Sleep(time.Millisecond * 100) _, ispending, err := self.ethclient.TransactionByHash(context.Background(), hash) if err != nil { log.Errorf("failed to call TransactionByHash: %v", err) diff --git a/chains/eth/wbtc.go b/chains/eth/wbtc.go new file mode 100644 index 0000000..ca0c94d --- /dev/null +++ b/chains/eth/wbtc.go @@ -0,0 +1,11539 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package eth + +import ( + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// BasicTokenABI is the input ABI used to generate the binding from. +const BasicTokenABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + +// BasicTokenFuncSigs maps the 4-byte function signature to its string representation. +var BasicTokenFuncSigs = map[string]string{ + "70a08231": "balanceOf(address)", + "18160ddd": "totalSupply()", + "a9059cbb": "transfer(address,uint256)", +} + +// BasicTokenBin is the compiled bytecode used for deploying new contracts. +var BasicTokenBin = "0x608060405234801561001057600080fd5b5061027a806100206000396000f3006080604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318160ddd811461005b57806370a0823114610082578063a9059cbb146100b0575b600080fd5b34801561006757600080fd5b506100706100f5565b60408051918252519081900360200190f35b34801561008e57600080fd5b5061007073ffffffffffffffffffffffffffffffffffffffff600435166100fb565b3480156100bc57600080fd5b506100e173ffffffffffffffffffffffffffffffffffffffff60043516602435610123565b604080519115158252519081900360200190f35b60015490565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3360009081526020819052604081205482111561013f57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316151561016157600080fd5b33600090815260208190526040902054610181908363ffffffff61022916565b336000908152602081905260408082209290925573ffffffffffffffffffffffffffffffffffffffff8516815220546101c0908363ffffffff61023b16565b73ffffffffffffffffffffffffffffffffffffffff8416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60008282111561023557fe5b50900390565b8181018281101561024857fe5b929150505600a165627a7a72305820242003bb8e38ba90c02c0906e5861b4d0d143352dfabc62e66eb4d37cd101db70029" + +// DeployBasicToken deploys a new Ethereum contract, binding an instance of BasicToken to it. +func DeployBasicToken(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *BasicToken, error) { + parsed, err := abi.JSON(strings.NewReader(BasicTokenABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(BasicTokenBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &BasicToken{BasicTokenCaller: BasicTokenCaller{contract: contract}, BasicTokenTransactor: BasicTokenTransactor{contract: contract}, BasicTokenFilterer: BasicTokenFilterer{contract: contract}}, nil +} + +// BasicToken is an auto generated Go binding around an Ethereum contract. +type BasicToken struct { + BasicTokenCaller // Read-only binding to the contract + BasicTokenTransactor // Write-only binding to the contract + BasicTokenFilterer // Log filterer for contract events +} + +// BasicTokenCaller is an auto generated read-only Go binding around an Ethereum contract. +type BasicTokenCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BasicTokenTransactor is an auto generated write-only Go binding around an Ethereum contract. +type BasicTokenTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BasicTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type BasicTokenFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BasicTokenSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type BasicTokenSession struct { + Contract *BasicToken // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// BasicTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type BasicTokenCallerSession struct { + Contract *BasicTokenCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// BasicTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type BasicTokenTransactorSession struct { + Contract *BasicTokenTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// BasicTokenRaw is an auto generated low-level Go binding around an Ethereum contract. +type BasicTokenRaw struct { + Contract *BasicToken // Generic contract binding to access the raw methods on +} + +// BasicTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type BasicTokenCallerRaw struct { + Contract *BasicTokenCaller // Generic read-only contract binding to access the raw methods on +} + +// BasicTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type BasicTokenTransactorRaw struct { + Contract *BasicTokenTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewBasicToken creates a new instance of BasicToken, bound to a specific deployed contract. +func NewBasicToken(address common.Address, backend bind.ContractBackend) (*BasicToken, error) { + contract, err := bindBasicToken(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &BasicToken{BasicTokenCaller: BasicTokenCaller{contract: contract}, BasicTokenTransactor: BasicTokenTransactor{contract: contract}, BasicTokenFilterer: BasicTokenFilterer{contract: contract}}, nil +} + +// NewBasicTokenCaller creates a new read-only instance of BasicToken, bound to a specific deployed contract. +func NewBasicTokenCaller(address common.Address, caller bind.ContractCaller) (*BasicTokenCaller, error) { + contract, err := bindBasicToken(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &BasicTokenCaller{contract: contract}, nil +} + +// NewBasicTokenTransactor creates a new write-only instance of BasicToken, bound to a specific deployed contract. +func NewBasicTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*BasicTokenTransactor, error) { + contract, err := bindBasicToken(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &BasicTokenTransactor{contract: contract}, nil +} + +// NewBasicTokenFilterer creates a new log filterer instance of BasicToken, bound to a specific deployed contract. +func NewBasicTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*BasicTokenFilterer, error) { + contract, err := bindBasicToken(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &BasicTokenFilterer{contract: contract}, nil +} + +// bindBasicToken binds a generic wrapper to an already deployed contract. +func bindBasicToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(BasicTokenABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_BasicToken *BasicTokenRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _BasicToken.Contract.BasicTokenCaller.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 (_BasicToken *BasicTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BasicToken.Contract.BasicTokenTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_BasicToken *BasicTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _BasicToken.Contract.BasicTokenTransactor.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 (_BasicToken *BasicTokenCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _BasicToken.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 (_BasicToken *BasicTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BasicToken.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_BasicToken *BasicTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _BasicToken.Contract.contract.Transact(opts, method, params...) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_BasicToken *BasicTokenCaller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _BasicToken.contract.Call(opts, out, "balanceOf", _owner) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_BasicToken *BasicTokenSession) BalanceOf(_owner common.Address) (*big.Int, error) { + return _BasicToken.Contract.BalanceOf(&_BasicToken.CallOpts, _owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_BasicToken *BasicTokenCallerSession) BalanceOf(_owner common.Address) (*big.Int, error) { + return _BasicToken.Contract.BalanceOf(&_BasicToken.CallOpts, _owner) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_BasicToken *BasicTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _BasicToken.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_BasicToken *BasicTokenSession) TotalSupply() (*big.Int, error) { + return _BasicToken.Contract.TotalSupply(&_BasicToken.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_BasicToken *BasicTokenCallerSession) TotalSupply() (*big.Int, error) { + return _BasicToken.Contract.TotalSupply(&_BasicToken.CallOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_BasicToken *BasicTokenTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _BasicToken.contract.Transact(opts, "transfer", _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_BasicToken *BasicTokenSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _BasicToken.Contract.Transfer(&_BasicToken.TransactOpts, _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_BasicToken *BasicTokenTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _BasicToken.Contract.Transfer(&_BasicToken.TransactOpts, _to, _value) +} + +// BasicTokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the BasicToken contract. +type BasicTokenTransferIterator struct { + Event *BasicTokenTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BasicTokenTransferIterator) 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(BasicTokenTransfer) + 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(BasicTokenTransfer) + 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 *BasicTokenTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BasicTokenTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BasicTokenTransfer represents a Transfer event raised by the BasicToken contract. +type BasicTokenTransfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_BasicToken *BasicTokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*BasicTokenTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _BasicToken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &BasicTokenTransferIterator{contract: _BasicToken.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_BasicToken *BasicTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *BasicTokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _BasicToken.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BasicTokenTransfer) + if err := _BasicToken.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_BasicToken *BasicTokenFilterer) ParseTransfer(log types.Log) (*BasicTokenTransfer, error) { + event := new(BasicTokenTransfer) + if err := _BasicToken.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// BurnableTokenABI is the input ABI used to generate the binding from. +const BurnableTokenABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"burner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + +// BurnableTokenFuncSigs maps the 4-byte function signature to its string representation. +var BurnableTokenFuncSigs = map[string]string{ + "70a08231": "balanceOf(address)", + "42966c68": "burn(uint256)", + "18160ddd": "totalSupply()", + "a9059cbb": "transfer(address,uint256)", +} + +// BurnableTokenBin is the compiled bytecode used for deploying new contracts. +var BurnableTokenBin = "0x608060405234801561001057600080fd5b5061035f806100206000396000f3006080604052600436106100615763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318160ddd811461006657806342966c681461008d57806370a08231146100a7578063a9059cbb146100c8575b600080fd5b34801561007257600080fd5b5061007b610100565b60408051918252519081900360200190f35b34801561009957600080fd5b506100a5600435610106565b005b3480156100b357600080fd5b5061007b600160a060020a0360043516610113565b3480156100d457600080fd5b506100ec600160a060020a036004351660243561012e565b604080519115158252519081900360200190f35b60015490565b610110338261020d565b50565b600160a060020a031660009081526020819052604090205490565b3360009081526020819052604081205482111561014a57600080fd5b600160a060020a038316151561015f57600080fd5b3360009081526020819052604090205461017f908363ffffffff61030e16565b3360009081526020819052604080822092909255600160a060020a038516815220546101b1908363ffffffff61032016565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b600160a060020a03821660009081526020819052604090205481111561023257600080fd5b600160a060020a03821660009081526020819052604090205461025b908263ffffffff61030e16565b600160a060020a038316600090815260208190526040902055600154610287908263ffffffff61030e16565b600155604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a2604080518281529051600091600160a060020a038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60008282111561031a57fe5b50900390565b8181018281101561032d57fe5b929150505600a165627a7a723058204e26cc2c49935a8d99c564d84447a87cfbda4572a1efcacee5eb02fba6de9a110029" + +// DeployBurnableToken deploys a new Ethereum contract, binding an instance of BurnableToken to it. +func DeployBurnableToken(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *BurnableToken, error) { + parsed, err := abi.JSON(strings.NewReader(BurnableTokenABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(BurnableTokenBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &BurnableToken{BurnableTokenCaller: BurnableTokenCaller{contract: contract}, BurnableTokenTransactor: BurnableTokenTransactor{contract: contract}, BurnableTokenFilterer: BurnableTokenFilterer{contract: contract}}, nil +} + +// BurnableToken is an auto generated Go binding around an Ethereum contract. +type BurnableToken struct { + BurnableTokenCaller // Read-only binding to the contract + BurnableTokenTransactor // Write-only binding to the contract + BurnableTokenFilterer // Log filterer for contract events +} + +// BurnableTokenCaller is an auto generated read-only Go binding around an Ethereum contract. +type BurnableTokenCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BurnableTokenTransactor is an auto generated write-only Go binding around an Ethereum contract. +type BurnableTokenTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BurnableTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type BurnableTokenFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BurnableTokenSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type BurnableTokenSession struct { + Contract *BurnableToken // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// BurnableTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type BurnableTokenCallerSession struct { + Contract *BurnableTokenCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// BurnableTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type BurnableTokenTransactorSession struct { + Contract *BurnableTokenTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// BurnableTokenRaw is an auto generated low-level Go binding around an Ethereum contract. +type BurnableTokenRaw struct { + Contract *BurnableToken // Generic contract binding to access the raw methods on +} + +// BurnableTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type BurnableTokenCallerRaw struct { + Contract *BurnableTokenCaller // Generic read-only contract binding to access the raw methods on +} + +// BurnableTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type BurnableTokenTransactorRaw struct { + Contract *BurnableTokenTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewBurnableToken creates a new instance of BurnableToken, bound to a specific deployed contract. +func NewBurnableToken(address common.Address, backend bind.ContractBackend) (*BurnableToken, error) { + contract, err := bindBurnableToken(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &BurnableToken{BurnableTokenCaller: BurnableTokenCaller{contract: contract}, BurnableTokenTransactor: BurnableTokenTransactor{contract: contract}, BurnableTokenFilterer: BurnableTokenFilterer{contract: contract}}, nil +} + +// NewBurnableTokenCaller creates a new read-only instance of BurnableToken, bound to a specific deployed contract. +func NewBurnableTokenCaller(address common.Address, caller bind.ContractCaller) (*BurnableTokenCaller, error) { + contract, err := bindBurnableToken(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &BurnableTokenCaller{contract: contract}, nil +} + +// NewBurnableTokenTransactor creates a new write-only instance of BurnableToken, bound to a specific deployed contract. +func NewBurnableTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*BurnableTokenTransactor, error) { + contract, err := bindBurnableToken(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &BurnableTokenTransactor{contract: contract}, nil +} + +// NewBurnableTokenFilterer creates a new log filterer instance of BurnableToken, bound to a specific deployed contract. +func NewBurnableTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*BurnableTokenFilterer, error) { + contract, err := bindBurnableToken(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &BurnableTokenFilterer{contract: contract}, nil +} + +// bindBurnableToken binds a generic wrapper to an already deployed contract. +func bindBurnableToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(BurnableTokenABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_BurnableToken *BurnableTokenRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _BurnableToken.Contract.BurnableTokenCaller.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 (_BurnableToken *BurnableTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BurnableToken.Contract.BurnableTokenTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_BurnableToken *BurnableTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _BurnableToken.Contract.BurnableTokenTransactor.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 (_BurnableToken *BurnableTokenCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _BurnableToken.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 (_BurnableToken *BurnableTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BurnableToken.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_BurnableToken *BurnableTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _BurnableToken.Contract.contract.Transact(opts, method, params...) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_BurnableToken *BurnableTokenCaller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _BurnableToken.contract.Call(opts, out, "balanceOf", _owner) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_BurnableToken *BurnableTokenSession) BalanceOf(_owner common.Address) (*big.Int, error) { + return _BurnableToken.Contract.BalanceOf(&_BurnableToken.CallOpts, _owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_BurnableToken *BurnableTokenCallerSession) BalanceOf(_owner common.Address) (*big.Int, error) { + return _BurnableToken.Contract.BalanceOf(&_BurnableToken.CallOpts, _owner) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_BurnableToken *BurnableTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _BurnableToken.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_BurnableToken *BurnableTokenSession) TotalSupply() (*big.Int, error) { + return _BurnableToken.Contract.TotalSupply(&_BurnableToken.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_BurnableToken *BurnableTokenCallerSession) TotalSupply() (*big.Int, error) { + return _BurnableToken.Contract.TotalSupply(&_BurnableToken.CallOpts) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 _value) returns() +func (_BurnableToken *BurnableTokenTransactor) Burn(opts *bind.TransactOpts, _value *big.Int) (*types.Transaction, error) { + return _BurnableToken.contract.Transact(opts, "burn", _value) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 _value) returns() +func (_BurnableToken *BurnableTokenSession) Burn(_value *big.Int) (*types.Transaction, error) { + return _BurnableToken.Contract.Burn(&_BurnableToken.TransactOpts, _value) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 _value) returns() +func (_BurnableToken *BurnableTokenTransactorSession) Burn(_value *big.Int) (*types.Transaction, error) { + return _BurnableToken.Contract.Burn(&_BurnableToken.TransactOpts, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_BurnableToken *BurnableTokenTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _BurnableToken.contract.Transact(opts, "transfer", _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_BurnableToken *BurnableTokenSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _BurnableToken.Contract.Transfer(&_BurnableToken.TransactOpts, _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_BurnableToken *BurnableTokenTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _BurnableToken.Contract.Transfer(&_BurnableToken.TransactOpts, _to, _value) +} + +// BurnableTokenBurnIterator is returned from FilterBurn and is used to iterate over the raw logs and unpacked data for Burn events raised by the BurnableToken contract. +type BurnableTokenBurnIterator struct { + Event *BurnableTokenBurn // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BurnableTokenBurnIterator) 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(BurnableTokenBurn) + 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(BurnableTokenBurn) + 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 *BurnableTokenBurnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BurnableTokenBurnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BurnableTokenBurn represents a Burn event raised by the BurnableToken contract. +type BurnableTokenBurn struct { + Burner common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBurn is a free log retrieval operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. +// +// Solidity: event Burn(address indexed burner, uint256 value) +func (_BurnableToken *BurnableTokenFilterer) FilterBurn(opts *bind.FilterOpts, burner []common.Address) (*BurnableTokenBurnIterator, error) { + + var burnerRule []interface{} + for _, burnerItem := range burner { + burnerRule = append(burnerRule, burnerItem) + } + + logs, sub, err := _BurnableToken.contract.FilterLogs(opts, "Burn", burnerRule) + if err != nil { + return nil, err + } + return &BurnableTokenBurnIterator{contract: _BurnableToken.contract, event: "Burn", logs: logs, sub: sub}, nil +} + +// WatchBurn is a free log subscription operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. +// +// Solidity: event Burn(address indexed burner, uint256 value) +func (_BurnableToken *BurnableTokenFilterer) WatchBurn(opts *bind.WatchOpts, sink chan<- *BurnableTokenBurn, burner []common.Address) (event.Subscription, error) { + + var burnerRule []interface{} + for _, burnerItem := range burner { + burnerRule = append(burnerRule, burnerItem) + } + + logs, sub, err := _BurnableToken.contract.WatchLogs(opts, "Burn", burnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BurnableTokenBurn) + if err := _BurnableToken.contract.UnpackLog(event, "Burn", 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 +} + +// ParseBurn is a log parse operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. +// +// Solidity: event Burn(address indexed burner, uint256 value) +func (_BurnableToken *BurnableTokenFilterer) ParseBurn(log types.Log) (*BurnableTokenBurn, error) { + event := new(BurnableTokenBurn) + if err := _BurnableToken.contract.UnpackLog(event, "Burn", log); err != nil { + return nil, err + } + return event, nil +} + +// BurnableTokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the BurnableToken contract. +type BurnableTokenTransferIterator struct { + Event *BurnableTokenTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BurnableTokenTransferIterator) 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(BurnableTokenTransfer) + 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(BurnableTokenTransfer) + 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 *BurnableTokenTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BurnableTokenTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BurnableTokenTransfer represents a Transfer event raised by the BurnableToken contract. +type BurnableTokenTransfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_BurnableToken *BurnableTokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*BurnableTokenTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _BurnableToken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &BurnableTokenTransferIterator{contract: _BurnableToken.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_BurnableToken *BurnableTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *BurnableTokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _BurnableToken.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BurnableTokenTransfer) + if err := _BurnableToken.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_BurnableToken *BurnableTokenFilterer) ParseTransfer(log types.Log) (*BurnableTokenTransfer, error) { + event := new(BurnableTokenTransfer) + if err := _BurnableToken.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// CanReclaimTokenABI is the input ABI used to generate the binding from. +const CanReclaimTokenABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"reclaimToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRenounced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + +// CanReclaimTokenFuncSigs maps the 4-byte function signature to its string representation. +var CanReclaimTokenFuncSigs = map[string]string{ + "8da5cb5b": "owner()", + "17ffc320": "reclaimToken(address)", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", +} + +// CanReclaimTokenBin is the compiled bytecode used for deploying new contracts. +var CanReclaimTokenBin = "0x608060405260008054600160a060020a031916331790556103bb806100256000396000f3006080604052600436106100615763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166317ffc3208114610066578063715018a6146100895780638da5cb5b1461009e578063f2fde38b146100cf575b600080fd5b34801561007257600080fd5b50610087600160a060020a03600435166100f0565b005b34801561009557600080fd5b506100876101bc565b3480156100aa57600080fd5b506100b3610228565b60408051600160a060020a039092168252519081900360200190f35b3480156100db57600080fd5b50610087600160a060020a0360043516610237565b60008054600160a060020a0316331461010857600080fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038416916370a082319160248083019260209291908290030181600087803b15801561016957600080fd5b505af115801561017d573d6000803e3d6000fd5b505050506040513d602081101561019357600080fd5b50516000549091506101b890600160a060020a0384811691168363ffffffff61025a16565b5050565b600054600160a060020a031633146101d357600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b600054600160a060020a0316331461024e57600080fd5b61025781610312565b50565b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156102d657600080fd5b505af11580156102ea573d6000803e3d6000fd5b505050506040513d602081101561030057600080fd5b5051151561030d57600080fd5b505050565b600160a060020a038116151561032757600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a723058208c1f51b3840ad393066b7d9058166bb3b7dc0d6d17276956f384cf84d46b0ceb0029" + +// DeployCanReclaimToken deploys a new Ethereum contract, binding an instance of CanReclaimToken to it. +func DeployCanReclaimToken(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *CanReclaimToken, error) { + parsed, err := abi.JSON(strings.NewReader(CanReclaimTokenABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(CanReclaimTokenBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &CanReclaimToken{CanReclaimTokenCaller: CanReclaimTokenCaller{contract: contract}, CanReclaimTokenTransactor: CanReclaimTokenTransactor{contract: contract}, CanReclaimTokenFilterer: CanReclaimTokenFilterer{contract: contract}}, nil +} + +// CanReclaimToken is an auto generated Go binding around an Ethereum contract. +type CanReclaimToken struct { + CanReclaimTokenCaller // Read-only binding to the contract + CanReclaimTokenTransactor // Write-only binding to the contract + CanReclaimTokenFilterer // Log filterer for contract events +} + +// CanReclaimTokenCaller is an auto generated read-only Go binding around an Ethereum contract. +type CanReclaimTokenCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CanReclaimTokenTransactor is an auto generated write-only Go binding around an Ethereum contract. +type CanReclaimTokenTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CanReclaimTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type CanReclaimTokenFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// CanReclaimTokenSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type CanReclaimTokenSession struct { + Contract *CanReclaimToken // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// CanReclaimTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type CanReclaimTokenCallerSession struct { + Contract *CanReclaimTokenCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// CanReclaimTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type CanReclaimTokenTransactorSession struct { + Contract *CanReclaimTokenTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// CanReclaimTokenRaw is an auto generated low-level Go binding around an Ethereum contract. +type CanReclaimTokenRaw struct { + Contract *CanReclaimToken // Generic contract binding to access the raw methods on +} + +// CanReclaimTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type CanReclaimTokenCallerRaw struct { + Contract *CanReclaimTokenCaller // Generic read-only contract binding to access the raw methods on +} + +// CanReclaimTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type CanReclaimTokenTransactorRaw struct { + Contract *CanReclaimTokenTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewCanReclaimToken creates a new instance of CanReclaimToken, bound to a specific deployed contract. +func NewCanReclaimToken(address common.Address, backend bind.ContractBackend) (*CanReclaimToken, error) { + contract, err := bindCanReclaimToken(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &CanReclaimToken{CanReclaimTokenCaller: CanReclaimTokenCaller{contract: contract}, CanReclaimTokenTransactor: CanReclaimTokenTransactor{contract: contract}, CanReclaimTokenFilterer: CanReclaimTokenFilterer{contract: contract}}, nil +} + +// NewCanReclaimTokenCaller creates a new read-only instance of CanReclaimToken, bound to a specific deployed contract. +func NewCanReclaimTokenCaller(address common.Address, caller bind.ContractCaller) (*CanReclaimTokenCaller, error) { + contract, err := bindCanReclaimToken(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &CanReclaimTokenCaller{contract: contract}, nil +} + +// NewCanReclaimTokenTransactor creates a new write-only instance of CanReclaimToken, bound to a specific deployed contract. +func NewCanReclaimTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*CanReclaimTokenTransactor, error) { + contract, err := bindCanReclaimToken(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &CanReclaimTokenTransactor{contract: contract}, nil +} + +// NewCanReclaimTokenFilterer creates a new log filterer instance of CanReclaimToken, bound to a specific deployed contract. +func NewCanReclaimTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*CanReclaimTokenFilterer, error) { + contract, err := bindCanReclaimToken(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &CanReclaimTokenFilterer{contract: contract}, nil +} + +// bindCanReclaimToken binds a generic wrapper to an already deployed contract. +func bindCanReclaimToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(CanReclaimTokenABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_CanReclaimToken *CanReclaimTokenRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _CanReclaimToken.Contract.CanReclaimTokenCaller.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 (_CanReclaimToken *CanReclaimTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CanReclaimToken.Contract.CanReclaimTokenTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_CanReclaimToken *CanReclaimTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CanReclaimToken.Contract.CanReclaimTokenTransactor.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 (_CanReclaimToken *CanReclaimTokenCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _CanReclaimToken.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 (_CanReclaimToken *CanReclaimTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CanReclaimToken.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_CanReclaimToken *CanReclaimTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CanReclaimToken.Contract.contract.Transact(opts, method, params...) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_CanReclaimToken *CanReclaimTokenCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _CanReclaimToken.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_CanReclaimToken *CanReclaimTokenSession) Owner() (common.Address, error) { + return _CanReclaimToken.Contract.Owner(&_CanReclaimToken.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_CanReclaimToken *CanReclaimTokenCallerSession) Owner() (common.Address, error) { + return _CanReclaimToken.Contract.Owner(&_CanReclaimToken.CallOpts) +} + +// ReclaimToken is a paid mutator transaction binding the contract method 0x17ffc320. +// +// Solidity: function reclaimToken(address _token) returns() +func (_CanReclaimToken *CanReclaimTokenTransactor) ReclaimToken(opts *bind.TransactOpts, _token common.Address) (*types.Transaction, error) { + return _CanReclaimToken.contract.Transact(opts, "reclaimToken", _token) +} + +// ReclaimToken is a paid mutator transaction binding the contract method 0x17ffc320. +// +// Solidity: function reclaimToken(address _token) returns() +func (_CanReclaimToken *CanReclaimTokenSession) ReclaimToken(_token common.Address) (*types.Transaction, error) { + return _CanReclaimToken.Contract.ReclaimToken(&_CanReclaimToken.TransactOpts, _token) +} + +// ReclaimToken is a paid mutator transaction binding the contract method 0x17ffc320. +// +// Solidity: function reclaimToken(address _token) returns() +func (_CanReclaimToken *CanReclaimTokenTransactorSession) ReclaimToken(_token common.Address) (*types.Transaction, error) { + return _CanReclaimToken.Contract.ReclaimToken(&_CanReclaimToken.TransactOpts, _token) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_CanReclaimToken *CanReclaimTokenTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CanReclaimToken.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_CanReclaimToken *CanReclaimTokenSession) RenounceOwnership() (*types.Transaction, error) { + return _CanReclaimToken.Contract.RenounceOwnership(&_CanReclaimToken.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_CanReclaimToken *CanReclaimTokenTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _CanReclaimToken.Contract.RenounceOwnership(&_CanReclaimToken.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_CanReclaimToken *CanReclaimTokenTransactor) TransferOwnership(opts *bind.TransactOpts, _newOwner common.Address) (*types.Transaction, error) { + return _CanReclaimToken.contract.Transact(opts, "transferOwnership", _newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_CanReclaimToken *CanReclaimTokenSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _CanReclaimToken.Contract.TransferOwnership(&_CanReclaimToken.TransactOpts, _newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_CanReclaimToken *CanReclaimTokenTransactorSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _CanReclaimToken.Contract.TransferOwnership(&_CanReclaimToken.TransactOpts, _newOwner) +} + +// CanReclaimTokenOwnershipRenouncedIterator is returned from FilterOwnershipRenounced and is used to iterate over the raw logs and unpacked data for OwnershipRenounced events raised by the CanReclaimToken contract. +type CanReclaimTokenOwnershipRenouncedIterator struct { + Event *CanReclaimTokenOwnershipRenounced // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *CanReclaimTokenOwnershipRenouncedIterator) 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(CanReclaimTokenOwnershipRenounced) + 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(CanReclaimTokenOwnershipRenounced) + 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 *CanReclaimTokenOwnershipRenouncedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CanReclaimTokenOwnershipRenouncedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CanReclaimTokenOwnershipRenounced represents a OwnershipRenounced event raised by the CanReclaimToken contract. +type CanReclaimTokenOwnershipRenounced struct { + PreviousOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipRenounced is a free log retrieval operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_CanReclaimToken *CanReclaimTokenFilterer) FilterOwnershipRenounced(opts *bind.FilterOpts, previousOwner []common.Address) (*CanReclaimTokenOwnershipRenouncedIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _CanReclaimToken.contract.FilterLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return &CanReclaimTokenOwnershipRenouncedIterator{contract: _CanReclaimToken.contract, event: "OwnershipRenounced", logs: logs, sub: sub}, nil +} + +// WatchOwnershipRenounced is a free log subscription operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_CanReclaimToken *CanReclaimTokenFilterer) WatchOwnershipRenounced(opts *bind.WatchOpts, sink chan<- *CanReclaimTokenOwnershipRenounced, previousOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _CanReclaimToken.contract.WatchLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(CanReclaimTokenOwnershipRenounced) + if err := _CanReclaimToken.contract.UnpackLog(event, "OwnershipRenounced", 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 +} + +// ParseOwnershipRenounced is a log parse operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_CanReclaimToken *CanReclaimTokenFilterer) ParseOwnershipRenounced(log types.Log) (*CanReclaimTokenOwnershipRenounced, error) { + event := new(CanReclaimTokenOwnershipRenounced) + if err := _CanReclaimToken.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil { + return nil, err + } + return event, nil +} + +// CanReclaimTokenOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the CanReclaimToken contract. +type CanReclaimTokenOwnershipTransferredIterator struct { + Event *CanReclaimTokenOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *CanReclaimTokenOwnershipTransferredIterator) 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(CanReclaimTokenOwnershipTransferred) + 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(CanReclaimTokenOwnershipTransferred) + 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 *CanReclaimTokenOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *CanReclaimTokenOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// CanReclaimTokenOwnershipTransferred represents a OwnershipTransferred event raised by the CanReclaimToken contract. +type CanReclaimTokenOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_CanReclaimToken *CanReclaimTokenFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*CanReclaimTokenOwnershipTransferredIterator, 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 := _CanReclaimToken.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &CanReclaimTokenOwnershipTransferredIterator{contract: _CanReclaimToken.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 (_CanReclaimToken *CanReclaimTokenFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CanReclaimTokenOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _CanReclaimToken.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(CanReclaimTokenOwnershipTransferred) + if err := _CanReclaimToken.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_CanReclaimToken *CanReclaimTokenFilterer) ParseOwnershipTransferred(log types.Log) (*CanReclaimTokenOwnershipTransferred, error) { + event := new(CanReclaimTokenOwnershipTransferred) + if err := _CanReclaimToken.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// ClaimableABI is the input ABI used to generate the binding from. +const ClaimableABI = "[{\"constant\":false,\"inputs\":[],\"name\":\"claimOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRenounced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + +// ClaimableFuncSigs maps the 4-byte function signature to its string representation. +var ClaimableFuncSigs = map[string]string{ + "4e71e0c8": "claimOwnership()", + "8da5cb5b": "owner()", + "e30c3978": "pendingOwner()", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", +} + +// ClaimableBin is the compiled bytecode used for deploying new contracts. +var ClaimableBin = "0x608060405260008054600160a060020a03191633179055610288806100256000396000f30060806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416634e71e0c88114610071578063715018a6146100885780638da5cb5b1461009d578063e30c3978146100ce578063f2fde38b146100e3575b600080fd5b34801561007d57600080fd5b50610086610104565b005b34801561009457600080fd5b5061008661018c565b3480156100a957600080fd5b506100b26101f8565b60408051600160a060020a039092168252519081900360200190f35b3480156100da57600080fd5b506100b2610207565b3480156100ef57600080fd5b50610086600160a060020a0360043516610216565b600154600160a060020a0316331461011b57600080fd5b60015460008054604051600160a060020a0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600054600160a060020a031633146101a357600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b600154600160a060020a031681565b600054600160a060020a0316331461022d57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820d08e2d1fc4839abf492a5a6035b6fa0fe568636869bb3d3238cd4cb1fd2833fb0029" + +// DeployClaimable deploys a new Ethereum contract, binding an instance of Claimable to it. +func DeployClaimable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Claimable, error) { + parsed, err := abi.JSON(strings.NewReader(ClaimableABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ClaimableBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Claimable{ClaimableCaller: ClaimableCaller{contract: contract}, ClaimableTransactor: ClaimableTransactor{contract: contract}, ClaimableFilterer: ClaimableFilterer{contract: contract}}, nil +} + +// Claimable is an auto generated Go binding around an Ethereum contract. +type Claimable struct { + ClaimableCaller // Read-only binding to the contract + ClaimableTransactor // Write-only binding to the contract + ClaimableFilterer // Log filterer for contract events +} + +// ClaimableCaller is an auto generated read-only Go binding around an Ethereum contract. +type ClaimableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ClaimableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ClaimableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ClaimableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ClaimableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ClaimableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ClaimableSession struct { + Contract *Claimable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ClaimableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ClaimableCallerSession struct { + Contract *ClaimableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ClaimableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ClaimableTransactorSession struct { + Contract *ClaimableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ClaimableRaw is an auto generated low-level Go binding around an Ethereum contract. +type ClaimableRaw struct { + Contract *Claimable // Generic contract binding to access the raw methods on +} + +// ClaimableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ClaimableCallerRaw struct { + Contract *ClaimableCaller // Generic read-only contract binding to access the raw methods on +} + +// ClaimableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ClaimableTransactorRaw struct { + Contract *ClaimableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewClaimable creates a new instance of Claimable, bound to a specific deployed contract. +func NewClaimable(address common.Address, backend bind.ContractBackend) (*Claimable, error) { + contract, err := bindClaimable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Claimable{ClaimableCaller: ClaimableCaller{contract: contract}, ClaimableTransactor: ClaimableTransactor{contract: contract}, ClaimableFilterer: ClaimableFilterer{contract: contract}}, nil +} + +// NewClaimableCaller creates a new read-only instance of Claimable, bound to a specific deployed contract. +func NewClaimableCaller(address common.Address, caller bind.ContractCaller) (*ClaimableCaller, error) { + contract, err := bindClaimable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ClaimableCaller{contract: contract}, nil +} + +// NewClaimableTransactor creates a new write-only instance of Claimable, bound to a specific deployed contract. +func NewClaimableTransactor(address common.Address, transactor bind.ContractTransactor) (*ClaimableTransactor, error) { + contract, err := bindClaimable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ClaimableTransactor{contract: contract}, nil +} + +// NewClaimableFilterer creates a new log filterer instance of Claimable, bound to a specific deployed contract. +func NewClaimableFilterer(address common.Address, filterer bind.ContractFilterer) (*ClaimableFilterer, error) { + contract, err := bindClaimable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ClaimableFilterer{contract: contract}, nil +} + +// bindClaimable binds a generic wrapper to an already deployed contract. +func bindClaimable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ClaimableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Claimable *ClaimableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Claimable.Contract.ClaimableCaller.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 (_Claimable *ClaimableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Claimable.Contract.ClaimableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Claimable *ClaimableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Claimable.Contract.ClaimableTransactor.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 (_Claimable *ClaimableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Claimable.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 (_Claimable *ClaimableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Claimable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Claimable *ClaimableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Claimable.Contract.contract.Transact(opts, method, params...) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Claimable *ClaimableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _Claimable.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Claimable *ClaimableSession) Owner() (common.Address, error) { + return _Claimable.Contract.Owner(&_Claimable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Claimable *ClaimableCallerSession) Owner() (common.Address, error) { + return _Claimable.Contract.Owner(&_Claimable.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_Claimable *ClaimableCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _Claimable.contract.Call(opts, out, "pendingOwner") + return *ret0, err +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_Claimable *ClaimableSession) PendingOwner() (common.Address, error) { + return _Claimable.Contract.PendingOwner(&_Claimable.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_Claimable *ClaimableCallerSession) PendingOwner() (common.Address, error) { + return _Claimable.Contract.PendingOwner(&_Claimable.CallOpts) +} + +// ClaimOwnership is a paid mutator transaction binding the contract method 0x4e71e0c8. +// +// Solidity: function claimOwnership() returns() +func (_Claimable *ClaimableTransactor) ClaimOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Claimable.contract.Transact(opts, "claimOwnership") +} + +// ClaimOwnership is a paid mutator transaction binding the contract method 0x4e71e0c8. +// +// Solidity: function claimOwnership() returns() +func (_Claimable *ClaimableSession) ClaimOwnership() (*types.Transaction, error) { + return _Claimable.Contract.ClaimOwnership(&_Claimable.TransactOpts) +} + +// ClaimOwnership is a paid mutator transaction binding the contract method 0x4e71e0c8. +// +// Solidity: function claimOwnership() returns() +func (_Claimable *ClaimableTransactorSession) ClaimOwnership() (*types.Transaction, error) { + return _Claimable.Contract.ClaimOwnership(&_Claimable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Claimable *ClaimableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Claimable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Claimable *ClaimableSession) RenounceOwnership() (*types.Transaction, error) { + return _Claimable.Contract.RenounceOwnership(&_Claimable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Claimable *ClaimableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Claimable.Contract.RenounceOwnership(&_Claimable.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Claimable *ClaimableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Claimable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Claimable *ClaimableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Claimable.Contract.TransferOwnership(&_Claimable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Claimable *ClaimableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Claimable.Contract.TransferOwnership(&_Claimable.TransactOpts, newOwner) +} + +// ClaimableOwnershipRenouncedIterator is returned from FilterOwnershipRenounced and is used to iterate over the raw logs and unpacked data for OwnershipRenounced events raised by the Claimable contract. +type ClaimableOwnershipRenouncedIterator struct { + Event *ClaimableOwnershipRenounced // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ClaimableOwnershipRenouncedIterator) 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(ClaimableOwnershipRenounced) + 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(ClaimableOwnershipRenounced) + 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 *ClaimableOwnershipRenouncedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ClaimableOwnershipRenouncedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ClaimableOwnershipRenounced represents a OwnershipRenounced event raised by the Claimable contract. +type ClaimableOwnershipRenounced struct { + PreviousOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipRenounced is a free log retrieval operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Claimable *ClaimableFilterer) FilterOwnershipRenounced(opts *bind.FilterOpts, previousOwner []common.Address) (*ClaimableOwnershipRenouncedIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _Claimable.contract.FilterLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return &ClaimableOwnershipRenouncedIterator{contract: _Claimable.contract, event: "OwnershipRenounced", logs: logs, sub: sub}, nil +} + +// WatchOwnershipRenounced is a free log subscription operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Claimable *ClaimableFilterer) WatchOwnershipRenounced(opts *bind.WatchOpts, sink chan<- *ClaimableOwnershipRenounced, previousOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _Claimable.contract.WatchLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ClaimableOwnershipRenounced) + if err := _Claimable.contract.UnpackLog(event, "OwnershipRenounced", 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 +} + +// ParseOwnershipRenounced is a log parse operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Claimable *ClaimableFilterer) ParseOwnershipRenounced(log types.Log) (*ClaimableOwnershipRenounced, error) { + event := new(ClaimableOwnershipRenounced) + if err := _Claimable.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil { + return nil, err + } + return event, nil +} + +// ClaimableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Claimable contract. +type ClaimableOwnershipTransferredIterator struct { + Event *ClaimableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ClaimableOwnershipTransferredIterator) 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(ClaimableOwnershipTransferred) + 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(ClaimableOwnershipTransferred) + 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 *ClaimableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ClaimableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ClaimableOwnershipTransferred represents a OwnershipTransferred event raised by the Claimable contract. +type ClaimableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Claimable *ClaimableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ClaimableOwnershipTransferredIterator, 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 := _Claimable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ClaimableOwnershipTransferredIterator{contract: _Claimable.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 (_Claimable *ClaimableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ClaimableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Claimable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ClaimableOwnershipTransferred) + if err := _Claimable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Claimable *ClaimableFilterer) ParseOwnershipTransferred(log types.Log) (*ClaimableOwnershipTransferred, error) { + event := new(ClaimableOwnershipTransferred) + if err := _Claimable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// DetailedERC20ABI is the input ABI used to generate the binding from. +const DetailedERC20ABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_name\",\"type\":\"string\"},{\"name\":\"_symbol\",\"type\":\"string\"},{\"name\":\"_decimals\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + +// DetailedERC20FuncSigs maps the 4-byte function signature to its string representation. +var DetailedERC20FuncSigs = map[string]string{ + "dd62ed3e": "allowance(address,address)", + "095ea7b3": "approve(address,uint256)", + "70a08231": "balanceOf(address)", + "313ce567": "decimals()", + "06fdde03": "name()", + "95d89b41": "symbol()", + "18160ddd": "totalSupply()", + "a9059cbb": "transfer(address,uint256)", + "23b872dd": "transferFrom(address,address,uint256)", +} + +// DetailedERC20 is an auto generated Go binding around an Ethereum contract. +type DetailedERC20 struct { + DetailedERC20Caller // Read-only binding to the contract + DetailedERC20Transactor // Write-only binding to the contract + DetailedERC20Filterer // Log filterer for contract events +} + +// DetailedERC20Caller is an auto generated read-only Go binding around an Ethereum contract. +type DetailedERC20Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// DetailedERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. +type DetailedERC20Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// DetailedERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type DetailedERC20Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// DetailedERC20Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type DetailedERC20Session struct { + Contract *DetailedERC20 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// DetailedERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type DetailedERC20CallerSession struct { + Contract *DetailedERC20Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// DetailedERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type DetailedERC20TransactorSession struct { + Contract *DetailedERC20Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// DetailedERC20Raw is an auto generated low-level Go binding around an Ethereum contract. +type DetailedERC20Raw struct { + Contract *DetailedERC20 // Generic contract binding to access the raw methods on +} + +// DetailedERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type DetailedERC20CallerRaw struct { + Contract *DetailedERC20Caller // Generic read-only contract binding to access the raw methods on +} + +// DetailedERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type DetailedERC20TransactorRaw struct { + Contract *DetailedERC20Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewDetailedERC20 creates a new instance of DetailedERC20, bound to a specific deployed contract. +func NewDetailedERC20(address common.Address, backend bind.ContractBackend) (*DetailedERC20, error) { + contract, err := bindDetailedERC20(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &DetailedERC20{DetailedERC20Caller: DetailedERC20Caller{contract: contract}, DetailedERC20Transactor: DetailedERC20Transactor{contract: contract}, DetailedERC20Filterer: DetailedERC20Filterer{contract: contract}}, nil +} + +// NewDetailedERC20Caller creates a new read-only instance of DetailedERC20, bound to a specific deployed contract. +func NewDetailedERC20Caller(address common.Address, caller bind.ContractCaller) (*DetailedERC20Caller, error) { + contract, err := bindDetailedERC20(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &DetailedERC20Caller{contract: contract}, nil +} + +// NewDetailedERC20Transactor creates a new write-only instance of DetailedERC20, bound to a specific deployed contract. +func NewDetailedERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*DetailedERC20Transactor, error) { + contract, err := bindDetailedERC20(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &DetailedERC20Transactor{contract: contract}, nil +} + +// NewDetailedERC20Filterer creates a new log filterer instance of DetailedERC20, bound to a specific deployed contract. +func NewDetailedERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*DetailedERC20Filterer, error) { + contract, err := bindDetailedERC20(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &DetailedERC20Filterer{contract: contract}, nil +} + +// bindDetailedERC20 binds a generic wrapper to an already deployed contract. +func bindDetailedERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(DetailedERC20ABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_DetailedERC20 *DetailedERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _DetailedERC20.Contract.DetailedERC20Caller.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 (_DetailedERC20 *DetailedERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _DetailedERC20.Contract.DetailedERC20Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_DetailedERC20 *DetailedERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _DetailedERC20.Contract.DetailedERC20Transactor.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 (_DetailedERC20 *DetailedERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _DetailedERC20.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 (_DetailedERC20 *DetailedERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _DetailedERC20.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_DetailedERC20 *DetailedERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _DetailedERC20.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_DetailedERC20 *DetailedERC20Caller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _DetailedERC20.contract.Call(opts, out, "allowance", _owner, _spender) + return *ret0, err +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_DetailedERC20 *DetailedERC20Session) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { + return _DetailedERC20.Contract.Allowance(&_DetailedERC20.CallOpts, _owner, _spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_DetailedERC20 *DetailedERC20CallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { + return _DetailedERC20.Contract.Allowance(&_DetailedERC20.CallOpts, _owner, _spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _who) view returns(uint256) +func (_DetailedERC20 *DetailedERC20Caller) BalanceOf(opts *bind.CallOpts, _who common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _DetailedERC20.contract.Call(opts, out, "balanceOf", _who) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _who) view returns(uint256) +func (_DetailedERC20 *DetailedERC20Session) BalanceOf(_who common.Address) (*big.Int, error) { + return _DetailedERC20.Contract.BalanceOf(&_DetailedERC20.CallOpts, _who) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _who) view returns(uint256) +func (_DetailedERC20 *DetailedERC20CallerSession) BalanceOf(_who common.Address) (*big.Int, error) { + return _DetailedERC20.Contract.BalanceOf(&_DetailedERC20.CallOpts, _who) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_DetailedERC20 *DetailedERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { + var ( + ret0 = new(uint8) + ) + out := ret0 + err := _DetailedERC20.contract.Call(opts, out, "decimals") + return *ret0, err +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_DetailedERC20 *DetailedERC20Session) Decimals() (uint8, error) { + return _DetailedERC20.Contract.Decimals(&_DetailedERC20.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_DetailedERC20 *DetailedERC20CallerSession) Decimals() (uint8, error) { + return _DetailedERC20.Contract.Decimals(&_DetailedERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_DetailedERC20 *DetailedERC20Caller) Name(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _DetailedERC20.contract.Call(opts, out, "name") + return *ret0, err +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_DetailedERC20 *DetailedERC20Session) Name() (string, error) { + return _DetailedERC20.Contract.Name(&_DetailedERC20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_DetailedERC20 *DetailedERC20CallerSession) Name() (string, error) { + return _DetailedERC20.Contract.Name(&_DetailedERC20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_DetailedERC20 *DetailedERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _DetailedERC20.contract.Call(opts, out, "symbol") + return *ret0, err +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_DetailedERC20 *DetailedERC20Session) Symbol() (string, error) { + return _DetailedERC20.Contract.Symbol(&_DetailedERC20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_DetailedERC20 *DetailedERC20CallerSession) Symbol() (string, error) { + return _DetailedERC20.Contract.Symbol(&_DetailedERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_DetailedERC20 *DetailedERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _DetailedERC20.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_DetailedERC20 *DetailedERC20Session) TotalSupply() (*big.Int, error) { + return _DetailedERC20.Contract.TotalSupply(&_DetailedERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_DetailedERC20 *DetailedERC20CallerSession) TotalSupply() (*big.Int, error) { + return _DetailedERC20.Contract.TotalSupply(&_DetailedERC20.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_DetailedERC20 *DetailedERC20Transactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _DetailedERC20.contract.Transact(opts, "approve", _spender, _value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_DetailedERC20 *DetailedERC20Session) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _DetailedERC20.Contract.Approve(&_DetailedERC20.TransactOpts, _spender, _value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_DetailedERC20 *DetailedERC20TransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _DetailedERC20.Contract.Approve(&_DetailedERC20.TransactOpts, _spender, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_DetailedERC20 *DetailedERC20Transactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _DetailedERC20.contract.Transact(opts, "transfer", _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_DetailedERC20 *DetailedERC20Session) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _DetailedERC20.Contract.Transfer(&_DetailedERC20.TransactOpts, _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_DetailedERC20 *DetailedERC20TransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _DetailedERC20.Contract.Transfer(&_DetailedERC20.TransactOpts, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_DetailedERC20 *DetailedERC20Transactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _DetailedERC20.contract.Transact(opts, "transferFrom", _from, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_DetailedERC20 *DetailedERC20Session) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _DetailedERC20.Contract.TransferFrom(&_DetailedERC20.TransactOpts, _from, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_DetailedERC20 *DetailedERC20TransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _DetailedERC20.Contract.TransferFrom(&_DetailedERC20.TransactOpts, _from, _to, _value) +} + +// DetailedERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the DetailedERC20 contract. +type DetailedERC20ApprovalIterator struct { + Event *DetailedERC20Approval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *DetailedERC20ApprovalIterator) 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(DetailedERC20Approval) + 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(DetailedERC20Approval) + 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 *DetailedERC20ApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *DetailedERC20ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// DetailedERC20Approval represents a Approval event raised by the DetailedERC20 contract. +type DetailedERC20Approval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_DetailedERC20 *DetailedERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*DetailedERC20ApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _DetailedERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &DetailedERC20ApprovalIterator{contract: _DetailedERC20.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_DetailedERC20 *DetailedERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *DetailedERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _DetailedERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(DetailedERC20Approval) + if err := _DetailedERC20.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_DetailedERC20 *DetailedERC20Filterer) ParseApproval(log types.Log) (*DetailedERC20Approval, error) { + event := new(DetailedERC20Approval) + if err := _DetailedERC20.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// DetailedERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the DetailedERC20 contract. +type DetailedERC20TransferIterator struct { + Event *DetailedERC20Transfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *DetailedERC20TransferIterator) 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(DetailedERC20Transfer) + 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(DetailedERC20Transfer) + 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 *DetailedERC20TransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *DetailedERC20TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// DetailedERC20Transfer represents a Transfer event raised by the DetailedERC20 contract. +type DetailedERC20Transfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_DetailedERC20 *DetailedERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*DetailedERC20TransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _DetailedERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &DetailedERC20TransferIterator{contract: _DetailedERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_DetailedERC20 *DetailedERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *DetailedERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _DetailedERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(DetailedERC20Transfer) + if err := _DetailedERC20.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_DetailedERC20 *DetailedERC20Filterer) ParseTransfer(log types.Log) (*DetailedERC20Transfer, error) { + event := new(DetailedERC20Transfer) + if err := _DetailedERC20.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// ERC20ABI is the input ABI used to generate the binding from. +const ERC20ABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + +// ERC20FuncSigs maps the 4-byte function signature to its string representation. +var ERC20FuncSigs = map[string]string{ + "dd62ed3e": "allowance(address,address)", + "095ea7b3": "approve(address,uint256)", + "70a08231": "balanceOf(address)", + "18160ddd": "totalSupply()", + "a9059cbb": "transfer(address,uint256)", + "23b872dd": "transferFrom(address,address,uint256)", +} + +// ERC20 is an auto generated Go binding around an Ethereum contract. +type ERC20 struct { + ERC20Caller // Read-only binding to the contract + ERC20Transactor // Write-only binding to the contract + ERC20Filterer // Log filterer for contract events +} + +// ERC20Caller is an auto generated read-only Go binding around an Ethereum contract. +type ERC20Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. +type ERC20Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ERC20Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ERC20Session struct { + Contract *ERC20 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ERC20CallerSession struct { + Contract *ERC20Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ERC20TransactorSession struct { + Contract *ERC20Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERC20Raw is an auto generated low-level Go binding around an Ethereum contract. +type ERC20Raw struct { + Contract *ERC20 // Generic contract binding to access the raw methods on +} + +// ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ERC20CallerRaw struct { + Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on +} + +// ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ERC20TransactorRaw struct { + Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewERC20 creates a new instance of ERC20, bound to a specific deployed contract. +func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error) { + contract, err := bindERC20(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil +} + +// NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract. +func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error) { + contract, err := bindERC20(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ERC20Caller{contract: contract}, nil +} + +// NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract. +func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error) { + contract, err := bindERC20(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ERC20Transactor{contract: contract}, nil +} + +// NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract. +func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error) { + contract, err := bindERC20(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ERC20Filterer{contract: contract}, nil +} + +// bindERC20 binds a generic wrapper to an already deployed contract. +func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ERC20.Contract.ERC20Caller.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 (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20.Contract.ERC20Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC20.Contract.ERC20Transactor.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 (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ERC20.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 (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC20.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_ERC20 *ERC20Caller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _ERC20.contract.Call(opts, out, "allowance", _owner, _spender) + return *ret0, err +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_ERC20 *ERC20Session) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { + return _ERC20.Contract.Allowance(&_ERC20.CallOpts, _owner, _spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_ERC20 *ERC20CallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { + return _ERC20.Contract.Allowance(&_ERC20.CallOpts, _owner, _spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _who) view returns(uint256) +func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, _who common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _ERC20.contract.Call(opts, out, "balanceOf", _who) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _who) view returns(uint256) +func (_ERC20 *ERC20Session) BalanceOf(_who common.Address) (*big.Int, error) { + return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, _who) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _who) view returns(uint256) +func (_ERC20 *ERC20CallerSession) BalanceOf(_who common.Address) (*big.Int, error) { + return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, _who) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _ERC20.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error) { + return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error) { + return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC20.contract.Transact(opts, "approve", _spender, _value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_ERC20 *ERC20Session) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC20.Contract.Approve(&_ERC20.TransactOpts, _spender, _value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_ERC20 *ERC20TransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC20.Contract.Approve(&_ERC20.TransactOpts, _spender, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC20.contract.Transact(opts, "transfer", _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_ERC20 *ERC20Session) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_ERC20 *ERC20TransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC20.contract.Transact(opts, "transferFrom", _from, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_ERC20 *ERC20Session) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, _from, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_ERC20 *ERC20TransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, _from, _to, _value) +} + +// ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20 contract. +type ERC20ApprovalIterator struct { + Event *ERC20Approval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ERC20ApprovalIterator) 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(ERC20Approval) + 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(ERC20Approval) + 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 *ERC20ApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20Approval represents a Approval event raised by the ERC20 contract. +type ERC20Approval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _ERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &ERC20ApprovalIterator{contract: _ERC20.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _ERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ERC20Approval) + if err := _ERC20.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_ERC20 *ERC20Filterer) ParseApproval(log types.Log) (*ERC20Approval, error) { + event := new(ERC20Approval) + if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20 contract. +type ERC20TransferIterator struct { + Event *ERC20Transfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ERC20TransferIterator) 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(ERC20Transfer) + 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(ERC20Transfer) + 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 *ERC20TransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20Transfer represents a Transfer event raised by the ERC20 contract. +type ERC20Transfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _ERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &ERC20TransferIterator{contract: _ERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _ERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ERC20Transfer) + if err := _ERC20.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_ERC20 *ERC20Filterer) ParseTransfer(log types.Log) (*ERC20Transfer, error) { + event := new(ERC20Transfer) + if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// ERC20BasicABI is the input ABI used to generate the binding from. +const ERC20BasicABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_who\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + +// ERC20BasicFuncSigs maps the 4-byte function signature to its string representation. +var ERC20BasicFuncSigs = map[string]string{ + "70a08231": "balanceOf(address)", + "18160ddd": "totalSupply()", + "a9059cbb": "transfer(address,uint256)", +} + +// ERC20Basic is an auto generated Go binding around an Ethereum contract. +type ERC20Basic struct { + ERC20BasicCaller // Read-only binding to the contract + ERC20BasicTransactor // Write-only binding to the contract + ERC20BasicFilterer // Log filterer for contract events +} + +// ERC20BasicCaller is an auto generated read-only Go binding around an Ethereum contract. +type ERC20BasicCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20BasicTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ERC20BasicTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20BasicFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ERC20BasicFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERC20BasicSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ERC20BasicSession struct { + Contract *ERC20Basic // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERC20BasicCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ERC20BasicCallerSession struct { + Contract *ERC20BasicCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ERC20BasicTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ERC20BasicTransactorSession struct { + Contract *ERC20BasicTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERC20BasicRaw is an auto generated low-level Go binding around an Ethereum contract. +type ERC20BasicRaw struct { + Contract *ERC20Basic // Generic contract binding to access the raw methods on +} + +// ERC20BasicCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ERC20BasicCallerRaw struct { + Contract *ERC20BasicCaller // Generic read-only contract binding to access the raw methods on +} + +// ERC20BasicTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ERC20BasicTransactorRaw struct { + Contract *ERC20BasicTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewERC20Basic creates a new instance of ERC20Basic, bound to a specific deployed contract. +func NewERC20Basic(address common.Address, backend bind.ContractBackend) (*ERC20Basic, error) { + contract, err := bindERC20Basic(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ERC20Basic{ERC20BasicCaller: ERC20BasicCaller{contract: contract}, ERC20BasicTransactor: ERC20BasicTransactor{contract: contract}, ERC20BasicFilterer: ERC20BasicFilterer{contract: contract}}, nil +} + +// NewERC20BasicCaller creates a new read-only instance of ERC20Basic, bound to a specific deployed contract. +func NewERC20BasicCaller(address common.Address, caller bind.ContractCaller) (*ERC20BasicCaller, error) { + contract, err := bindERC20Basic(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ERC20BasicCaller{contract: contract}, nil +} + +// NewERC20BasicTransactor creates a new write-only instance of ERC20Basic, bound to a specific deployed contract. +func NewERC20BasicTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20BasicTransactor, error) { + contract, err := bindERC20Basic(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ERC20BasicTransactor{contract: contract}, nil +} + +// NewERC20BasicFilterer creates a new log filterer instance of ERC20Basic, bound to a specific deployed contract. +func NewERC20BasicFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20BasicFilterer, error) { + contract, err := bindERC20Basic(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ERC20BasicFilterer{contract: contract}, nil +} + +// bindERC20Basic binds a generic wrapper to an already deployed contract. +func bindERC20Basic(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ERC20BasicABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_ERC20Basic *ERC20BasicRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ERC20Basic.Contract.ERC20BasicCaller.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 (_ERC20Basic *ERC20BasicRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20Basic.Contract.ERC20BasicTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC20Basic *ERC20BasicRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC20Basic.Contract.ERC20BasicTransactor.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 (_ERC20Basic *ERC20BasicCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ERC20Basic.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 (_ERC20Basic *ERC20BasicTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC20Basic.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC20Basic *ERC20BasicTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC20Basic.Contract.contract.Transact(opts, method, params...) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _who) view returns(uint256) +func (_ERC20Basic *ERC20BasicCaller) BalanceOf(opts *bind.CallOpts, _who common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _ERC20Basic.contract.Call(opts, out, "balanceOf", _who) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _who) view returns(uint256) +func (_ERC20Basic *ERC20BasicSession) BalanceOf(_who common.Address) (*big.Int, error) { + return _ERC20Basic.Contract.BalanceOf(&_ERC20Basic.CallOpts, _who) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _who) view returns(uint256) +func (_ERC20Basic *ERC20BasicCallerSession) BalanceOf(_who common.Address) (*big.Int, error) { + return _ERC20Basic.Contract.BalanceOf(&_ERC20Basic.CallOpts, _who) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ERC20Basic *ERC20BasicCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _ERC20Basic.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ERC20Basic *ERC20BasicSession) TotalSupply() (*big.Int, error) { + return _ERC20Basic.Contract.TotalSupply(&_ERC20Basic.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_ERC20Basic *ERC20BasicCallerSession) TotalSupply() (*big.Int, error) { + return _ERC20Basic.Contract.TotalSupply(&_ERC20Basic.CallOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_ERC20Basic *ERC20BasicTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC20Basic.contract.Transact(opts, "transfer", _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_ERC20Basic *ERC20BasicSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC20Basic.Contract.Transfer(&_ERC20Basic.TransactOpts, _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_ERC20Basic *ERC20BasicTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC20Basic.Contract.Transfer(&_ERC20Basic.TransactOpts, _to, _value) +} + +// ERC20BasicTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20Basic contract. +type ERC20BasicTransferIterator struct { + Event *ERC20BasicTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ERC20BasicTransferIterator) 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(ERC20BasicTransfer) + 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(ERC20BasicTransfer) + 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 *ERC20BasicTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERC20BasicTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERC20BasicTransfer represents a Transfer event raised by the ERC20Basic contract. +type ERC20BasicTransfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_ERC20Basic *ERC20BasicFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20BasicTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _ERC20Basic.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &ERC20BasicTransferIterator{contract: _ERC20Basic.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_ERC20Basic *ERC20BasicFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20BasicTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _ERC20Basic.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ERC20BasicTransfer) + if err := _ERC20Basic.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_ERC20Basic *ERC20BasicFilterer) ParseTransfer(log types.Log) (*ERC20BasicTransfer, error) { + event := new(ERC20BasicTransfer) + if err := _ERC20Basic.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// MintableTokenABI is the input ABI used to generate the binding from. +const MintableTokenABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"mintingFinished\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"finishMinting\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"MintFinished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRenounced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + +// MintableTokenFuncSigs maps the 4-byte function signature to its string representation. +var MintableTokenFuncSigs = map[string]string{ + "dd62ed3e": "allowance(address,address)", + "095ea7b3": "approve(address,uint256)", + "70a08231": "balanceOf(address)", + "66188463": "decreaseApproval(address,uint256)", + "7d64bcb4": "finishMinting()", + "d73dd623": "increaseApproval(address,uint256)", + "40c10f19": "mint(address,uint256)", + "05d2035b": "mintingFinished()", + "8da5cb5b": "owner()", + "715018a6": "renounceOwnership()", + "18160ddd": "totalSupply()", + "a9059cbb": "transfer(address,uint256)", + "23b872dd": "transferFrom(address,address,uint256)", + "f2fde38b": "transferOwnership(address)", +} + +// MintableTokenBin is the compiled bytecode used for deploying new contracts. +var MintableTokenBin = "0x608060405260038054600160a860020a03191633179055610aa7806100256000396000f3006080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b81146100d4578063095ea7b3146100fd57806318160ddd1461012157806323b872dd1461014857806340c10f1914610172578063661884631461019657806370a08231146101ba578063715018a6146101db5780637d64bcb4146101f25780638da5cb5b14610207578063a9059cbb14610238578063d73dd6231461025c578063dd62ed3e14610280578063f2fde38b146102a7575b600080fd5b3480156100e057600080fd5b506100e96102c8565b604080519115158252519081900360200190f35b34801561010957600080fd5b506100e9600160a060020a03600435166024356102e9565b34801561012d57600080fd5b5061013661034f565b60408051918252519081900360200190f35b34801561015457600080fd5b506100e9600160a060020a0360043581169060243516604435610355565b34801561017e57600080fd5b506100e9600160a060020a03600435166024356104ca565b3480156101a257600080fd5b506100e9600160a060020a03600435166024356105e5565b3480156101c657600080fd5b50610136600160a060020a03600435166106d4565b3480156101e757600080fd5b506101f06106ef565b005b3480156101fe57600080fd5b506100e961075d565b34801561021357600080fd5b5061021c610803565b60408051600160a060020a039092168252519081900360200190f35b34801561024457600080fd5b506100e9600160a060020a0360043516602435610812565b34801561026857600080fd5b506100e9600160a060020a03600435166024356108f1565b34801561028c57600080fd5b50610136600160a060020a036004358116906024351661098a565b3480156102b357600080fd5b506101f0600160a060020a03600435166109b5565b60035474010000000000000000000000000000000000000000900460ff1681565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60015490565b600160a060020a03831660009081526020819052604081205482111561037a57600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156103aa57600080fd5b600160a060020a03831615156103bf57600080fd5b600160a060020a0384166000908152602081905260409020546103e8908363ffffffff6109d816565b600160a060020a03808616600090815260208190526040808220939093559085168152205461041d908363ffffffff6109ea16565b600160a060020a0380851660009081526020818152604080832094909455918716815260028252828120338252909152205461045f908363ffffffff6109d816565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b600354600090600160a060020a031633146104e457600080fd5b60035474010000000000000000000000000000000000000000900460ff161561050c57600080fd5b60015461051f908363ffffffff6109ea16565b600155600160a060020a03831660009081526020819052604090205461054b908363ffffffff6109ea16565b600160a060020a03841660008181526020818152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a038516916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b336000908152600260209081526040808320600160a060020a038616845290915281205480831061063957336000908152600260209081526040808320600160a060020a038816845290915281205561066e565b610649818463ffffffff6109d816565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a0316331461070657600080fd5b600354604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26003805473ffffffffffffffffffffffffffffffffffffffff19169055565b600354600090600160a060020a0316331461077757600080fd5b60035474010000000000000000000000000000000000000000900460ff161561079f57600080fd5b6003805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a150600190565b600354600160a060020a031681565b3360009081526020819052604081205482111561082e57600080fd5b600160a060020a038316151561084357600080fd5b33600090815260208190526040902054610863908363ffffffff6109d816565b3360009081526020819052604080822092909255600160a060020a03851681522054610895908363ffffffff6109ea16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610925908363ffffffff6109ea16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a031633146109cc57600080fd5b6109d5816109fd565b50565b6000828211156109e457fe5b50900390565b818101828110156109f757fe5b92915050565b600160a060020a0381161515610a1257600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820c5d903731e40b26f8694496b9b627bedc571248e7236d9a62037331e3d86d8e80029" + +// DeployMintableToken deploys a new Ethereum contract, binding an instance of MintableToken to it. +func DeployMintableToken(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *MintableToken, error) { + parsed, err := abi.JSON(strings.NewReader(MintableTokenABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(MintableTokenBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &MintableToken{MintableTokenCaller: MintableTokenCaller{contract: contract}, MintableTokenTransactor: MintableTokenTransactor{contract: contract}, MintableTokenFilterer: MintableTokenFilterer{contract: contract}}, nil +} + +// MintableToken is an auto generated Go binding around an Ethereum contract. +type MintableToken struct { + MintableTokenCaller // Read-only binding to the contract + MintableTokenTransactor // Write-only binding to the contract + MintableTokenFilterer // Log filterer for contract events +} + +// MintableTokenCaller is an auto generated read-only Go binding around an Ethereum contract. +type MintableTokenCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MintableTokenTransactor is an auto generated write-only Go binding around an Ethereum contract. +type MintableTokenTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MintableTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MintableTokenFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MintableTokenSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MintableTokenSession struct { + Contract *MintableToken // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MintableTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MintableTokenCallerSession struct { + Contract *MintableTokenCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MintableTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MintableTokenTransactorSession struct { + Contract *MintableTokenTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MintableTokenRaw is an auto generated low-level Go binding around an Ethereum contract. +type MintableTokenRaw struct { + Contract *MintableToken // Generic contract binding to access the raw methods on +} + +// MintableTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MintableTokenCallerRaw struct { + Contract *MintableTokenCaller // Generic read-only contract binding to access the raw methods on +} + +// MintableTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MintableTokenTransactorRaw struct { + Contract *MintableTokenTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewMintableToken creates a new instance of MintableToken, bound to a specific deployed contract. +func NewMintableToken(address common.Address, backend bind.ContractBackend) (*MintableToken, error) { + contract, err := bindMintableToken(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MintableToken{MintableTokenCaller: MintableTokenCaller{contract: contract}, MintableTokenTransactor: MintableTokenTransactor{contract: contract}, MintableTokenFilterer: MintableTokenFilterer{contract: contract}}, nil +} + +// NewMintableTokenCaller creates a new read-only instance of MintableToken, bound to a specific deployed contract. +func NewMintableTokenCaller(address common.Address, caller bind.ContractCaller) (*MintableTokenCaller, error) { + contract, err := bindMintableToken(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MintableTokenCaller{contract: contract}, nil +} + +// NewMintableTokenTransactor creates a new write-only instance of MintableToken, bound to a specific deployed contract. +func NewMintableTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*MintableTokenTransactor, error) { + contract, err := bindMintableToken(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MintableTokenTransactor{contract: contract}, nil +} + +// NewMintableTokenFilterer creates a new log filterer instance of MintableToken, bound to a specific deployed contract. +func NewMintableTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*MintableTokenFilterer, error) { + contract, err := bindMintableToken(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MintableTokenFilterer{contract: contract}, nil +} + +// bindMintableToken binds a generic wrapper to an already deployed contract. +func bindMintableToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(MintableTokenABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_MintableToken *MintableTokenRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _MintableToken.Contract.MintableTokenCaller.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 (_MintableToken *MintableTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MintableToken.Contract.MintableTokenTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MintableToken *MintableTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MintableToken.Contract.MintableTokenTransactor.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 (_MintableToken *MintableTokenCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _MintableToken.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 (_MintableToken *MintableTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MintableToken.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MintableToken *MintableTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MintableToken.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_MintableToken *MintableTokenCaller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _MintableToken.contract.Call(opts, out, "allowance", _owner, _spender) + return *ret0, err +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_MintableToken *MintableTokenSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { + return _MintableToken.Contract.Allowance(&_MintableToken.CallOpts, _owner, _spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_MintableToken *MintableTokenCallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { + return _MintableToken.Contract.Allowance(&_MintableToken.CallOpts, _owner, _spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_MintableToken *MintableTokenCaller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _MintableToken.contract.Call(opts, out, "balanceOf", _owner) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_MintableToken *MintableTokenSession) BalanceOf(_owner common.Address) (*big.Int, error) { + return _MintableToken.Contract.BalanceOf(&_MintableToken.CallOpts, _owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_MintableToken *MintableTokenCallerSession) BalanceOf(_owner common.Address) (*big.Int, error) { + return _MintableToken.Contract.BalanceOf(&_MintableToken.CallOpts, _owner) +} + +// MintingFinished is a free data retrieval call binding the contract method 0x05d2035b. +// +// Solidity: function mintingFinished() view returns(bool) +func (_MintableToken *MintableTokenCaller) MintingFinished(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _MintableToken.contract.Call(opts, out, "mintingFinished") + return *ret0, err +} + +// MintingFinished is a free data retrieval call binding the contract method 0x05d2035b. +// +// Solidity: function mintingFinished() view returns(bool) +func (_MintableToken *MintableTokenSession) MintingFinished() (bool, error) { + return _MintableToken.Contract.MintingFinished(&_MintableToken.CallOpts) +} + +// MintingFinished is a free data retrieval call binding the contract method 0x05d2035b. +// +// Solidity: function mintingFinished() view returns(bool) +func (_MintableToken *MintableTokenCallerSession) MintingFinished() (bool, error) { + return _MintableToken.Contract.MintingFinished(&_MintableToken.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MintableToken *MintableTokenCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _MintableToken.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MintableToken *MintableTokenSession) Owner() (common.Address, error) { + return _MintableToken.Contract.Owner(&_MintableToken.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MintableToken *MintableTokenCallerSession) Owner() (common.Address, error) { + return _MintableToken.Contract.Owner(&_MintableToken.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_MintableToken *MintableTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _MintableToken.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_MintableToken *MintableTokenSession) TotalSupply() (*big.Int, error) { + return _MintableToken.Contract.TotalSupply(&_MintableToken.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_MintableToken *MintableTokenCallerSession) TotalSupply() (*big.Int, error) { + return _MintableToken.Contract.TotalSupply(&_MintableToken.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_MintableToken *MintableTokenTransactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _MintableToken.contract.Transact(opts, "approve", _spender, _value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_MintableToken *MintableTokenSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _MintableToken.Contract.Approve(&_MintableToken.TransactOpts, _spender, _value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_MintableToken *MintableTokenTransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _MintableToken.Contract.Approve(&_MintableToken.TransactOpts, _spender, _value) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool) +func (_MintableToken *MintableTokenTransactor) DecreaseApproval(opts *bind.TransactOpts, _spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _MintableToken.contract.Transact(opts, "decreaseApproval", _spender, _subtractedValue) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool) +func (_MintableToken *MintableTokenSession) DecreaseApproval(_spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _MintableToken.Contract.DecreaseApproval(&_MintableToken.TransactOpts, _spender, _subtractedValue) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool) +func (_MintableToken *MintableTokenTransactorSession) DecreaseApproval(_spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _MintableToken.Contract.DecreaseApproval(&_MintableToken.TransactOpts, _spender, _subtractedValue) +} + +// FinishMinting is a paid mutator transaction binding the contract method 0x7d64bcb4. +// +// Solidity: function finishMinting() returns(bool) +func (_MintableToken *MintableTokenTransactor) FinishMinting(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MintableToken.contract.Transact(opts, "finishMinting") +} + +// FinishMinting is a paid mutator transaction binding the contract method 0x7d64bcb4. +// +// Solidity: function finishMinting() returns(bool) +func (_MintableToken *MintableTokenSession) FinishMinting() (*types.Transaction, error) { + return _MintableToken.Contract.FinishMinting(&_MintableToken.TransactOpts) +} + +// FinishMinting is a paid mutator transaction binding the contract method 0x7d64bcb4. +// +// Solidity: function finishMinting() returns(bool) +func (_MintableToken *MintableTokenTransactorSession) FinishMinting() (*types.Transaction, error) { + return _MintableToken.Contract.FinishMinting(&_MintableToken.TransactOpts) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool) +func (_MintableToken *MintableTokenTransactor) IncreaseApproval(opts *bind.TransactOpts, _spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _MintableToken.contract.Transact(opts, "increaseApproval", _spender, _addedValue) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool) +func (_MintableToken *MintableTokenSession) IncreaseApproval(_spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _MintableToken.Contract.IncreaseApproval(&_MintableToken.TransactOpts, _spender, _addedValue) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool) +func (_MintableToken *MintableTokenTransactorSession) IncreaseApproval(_spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _MintableToken.Contract.IncreaseApproval(&_MintableToken.TransactOpts, _spender, _addedValue) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address _to, uint256 _amount) returns(bool) +func (_MintableToken *MintableTokenTransactor) Mint(opts *bind.TransactOpts, _to common.Address, _amount *big.Int) (*types.Transaction, error) { + return _MintableToken.contract.Transact(opts, "mint", _to, _amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address _to, uint256 _amount) returns(bool) +func (_MintableToken *MintableTokenSession) Mint(_to common.Address, _amount *big.Int) (*types.Transaction, error) { + return _MintableToken.Contract.Mint(&_MintableToken.TransactOpts, _to, _amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address _to, uint256 _amount) returns(bool) +func (_MintableToken *MintableTokenTransactorSession) Mint(_to common.Address, _amount *big.Int) (*types.Transaction, error) { + return _MintableToken.Contract.Mint(&_MintableToken.TransactOpts, _to, _amount) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MintableToken *MintableTokenTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MintableToken.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MintableToken *MintableTokenSession) RenounceOwnership() (*types.Transaction, error) { + return _MintableToken.Contract.RenounceOwnership(&_MintableToken.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MintableToken *MintableTokenTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _MintableToken.Contract.RenounceOwnership(&_MintableToken.TransactOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_MintableToken *MintableTokenTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _MintableToken.contract.Transact(opts, "transfer", _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_MintableToken *MintableTokenSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _MintableToken.Contract.Transfer(&_MintableToken.TransactOpts, _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_MintableToken *MintableTokenTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _MintableToken.Contract.Transfer(&_MintableToken.TransactOpts, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_MintableToken *MintableTokenTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _MintableToken.contract.Transact(opts, "transferFrom", _from, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_MintableToken *MintableTokenSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _MintableToken.Contract.TransferFrom(&_MintableToken.TransactOpts, _from, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_MintableToken *MintableTokenTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _MintableToken.Contract.TransferFrom(&_MintableToken.TransactOpts, _from, _to, _value) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_MintableToken *MintableTokenTransactor) TransferOwnership(opts *bind.TransactOpts, _newOwner common.Address) (*types.Transaction, error) { + return _MintableToken.contract.Transact(opts, "transferOwnership", _newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_MintableToken *MintableTokenSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _MintableToken.Contract.TransferOwnership(&_MintableToken.TransactOpts, _newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_MintableToken *MintableTokenTransactorSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _MintableToken.Contract.TransferOwnership(&_MintableToken.TransactOpts, _newOwner) +} + +// MintableTokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the MintableToken contract. +type MintableTokenApprovalIterator struct { + Event *MintableTokenApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MintableTokenApprovalIterator) 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(MintableTokenApproval) + 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(MintableTokenApproval) + 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 *MintableTokenApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MintableTokenApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MintableTokenApproval represents a Approval event raised by the MintableToken contract. +type MintableTokenApproval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_MintableToken *MintableTokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*MintableTokenApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _MintableToken.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &MintableTokenApprovalIterator{contract: _MintableToken.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_MintableToken *MintableTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *MintableTokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _MintableToken.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MintableTokenApproval) + if err := _MintableToken.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_MintableToken *MintableTokenFilterer) ParseApproval(log types.Log) (*MintableTokenApproval, error) { + event := new(MintableTokenApproval) + if err := _MintableToken.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// MintableTokenMintIterator is returned from FilterMint and is used to iterate over the raw logs and unpacked data for Mint events raised by the MintableToken contract. +type MintableTokenMintIterator struct { + Event *MintableTokenMint // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MintableTokenMintIterator) 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(MintableTokenMint) + 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(MintableTokenMint) + 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 *MintableTokenMintIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MintableTokenMintIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MintableTokenMint represents a Mint event raised by the MintableToken contract. +type MintableTokenMint struct { + To common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMint is a free log retrieval operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. +// +// Solidity: event Mint(address indexed to, uint256 amount) +func (_MintableToken *MintableTokenFilterer) FilterMint(opts *bind.FilterOpts, to []common.Address) (*MintableTokenMintIterator, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _MintableToken.contract.FilterLogs(opts, "Mint", toRule) + if err != nil { + return nil, err + } + return &MintableTokenMintIterator{contract: _MintableToken.contract, event: "Mint", logs: logs, sub: sub}, nil +} + +// WatchMint is a free log subscription operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. +// +// Solidity: event Mint(address indexed to, uint256 amount) +func (_MintableToken *MintableTokenFilterer) WatchMint(opts *bind.WatchOpts, sink chan<- *MintableTokenMint, to []common.Address) (event.Subscription, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _MintableToken.contract.WatchLogs(opts, "Mint", toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MintableTokenMint) + if err := _MintableToken.contract.UnpackLog(event, "Mint", 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 +} + +// ParseMint is a log parse operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. +// +// Solidity: event Mint(address indexed to, uint256 amount) +func (_MintableToken *MintableTokenFilterer) ParseMint(log types.Log) (*MintableTokenMint, error) { + event := new(MintableTokenMint) + if err := _MintableToken.contract.UnpackLog(event, "Mint", log); err != nil { + return nil, err + } + return event, nil +} + +// MintableTokenMintFinishedIterator is returned from FilterMintFinished and is used to iterate over the raw logs and unpacked data for MintFinished events raised by the MintableToken contract. +type MintableTokenMintFinishedIterator struct { + Event *MintableTokenMintFinished // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MintableTokenMintFinishedIterator) 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(MintableTokenMintFinished) + 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(MintableTokenMintFinished) + 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 *MintableTokenMintFinishedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MintableTokenMintFinishedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MintableTokenMintFinished represents a MintFinished event raised by the MintableToken contract. +type MintableTokenMintFinished struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMintFinished is a free log retrieval operation binding the contract event 0xae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa08. +// +// Solidity: event MintFinished() +func (_MintableToken *MintableTokenFilterer) FilterMintFinished(opts *bind.FilterOpts) (*MintableTokenMintFinishedIterator, error) { + + logs, sub, err := _MintableToken.contract.FilterLogs(opts, "MintFinished") + if err != nil { + return nil, err + } + return &MintableTokenMintFinishedIterator{contract: _MintableToken.contract, event: "MintFinished", logs: logs, sub: sub}, nil +} + +// WatchMintFinished is a free log subscription operation binding the contract event 0xae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa08. +// +// Solidity: event MintFinished() +func (_MintableToken *MintableTokenFilterer) WatchMintFinished(opts *bind.WatchOpts, sink chan<- *MintableTokenMintFinished) (event.Subscription, error) { + + logs, sub, err := _MintableToken.contract.WatchLogs(opts, "MintFinished") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MintableTokenMintFinished) + if err := _MintableToken.contract.UnpackLog(event, "MintFinished", 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 +} + +// ParseMintFinished is a log parse operation binding the contract event 0xae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa08. +// +// Solidity: event MintFinished() +func (_MintableToken *MintableTokenFilterer) ParseMintFinished(log types.Log) (*MintableTokenMintFinished, error) { + event := new(MintableTokenMintFinished) + if err := _MintableToken.contract.UnpackLog(event, "MintFinished", log); err != nil { + return nil, err + } + return event, nil +} + +// MintableTokenOwnershipRenouncedIterator is returned from FilterOwnershipRenounced and is used to iterate over the raw logs and unpacked data for OwnershipRenounced events raised by the MintableToken contract. +type MintableTokenOwnershipRenouncedIterator struct { + Event *MintableTokenOwnershipRenounced // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MintableTokenOwnershipRenouncedIterator) 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(MintableTokenOwnershipRenounced) + 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(MintableTokenOwnershipRenounced) + 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 *MintableTokenOwnershipRenouncedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MintableTokenOwnershipRenouncedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MintableTokenOwnershipRenounced represents a OwnershipRenounced event raised by the MintableToken contract. +type MintableTokenOwnershipRenounced struct { + PreviousOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipRenounced is a free log retrieval operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_MintableToken *MintableTokenFilterer) FilterOwnershipRenounced(opts *bind.FilterOpts, previousOwner []common.Address) (*MintableTokenOwnershipRenouncedIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _MintableToken.contract.FilterLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return &MintableTokenOwnershipRenouncedIterator{contract: _MintableToken.contract, event: "OwnershipRenounced", logs: logs, sub: sub}, nil +} + +// WatchOwnershipRenounced is a free log subscription operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_MintableToken *MintableTokenFilterer) WatchOwnershipRenounced(opts *bind.WatchOpts, sink chan<- *MintableTokenOwnershipRenounced, previousOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _MintableToken.contract.WatchLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MintableTokenOwnershipRenounced) + if err := _MintableToken.contract.UnpackLog(event, "OwnershipRenounced", 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 +} + +// ParseOwnershipRenounced is a log parse operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_MintableToken *MintableTokenFilterer) ParseOwnershipRenounced(log types.Log) (*MintableTokenOwnershipRenounced, error) { + event := new(MintableTokenOwnershipRenounced) + if err := _MintableToken.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil { + return nil, err + } + return event, nil +} + +// MintableTokenOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the MintableToken contract. +type MintableTokenOwnershipTransferredIterator struct { + Event *MintableTokenOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MintableTokenOwnershipTransferredIterator) 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(MintableTokenOwnershipTransferred) + 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(MintableTokenOwnershipTransferred) + 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 *MintableTokenOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MintableTokenOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MintableTokenOwnershipTransferred represents a OwnershipTransferred event raised by the MintableToken contract. +type MintableTokenOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MintableToken *MintableTokenFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MintableTokenOwnershipTransferredIterator, 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 := _MintableToken.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &MintableTokenOwnershipTransferredIterator{contract: _MintableToken.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 (_MintableToken *MintableTokenFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MintableTokenOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MintableToken.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MintableTokenOwnershipTransferred) + if err := _MintableToken.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MintableToken *MintableTokenFilterer) ParseOwnershipTransferred(log types.Log) (*MintableTokenOwnershipTransferred, error) { + event := new(MintableTokenOwnershipTransferred) + if err := _MintableToken.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// MintableTokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the MintableToken contract. +type MintableTokenTransferIterator struct { + Event *MintableTokenTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MintableTokenTransferIterator) 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(MintableTokenTransfer) + 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(MintableTokenTransfer) + 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 *MintableTokenTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MintableTokenTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MintableTokenTransfer represents a Transfer event raised by the MintableToken contract. +type MintableTokenTransfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_MintableToken *MintableTokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*MintableTokenTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _MintableToken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &MintableTokenTransferIterator{contract: _MintableToken.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_MintableToken *MintableTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *MintableTokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _MintableToken.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MintableTokenTransfer) + if err := _MintableToken.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_MintableToken *MintableTokenFilterer) ParseTransfer(log types.Log) (*MintableTokenTransfer, error) { + event := new(MintableTokenTransfer) + if err := _MintableToken.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// OwnableABI is the input ABI used to generate the binding from. +const OwnableABI = "[{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRenounced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + +// OwnableFuncSigs maps the 4-byte function signature to its string representation. +var OwnableFuncSigs = map[string]string{ + "8da5cb5b": "owner()", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", +} + +// OwnableBin is the compiled bytecode used for deploying new contracts. +var OwnableBin = "0x608060405234801561001057600080fd5b5060008054600160a060020a0319163317905561020b806100326000396000f3006080604052600436106100565763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663715018a6811461005b5780638da5cb5b14610072578063f2fde38b146100a3575b600080fd5b34801561006757600080fd5b506100706100c4565b005b34801561007e57600080fd5b50610087610130565b60408051600160a060020a039092168252519081900360200190f35b3480156100af57600080fd5b50610070600160a060020a036004351661013f565b600054600160a060020a031633146100db57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b600054600160a060020a0316331461015657600080fd5b61015f81610162565b50565b600160a060020a038116151561017757600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a723058203a6a703a1463aaa60174ff283b267653ba73d545d4bdef7989287441cb2506b30029" + +// DeployOwnable deploys a new Ethereum contract, binding an instance of Ownable to it. +func DeployOwnable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Ownable, error) { + parsed, err := abi.JSON(strings.NewReader(OwnableABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(OwnableBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Ownable{OwnableCaller: OwnableCaller{contract: contract}, OwnableTransactor: OwnableTransactor{contract: contract}, OwnableFilterer: OwnableFilterer{contract: contract}}, nil +} + +// Ownable is an auto generated Go binding around an Ethereum contract. +type Ownable struct { + OwnableCaller // Read-only binding to the contract + OwnableTransactor // Write-only binding to the contract + OwnableFilterer // Log filterer for contract events +} + +// OwnableCaller is an auto generated read-only Go binding around an Ethereum contract. +type OwnableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OwnableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OwnableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OwnableSession struct { + Contract *Ownable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OwnableCallerSession struct { + Contract *OwnableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OwnableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OwnableTransactorSession struct { + Contract *OwnableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableRaw is an auto generated low-level Go binding around an Ethereum contract. +type OwnableRaw struct { + Contract *Ownable // Generic contract binding to access the raw methods on +} + +// OwnableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OwnableCallerRaw struct { + Contract *OwnableCaller // Generic read-only contract binding to access the raw methods on +} + +// OwnableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OwnableTransactorRaw struct { + Contract *OwnableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOwnable creates a new instance of Ownable, bound to a specific deployed contract. +func NewOwnable(address common.Address, backend bind.ContractBackend) (*Ownable, error) { + contract, err := bindOwnable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Ownable{OwnableCaller: OwnableCaller{contract: contract}, OwnableTransactor: OwnableTransactor{contract: contract}, OwnableFilterer: OwnableFilterer{contract: contract}}, nil +} + +// NewOwnableCaller creates a new read-only instance of Ownable, bound to a specific deployed contract. +func NewOwnableCaller(address common.Address, caller bind.ContractCaller) (*OwnableCaller, error) { + contract, err := bindOwnable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OwnableCaller{contract: contract}, nil +} + +// NewOwnableTransactor creates a new write-only instance of Ownable, bound to a specific deployed contract. +func NewOwnableTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnableTransactor, error) { + contract, err := bindOwnable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OwnableTransactor{contract: contract}, nil +} + +// NewOwnableFilterer creates a new log filterer instance of Ownable, bound to a specific deployed contract. +func NewOwnableFilterer(address common.Address, filterer bind.ContractFilterer) (*OwnableFilterer, error) { + contract, err := bindOwnable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OwnableFilterer{contract: contract}, nil +} + +// bindOwnable binds a generic wrapper to an already deployed contract. +func bindOwnable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(OwnableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Ownable *OwnableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Ownable.Contract.OwnableCaller.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 (_Ownable *OwnableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.Contract.OwnableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Ownable *OwnableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Ownable.Contract.OwnableTransactor.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 (_Ownable *OwnableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Ownable.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 (_Ownable *OwnableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Ownable *OwnableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Ownable.Contract.contract.Transact(opts, method, params...) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _Ownable.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableSession) Owner() (common.Address, error) { + return _Ownable.Contract.Owner(&_Ownable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Ownable *OwnableCallerSession) Owner() (common.Address, error) { + return _Ownable.Contract.Owner(&_Ownable.CallOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Ownable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableSession) RenounceOwnership() (*types.Transaction, error) { + return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Ownable *OwnableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_Ownable *OwnableTransactor) TransferOwnership(opts *bind.TransactOpts, _newOwner common.Address) (*types.Transaction, error) { + return _Ownable.contract.Transact(opts, "transferOwnership", _newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_Ownable *OwnableSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, _newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_Ownable *OwnableTransactorSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, _newOwner) +} + +// OwnableOwnershipRenouncedIterator is returned from FilterOwnershipRenounced and is used to iterate over the raw logs and unpacked data for OwnershipRenounced events raised by the Ownable contract. +type OwnableOwnershipRenouncedIterator struct { + Event *OwnableOwnershipRenounced // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OwnableOwnershipRenouncedIterator) 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(OwnableOwnershipRenounced) + 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(OwnableOwnershipRenounced) + 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 *OwnableOwnershipRenouncedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OwnableOwnershipRenouncedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OwnableOwnershipRenounced represents a OwnershipRenounced event raised by the Ownable contract. +type OwnableOwnershipRenounced struct { + PreviousOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipRenounced is a free log retrieval operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Ownable *OwnableFilterer) FilterOwnershipRenounced(opts *bind.FilterOpts, previousOwner []common.Address) (*OwnableOwnershipRenouncedIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _Ownable.contract.FilterLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return &OwnableOwnershipRenouncedIterator{contract: _Ownable.contract, event: "OwnershipRenounced", logs: logs, sub: sub}, nil +} + +// WatchOwnershipRenounced is a free log subscription operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Ownable *OwnableFilterer) WatchOwnershipRenounced(opts *bind.WatchOpts, sink chan<- *OwnableOwnershipRenounced, previousOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _Ownable.contract.WatchLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OwnableOwnershipRenounced) + if err := _Ownable.contract.UnpackLog(event, "OwnershipRenounced", 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 +} + +// ParseOwnershipRenounced is a log parse operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Ownable *OwnableFilterer) ParseOwnershipRenounced(log types.Log) (*OwnableOwnershipRenounced, error) { + event := new(OwnableOwnershipRenounced) + if err := _Ownable.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil { + return nil, err + } + return event, nil +} + +// OwnableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Ownable contract. +type OwnableOwnershipTransferredIterator struct { + Event *OwnableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OwnableOwnershipTransferredIterator) 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(OwnableOwnershipTransferred) + 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(OwnableOwnershipTransferred) + 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 *OwnableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OwnableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OwnableOwnershipTransferred represents a OwnershipTransferred event raised by the Ownable contract. +type OwnableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Ownable *OwnableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnableOwnershipTransferredIterator, 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 := _Ownable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &OwnableOwnershipTransferredIterator{contract: _Ownable.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 (_Ownable *OwnableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Ownable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OwnableOwnershipTransferred) + if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Ownable *OwnableFilterer) ParseOwnershipTransferred(log types.Log) (*OwnableOwnershipTransferred, error) { + event := new(OwnableOwnershipTransferred) + if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// OwnableContractABI is the input ABI used to generate the binding from. +const OwnableContractABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"reclaimToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRenounced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + +// OwnableContractFuncSigs maps the 4-byte function signature to its string representation. +var OwnableContractFuncSigs = map[string]string{ + "4e71e0c8": "claimOwnership()", + "8da5cb5b": "owner()", + "e30c3978": "pendingOwner()", + "17ffc320": "reclaimToken(address)", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", +} + +// OwnableContractBin is the compiled bytecode used for deploying new contracts. +var OwnableContractBin = "0x608060405260008054600160a060020a03191633179055610438806100256000396000f3006080604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166317ffc320811461007c5780634e71e0c81461009f578063715018a6146100b45780638da5cb5b146100c9578063e30c3978146100fa578063f2fde38b1461010f575b600080fd5b34801561008857600080fd5b5061009d600160a060020a0360043516610130565b005b3480156100ab57600080fd5b5061009d6101fc565b3480156100c057600080fd5b5061009d610284565b3480156100d557600080fd5b506100de6102f0565b60408051600160a060020a039092168252519081900360200190f35b34801561010657600080fd5b506100de6102ff565b34801561011b57600080fd5b5061009d600160a060020a036004351661030e565b60008054600160a060020a0316331461014857600080fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038416916370a082319160248083019260209291908290030181600087803b1580156101a957600080fd5b505af11580156101bd573d6000803e3d6000fd5b505050506040513d60208110156101d357600080fd5b50516000549091506101f890600160a060020a0384811691168363ffffffff61035416565b5050565b600154600160a060020a0316331461021357600080fd5b60015460008054604051600160a060020a0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600054600160a060020a0316331461029b57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b600154600160a060020a031681565b600054600160a060020a0316331461032557600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156103d057600080fd5b505af11580156103e4573d6000803e3d6000fd5b505050506040513d60208110156103fa57600080fd5b5051151561040757600080fd5b5050505600a165627a7a72305820ed9b8d58f1bc1267159cbd6c81106334945e5abd299645dcfe387c3049ae997f0029" + +// DeployOwnableContract deploys a new Ethereum contract, binding an instance of OwnableContract to it. +func DeployOwnableContract(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *OwnableContract, error) { + parsed, err := abi.JSON(strings.NewReader(OwnableContractABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(OwnableContractBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &OwnableContract{OwnableContractCaller: OwnableContractCaller{contract: contract}, OwnableContractTransactor: OwnableContractTransactor{contract: contract}, OwnableContractFilterer: OwnableContractFilterer{contract: contract}}, nil +} + +// OwnableContract is an auto generated Go binding around an Ethereum contract. +type OwnableContract struct { + OwnableContractCaller // Read-only binding to the contract + OwnableContractTransactor // Write-only binding to the contract + OwnableContractFilterer // Log filterer for contract events +} + +// OwnableContractCaller is an auto generated read-only Go binding around an Ethereum contract. +type OwnableContractCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableContractTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OwnableContractTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableContractFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OwnableContractFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableContractSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OwnableContractSession struct { + Contract *OwnableContract // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableContractCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OwnableContractCallerSession struct { + Contract *OwnableContractCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OwnableContractTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OwnableContractTransactorSession struct { + Contract *OwnableContractTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableContractRaw is an auto generated low-level Go binding around an Ethereum contract. +type OwnableContractRaw struct { + Contract *OwnableContract // Generic contract binding to access the raw methods on +} + +// OwnableContractCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OwnableContractCallerRaw struct { + Contract *OwnableContractCaller // Generic read-only contract binding to access the raw methods on +} + +// OwnableContractTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OwnableContractTransactorRaw struct { + Contract *OwnableContractTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOwnableContract creates a new instance of OwnableContract, bound to a specific deployed contract. +func NewOwnableContract(address common.Address, backend bind.ContractBackend) (*OwnableContract, error) { + contract, err := bindOwnableContract(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &OwnableContract{OwnableContractCaller: OwnableContractCaller{contract: contract}, OwnableContractTransactor: OwnableContractTransactor{contract: contract}, OwnableContractFilterer: OwnableContractFilterer{contract: contract}}, nil +} + +// NewOwnableContractCaller creates a new read-only instance of OwnableContract, bound to a specific deployed contract. +func NewOwnableContractCaller(address common.Address, caller bind.ContractCaller) (*OwnableContractCaller, error) { + contract, err := bindOwnableContract(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OwnableContractCaller{contract: contract}, nil +} + +// NewOwnableContractTransactor creates a new write-only instance of OwnableContract, bound to a specific deployed contract. +func NewOwnableContractTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnableContractTransactor, error) { + contract, err := bindOwnableContract(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OwnableContractTransactor{contract: contract}, nil +} + +// NewOwnableContractFilterer creates a new log filterer instance of OwnableContract, bound to a specific deployed contract. +func NewOwnableContractFilterer(address common.Address, filterer bind.ContractFilterer) (*OwnableContractFilterer, error) { + contract, err := bindOwnableContract(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OwnableContractFilterer{contract: contract}, nil +} + +// bindOwnableContract binds a generic wrapper to an already deployed contract. +func bindOwnableContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(OwnableContractABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_OwnableContract *OwnableContractRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _OwnableContract.Contract.OwnableContractCaller.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 (_OwnableContract *OwnableContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OwnableContract.Contract.OwnableContractTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OwnableContract *OwnableContractRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OwnableContract.Contract.OwnableContractTransactor.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 (_OwnableContract *OwnableContractCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _OwnableContract.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 (_OwnableContract *OwnableContractTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OwnableContract.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OwnableContract *OwnableContractTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OwnableContract.Contract.contract.Transact(opts, method, params...) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_OwnableContract *OwnableContractCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _OwnableContract.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_OwnableContract *OwnableContractSession) Owner() (common.Address, error) { + return _OwnableContract.Contract.Owner(&_OwnableContract.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_OwnableContract *OwnableContractCallerSession) Owner() (common.Address, error) { + return _OwnableContract.Contract.Owner(&_OwnableContract.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_OwnableContract *OwnableContractCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _OwnableContract.contract.Call(opts, out, "pendingOwner") + return *ret0, err +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_OwnableContract *OwnableContractSession) PendingOwner() (common.Address, error) { + return _OwnableContract.Contract.PendingOwner(&_OwnableContract.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_OwnableContract *OwnableContractCallerSession) PendingOwner() (common.Address, error) { + return _OwnableContract.Contract.PendingOwner(&_OwnableContract.CallOpts) +} + +// ClaimOwnership is a paid mutator transaction binding the contract method 0x4e71e0c8. +// +// Solidity: function claimOwnership() returns() +func (_OwnableContract *OwnableContractTransactor) ClaimOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OwnableContract.contract.Transact(opts, "claimOwnership") +} + +// ClaimOwnership is a paid mutator transaction binding the contract method 0x4e71e0c8. +// +// Solidity: function claimOwnership() returns() +func (_OwnableContract *OwnableContractSession) ClaimOwnership() (*types.Transaction, error) { + return _OwnableContract.Contract.ClaimOwnership(&_OwnableContract.TransactOpts) +} + +// ClaimOwnership is a paid mutator transaction binding the contract method 0x4e71e0c8. +// +// Solidity: function claimOwnership() returns() +func (_OwnableContract *OwnableContractTransactorSession) ClaimOwnership() (*types.Transaction, error) { + return _OwnableContract.Contract.ClaimOwnership(&_OwnableContract.TransactOpts) +} + +// ReclaimToken is a paid mutator transaction binding the contract method 0x17ffc320. +// +// Solidity: function reclaimToken(address _token) returns() +func (_OwnableContract *OwnableContractTransactor) ReclaimToken(opts *bind.TransactOpts, _token common.Address) (*types.Transaction, error) { + return _OwnableContract.contract.Transact(opts, "reclaimToken", _token) +} + +// ReclaimToken is a paid mutator transaction binding the contract method 0x17ffc320. +// +// Solidity: function reclaimToken(address _token) returns() +func (_OwnableContract *OwnableContractSession) ReclaimToken(_token common.Address) (*types.Transaction, error) { + return _OwnableContract.Contract.ReclaimToken(&_OwnableContract.TransactOpts, _token) +} + +// ReclaimToken is a paid mutator transaction binding the contract method 0x17ffc320. +// +// Solidity: function reclaimToken(address _token) returns() +func (_OwnableContract *OwnableContractTransactorSession) ReclaimToken(_token common.Address) (*types.Transaction, error) { + return _OwnableContract.Contract.ReclaimToken(&_OwnableContract.TransactOpts, _token) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_OwnableContract *OwnableContractTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OwnableContract.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_OwnableContract *OwnableContractSession) RenounceOwnership() (*types.Transaction, error) { + return _OwnableContract.Contract.RenounceOwnership(&_OwnableContract.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_OwnableContract *OwnableContractTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _OwnableContract.Contract.RenounceOwnership(&_OwnableContract.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_OwnableContract *OwnableContractTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _OwnableContract.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_OwnableContract *OwnableContractSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _OwnableContract.Contract.TransferOwnership(&_OwnableContract.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_OwnableContract *OwnableContractTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _OwnableContract.Contract.TransferOwnership(&_OwnableContract.TransactOpts, newOwner) +} + +// OwnableContractOwnershipRenouncedIterator is returned from FilterOwnershipRenounced and is used to iterate over the raw logs and unpacked data for OwnershipRenounced events raised by the OwnableContract contract. +type OwnableContractOwnershipRenouncedIterator struct { + Event *OwnableContractOwnershipRenounced // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OwnableContractOwnershipRenouncedIterator) 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(OwnableContractOwnershipRenounced) + 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(OwnableContractOwnershipRenounced) + 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 *OwnableContractOwnershipRenouncedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OwnableContractOwnershipRenouncedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OwnableContractOwnershipRenounced represents a OwnershipRenounced event raised by the OwnableContract contract. +type OwnableContractOwnershipRenounced struct { + PreviousOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipRenounced is a free log retrieval operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_OwnableContract *OwnableContractFilterer) FilterOwnershipRenounced(opts *bind.FilterOpts, previousOwner []common.Address) (*OwnableContractOwnershipRenouncedIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _OwnableContract.contract.FilterLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return &OwnableContractOwnershipRenouncedIterator{contract: _OwnableContract.contract, event: "OwnershipRenounced", logs: logs, sub: sub}, nil +} + +// WatchOwnershipRenounced is a free log subscription operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_OwnableContract *OwnableContractFilterer) WatchOwnershipRenounced(opts *bind.WatchOpts, sink chan<- *OwnableContractOwnershipRenounced, previousOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _OwnableContract.contract.WatchLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OwnableContractOwnershipRenounced) + if err := _OwnableContract.contract.UnpackLog(event, "OwnershipRenounced", 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 +} + +// ParseOwnershipRenounced is a log parse operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_OwnableContract *OwnableContractFilterer) ParseOwnershipRenounced(log types.Log) (*OwnableContractOwnershipRenounced, error) { + event := new(OwnableContractOwnershipRenounced) + if err := _OwnableContract.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil { + return nil, err + } + return event, nil +} + +// OwnableContractOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the OwnableContract contract. +type OwnableContractOwnershipTransferredIterator struct { + Event *OwnableContractOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OwnableContractOwnershipTransferredIterator) 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(OwnableContractOwnershipTransferred) + 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(OwnableContractOwnershipTransferred) + 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 *OwnableContractOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OwnableContractOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OwnableContractOwnershipTransferred represents a OwnershipTransferred event raised by the OwnableContract contract. +type OwnableContractOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_OwnableContract *OwnableContractFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnableContractOwnershipTransferredIterator, 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 := _OwnableContract.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &OwnableContractOwnershipTransferredIterator{contract: _OwnableContract.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 (_OwnableContract *OwnableContractFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnableContractOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _OwnableContract.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OwnableContractOwnershipTransferred) + if err := _OwnableContract.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_OwnableContract *OwnableContractFilterer) ParseOwnershipTransferred(log types.Log) (*OwnableContractOwnershipTransferred, error) { + event := new(OwnableContractOwnershipTransferred) + if err := _OwnableContract.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableABI is the input ABI used to generate the binding from. +const PausableABI = "[{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Pause\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpause\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRenounced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + +// PausableFuncSigs maps the 4-byte function signature to its string representation. +var PausableFuncSigs = map[string]string{ + "8da5cb5b": "owner()", + "8456cb59": "pause()", + "5c975abb": "paused()", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", + "3f4ba83a": "unpause()", +} + +// PausableBin is the compiled bytecode used for deploying new contracts. +var PausableBin = "0x608060405260008054600160a860020a031916331790556103c4806100256000396000f3006080604052600436106100775763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633f4ba83a811461007c5780635c975abb14610093578063715018a6146100bc5780638456cb59146100d15780638da5cb5b146100e6578063f2fde38b14610117575b600080fd5b34801561008857600080fd5b50610091610138565b005b34801561009f57600080fd5b506100a86101bf565b604080519115158252519081900360200190f35b3480156100c857600080fd5b506100916101e0565b3480156100dd57600080fd5b5061009161024c565b3480156100f257600080fd5b506100fb6102e9565b60408051600160a060020a039092168252519081900360200190f35b34801561012357600080fd5b50610091600160a060020a03600435166102f8565b600054600160a060020a0316331461014f57600080fd5b60005474010000000000000000000000000000000000000000900460ff16151561017857600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b60005474010000000000000000000000000000000000000000900460ff1681565b600054600160a060020a031633146101f757600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a0316331461026357600080fd5b60005474010000000000000000000000000000000000000000900460ff161561028b57600080fd5b6000805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600054600160a060020a031681565b600054600160a060020a0316331461030f57600080fd5b6103188161031b565b50565b600160a060020a038116151561033057600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a723058209608a8b8875e30583394a001b36a02030b7740508c5c7f0200ed3194062d11270029" + +// DeployPausable deploys a new Ethereum contract, binding an instance of Pausable to it. +func DeployPausable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Pausable, error) { + parsed, err := abi.JSON(strings.NewReader(PausableABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(PausableBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Pausable{PausableCaller: PausableCaller{contract: contract}, PausableTransactor: PausableTransactor{contract: contract}, PausableFilterer: PausableFilterer{contract: contract}}, nil +} + +// Pausable is an auto generated Go binding around an Ethereum contract. +type Pausable struct { + PausableCaller // Read-only binding to the contract + PausableTransactor // Write-only binding to the contract + PausableFilterer // Log filterer for contract events +} + +// PausableCaller is an auto generated read-only Go binding around an Ethereum contract. +type PausableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type PausableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type PausableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type PausableSession struct { + Contract *Pausable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PausableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type PausableCallerSession struct { + Contract *PausableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// PausableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type PausableTransactorSession struct { + Contract *PausableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PausableRaw is an auto generated low-level Go binding around an Ethereum contract. +type PausableRaw struct { + Contract *Pausable // Generic contract binding to access the raw methods on +} + +// PausableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type PausableCallerRaw struct { + Contract *PausableCaller // Generic read-only contract binding to access the raw methods on +} + +// PausableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type PausableTransactorRaw struct { + Contract *PausableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewPausable creates a new instance of Pausable, bound to a specific deployed contract. +func NewPausable(address common.Address, backend bind.ContractBackend) (*Pausable, error) { + contract, err := bindPausable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Pausable{PausableCaller: PausableCaller{contract: contract}, PausableTransactor: PausableTransactor{contract: contract}, PausableFilterer: PausableFilterer{contract: contract}}, nil +} + +// NewPausableCaller creates a new read-only instance of Pausable, bound to a specific deployed contract. +func NewPausableCaller(address common.Address, caller bind.ContractCaller) (*PausableCaller, error) { + contract, err := bindPausable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &PausableCaller{contract: contract}, nil +} + +// NewPausableTransactor creates a new write-only instance of Pausable, bound to a specific deployed contract. +func NewPausableTransactor(address common.Address, transactor bind.ContractTransactor) (*PausableTransactor, error) { + contract, err := bindPausable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &PausableTransactor{contract: contract}, nil +} + +// NewPausableFilterer creates a new log filterer instance of Pausable, bound to a specific deployed contract. +func NewPausableFilterer(address common.Address, filterer bind.ContractFilterer) (*PausableFilterer, error) { + contract, err := bindPausable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &PausableFilterer{contract: contract}, nil +} + +// bindPausable binds a generic wrapper to an already deployed contract. +func bindPausable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(PausableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_Pausable *PausableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Pausable.Contract.PausableCaller.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 (_Pausable *PausableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Pausable.Contract.PausableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Pausable *PausableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Pausable.Contract.PausableTransactor.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 (_Pausable *PausableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Pausable.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 (_Pausable *PausableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Pausable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Pausable *PausableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Pausable.Contract.contract.Transact(opts, method, params...) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Pausable *PausableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _Pausable.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Pausable *PausableSession) Owner() (common.Address, error) { + return _Pausable.Contract.Owner(&_Pausable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Pausable *PausableCallerSession) Owner() (common.Address, error) { + return _Pausable.Contract.Owner(&_Pausable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Pausable *PausableCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _Pausable.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Pausable *PausableSession) Paused() (bool, error) { + return _Pausable.Contract.Paused(&_Pausable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Pausable *PausableCallerSession) Paused() (bool, error) { + return _Pausable.Contract.Paused(&_Pausable.CallOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_Pausable *PausableTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Pausable.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_Pausable *PausableSession) Pause() (*types.Transaction, error) { + return _Pausable.Contract.Pause(&_Pausable.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_Pausable *PausableTransactorSession) Pause() (*types.Transaction, error) { + return _Pausable.Contract.Pause(&_Pausable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Pausable *PausableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Pausable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Pausable *PausableSession) RenounceOwnership() (*types.Transaction, error) { + return _Pausable.Contract.RenounceOwnership(&_Pausable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Pausable *PausableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Pausable.Contract.RenounceOwnership(&_Pausable.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_Pausable *PausableTransactor) TransferOwnership(opts *bind.TransactOpts, _newOwner common.Address) (*types.Transaction, error) { + return _Pausable.contract.Transact(opts, "transferOwnership", _newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_Pausable *PausableSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _Pausable.Contract.TransferOwnership(&_Pausable.TransactOpts, _newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_Pausable *PausableTransactorSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _Pausable.Contract.TransferOwnership(&_Pausable.TransactOpts, _newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_Pausable *PausableTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Pausable.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_Pausable *PausableSession) Unpause() (*types.Transaction, error) { + return _Pausable.Contract.Unpause(&_Pausable.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_Pausable *PausableTransactorSession) Unpause() (*types.Transaction, error) { + return _Pausable.Contract.Unpause(&_Pausable.TransactOpts) +} + +// PausableOwnershipRenouncedIterator is returned from FilterOwnershipRenounced and is used to iterate over the raw logs and unpacked data for OwnershipRenounced events raised by the Pausable contract. +type PausableOwnershipRenouncedIterator struct { + Event *PausableOwnershipRenounced // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableOwnershipRenouncedIterator) 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(PausableOwnershipRenounced) + 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(PausableOwnershipRenounced) + 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 *PausableOwnershipRenouncedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableOwnershipRenouncedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableOwnershipRenounced represents a OwnershipRenounced event raised by the Pausable contract. +type PausableOwnershipRenounced struct { + PreviousOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipRenounced is a free log retrieval operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Pausable *PausableFilterer) FilterOwnershipRenounced(opts *bind.FilterOpts, previousOwner []common.Address) (*PausableOwnershipRenouncedIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _Pausable.contract.FilterLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return &PausableOwnershipRenouncedIterator{contract: _Pausable.contract, event: "OwnershipRenounced", logs: logs, sub: sub}, nil +} + +// WatchOwnershipRenounced is a free log subscription operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Pausable *PausableFilterer) WatchOwnershipRenounced(opts *bind.WatchOpts, sink chan<- *PausableOwnershipRenounced, previousOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _Pausable.contract.WatchLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableOwnershipRenounced) + if err := _Pausable.contract.UnpackLog(event, "OwnershipRenounced", 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 +} + +// ParseOwnershipRenounced is a log parse operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Pausable *PausableFilterer) ParseOwnershipRenounced(log types.Log) (*PausableOwnershipRenounced, error) { + event := new(PausableOwnershipRenounced) + if err := _Pausable.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Pausable contract. +type PausableOwnershipTransferredIterator struct { + Event *PausableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableOwnershipTransferredIterator) 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(PausableOwnershipTransferred) + 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(PausableOwnershipTransferred) + 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 *PausableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableOwnershipTransferred represents a OwnershipTransferred event raised by the Pausable contract. +type PausableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Pausable *PausableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*PausableOwnershipTransferredIterator, 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 := _Pausable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &PausableOwnershipTransferredIterator{contract: _Pausable.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 (_Pausable *PausableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *PausableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Pausable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableOwnershipTransferred) + if err := _Pausable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Pausable *PausableFilterer) ParseOwnershipTransferred(log types.Log) (*PausableOwnershipTransferred, error) { + event := new(PausableOwnershipTransferred) + if err := _Pausable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// PausablePauseIterator is returned from FilterPause and is used to iterate over the raw logs and unpacked data for Pause events raised by the Pausable contract. +type PausablePauseIterator struct { + Event *PausablePause // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausablePauseIterator) 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(PausablePause) + 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(PausablePause) + 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 *PausablePauseIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausablePauseIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausablePause represents a Pause event raised by the Pausable contract. +type PausablePause struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPause is a free log retrieval operation binding the contract event 0x6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff625. +// +// Solidity: event Pause() +func (_Pausable *PausableFilterer) FilterPause(opts *bind.FilterOpts) (*PausablePauseIterator, error) { + + logs, sub, err := _Pausable.contract.FilterLogs(opts, "Pause") + if err != nil { + return nil, err + } + return &PausablePauseIterator{contract: _Pausable.contract, event: "Pause", logs: logs, sub: sub}, nil +} + +// WatchPause is a free log subscription operation binding the contract event 0x6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff625. +// +// Solidity: event Pause() +func (_Pausable *PausableFilterer) WatchPause(opts *bind.WatchOpts, sink chan<- *PausablePause) (event.Subscription, error) { + + logs, sub, err := _Pausable.contract.WatchLogs(opts, "Pause") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausablePause) + if err := _Pausable.contract.UnpackLog(event, "Pause", 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 +} + +// ParsePause is a log parse operation binding the contract event 0x6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff625. +// +// Solidity: event Pause() +func (_Pausable *PausableFilterer) ParsePause(log types.Log) (*PausablePause, error) { + event := new(PausablePause) + if err := _Pausable.contract.UnpackLog(event, "Pause", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableUnpauseIterator is returned from FilterUnpause and is used to iterate over the raw logs and unpacked data for Unpause events raised by the Pausable contract. +type PausableUnpauseIterator struct { + Event *PausableUnpause // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableUnpauseIterator) 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(PausableUnpause) + 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(PausableUnpause) + 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 *PausableUnpauseIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableUnpauseIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableUnpause represents a Unpause event raised by the Pausable contract. +type PausableUnpause struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpause is a free log retrieval operation binding the contract event 0x7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b33. +// +// Solidity: event Unpause() +func (_Pausable *PausableFilterer) FilterUnpause(opts *bind.FilterOpts) (*PausableUnpauseIterator, error) { + + logs, sub, err := _Pausable.contract.FilterLogs(opts, "Unpause") + if err != nil { + return nil, err + } + return &PausableUnpauseIterator{contract: _Pausable.contract, event: "Unpause", logs: logs, sub: sub}, nil +} + +// WatchUnpause is a free log subscription operation binding the contract event 0x7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b33. +// +// Solidity: event Unpause() +func (_Pausable *PausableFilterer) WatchUnpause(opts *bind.WatchOpts, sink chan<- *PausableUnpause) (event.Subscription, error) { + + logs, sub, err := _Pausable.contract.WatchLogs(opts, "Unpause") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableUnpause) + if err := _Pausable.contract.UnpackLog(event, "Unpause", 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 +} + +// ParseUnpause is a log parse operation binding the contract event 0x7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b33. +// +// Solidity: event Unpause() +func (_Pausable *PausableFilterer) ParseUnpause(log types.Log) (*PausableUnpause, error) { + event := new(PausableUnpause) + if err := _Pausable.contract.UnpackLog(event, "Unpause", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableTokenABI is the input ABI used to generate the binding from. +const PausableTokenABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Pause\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpause\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRenounced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + +// PausableTokenFuncSigs maps the 4-byte function signature to its string representation. +var PausableTokenFuncSigs = map[string]string{ + "dd62ed3e": "allowance(address,address)", + "095ea7b3": "approve(address,uint256)", + "70a08231": "balanceOf(address)", + "66188463": "decreaseApproval(address,uint256)", + "d73dd623": "increaseApproval(address,uint256)", + "8da5cb5b": "owner()", + "8456cb59": "pause()", + "5c975abb": "paused()", + "715018a6": "renounceOwnership()", + "18160ddd": "totalSupply()", + "a9059cbb": "transfer(address,uint256)", + "23b872dd": "transferFrom(address,address,uint256)", + "f2fde38b": "transferOwnership(address)", + "3f4ba83a": "unpause()", +} + +// PausableTokenBin is the compiled bytecode used for deploying new contracts. +var PausableTokenBin = "0x608060405260038054600160a860020a03191633179055610a7f806100256000396000f3006080604052600436106100cf5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100d457806318160ddd1461010c57806323b872dd146101335780633f4ba83a1461015d5780635c975abb14610174578063661884631461018957806370a08231146101ad578063715018a6146101ce5780638456cb59146101e35780638da5cb5b146101f8578063a9059cbb14610229578063d73dd6231461024d578063dd62ed3e14610271578063f2fde38b14610298575b600080fd5b3480156100e057600080fd5b506100f8600160a060020a03600435166024356102b9565b604080519115158252519081900360200190f35b34801561011857600080fd5b506101216102e4565b60408051918252519081900360200190f35b34801561013f57600080fd5b506100f8600160a060020a03600435811690602435166044356102ea565b34801561016957600080fd5b50610172610317565b005b34801561018057600080fd5b506100f861038f565b34801561019557600080fd5b506100f8600160a060020a036004351660243561039f565b3480156101b957600080fd5b50610121600160a060020a03600435166103c3565b3480156101da57600080fd5b506101726103de565b3480156101ef57600080fd5b5061017261044c565b34801561020457600080fd5b5061020d6104c9565b60408051600160a060020a039092168252519081900360200190f35b34801561023557600080fd5b506100f8600160a060020a03600435166024356104d8565b34801561025957600080fd5b506100f8600160a060020a03600435166024356104fc565b34801561027d57600080fd5b50610121600160a060020a0360043581169060243516610520565b3480156102a457600080fd5b50610172600160a060020a036004351661054b565b60035460009060a060020a900460ff16156102d357600080fd5b6102dd838361056e565b9392505050565b60015490565b60035460009060a060020a900460ff161561030457600080fd5b61030f8484846105d4565b949350505050565b600354600160a060020a0316331461032e57600080fd5b60035460a060020a900460ff16151561034657600080fd5b6003805474ff0000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b60035460a060020a900460ff1681565b60035460009060a060020a900460ff16156103b957600080fd5b6102dd8383610749565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031633146103f557600080fd5b600354604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26003805473ffffffffffffffffffffffffffffffffffffffff19169055565b600354600160a060020a0316331461046357600080fd5b60035460a060020a900460ff161561047a57600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600354600160a060020a031681565b60035460009060a060020a900460ff16156104f257600080fd5b6102dd8383610838565b60035460009060a060020a900460ff161561051657600080fd5b6102dd8383610917565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a0316331461056257600080fd5b61056b816109b0565b50565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b600160a060020a0383166000908152602081905260408120548211156105f957600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561062957600080fd5b600160a060020a038316151561063e57600080fd5b600160a060020a038416600090815260208190526040902054610667908363ffffffff610a2e16565b600160a060020a03808616600090815260208190526040808220939093559085168152205461069c908363ffffffff610a4016565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546106de908363ffffffff610a2e16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a038616845290915281205480831061079d57336000908152600260209081526040808320600160a060020a03881684529091528120556107d2565b6107ad818463ffffffff610a2e16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b3360009081526020819052604081205482111561085457600080fd5b600160a060020a038316151561086957600080fd5b33600090815260208190526040902054610889908363ffffffff610a2e16565b3360009081526020819052604080822092909255600160a060020a038516815220546108bb908363ffffffff610a4016565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a038616845290915281205461094b908363ffffffff610a4016565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03811615156109c557600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610a3a57fe5b50900390565b81810182811015610a4d57fe5b929150505600a165627a7a72305820c137152dd6860b047530f27123fc716df812d47b6266d81b079dc869b9d4f4170029" + +// DeployPausableToken deploys a new Ethereum contract, binding an instance of PausableToken to it. +func DeployPausableToken(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *PausableToken, error) { + parsed, err := abi.JSON(strings.NewReader(PausableTokenABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(PausableTokenBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &PausableToken{PausableTokenCaller: PausableTokenCaller{contract: contract}, PausableTokenTransactor: PausableTokenTransactor{contract: contract}, PausableTokenFilterer: PausableTokenFilterer{contract: contract}}, nil +} + +// PausableToken is an auto generated Go binding around an Ethereum contract. +type PausableToken struct { + PausableTokenCaller // Read-only binding to the contract + PausableTokenTransactor // Write-only binding to the contract + PausableTokenFilterer // Log filterer for contract events +} + +// PausableTokenCaller is an auto generated read-only Go binding around an Ethereum contract. +type PausableTokenCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableTokenTransactor is an auto generated write-only Go binding around an Ethereum contract. +type PausableTokenTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type PausableTokenFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableTokenSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type PausableTokenSession struct { + Contract *PausableToken // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PausableTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type PausableTokenCallerSession struct { + Contract *PausableTokenCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// PausableTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type PausableTokenTransactorSession struct { + Contract *PausableTokenTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PausableTokenRaw is an auto generated low-level Go binding around an Ethereum contract. +type PausableTokenRaw struct { + Contract *PausableToken // Generic contract binding to access the raw methods on +} + +// PausableTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type PausableTokenCallerRaw struct { + Contract *PausableTokenCaller // Generic read-only contract binding to access the raw methods on +} + +// PausableTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type PausableTokenTransactorRaw struct { + Contract *PausableTokenTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewPausableToken creates a new instance of PausableToken, bound to a specific deployed contract. +func NewPausableToken(address common.Address, backend bind.ContractBackend) (*PausableToken, error) { + contract, err := bindPausableToken(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &PausableToken{PausableTokenCaller: PausableTokenCaller{contract: contract}, PausableTokenTransactor: PausableTokenTransactor{contract: contract}, PausableTokenFilterer: PausableTokenFilterer{contract: contract}}, nil +} + +// NewPausableTokenCaller creates a new read-only instance of PausableToken, bound to a specific deployed contract. +func NewPausableTokenCaller(address common.Address, caller bind.ContractCaller) (*PausableTokenCaller, error) { + contract, err := bindPausableToken(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &PausableTokenCaller{contract: contract}, nil +} + +// NewPausableTokenTransactor creates a new write-only instance of PausableToken, bound to a specific deployed contract. +func NewPausableTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*PausableTokenTransactor, error) { + contract, err := bindPausableToken(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &PausableTokenTransactor{contract: contract}, nil +} + +// NewPausableTokenFilterer creates a new log filterer instance of PausableToken, bound to a specific deployed contract. +func NewPausableTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*PausableTokenFilterer, error) { + contract, err := bindPausableToken(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &PausableTokenFilterer{contract: contract}, nil +} + +// bindPausableToken binds a generic wrapper to an already deployed contract. +func bindPausableToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(PausableTokenABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_PausableToken *PausableTokenRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _PausableToken.Contract.PausableTokenCaller.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 (_PausableToken *PausableTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PausableToken.Contract.PausableTokenTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_PausableToken *PausableTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _PausableToken.Contract.PausableTokenTransactor.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 (_PausableToken *PausableTokenCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _PausableToken.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 (_PausableToken *PausableTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PausableToken.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_PausableToken *PausableTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _PausableToken.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_PausableToken *PausableTokenCaller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _PausableToken.contract.Call(opts, out, "allowance", _owner, _spender) + return *ret0, err +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_PausableToken *PausableTokenSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { + return _PausableToken.Contract.Allowance(&_PausableToken.CallOpts, _owner, _spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_PausableToken *PausableTokenCallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { + return _PausableToken.Contract.Allowance(&_PausableToken.CallOpts, _owner, _spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_PausableToken *PausableTokenCaller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _PausableToken.contract.Call(opts, out, "balanceOf", _owner) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_PausableToken *PausableTokenSession) BalanceOf(_owner common.Address) (*big.Int, error) { + return _PausableToken.Contract.BalanceOf(&_PausableToken.CallOpts, _owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_PausableToken *PausableTokenCallerSession) BalanceOf(_owner common.Address) (*big.Int, error) { + return _PausableToken.Contract.BalanceOf(&_PausableToken.CallOpts, _owner) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_PausableToken *PausableTokenCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _PausableToken.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_PausableToken *PausableTokenSession) Owner() (common.Address, error) { + return _PausableToken.Contract.Owner(&_PausableToken.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_PausableToken *PausableTokenCallerSession) Owner() (common.Address, error) { + return _PausableToken.Contract.Owner(&_PausableToken.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_PausableToken *PausableTokenCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _PausableToken.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_PausableToken *PausableTokenSession) Paused() (bool, error) { + return _PausableToken.Contract.Paused(&_PausableToken.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_PausableToken *PausableTokenCallerSession) Paused() (bool, error) { + return _PausableToken.Contract.Paused(&_PausableToken.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_PausableToken *PausableTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _PausableToken.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_PausableToken *PausableTokenSession) TotalSupply() (*big.Int, error) { + return _PausableToken.Contract.TotalSupply(&_PausableToken.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_PausableToken *PausableTokenCallerSession) TotalSupply() (*big.Int, error) { + return _PausableToken.Contract.TotalSupply(&_PausableToken.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_PausableToken *PausableTokenTransactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _PausableToken.contract.Transact(opts, "approve", _spender, _value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_PausableToken *PausableTokenSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _PausableToken.Contract.Approve(&_PausableToken.TransactOpts, _spender, _value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_PausableToken *PausableTokenTransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _PausableToken.Contract.Approve(&_PausableToken.TransactOpts, _spender, _value) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool success) +func (_PausableToken *PausableTokenTransactor) DecreaseApproval(opts *bind.TransactOpts, _spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _PausableToken.contract.Transact(opts, "decreaseApproval", _spender, _subtractedValue) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool success) +func (_PausableToken *PausableTokenSession) DecreaseApproval(_spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _PausableToken.Contract.DecreaseApproval(&_PausableToken.TransactOpts, _spender, _subtractedValue) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool success) +func (_PausableToken *PausableTokenTransactorSession) DecreaseApproval(_spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _PausableToken.Contract.DecreaseApproval(&_PausableToken.TransactOpts, _spender, _subtractedValue) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool success) +func (_PausableToken *PausableTokenTransactor) IncreaseApproval(opts *bind.TransactOpts, _spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _PausableToken.contract.Transact(opts, "increaseApproval", _spender, _addedValue) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool success) +func (_PausableToken *PausableTokenSession) IncreaseApproval(_spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _PausableToken.Contract.IncreaseApproval(&_PausableToken.TransactOpts, _spender, _addedValue) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool success) +func (_PausableToken *PausableTokenTransactorSession) IncreaseApproval(_spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _PausableToken.Contract.IncreaseApproval(&_PausableToken.TransactOpts, _spender, _addedValue) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_PausableToken *PausableTokenTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PausableToken.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_PausableToken *PausableTokenSession) Pause() (*types.Transaction, error) { + return _PausableToken.Contract.Pause(&_PausableToken.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_PausableToken *PausableTokenTransactorSession) Pause() (*types.Transaction, error) { + return _PausableToken.Contract.Pause(&_PausableToken.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_PausableToken *PausableTokenTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PausableToken.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_PausableToken *PausableTokenSession) RenounceOwnership() (*types.Transaction, error) { + return _PausableToken.Contract.RenounceOwnership(&_PausableToken.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_PausableToken *PausableTokenTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _PausableToken.Contract.RenounceOwnership(&_PausableToken.TransactOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_PausableToken *PausableTokenTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _PausableToken.contract.Transact(opts, "transfer", _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_PausableToken *PausableTokenSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _PausableToken.Contract.Transfer(&_PausableToken.TransactOpts, _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_PausableToken *PausableTokenTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _PausableToken.Contract.Transfer(&_PausableToken.TransactOpts, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_PausableToken *PausableTokenTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _PausableToken.contract.Transact(opts, "transferFrom", _from, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_PausableToken *PausableTokenSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _PausableToken.Contract.TransferFrom(&_PausableToken.TransactOpts, _from, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_PausableToken *PausableTokenTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _PausableToken.Contract.TransferFrom(&_PausableToken.TransactOpts, _from, _to, _value) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_PausableToken *PausableTokenTransactor) TransferOwnership(opts *bind.TransactOpts, _newOwner common.Address) (*types.Transaction, error) { + return _PausableToken.contract.Transact(opts, "transferOwnership", _newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_PausableToken *PausableTokenSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _PausableToken.Contract.TransferOwnership(&_PausableToken.TransactOpts, _newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_PausableToken *PausableTokenTransactorSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _PausableToken.Contract.TransferOwnership(&_PausableToken.TransactOpts, _newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_PausableToken *PausableTokenTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PausableToken.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_PausableToken *PausableTokenSession) Unpause() (*types.Transaction, error) { + return _PausableToken.Contract.Unpause(&_PausableToken.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_PausableToken *PausableTokenTransactorSession) Unpause() (*types.Transaction, error) { + return _PausableToken.Contract.Unpause(&_PausableToken.TransactOpts) +} + +// PausableTokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the PausableToken contract. +type PausableTokenApprovalIterator struct { + Event *PausableTokenApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableTokenApprovalIterator) 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(PausableTokenApproval) + 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(PausableTokenApproval) + 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 *PausableTokenApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableTokenApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableTokenApproval represents a Approval event raised by the PausableToken contract. +type PausableTokenApproval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_PausableToken *PausableTokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*PausableTokenApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _PausableToken.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &PausableTokenApprovalIterator{contract: _PausableToken.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_PausableToken *PausableTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *PausableTokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _PausableToken.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableTokenApproval) + if err := _PausableToken.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_PausableToken *PausableTokenFilterer) ParseApproval(log types.Log) (*PausableTokenApproval, error) { + event := new(PausableTokenApproval) + if err := _PausableToken.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableTokenOwnershipRenouncedIterator is returned from FilterOwnershipRenounced and is used to iterate over the raw logs and unpacked data for OwnershipRenounced events raised by the PausableToken contract. +type PausableTokenOwnershipRenouncedIterator struct { + Event *PausableTokenOwnershipRenounced // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableTokenOwnershipRenouncedIterator) 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(PausableTokenOwnershipRenounced) + 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(PausableTokenOwnershipRenounced) + 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 *PausableTokenOwnershipRenouncedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableTokenOwnershipRenouncedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableTokenOwnershipRenounced represents a OwnershipRenounced event raised by the PausableToken contract. +type PausableTokenOwnershipRenounced struct { + PreviousOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipRenounced is a free log retrieval operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_PausableToken *PausableTokenFilterer) FilterOwnershipRenounced(opts *bind.FilterOpts, previousOwner []common.Address) (*PausableTokenOwnershipRenouncedIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _PausableToken.contract.FilterLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return &PausableTokenOwnershipRenouncedIterator{contract: _PausableToken.contract, event: "OwnershipRenounced", logs: logs, sub: sub}, nil +} + +// WatchOwnershipRenounced is a free log subscription operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_PausableToken *PausableTokenFilterer) WatchOwnershipRenounced(opts *bind.WatchOpts, sink chan<- *PausableTokenOwnershipRenounced, previousOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _PausableToken.contract.WatchLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableTokenOwnershipRenounced) + if err := _PausableToken.contract.UnpackLog(event, "OwnershipRenounced", 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 +} + +// ParseOwnershipRenounced is a log parse operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_PausableToken *PausableTokenFilterer) ParseOwnershipRenounced(log types.Log) (*PausableTokenOwnershipRenounced, error) { + event := new(PausableTokenOwnershipRenounced) + if err := _PausableToken.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableTokenOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the PausableToken contract. +type PausableTokenOwnershipTransferredIterator struct { + Event *PausableTokenOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableTokenOwnershipTransferredIterator) 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(PausableTokenOwnershipTransferred) + 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(PausableTokenOwnershipTransferred) + 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 *PausableTokenOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableTokenOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableTokenOwnershipTransferred represents a OwnershipTransferred event raised by the PausableToken contract. +type PausableTokenOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_PausableToken *PausableTokenFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*PausableTokenOwnershipTransferredIterator, 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 := _PausableToken.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &PausableTokenOwnershipTransferredIterator{contract: _PausableToken.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 (_PausableToken *PausableTokenFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *PausableTokenOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _PausableToken.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableTokenOwnershipTransferred) + if err := _PausableToken.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_PausableToken *PausableTokenFilterer) ParseOwnershipTransferred(log types.Log) (*PausableTokenOwnershipTransferred, error) { + event := new(PausableTokenOwnershipTransferred) + if err := _PausableToken.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableTokenPauseIterator is returned from FilterPause and is used to iterate over the raw logs and unpacked data for Pause events raised by the PausableToken contract. +type PausableTokenPauseIterator struct { + Event *PausableTokenPause // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableTokenPauseIterator) 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(PausableTokenPause) + 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(PausableTokenPause) + 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 *PausableTokenPauseIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableTokenPauseIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableTokenPause represents a Pause event raised by the PausableToken contract. +type PausableTokenPause struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPause is a free log retrieval operation binding the contract event 0x6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff625. +// +// Solidity: event Pause() +func (_PausableToken *PausableTokenFilterer) FilterPause(opts *bind.FilterOpts) (*PausableTokenPauseIterator, error) { + + logs, sub, err := _PausableToken.contract.FilterLogs(opts, "Pause") + if err != nil { + return nil, err + } + return &PausableTokenPauseIterator{contract: _PausableToken.contract, event: "Pause", logs: logs, sub: sub}, nil +} + +// WatchPause is a free log subscription operation binding the contract event 0x6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff625. +// +// Solidity: event Pause() +func (_PausableToken *PausableTokenFilterer) WatchPause(opts *bind.WatchOpts, sink chan<- *PausableTokenPause) (event.Subscription, error) { + + logs, sub, err := _PausableToken.contract.WatchLogs(opts, "Pause") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableTokenPause) + if err := _PausableToken.contract.UnpackLog(event, "Pause", 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 +} + +// ParsePause is a log parse operation binding the contract event 0x6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff625. +// +// Solidity: event Pause() +func (_PausableToken *PausableTokenFilterer) ParsePause(log types.Log) (*PausableTokenPause, error) { + event := new(PausableTokenPause) + if err := _PausableToken.contract.UnpackLog(event, "Pause", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableTokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the PausableToken contract. +type PausableTokenTransferIterator struct { + Event *PausableTokenTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableTokenTransferIterator) 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(PausableTokenTransfer) + 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(PausableTokenTransfer) + 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 *PausableTokenTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableTokenTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableTokenTransfer represents a Transfer event raised by the PausableToken contract. +type PausableTokenTransfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_PausableToken *PausableTokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*PausableTokenTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _PausableToken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &PausableTokenTransferIterator{contract: _PausableToken.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_PausableToken *PausableTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *PausableTokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _PausableToken.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableTokenTransfer) + if err := _PausableToken.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_PausableToken *PausableTokenFilterer) ParseTransfer(log types.Log) (*PausableTokenTransfer, error) { + event := new(PausableTokenTransfer) + if err := _PausableToken.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// PausableTokenUnpauseIterator is returned from FilterUnpause and is used to iterate over the raw logs and unpacked data for Unpause events raised by the PausableToken contract. +type PausableTokenUnpauseIterator struct { + Event *PausableTokenUnpause // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableTokenUnpauseIterator) 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(PausableTokenUnpause) + 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(PausableTokenUnpause) + 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 *PausableTokenUnpauseIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableTokenUnpauseIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableTokenUnpause represents a Unpause event raised by the PausableToken contract. +type PausableTokenUnpause struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpause is a free log retrieval operation binding the contract event 0x7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b33. +// +// Solidity: event Unpause() +func (_PausableToken *PausableTokenFilterer) FilterUnpause(opts *bind.FilterOpts) (*PausableTokenUnpauseIterator, error) { + + logs, sub, err := _PausableToken.contract.FilterLogs(opts, "Unpause") + if err != nil { + return nil, err + } + return &PausableTokenUnpauseIterator{contract: _PausableToken.contract, event: "Unpause", logs: logs, sub: sub}, nil +} + +// WatchUnpause is a free log subscription operation binding the contract event 0x7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b33. +// +// Solidity: event Unpause() +func (_PausableToken *PausableTokenFilterer) WatchUnpause(opts *bind.WatchOpts, sink chan<- *PausableTokenUnpause) (event.Subscription, error) { + + logs, sub, err := _PausableToken.contract.WatchLogs(opts, "Unpause") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableTokenUnpause) + if err := _PausableToken.contract.UnpackLog(event, "Unpause", 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 +} + +// ParseUnpause is a log parse operation binding the contract event 0x7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b33. +// +// Solidity: event Unpause() +func (_PausableToken *PausableTokenFilterer) ParseUnpause(log types.Log) (*PausableTokenUnpause, error) { + event := new(PausableTokenUnpause) + if err := _PausableToken.contract.UnpackLog(event, "Unpause", log); err != nil { + return nil, err + } + return event, nil +} + +// SafeERC20ABI is the input ABI used to generate the binding from. +const SafeERC20ABI = "[]" + +// SafeERC20Bin is the compiled bytecode used for deploying new contracts. +var SafeERC20Bin = "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820760976ca8c9ae3ab509781afa90b889d8ad846966b029cc4b8387f2adbb8ed8d0029" + +// DeploySafeERC20 deploys a new Ethereum contract, binding an instance of SafeERC20 to it. +func DeploySafeERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeERC20, error) { + parsed, err := abi.JSON(strings.NewReader(SafeERC20ABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeERC20Bin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &SafeERC20{SafeERC20Caller: SafeERC20Caller{contract: contract}, SafeERC20Transactor: SafeERC20Transactor{contract: contract}, SafeERC20Filterer: SafeERC20Filterer{contract: contract}}, nil +} + +// SafeERC20 is an auto generated Go binding around an Ethereum contract. +type SafeERC20 struct { + SafeERC20Caller // Read-only binding to the contract + SafeERC20Transactor // Write-only binding to the contract + SafeERC20Filterer // Log filterer for contract events +} + +// SafeERC20Caller is an auto generated read-only Go binding around an Ethereum contract. +type SafeERC20Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. +type SafeERC20Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SafeERC20Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeERC20Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SafeERC20Session struct { + Contract *SafeERC20 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SafeERC20CallerSession struct { + Contract *SafeERC20Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SafeERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SafeERC20TransactorSession struct { + Contract *SafeERC20Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeERC20Raw is an auto generated low-level Go binding around an Ethereum contract. +type SafeERC20Raw struct { + Contract *SafeERC20 // Generic contract binding to access the raw methods on +} + +// SafeERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SafeERC20CallerRaw struct { + Contract *SafeERC20Caller // Generic read-only contract binding to access the raw methods on +} + +// SafeERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SafeERC20TransactorRaw struct { + Contract *SafeERC20Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewSafeERC20 creates a new instance of SafeERC20, bound to a specific deployed contract. +func NewSafeERC20(address common.Address, backend bind.ContractBackend) (*SafeERC20, error) { + contract, err := bindSafeERC20(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &SafeERC20{SafeERC20Caller: SafeERC20Caller{contract: contract}, SafeERC20Transactor: SafeERC20Transactor{contract: contract}, SafeERC20Filterer: SafeERC20Filterer{contract: contract}}, nil +} + +// NewSafeERC20Caller creates a new read-only instance of SafeERC20, bound to a specific deployed contract. +func NewSafeERC20Caller(address common.Address, caller bind.ContractCaller) (*SafeERC20Caller, error) { + contract, err := bindSafeERC20(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SafeERC20Caller{contract: contract}, nil +} + +// NewSafeERC20Transactor creates a new write-only instance of SafeERC20, bound to a specific deployed contract. +func NewSafeERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*SafeERC20Transactor, error) { + contract, err := bindSafeERC20(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SafeERC20Transactor{contract: contract}, nil +} + +// NewSafeERC20Filterer creates a new log filterer instance of SafeERC20, bound to a specific deployed contract. +func NewSafeERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*SafeERC20Filterer, error) { + contract, err := bindSafeERC20(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SafeERC20Filterer{contract: contract}, nil +} + +// bindSafeERC20 binds a generic wrapper to an already deployed contract. +func bindSafeERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(SafeERC20ABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_SafeERC20 *SafeERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _SafeERC20.Contract.SafeERC20Caller.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 (_SafeERC20 *SafeERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SafeERC20.Contract.SafeERC20Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SafeERC20 *SafeERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SafeERC20.Contract.SafeERC20Transactor.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 (_SafeERC20 *SafeERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _SafeERC20.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 (_SafeERC20 *SafeERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SafeERC20.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SafeERC20 *SafeERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SafeERC20.Contract.contract.Transact(opts, method, params...) +} + +// SafeMathABI is the input ABI used to generate the binding from. +const SafeMathABI = "[]" + +// SafeMathBin is the compiled bytecode used for deploying new contracts. +var SafeMathBin = "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820c604b7fd5e8e5c1fa558cb75b5f3a6b0028ed71a9e9a08032c49fa239d2322bc0029" + +// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. +func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { + parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil +} + +// SafeMath is an auto generated Go binding around an Ethereum contract. +type SafeMath struct { + SafeMathCaller // Read-only binding to the contract + SafeMathTransactor // Write-only binding to the contract + SafeMathFilterer // Log filterer for contract events +} + +// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. +type SafeMathCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SafeMathTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SafeMathFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeMathSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SafeMathSession struct { + Contract *SafeMath // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SafeMathCallerSession struct { + Contract *SafeMathCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SafeMathTransactorSession struct { + Contract *SafeMathTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. +type SafeMathRaw struct { + Contract *SafeMath // Generic contract binding to access the raw methods on +} + +// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SafeMathCallerRaw struct { + Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on +} + +// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SafeMathTransactorRaw struct { + Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. +func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { + contract, err := bindSafeMath(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil +} + +// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { + contract, err := bindSafeMath(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SafeMathCaller{contract: contract}, nil +} + +// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { + contract, err := bindSafeMath(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SafeMathTransactor{contract: contract}, nil +} + +// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. +func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { + contract, err := bindSafeMath(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SafeMathFilterer{contract: contract}, nil +} + +// bindSafeMath binds a generic wrapper to an already deployed contract. +func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SafeMath.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SafeMath.Contract.contract.Transact(opts, method, params...) +} + +// StandardTokenABI is the input ABI used to generate the binding from. +const StandardTokenABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + +// StandardTokenFuncSigs maps the 4-byte function signature to its string representation. +var StandardTokenFuncSigs = map[string]string{ + "dd62ed3e": "allowance(address,address)", + "095ea7b3": "approve(address,uint256)", + "70a08231": "balanceOf(address)", + "66188463": "decreaseApproval(address,uint256)", + "d73dd623": "increaseApproval(address,uint256)", + "18160ddd": "totalSupply()", + "a9059cbb": "transfer(address,uint256)", + "23b872dd": "transferFrom(address,address,uint256)", +} + +// StandardTokenBin is the compiled bytecode used for deploying new contracts. +var StandardTokenBin = "0x608060405234801561001057600080fd5b506106ae806100206000396000f30060806040526004361061008d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461009257806318160ddd146100ca57806323b872dd146100f1578063661884631461011b57806370a082311461013f578063a9059cbb14610160578063d73dd62314610184578063dd62ed3e146101a8575b600080fd5b34801561009e57600080fd5b506100b6600160a060020a03600435166024356101cf565b604080519115158252519081900360200190f35b3480156100d657600080fd5b506100df610235565b60408051918252519081900360200190f35b3480156100fd57600080fd5b506100b6600160a060020a036004358116906024351660443561023b565b34801561012757600080fd5b506100b6600160a060020a03600435166024356103b0565b34801561014b57600080fd5b506100df600160a060020a036004351661049f565b34801561016c57600080fd5b506100b6600160a060020a03600435166024356104ba565b34801561019057600080fd5b506100b6600160a060020a0360043516602435610599565b3480156101b457600080fd5b506100df600160a060020a0360043581169060243516610632565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60015490565b600160a060020a03831660009081526020819052604081205482111561026057600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561029057600080fd5b600160a060020a03831615156102a557600080fd5b600160a060020a0384166000908152602081905260409020546102ce908363ffffffff61065d16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610303908363ffffffff61066f16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610345908363ffffffff61065d16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a038616845290915281205480831061040457336000908152600260209081526040808320600160a060020a0388168452909152812055610439565b610414818463ffffffff61065d16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b336000908152602081905260408120548211156104d657600080fd5b600160a060020a03831615156104eb57600080fd5b3360009081526020819052604090205461050b908363ffffffff61065d16565b3360009081526020819052604080822092909255600160a060020a0385168152205461053d908363ffffffff61066f16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a03861684529091528120546105cd908363ffffffff61066f16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60008282111561066957fe5b50900390565b8181018281101561067c57fe5b929150505600a165627a7a72305820d51e1a9dcf8616a2e8027e3fbed50c236184de40e8eef3d591cdac7e5cceef670029" + +// DeployStandardToken deploys a new Ethereum contract, binding an instance of StandardToken to it. +func DeployStandardToken(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *StandardToken, error) { + parsed, err := abi.JSON(strings.NewReader(StandardTokenABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(StandardTokenBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &StandardToken{StandardTokenCaller: StandardTokenCaller{contract: contract}, StandardTokenTransactor: StandardTokenTransactor{contract: contract}, StandardTokenFilterer: StandardTokenFilterer{contract: contract}}, nil +} + +// StandardToken is an auto generated Go binding around an Ethereum contract. +type StandardToken struct { + StandardTokenCaller // Read-only binding to the contract + StandardTokenTransactor // Write-only binding to the contract + StandardTokenFilterer // Log filterer for contract events +} + +// StandardTokenCaller is an auto generated read-only Go binding around an Ethereum contract. +type StandardTokenCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// StandardTokenTransactor is an auto generated write-only Go binding around an Ethereum contract. +type StandardTokenTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// StandardTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type StandardTokenFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// StandardTokenSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type StandardTokenSession struct { + Contract *StandardToken // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// StandardTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type StandardTokenCallerSession struct { + Contract *StandardTokenCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// StandardTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type StandardTokenTransactorSession struct { + Contract *StandardTokenTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// StandardTokenRaw is an auto generated low-level Go binding around an Ethereum contract. +type StandardTokenRaw struct { + Contract *StandardToken // Generic contract binding to access the raw methods on +} + +// StandardTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type StandardTokenCallerRaw struct { + Contract *StandardTokenCaller // Generic read-only contract binding to access the raw methods on +} + +// StandardTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type StandardTokenTransactorRaw struct { + Contract *StandardTokenTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewStandardToken creates a new instance of StandardToken, bound to a specific deployed contract. +func NewStandardToken(address common.Address, backend bind.ContractBackend) (*StandardToken, error) { + contract, err := bindStandardToken(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &StandardToken{StandardTokenCaller: StandardTokenCaller{contract: contract}, StandardTokenTransactor: StandardTokenTransactor{contract: contract}, StandardTokenFilterer: StandardTokenFilterer{contract: contract}}, nil +} + +// NewStandardTokenCaller creates a new read-only instance of StandardToken, bound to a specific deployed contract. +func NewStandardTokenCaller(address common.Address, caller bind.ContractCaller) (*StandardTokenCaller, error) { + contract, err := bindStandardToken(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &StandardTokenCaller{contract: contract}, nil +} + +// NewStandardTokenTransactor creates a new write-only instance of StandardToken, bound to a specific deployed contract. +func NewStandardTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*StandardTokenTransactor, error) { + contract, err := bindStandardToken(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &StandardTokenTransactor{contract: contract}, nil +} + +// NewStandardTokenFilterer creates a new log filterer instance of StandardToken, bound to a specific deployed contract. +func NewStandardTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*StandardTokenFilterer, error) { + contract, err := bindStandardToken(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &StandardTokenFilterer{contract: contract}, nil +} + +// bindStandardToken binds a generic wrapper to an already deployed contract. +func bindStandardToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(StandardTokenABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_StandardToken *StandardTokenRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _StandardToken.Contract.StandardTokenCaller.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 (_StandardToken *StandardTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _StandardToken.Contract.StandardTokenTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_StandardToken *StandardTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _StandardToken.Contract.StandardTokenTransactor.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 (_StandardToken *StandardTokenCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _StandardToken.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 (_StandardToken *StandardTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _StandardToken.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_StandardToken *StandardTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _StandardToken.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_StandardToken *StandardTokenCaller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _StandardToken.contract.Call(opts, out, "allowance", _owner, _spender) + return *ret0, err +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_StandardToken *StandardTokenSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { + return _StandardToken.Contract.Allowance(&_StandardToken.CallOpts, _owner, _spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_StandardToken *StandardTokenCallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { + return _StandardToken.Contract.Allowance(&_StandardToken.CallOpts, _owner, _spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_StandardToken *StandardTokenCaller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _StandardToken.contract.Call(opts, out, "balanceOf", _owner) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_StandardToken *StandardTokenSession) BalanceOf(_owner common.Address) (*big.Int, error) { + return _StandardToken.Contract.BalanceOf(&_StandardToken.CallOpts, _owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_StandardToken *StandardTokenCallerSession) BalanceOf(_owner common.Address) (*big.Int, error) { + return _StandardToken.Contract.BalanceOf(&_StandardToken.CallOpts, _owner) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_StandardToken *StandardTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _StandardToken.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_StandardToken *StandardTokenSession) TotalSupply() (*big.Int, error) { + return _StandardToken.Contract.TotalSupply(&_StandardToken.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_StandardToken *StandardTokenCallerSession) TotalSupply() (*big.Int, error) { + return _StandardToken.Contract.TotalSupply(&_StandardToken.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_StandardToken *StandardTokenTransactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _StandardToken.contract.Transact(opts, "approve", _spender, _value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_StandardToken *StandardTokenSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _StandardToken.Contract.Approve(&_StandardToken.TransactOpts, _spender, _value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_StandardToken *StandardTokenTransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _StandardToken.Contract.Approve(&_StandardToken.TransactOpts, _spender, _value) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool) +func (_StandardToken *StandardTokenTransactor) DecreaseApproval(opts *bind.TransactOpts, _spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _StandardToken.contract.Transact(opts, "decreaseApproval", _spender, _subtractedValue) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool) +func (_StandardToken *StandardTokenSession) DecreaseApproval(_spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _StandardToken.Contract.DecreaseApproval(&_StandardToken.TransactOpts, _spender, _subtractedValue) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool) +func (_StandardToken *StandardTokenTransactorSession) DecreaseApproval(_spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _StandardToken.Contract.DecreaseApproval(&_StandardToken.TransactOpts, _spender, _subtractedValue) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool) +func (_StandardToken *StandardTokenTransactor) IncreaseApproval(opts *bind.TransactOpts, _spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _StandardToken.contract.Transact(opts, "increaseApproval", _spender, _addedValue) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool) +func (_StandardToken *StandardTokenSession) IncreaseApproval(_spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _StandardToken.Contract.IncreaseApproval(&_StandardToken.TransactOpts, _spender, _addedValue) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool) +func (_StandardToken *StandardTokenTransactorSession) IncreaseApproval(_spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _StandardToken.Contract.IncreaseApproval(&_StandardToken.TransactOpts, _spender, _addedValue) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_StandardToken *StandardTokenTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _StandardToken.contract.Transact(opts, "transfer", _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_StandardToken *StandardTokenSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _StandardToken.Contract.Transfer(&_StandardToken.TransactOpts, _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_StandardToken *StandardTokenTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _StandardToken.Contract.Transfer(&_StandardToken.TransactOpts, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_StandardToken *StandardTokenTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _StandardToken.contract.Transact(opts, "transferFrom", _from, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_StandardToken *StandardTokenSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _StandardToken.Contract.TransferFrom(&_StandardToken.TransactOpts, _from, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_StandardToken *StandardTokenTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _StandardToken.Contract.TransferFrom(&_StandardToken.TransactOpts, _from, _to, _value) +} + +// StandardTokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the StandardToken contract. +type StandardTokenApprovalIterator struct { + Event *StandardTokenApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *StandardTokenApprovalIterator) 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(StandardTokenApproval) + 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(StandardTokenApproval) + 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 *StandardTokenApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *StandardTokenApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// StandardTokenApproval represents a Approval event raised by the StandardToken contract. +type StandardTokenApproval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_StandardToken *StandardTokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*StandardTokenApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _StandardToken.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &StandardTokenApprovalIterator{contract: _StandardToken.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_StandardToken *StandardTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *StandardTokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _StandardToken.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(StandardTokenApproval) + if err := _StandardToken.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_StandardToken *StandardTokenFilterer) ParseApproval(log types.Log) (*StandardTokenApproval, error) { + event := new(StandardTokenApproval) + if err := _StandardToken.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// StandardTokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the StandardToken contract. +type StandardTokenTransferIterator struct { + Event *StandardTokenTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *StandardTokenTransferIterator) 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(StandardTokenTransfer) + 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(StandardTokenTransfer) + 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 *StandardTokenTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *StandardTokenTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// StandardTokenTransfer represents a Transfer event raised by the StandardToken contract. +type StandardTokenTransfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_StandardToken *StandardTokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*StandardTokenTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _StandardToken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &StandardTokenTransferIterator{contract: _StandardToken.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_StandardToken *StandardTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *StandardTokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _StandardToken.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(StandardTokenTransfer) + if err := _StandardToken.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_StandardToken *StandardTokenFilterer) ParseTransfer(log types.Log) (*StandardTokenTransfer, error) { + event := new(StandardTokenTransfer) + if err := _StandardToken.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// WBTCABI is the input ABI used to generate the binding from. +const WBTCABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"mintingFinished\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"reclaimToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"claimOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"finishMinting\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Pause\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpause\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"burner\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"MintFinished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRenounced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" + +// WBTCFuncSigs maps the 4-byte function signature to its string representation. +var WBTCFuncSigs = map[string]string{ + "dd62ed3e": "allowance(address,address)", + "095ea7b3": "approve(address,uint256)", + "70a08231": "balanceOf(address)", + "42966c68": "burn(uint256)", + "4e71e0c8": "claimOwnership()", + "313ce567": "decimals()", + "66188463": "decreaseApproval(address,uint256)", + "7d64bcb4": "finishMinting()", + "d73dd623": "increaseApproval(address,uint256)", + "40c10f19": "mint(address,uint256)", + "05d2035b": "mintingFinished()", + "06fdde03": "name()", + "8da5cb5b": "owner()", + "8456cb59": "pause()", + "5c975abb": "paused()", + "e30c3978": "pendingOwner()", + "17ffc320": "reclaimToken(address)", + "715018a6": "renounceOwnership()", + "95d89b41": "symbol()", + "18160ddd": "totalSupply()", + "a9059cbb": "transfer(address,uint256)", + "23b872dd": "transferFrom(address,address,uint256)", + "f2fde38b": "transferOwnership(address)", + "3f4ba83a": "unpause()", +} + +// WBTCBin is the compiled bytecode used for deploying new contracts. +var WBTCBin = "0x6005805460a860020a61ffff0219169055600b60808181527f577261707065642042544300000000000000000000000000000000000000000060a0908152610100604052600460c09081527f574254430000000000000000000000000000000000000000000000000000000060e0529192600891620000829160039190620000c7565b50815162000098906004906020850190620000c7565b506005805460ff191660ff929092169190911761010060a860020a0319166101003302179055506200016c9050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200010a57805160ff19168380011785556200013a565b828001600101855582156200013a579182015b828111156200013a5782518255916020019190600101906200011d565b50620001489291506200014c565b5090565b6200016991905b8082111562000148576000815560010162000153565b90565b6111e6806200017c6000396000f30060806040526004361061013d5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b811461014257806306fdde031461016b578063095ea7b3146101f557806317ffc3201461021957806318160ddd1461023c57806323b872dd14610263578063313ce5671461028d5780633f4ba83a146102b857806340c10f19146102cd57806342966c68146102f15780634e71e0c8146103095780635c975abb1461031e578063661884631461033357806370a0823114610357578063715018a6146103785780637d64bcb41461038d5780638456cb59146103a25780638da5cb5b146103b757806395d89b41146103e8578063a9059cbb146103fd578063d73dd62314610421578063dd62ed3e14610445578063e30c39781461046c578063f2fde38b14610481575b600080fd5b34801561014e57600080fd5b506101576104a2565b604080519115158252519081900360200190f35b34801561017757600080fd5b506101806104c4565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ba5781810151838201526020016101a2565b50505050905090810190601f1680156101e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561020157600080fd5b50610157600160a060020a0360043516602435610552565b34801561022557600080fd5b5061023a600160a060020a036004351661057d565b005b34801561024857600080fd5b50610251610655565b60408051918252519081900360200190f35b34801561026f57600080fd5b50610157600160a060020a036004358116906024351660443561065b565b34801561029957600080fd5b506102a2610688565b6040805160ff9092168252519081900360200190f35b3480156102c457600080fd5b5061023a610691565b3480156102d957600080fd5b50610157600160a060020a0360043516602435610710565b3480156102fd57600080fd5b5061023a60043561081f565b34801561031557600080fd5b5061023a610847565b34801561032a57600080fd5b506101576108ef565b34801561033f57600080fd5b50610157600160a060020a03600435166024356108ff565b34801561036357600080fd5b50610251600160a060020a0360043516610923565b34801561038457600080fd5b5061023a61093e565b34801561039957600080fd5b506101576109c1565b3480156103ae57600080fd5b5061023a6109e6565b3480156103c357600080fd5b506103cc610a6a565b60408051600160a060020a039092168252519081900360200190f35b3480156103f457600080fd5b50610180610a7e565b34801561040957600080fd5b50610157600160a060020a0360043516602435610ad9565b34801561042d57600080fd5b50610157600160a060020a0360043516602435610afd565b34801561045157600080fd5b50610251600160a060020a0360043581169060243516610b21565b34801561047857600080fd5b506103cc610b4c565b34801561048d57600080fd5b5061023a600160a060020a0360043516610b5b565b6005547501000000000000000000000000000000000000000000900460ff1681565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561054a5780601f1061051f5761010080835404028352916020019161054a565b820191906000526020600020905b81548152906001019060200180831161052d57829003601f168201915b505050505081565b60055460009060b060020a900460ff161561056c57600080fd5b6105768383610ba6565b9392505050565b6005546000906101009004600160a060020a0316331461059c57600080fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038416916370a082319160248083019260209291908290030181600087803b1580156105fd57600080fd5b505af1158015610611573d6000803e3d6000fd5b505050506040513d602081101561062757600080fd5b505160055490915061065190600160a060020a03848116916101009004168363ffffffff610c0c16565b5050565b60015490565b60055460009060b060020a900460ff161561067557600080fd5b610680848484610cc4565b949350505050565b60055460ff1681565b6005546101009004600160a060020a031633146106ad57600080fd5b60055460b060020a900460ff1615156106c557600080fd5b6005805476ff00000000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6005546000906101009004600160a060020a0316331461072f57600080fd5b6005547501000000000000000000000000000000000000000000900460ff161561075857600080fd5b60015461076b908363ffffffff610e2716565b600155600160a060020a038316600090815260208190526040902054610797908363ffffffff610e2716565b600160a060020a03841660008181526020818152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a0385169160009160008051602061119b8339815191529181900360200190a350600192915050565b6005546101009004600160a060020a0316331461083b57600080fd5b61084481610e3a565b50565b600654600160a060020a0316331461085e57600080fd5b600654600554604051600160a060020a0392831692610100909204909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600680546005805474ffffffffffffffffffffffffffffffffffffffff001916610100600160a060020a0384160217905573ffffffffffffffffffffffffffffffffffffffff19169055565b60055460b060020a900460ff1681565b60055460009060b060020a900460ff161561091957600080fd5b6105768383610e44565b600160a060020a031660009081526020819052604090205490565b6005546101009004600160a060020a0316331461095a57600080fd5b604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f72656e6f756e63696e67206f776e65727368697020697320626c6f636b656400604482015290519081900360640190fd5b6005546000906101009004600160a060020a031633146109e057600080fd5b50600090565b6005546101009004600160a060020a03163314610a0257600080fd5b60055460b060020a900460ff1615610a1957600080fd5b6005805476ff00000000000000000000000000000000000000000000191660b060020a1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b6005546101009004600160a060020a031681565b6004805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561054a5780601f1061051f5761010080835404028352916020019161054a565b60055460009060b060020a900460ff1615610af357600080fd5b6105768383610f33565b60055460009060b060020a900460ff1615610b1757600080fd5b6105768383611000565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600654600160a060020a031681565b6005546101009004600160a060020a03163314610b7757600080fd5b6006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610c8857600080fd5b505af1158015610c9c573d6000803e3d6000fd5b505050506040513d6020811015610cb257600080fd5b50511515610cbf57600080fd5b505050565b600160a060020a038316600090815260208190526040812054821115610ce957600080fd5b600160a060020a0384166000908152600260209081526040808320338452909152902054821115610d1957600080fd5b600160a060020a0383161515610d2e57600080fd5b600160a060020a038416600090815260208190526040902054610d57908363ffffffff61109916565b600160a060020a038086166000908152602081905260408082209390935590851681522054610d8c908363ffffffff610e2716565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610dce908363ffffffff61109916565b600160a060020a038086166000818152600260209081526040808320338452825291829020949094558051868152905192871693919260008051602061119b833981519152929181900390910190a35060019392505050565b81810182811015610e3457fe5b92915050565b61084433826110ab565b336000908152600260209081526040808320600160a060020a0386168452909152812054808310610e9857336000908152600260209081526040808320600160a060020a0388168452909152812055610ecd565b610ea8818463ffffffff61109916565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b33600090815260208190526040812054821115610f4f57600080fd5b600160a060020a0383161515610f6457600080fd5b33600090815260208190526040902054610f84908363ffffffff61109916565b3360009081526020819052604080822092909255600160a060020a03851681522054610fb6908363ffffffff610e2716565b600160a060020a0384166000818152602081815260409182902093909355805185815290519192339260008051602061119b8339815191529281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054611034908363ffffffff610e2716565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6000828211156110a557fe5b50900390565b600160a060020a0382166000908152602081905260409020548111156110d057600080fd5b600160a060020a0382166000908152602081905260409020546110f9908263ffffffff61109916565b600160a060020a038316600090815260208190526040902055600154611125908263ffffffff61109916565b600155604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a2604080518281529051600091600160a060020a0385169160008051602061119b8339815191529181900360200190a350505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058200286d428d04ce1b531494f41c7d0949e1e9fb319e351034468e96677d1dfde670029" + +// DeployWBTC deploys a new Ethereum contract, binding an instance of WBTC to it. +func DeployWBTC(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *WBTC, error) { + parsed, err := abi.JSON(strings.NewReader(WBTCABI)) + if err != nil { + return common.Address{}, nil, nil, err + } + + address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(WBTCBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &WBTC{WBTCCaller: WBTCCaller{contract: contract}, WBTCTransactor: WBTCTransactor{contract: contract}, WBTCFilterer: WBTCFilterer{contract: contract}}, nil +} + +// WBTC is an auto generated Go binding around an Ethereum contract. +type WBTC struct { + WBTCCaller // Read-only binding to the contract + WBTCTransactor // Write-only binding to the contract + WBTCFilterer // Log filterer for contract events +} + +// WBTCCaller is an auto generated read-only Go binding around an Ethereum contract. +type WBTCCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WBTCTransactor is an auto generated write-only Go binding around an Ethereum contract. +type WBTCTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WBTCFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type WBTCFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// WBTCSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type WBTCSession struct { + Contract *WBTC // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// WBTCCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type WBTCCallerSession struct { + Contract *WBTCCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// WBTCTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type WBTCTransactorSession struct { + Contract *WBTCTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// WBTCRaw is an auto generated low-level Go binding around an Ethereum contract. +type WBTCRaw struct { + Contract *WBTC // Generic contract binding to access the raw methods on +} + +// WBTCCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type WBTCCallerRaw struct { + Contract *WBTCCaller // Generic read-only contract binding to access the raw methods on +} + +// WBTCTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type WBTCTransactorRaw struct { + Contract *WBTCTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewWBTC creates a new instance of WBTC, bound to a specific deployed contract. +func NewWBTC(address common.Address, backend bind.ContractBackend) (*WBTC, error) { + contract, err := bindWBTC(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &WBTC{WBTCCaller: WBTCCaller{contract: contract}, WBTCTransactor: WBTCTransactor{contract: contract}, WBTCFilterer: WBTCFilterer{contract: contract}}, nil +} + +// NewWBTCCaller creates a new read-only instance of WBTC, bound to a specific deployed contract. +func NewWBTCCaller(address common.Address, caller bind.ContractCaller) (*WBTCCaller, error) { + contract, err := bindWBTC(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &WBTCCaller{contract: contract}, nil +} + +// NewWBTCTransactor creates a new write-only instance of WBTC, bound to a specific deployed contract. +func NewWBTCTransactor(address common.Address, transactor bind.ContractTransactor) (*WBTCTransactor, error) { + contract, err := bindWBTC(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &WBTCTransactor{contract: contract}, nil +} + +// NewWBTCFilterer creates a new log filterer instance of WBTC, bound to a specific deployed contract. +func NewWBTCFilterer(address common.Address, filterer bind.ContractFilterer) (*WBTCFilterer, error) { + contract, err := bindWBTC(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &WBTCFilterer{contract: contract}, nil +} + +// bindWBTC binds a generic wrapper to an already deployed contract. +func bindWBTC(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(WBTCABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), 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 (_WBTC *WBTCRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _WBTC.Contract.WBTCCaller.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 (_WBTC *WBTCRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WBTC.Contract.WBTCTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_WBTC *WBTCRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _WBTC.Contract.WBTCTransactor.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 (_WBTC *WBTCCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _WBTC.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 (_WBTC *WBTCTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WBTC.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_WBTC *WBTCTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _WBTC.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_WBTC *WBTCCaller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _WBTC.contract.Call(opts, out, "allowance", _owner, _spender) + return *ret0, err +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_WBTC *WBTCSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { + return _WBTC.Contract.Allowance(&_WBTC.CallOpts, _owner, _spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) view returns(uint256) +func (_WBTC *WBTCCallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { + return _WBTC.Contract.Allowance(&_WBTC.CallOpts, _owner, _spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_WBTC *WBTCCaller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _WBTC.contract.Call(opts, out, "balanceOf", _owner) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_WBTC *WBTCSession) BalanceOf(_owner common.Address) (*big.Int, error) { + return _WBTC.Contract.BalanceOf(&_WBTC.CallOpts, _owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) view returns(uint256) +func (_WBTC *WBTCCallerSession) BalanceOf(_owner common.Address) (*big.Int, error) { + return _WBTC.Contract.BalanceOf(&_WBTC.CallOpts, _owner) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_WBTC *WBTCCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var ( + ret0 = new(uint8) + ) + out := ret0 + err := _WBTC.contract.Call(opts, out, "decimals") + return *ret0, err +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_WBTC *WBTCSession) Decimals() (uint8, error) { + return _WBTC.Contract.Decimals(&_WBTC.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_WBTC *WBTCCallerSession) Decimals() (uint8, error) { + return _WBTC.Contract.Decimals(&_WBTC.CallOpts) +} + +// MintingFinished is a free data retrieval call binding the contract method 0x05d2035b. +// +// Solidity: function mintingFinished() view returns(bool) +func (_WBTC *WBTCCaller) MintingFinished(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _WBTC.contract.Call(opts, out, "mintingFinished") + return *ret0, err +} + +// MintingFinished is a free data retrieval call binding the contract method 0x05d2035b. +// +// Solidity: function mintingFinished() view returns(bool) +func (_WBTC *WBTCSession) MintingFinished() (bool, error) { + return _WBTC.Contract.MintingFinished(&_WBTC.CallOpts) +} + +// MintingFinished is a free data retrieval call binding the contract method 0x05d2035b. +// +// Solidity: function mintingFinished() view returns(bool) +func (_WBTC *WBTCCallerSession) MintingFinished() (bool, error) { + return _WBTC.Contract.MintingFinished(&_WBTC.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_WBTC *WBTCCaller) Name(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _WBTC.contract.Call(opts, out, "name") + return *ret0, err +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_WBTC *WBTCSession) Name() (string, error) { + return _WBTC.Contract.Name(&_WBTC.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_WBTC *WBTCCallerSession) Name() (string, error) { + return _WBTC.Contract.Name(&_WBTC.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_WBTC *WBTCCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _WBTC.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_WBTC *WBTCSession) Owner() (common.Address, error) { + return _WBTC.Contract.Owner(&_WBTC.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_WBTC *WBTCCallerSession) Owner() (common.Address, error) { + return _WBTC.Contract.Owner(&_WBTC.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_WBTC *WBTCCaller) Paused(opts *bind.CallOpts) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _WBTC.contract.Call(opts, out, "paused") + return *ret0, err +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_WBTC *WBTCSession) Paused() (bool, error) { + return _WBTC.Contract.Paused(&_WBTC.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_WBTC *WBTCCallerSession) Paused() (bool, error) { + return _WBTC.Contract.Paused(&_WBTC.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_WBTC *WBTCCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _WBTC.contract.Call(opts, out, "pendingOwner") + return *ret0, err +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_WBTC *WBTCSession) PendingOwner() (common.Address, error) { + return _WBTC.Contract.PendingOwner(&_WBTC.CallOpts) +} + +// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978. +// +// Solidity: function pendingOwner() view returns(address) +func (_WBTC *WBTCCallerSession) PendingOwner() (common.Address, error) { + return _WBTC.Contract.PendingOwner(&_WBTC.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_WBTC *WBTCCaller) Symbol(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _WBTC.contract.Call(opts, out, "symbol") + return *ret0, err +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_WBTC *WBTCSession) Symbol() (string, error) { + return _WBTC.Contract.Symbol(&_WBTC.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_WBTC *WBTCCallerSession) Symbol() (string, error) { + return _WBTC.Contract.Symbol(&_WBTC.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_WBTC *WBTCCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _WBTC.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_WBTC *WBTCSession) TotalSupply() (*big.Int, error) { + return _WBTC.Contract.TotalSupply(&_WBTC.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_WBTC *WBTCCallerSession) TotalSupply() (*big.Int, error) { + return _WBTC.Contract.TotalSupply(&_WBTC.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_WBTC *WBTCTransactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _WBTC.contract.Transact(opts, "approve", _spender, _value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_WBTC *WBTCSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _WBTC.Contract.Approve(&_WBTC.TransactOpts, _spender, _value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_WBTC *WBTCTransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _WBTC.Contract.Approve(&_WBTC.TransactOpts, _spender, _value) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 value) returns() +func (_WBTC *WBTCTransactor) Burn(opts *bind.TransactOpts, value *big.Int) (*types.Transaction, error) { + return _WBTC.contract.Transact(opts, "burn", value) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 value) returns() +func (_WBTC *WBTCSession) Burn(value *big.Int) (*types.Transaction, error) { + return _WBTC.Contract.Burn(&_WBTC.TransactOpts, value) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 value) returns() +func (_WBTC *WBTCTransactorSession) Burn(value *big.Int) (*types.Transaction, error) { + return _WBTC.Contract.Burn(&_WBTC.TransactOpts, value) +} + +// ClaimOwnership is a paid mutator transaction binding the contract method 0x4e71e0c8. +// +// Solidity: function claimOwnership() returns() +func (_WBTC *WBTCTransactor) ClaimOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WBTC.contract.Transact(opts, "claimOwnership") +} + +// ClaimOwnership is a paid mutator transaction binding the contract method 0x4e71e0c8. +// +// Solidity: function claimOwnership() returns() +func (_WBTC *WBTCSession) ClaimOwnership() (*types.Transaction, error) { + return _WBTC.Contract.ClaimOwnership(&_WBTC.TransactOpts) +} + +// ClaimOwnership is a paid mutator transaction binding the contract method 0x4e71e0c8. +// +// Solidity: function claimOwnership() returns() +func (_WBTC *WBTCTransactorSession) ClaimOwnership() (*types.Transaction, error) { + return _WBTC.Contract.ClaimOwnership(&_WBTC.TransactOpts) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool success) +func (_WBTC *WBTCTransactor) DecreaseApproval(opts *bind.TransactOpts, _spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _WBTC.contract.Transact(opts, "decreaseApproval", _spender, _subtractedValue) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool success) +func (_WBTC *WBTCSession) DecreaseApproval(_spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _WBTC.Contract.DecreaseApproval(&_WBTC.TransactOpts, _spender, _subtractedValue) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool success) +func (_WBTC *WBTCTransactorSession) DecreaseApproval(_spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _WBTC.Contract.DecreaseApproval(&_WBTC.TransactOpts, _spender, _subtractedValue) +} + +// FinishMinting is a paid mutator transaction binding the contract method 0x7d64bcb4. +// +// Solidity: function finishMinting() returns(bool) +func (_WBTC *WBTCTransactor) FinishMinting(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WBTC.contract.Transact(opts, "finishMinting") +} + +// FinishMinting is a paid mutator transaction binding the contract method 0x7d64bcb4. +// +// Solidity: function finishMinting() returns(bool) +func (_WBTC *WBTCSession) FinishMinting() (*types.Transaction, error) { + return _WBTC.Contract.FinishMinting(&_WBTC.TransactOpts) +} + +// FinishMinting is a paid mutator transaction binding the contract method 0x7d64bcb4. +// +// Solidity: function finishMinting() returns(bool) +func (_WBTC *WBTCTransactorSession) FinishMinting() (*types.Transaction, error) { + return _WBTC.Contract.FinishMinting(&_WBTC.TransactOpts) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool success) +func (_WBTC *WBTCTransactor) IncreaseApproval(opts *bind.TransactOpts, _spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _WBTC.contract.Transact(opts, "increaseApproval", _spender, _addedValue) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool success) +func (_WBTC *WBTCSession) IncreaseApproval(_spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _WBTC.Contract.IncreaseApproval(&_WBTC.TransactOpts, _spender, _addedValue) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool success) +func (_WBTC *WBTCTransactorSession) IncreaseApproval(_spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _WBTC.Contract.IncreaseApproval(&_WBTC.TransactOpts, _spender, _addedValue) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address _to, uint256 _amount) returns(bool) +func (_WBTC *WBTCTransactor) Mint(opts *bind.TransactOpts, _to common.Address, _amount *big.Int) (*types.Transaction, error) { + return _WBTC.contract.Transact(opts, "mint", _to, _amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address _to, uint256 _amount) returns(bool) +func (_WBTC *WBTCSession) Mint(_to common.Address, _amount *big.Int) (*types.Transaction, error) { + return _WBTC.Contract.Mint(&_WBTC.TransactOpts, _to, _amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address _to, uint256 _amount) returns(bool) +func (_WBTC *WBTCTransactorSession) Mint(_to common.Address, _amount *big.Int) (*types.Transaction, error) { + return _WBTC.Contract.Mint(&_WBTC.TransactOpts, _to, _amount) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_WBTC *WBTCTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WBTC.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_WBTC *WBTCSession) Pause() (*types.Transaction, error) { + return _WBTC.Contract.Pause(&_WBTC.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_WBTC *WBTCTransactorSession) Pause() (*types.Transaction, error) { + return _WBTC.Contract.Pause(&_WBTC.TransactOpts) +} + +// ReclaimToken is a paid mutator transaction binding the contract method 0x17ffc320. +// +// Solidity: function reclaimToken(address _token) returns() +func (_WBTC *WBTCTransactor) ReclaimToken(opts *bind.TransactOpts, _token common.Address) (*types.Transaction, error) { + return _WBTC.contract.Transact(opts, "reclaimToken", _token) +} + +// ReclaimToken is a paid mutator transaction binding the contract method 0x17ffc320. +// +// Solidity: function reclaimToken(address _token) returns() +func (_WBTC *WBTCSession) ReclaimToken(_token common.Address) (*types.Transaction, error) { + return _WBTC.Contract.ReclaimToken(&_WBTC.TransactOpts, _token) +} + +// ReclaimToken is a paid mutator transaction binding the contract method 0x17ffc320. +// +// Solidity: function reclaimToken(address _token) returns() +func (_WBTC *WBTCTransactorSession) ReclaimToken(_token common.Address) (*types.Transaction, error) { + return _WBTC.Contract.ReclaimToken(&_WBTC.TransactOpts, _token) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_WBTC *WBTCTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WBTC.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_WBTC *WBTCSession) RenounceOwnership() (*types.Transaction, error) { + return _WBTC.Contract.RenounceOwnership(&_WBTC.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_WBTC *WBTCTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _WBTC.Contract.RenounceOwnership(&_WBTC.TransactOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_WBTC *WBTCTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _WBTC.contract.Transact(opts, "transfer", _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_WBTC *WBTCSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _WBTC.Contract.Transfer(&_WBTC.TransactOpts, _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool) +func (_WBTC *WBTCTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _WBTC.Contract.Transfer(&_WBTC.TransactOpts, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_WBTC *WBTCTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _WBTC.contract.Transact(opts, "transferFrom", _from, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_WBTC *WBTCSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _WBTC.Contract.TransferFrom(&_WBTC.TransactOpts, _from, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_WBTC *WBTCTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _WBTC.Contract.TransferFrom(&_WBTC.TransactOpts, _from, _to, _value) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_WBTC *WBTCTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _WBTC.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_WBTC *WBTCSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _WBTC.Contract.TransferOwnership(&_WBTC.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_WBTC *WBTCTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _WBTC.Contract.TransferOwnership(&_WBTC.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_WBTC *WBTCTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WBTC.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_WBTC *WBTCSession) Unpause() (*types.Transaction, error) { + return _WBTC.Contract.Unpause(&_WBTC.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_WBTC *WBTCTransactorSession) Unpause() (*types.Transaction, error) { + return _WBTC.Contract.Unpause(&_WBTC.TransactOpts) +} + +// WBTCApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the WBTC contract. +type WBTCApprovalIterator struct { + Event *WBTCApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *WBTCApprovalIterator) 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(WBTCApproval) + 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(WBTCApproval) + 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 *WBTCApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WBTCApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WBTCApproval represents a Approval event raised by the WBTC contract. +type WBTCApproval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_WBTC *WBTCFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*WBTCApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _WBTC.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &WBTCApprovalIterator{contract: _WBTC.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_WBTC *WBTCFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *WBTCApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _WBTC.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(WBTCApproval) + if err := _WBTC.contract.UnpackLog(event, "Approval", 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 +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_WBTC *WBTCFilterer) ParseApproval(log types.Log) (*WBTCApproval, error) { + event := new(WBTCApproval) + if err := _WBTC.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// WBTCBurnIterator is returned from FilterBurn and is used to iterate over the raw logs and unpacked data for Burn events raised by the WBTC contract. +type WBTCBurnIterator struct { + Event *WBTCBurn // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *WBTCBurnIterator) 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(WBTCBurn) + 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(WBTCBurn) + 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 *WBTCBurnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WBTCBurnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WBTCBurn represents a Burn event raised by the WBTC contract. +type WBTCBurn struct { + Burner common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBurn is a free log retrieval operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. +// +// Solidity: event Burn(address indexed burner, uint256 value) +func (_WBTC *WBTCFilterer) FilterBurn(opts *bind.FilterOpts, burner []common.Address) (*WBTCBurnIterator, error) { + + var burnerRule []interface{} + for _, burnerItem := range burner { + burnerRule = append(burnerRule, burnerItem) + } + + logs, sub, err := _WBTC.contract.FilterLogs(opts, "Burn", burnerRule) + if err != nil { + return nil, err + } + return &WBTCBurnIterator{contract: _WBTC.contract, event: "Burn", logs: logs, sub: sub}, nil +} + +// WatchBurn is a free log subscription operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. +// +// Solidity: event Burn(address indexed burner, uint256 value) +func (_WBTC *WBTCFilterer) WatchBurn(opts *bind.WatchOpts, sink chan<- *WBTCBurn, burner []common.Address) (event.Subscription, error) { + + var burnerRule []interface{} + for _, burnerItem := range burner { + burnerRule = append(burnerRule, burnerItem) + } + + logs, sub, err := _WBTC.contract.WatchLogs(opts, "Burn", burnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(WBTCBurn) + if err := _WBTC.contract.UnpackLog(event, "Burn", 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 +} + +// ParseBurn is a log parse operation binding the contract event 0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5. +// +// Solidity: event Burn(address indexed burner, uint256 value) +func (_WBTC *WBTCFilterer) ParseBurn(log types.Log) (*WBTCBurn, error) { + event := new(WBTCBurn) + if err := _WBTC.contract.UnpackLog(event, "Burn", log); err != nil { + return nil, err + } + return event, nil +} + +// WBTCMintIterator is returned from FilterMint and is used to iterate over the raw logs and unpacked data for Mint events raised by the WBTC contract. +type WBTCMintIterator struct { + Event *WBTCMint // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *WBTCMintIterator) 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(WBTCMint) + 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(WBTCMint) + 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 *WBTCMintIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WBTCMintIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WBTCMint represents a Mint event raised by the WBTC contract. +type WBTCMint struct { + To common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMint is a free log retrieval operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. +// +// Solidity: event Mint(address indexed to, uint256 amount) +func (_WBTC *WBTCFilterer) FilterMint(opts *bind.FilterOpts, to []common.Address) (*WBTCMintIterator, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _WBTC.contract.FilterLogs(opts, "Mint", toRule) + if err != nil { + return nil, err + } + return &WBTCMintIterator{contract: _WBTC.contract, event: "Mint", logs: logs, sub: sub}, nil +} + +// WatchMint is a free log subscription operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. +// +// Solidity: event Mint(address indexed to, uint256 amount) +func (_WBTC *WBTCFilterer) WatchMint(opts *bind.WatchOpts, sink chan<- *WBTCMint, to []common.Address) (event.Subscription, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _WBTC.contract.WatchLogs(opts, "Mint", toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(WBTCMint) + if err := _WBTC.contract.UnpackLog(event, "Mint", 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 +} + +// ParseMint is a log parse operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. +// +// Solidity: event Mint(address indexed to, uint256 amount) +func (_WBTC *WBTCFilterer) ParseMint(log types.Log) (*WBTCMint, error) { + event := new(WBTCMint) + if err := _WBTC.contract.UnpackLog(event, "Mint", log); err != nil { + return nil, err + } + return event, nil +} + +// WBTCMintFinishedIterator is returned from FilterMintFinished and is used to iterate over the raw logs and unpacked data for MintFinished events raised by the WBTC contract. +type WBTCMintFinishedIterator struct { + Event *WBTCMintFinished // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *WBTCMintFinishedIterator) 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(WBTCMintFinished) + 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(WBTCMintFinished) + 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 *WBTCMintFinishedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WBTCMintFinishedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WBTCMintFinished represents a MintFinished event raised by the WBTC contract. +type WBTCMintFinished struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMintFinished is a free log retrieval operation binding the contract event 0xae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa08. +// +// Solidity: event MintFinished() +func (_WBTC *WBTCFilterer) FilterMintFinished(opts *bind.FilterOpts) (*WBTCMintFinishedIterator, error) { + + logs, sub, err := _WBTC.contract.FilterLogs(opts, "MintFinished") + if err != nil { + return nil, err + } + return &WBTCMintFinishedIterator{contract: _WBTC.contract, event: "MintFinished", logs: logs, sub: sub}, nil +} + +// WatchMintFinished is a free log subscription operation binding the contract event 0xae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa08. +// +// Solidity: event MintFinished() +func (_WBTC *WBTCFilterer) WatchMintFinished(opts *bind.WatchOpts, sink chan<- *WBTCMintFinished) (event.Subscription, error) { + + logs, sub, err := _WBTC.contract.WatchLogs(opts, "MintFinished") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(WBTCMintFinished) + if err := _WBTC.contract.UnpackLog(event, "MintFinished", 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 +} + +// ParseMintFinished is a log parse operation binding the contract event 0xae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa08. +// +// Solidity: event MintFinished() +func (_WBTC *WBTCFilterer) ParseMintFinished(log types.Log) (*WBTCMintFinished, error) { + event := new(WBTCMintFinished) + if err := _WBTC.contract.UnpackLog(event, "MintFinished", log); err != nil { + return nil, err + } + return event, nil +} + +// WBTCOwnershipRenouncedIterator is returned from FilterOwnershipRenounced and is used to iterate over the raw logs and unpacked data for OwnershipRenounced events raised by the WBTC contract. +type WBTCOwnershipRenouncedIterator struct { + Event *WBTCOwnershipRenounced // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *WBTCOwnershipRenouncedIterator) 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(WBTCOwnershipRenounced) + 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(WBTCOwnershipRenounced) + 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 *WBTCOwnershipRenouncedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WBTCOwnershipRenouncedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WBTCOwnershipRenounced represents a OwnershipRenounced event raised by the WBTC contract. +type WBTCOwnershipRenounced struct { + PreviousOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipRenounced is a free log retrieval operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_WBTC *WBTCFilterer) FilterOwnershipRenounced(opts *bind.FilterOpts, previousOwner []common.Address) (*WBTCOwnershipRenouncedIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _WBTC.contract.FilterLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return &WBTCOwnershipRenouncedIterator{contract: _WBTC.contract, event: "OwnershipRenounced", logs: logs, sub: sub}, nil +} + +// WatchOwnershipRenounced is a free log subscription operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_WBTC *WBTCFilterer) WatchOwnershipRenounced(opts *bind.WatchOpts, sink chan<- *WBTCOwnershipRenounced, previousOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _WBTC.contract.WatchLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(WBTCOwnershipRenounced) + if err := _WBTC.contract.UnpackLog(event, "OwnershipRenounced", 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 +} + +// ParseOwnershipRenounced is a log parse operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_WBTC *WBTCFilterer) ParseOwnershipRenounced(log types.Log) (*WBTCOwnershipRenounced, error) { + event := new(WBTCOwnershipRenounced) + if err := _WBTC.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil { + return nil, err + } + return event, nil +} + +// WBTCOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the WBTC contract. +type WBTCOwnershipTransferredIterator struct { + Event *WBTCOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *WBTCOwnershipTransferredIterator) 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(WBTCOwnershipTransferred) + 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(WBTCOwnershipTransferred) + 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 *WBTCOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WBTCOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WBTCOwnershipTransferred represents a OwnershipTransferred event raised by the WBTC contract. +type WBTCOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_WBTC *WBTCFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*WBTCOwnershipTransferredIterator, 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 := _WBTC.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &WBTCOwnershipTransferredIterator{contract: _WBTC.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 (_WBTC *WBTCFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *WBTCOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _WBTC.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(WBTCOwnershipTransferred) + if err := _WBTC.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_WBTC *WBTCFilterer) ParseOwnershipTransferred(log types.Log) (*WBTCOwnershipTransferred, error) { + event := new(WBTCOwnershipTransferred) + if err := _WBTC.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// WBTCPauseIterator is returned from FilterPause and is used to iterate over the raw logs and unpacked data for Pause events raised by the WBTC contract. +type WBTCPauseIterator struct { + Event *WBTCPause // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *WBTCPauseIterator) 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(WBTCPause) + 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(WBTCPause) + 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 *WBTCPauseIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WBTCPauseIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WBTCPause represents a Pause event raised by the WBTC contract. +type WBTCPause struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPause is a free log retrieval operation binding the contract event 0x6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff625. +// +// Solidity: event Pause() +func (_WBTC *WBTCFilterer) FilterPause(opts *bind.FilterOpts) (*WBTCPauseIterator, error) { + + logs, sub, err := _WBTC.contract.FilterLogs(opts, "Pause") + if err != nil { + return nil, err + } + return &WBTCPauseIterator{contract: _WBTC.contract, event: "Pause", logs: logs, sub: sub}, nil +} + +// WatchPause is a free log subscription operation binding the contract event 0x6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff625. +// +// Solidity: event Pause() +func (_WBTC *WBTCFilterer) WatchPause(opts *bind.WatchOpts, sink chan<- *WBTCPause) (event.Subscription, error) { + + logs, sub, err := _WBTC.contract.WatchLogs(opts, "Pause") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(WBTCPause) + if err := _WBTC.contract.UnpackLog(event, "Pause", 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 +} + +// ParsePause is a log parse operation binding the contract event 0x6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff625. +// +// Solidity: event Pause() +func (_WBTC *WBTCFilterer) ParsePause(log types.Log) (*WBTCPause, error) { + event := new(WBTCPause) + if err := _WBTC.contract.UnpackLog(event, "Pause", log); err != nil { + return nil, err + } + return event, nil +} + +// WBTCTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the WBTC contract. +type WBTCTransferIterator struct { + Event *WBTCTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *WBTCTransferIterator) 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(WBTCTransfer) + 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(WBTCTransfer) + 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 *WBTCTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WBTCTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WBTCTransfer represents a Transfer event raised by the WBTC contract. +type WBTCTransfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_WBTC *WBTCFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*WBTCTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _WBTC.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &WBTCTransferIterator{contract: _WBTC.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_WBTC *WBTCFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *WBTCTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _WBTC.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(WBTCTransfer) + if err := _WBTC.contract.UnpackLog(event, "Transfer", 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 +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_WBTC *WBTCFilterer) ParseTransfer(log types.Log) (*WBTCTransfer, error) { + event := new(WBTCTransfer) + if err := _WBTC.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} + +// WBTCUnpauseIterator is returned from FilterUnpause and is used to iterate over the raw logs and unpacked data for Unpause events raised by the WBTC contract. +type WBTCUnpauseIterator struct { + Event *WBTCUnpause // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *WBTCUnpauseIterator) 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(WBTCUnpause) + 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(WBTCUnpause) + 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 *WBTCUnpauseIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *WBTCUnpauseIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// WBTCUnpause represents a Unpause event raised by the WBTC contract. +type WBTCUnpause struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpause is a free log retrieval operation binding the contract event 0x7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b33. +// +// Solidity: event Unpause() +func (_WBTC *WBTCFilterer) FilterUnpause(opts *bind.FilterOpts) (*WBTCUnpauseIterator, error) { + + logs, sub, err := _WBTC.contract.FilterLogs(opts, "Unpause") + if err != nil { + return nil, err + } + return &WBTCUnpauseIterator{contract: _WBTC.contract, event: "Unpause", logs: logs, sub: sub}, nil +} + +// WatchUnpause is a free log subscription operation binding the contract event 0x7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b33. +// +// Solidity: event Unpause() +func (_WBTC *WBTCFilterer) WatchUnpause(opts *bind.WatchOpts, sink chan<- *WBTCUnpause) (event.Subscription, error) { + + logs, sub, err := _WBTC.contract.WatchLogs(opts, "Unpause") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(WBTCUnpause) + if err := _WBTC.contract.UnpackLog(event, "Unpause", 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 +} + +// ParseUnpause is a log parse operation binding the contract event 0x7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b33. +// +// Solidity: event Unpause() +func (_WBTC *WBTCFilterer) ParseUnpause(log types.Log) (*WBTCUnpause, error) { + event := new(WBTCUnpause) + if err := _WBTC.contract.UnpackLog(event, "Unpause", log); err != nil { + return nil, err + } + return event, nil +} diff --git a/chains/neo/invoker.go b/chains/neo/invoker.go new file mode 100644 index 0000000..eff8b06 --- /dev/null +++ b/chains/neo/invoker.go @@ -0,0 +1,45 @@ +package neo + +import ( + "github.com/joeqian10/neo-gogogo/helper" + "github.com/joeqian10/neo-gogogo/rpc" + "github.com/joeqian10/neo-gogogo/wallet" + "github.com/polynetwork/poly-io-test/config" + "github.com/polynetwork/poly-io-test/log" + "strings" + "time" +) + +type NeoInvoker struct { + Cli *rpc.RpcClient + Acc *wallet.Account +} + +func NewNeoInvoker() (invoker *NeoInvoker, err error) { + invoker = &NeoInvoker{} + invoker.Cli = rpc.NewClient(config.DefConfig.NeoUrl) + invoker.Acc, err = wallet.NewAccountFromWIF(config.DefConfig.NeoWif) + if err != nil { + return nil, err + } + return +} + +func WaitNeoTx(cli *rpc.RpcClient, hash helper.UInt256) { + tick := time.NewTicker(100 * time.Millisecond) + for range tick.C { + res := cli.GetTransactionHeight(hash.String()) + if res.HasError() { + if strings.Contains(res.Error.Message, "Unknown") { + continue + } + log.Errorf("failed to get neo tx: %s", res.Error.Message) + continue + } + if res.Result <= 0 { + continue + } + log.Infof("capture neo tx %s", hash.String()) + break + } +} diff --git a/chains/neo/invoker_test.go b/chains/neo/invoker_test.go new file mode 100644 index 0000000..0704ed5 --- /dev/null +++ b/chains/neo/invoker_test.go @@ -0,0 +1,23 @@ +package neo + +import ( + "fmt" + "github.com/polynetwork/poly-io-test/config" + "testing" +) + +func TestNewNeoInvoker(t *testing.T) { + config.DefConfig.Init("./config-test-cp.json") + invoker, err := NewNeoInvoker() + if err != nil { + t.Fatal(err) + } + res := invoker.Cli.GetBlockCount() + if res.HasError() { + t.Fatal(res.Error.Message) + } + fmt.Println(res.Result) + + res1 := invoker.Cli.GetContractState("0xa837ba329255884b40581ba8a3d29820acf44316") + fmt.Println(res1) +} diff --git a/chains/ont/avm/ethx.avm b/chains/ont/avm/ethx.avm index c853250..1bb34f7 100644 --- a/chains/ont/avm/ethx.avm +++ b/chains/ont/avm/ethx.avm @@ -1 +1 @@ -5fc56b05322e302e306a00527ac4681953797374656d2e53746f726167652e476574436f6e746578746a51527ac4064574686572326a52527ac4034554486a53527ac401126a54527ac408000064a7b3b6e00d6a55527ac42241647a5a32564b7566644a57654238743961386269586f4862624d65326b5a65794868204f6e746f6c6f67792e52756e74696d652e426173653538546f416464726573736a56527ac41400000000000000000000000000000000000000096a57527ac401016a58527ac401026a59527ac40b546f74616c537570706c796a5a527ac40550726f78796a5b527ac46c0120c56b6a00527ac46a51527ac46a52527ac46a51c30f64656c6567617465546f50726f78797d9c7c75641f006a52c351c36a52c300c3526a00c306b403000000006e6c75666203006a51c3046e616d657d9c7c75641500006a00c306c804000000006e6c75666203006a51c30673796d626f6c7d9c7c75641500006a00c306e004000000006e6c75666203006a51c308646563696d616c737d9c7c75641500006a00c306f804000000006e6c75666203006a51c30b746f74616c537570706c797d9c7c75641500006a00c3061005000000006e6c75666203006a51c30962616c616e63654f667d9c7c75642c006a52c3c0517d9c7c75f16a52c300c36a54527ac46a54c3516a00c3064105000000006e6c75666203006a51c3087472616e736665727d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a55527ac46a52c351c36a56527ac46a52c352c36a57527ac46a57c36a56c36a55c3536a00c3068605000000006e6c75666203006a51c30d7472616e736665724d756c74697d9c7c756418006a52c3516a00c306f206000000006e6c75666203006a51c30c7472616e7366657246726f6d7d9c7c756453006a52c3c0547d9c7c75f16a52c300c36a58527ac46a52c351c36a55527ac46a52c352c36a56527ac46a52c353c36a57527ac46a57c36a56c36a55c36a58c3546a00c3064108000000006e6c75666203006a51c307617070726f76657d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a59527ac46a52c351c36a58527ac46a52c352c36a57527ac46a57c36a58c36a59c3536a00c3066b07000000006e6c75666203006a51c309616c6c6f77616e63657d9c7c756439006a52c3c0527d9c7c75f16a52c300c36a59527ac46a52c351c36a58527ac46a58c36a59c3526a00c306410a000000006e6c75666203006a51c30c67657450726f7879486173687d9c7c75641500006a00c3068c0a000000006e6c7566620300006c75665ac56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c356c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f1006a00c3068c0a000000006e6a55527ac46a55c3916427006a52c36a00c35bc36a00c351c3681253797374656d2e53746f726167652e507574620e006a52c36a55c37d9c7c75f16a52c3516a00c3064105000000006e6a53c3936a00c358c36a52c37e6a00c351c3681253797374656d2e53746f726167652e507574006a00c3061005000000006e6a53c3936a00c35ac36a00c351c3681253797374656d2e53746f726167652e5075746a53c36a52c300087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c756655c56b6a00527ac46a51527ac46203006a00c352c36c756655c56b6a00527ac46a51527ac46203006a00c353c36c756655c56b6a00527ac46a51527ac46203006a00c354c36c756655c56b6a00527ac46a51527ac46203006a00c35ac36a00c351c3681253797374656d2e53746f726167652e4765746c756657c56b6a00527ac46a51527ac46a52527ac46203006a52c3c001147d9c7c75f16a00c358c36a52c37e6a00c351c3681253797374656d2e53746f726167652e4765746c75665cc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a53c3c001147d9c7c75f16a52c3c001147d9c7c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a54c3007da07c75f16a00c358c36a52c37e6a55527ac46a55c36a00c351c3681253797374656d2e53746f726167652e4765746a56527ac46a56c36a54c37da27c75f16a54c36a56c37d9c7c756425006a55c36a00c351c3681553797374656d2e53746f726167652e44656c6574656226006a56c36a54c3946a55c36a00c351c3681253797374656d2e53746f726167652e5075746a00c358c36a53c37e6a57527ac46a57c36a00c351c3681253797374656d2e53746f726167652e4765746a58527ac46a58c36a54c3936a57c36a00c351c3681253797374656d2e53746f726167652e5075746a54c36a53c36a52c3087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c75665ac56b6a00527ac46a51527ac46a52527ac4620300006a53527ac46a52c36a54527ac46a54c3c06a55527ac46a53c36a55c39f6442006a54c36a53c3c36a56527ac46a53c351936a53527ac46a56c3c0537d9c7c75f16a56c352c36a56c351c36a56c300c3536a00c3068605000000006ef162baff516c75665ac56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a52c3c001147d9c7c75f16a53c3c001147d9c7c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a54c3007da27c75f16a54c36a52c3516a00c3064105000000006e7da17c75f16a00c359c36a52c37e6a53c37e6a56527ac46a54c36a56c36a00c351c3681253797374656d2e53746f726167652e5075746a54c36a53c36a52c308617070726f76616c54c1681553797374656d2e52756e74696d652e4e6f74696679516c756660c56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46a55527ac46203006a54c3c001147d9c7c75f16a53c3c001147d9c7c75f16a52c3c001147d9c7c75f16a55c3007da27c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a00c358c36a53c37e6a56527ac46a56c36a00c351c3681253797374656d2e53746f726167652e4765746a57527ac46a57c36a55c37da27c75f16a00c359c36a53c37e6a52c37e6a58527ac46a58c36a00c351c3681253797374656d2e53746f726167652e4765746a59527ac46a00c358c36a54c37e6a5a527ac46a59c36a55c37da27c75f16a55c36a59c37d9c7c756448006a58c36a00c351c3681553797374656d2e53746f726167652e44656c6574656a57c36a55c3946a56c36a00c351c3681253797374656d2e53746f726167652e5075746249006a59c36a55c3946a58c36a00c351c3681253797374656d2e53746f726167652e5075746a57c36a55c3946a56c36a00c351c3681253797374656d2e53746f726167652e5075746a5ac36a00c351c3681253797374656d2e53746f726167652e4765746a5b527ac46a5bc36a55c3936a5ac36a00c351c3681253797374656d2e53746f726167652e5075746a55c36a54c36a53c3087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c359c36a52c37e6a53c37e6a54527ac46a54c36a00c351c3681253797374656d2e53746f726167652e4765746c756655c56b6a00527ac46a51527ac46203006a00c35bc36a00c351c3681253797374656d2e53746f726167652e4765746c756603 \ No newline at end of file +5fc56b05322e302e306a00527ac4681953797374656d2e53746f726167652e476574436f6e746578746a51527ac4046f4554486a52527ac4046f4554486a53527ac401126a54527ac408000064a7b3b6e00d6a55527ac42241647a5a32564b7566644a57654238743961386269586f4862624d65326b5a65794868204f6e746f6c6f67792e52756e74696d652e426173653538546f416464726573736a56527ac41400000000000000000000000000000000000000096a57527ac401016a58527ac401026a59527ac40b546f74616c537570706c796a5a527ac40550726f78796a5b527ac46c0120c56b6a00527ac46a51527ac46a52527ac46a51c30f64656c6567617465546f50726f78797d9c7c75641f006a52c351c36a52c300c3526a00c306b303000000006e6c75666203006a51c3046e616d657d9c7c75641500006a00c306c704000000006e6c75666203006a51c30673796d626f6c7d9c7c75641500006a00c306df04000000006e6c75666203006a51c308646563696d616c737d9c7c75641500006a00c306f704000000006e6c75666203006a51c30b746f74616c537570706c797d9c7c75641500006a00c3060f05000000006e6c75666203006a51c30962616c616e63654f667d9c7c75642c006a52c3c0517d9c7c75f16a52c300c36a54527ac46a54c3516a00c3064005000000006e6c75666203006a51c3087472616e736665727d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a55527ac46a52c351c36a56527ac46a52c352c36a57527ac46a57c36a56c36a55c3536a00c3068505000000006e6c75666203006a51c30d7472616e736665724d756c74697d9c7c756418006a52c3516a00c306f106000000006e6c75666203006a51c30c7472616e7366657246726f6d7d9c7c756453006a52c3c0547d9c7c75f16a52c300c36a58527ac46a52c351c36a55527ac46a52c352c36a56527ac46a52c353c36a57527ac46a57c36a56c36a55c36a58c3546a00c3064008000000006e6c75666203006a51c307617070726f76657d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a59527ac46a52c351c36a58527ac46a52c352c36a57527ac46a57c36a58c36a59c3536a00c3066a07000000006e6c75666203006a51c309616c6c6f77616e63657d9c7c756439006a52c3c0527d9c7c75f16a52c300c36a59527ac46a52c351c36a58527ac46a58c36a59c3526a00c306400a000000006e6c75666203006a51c30c67657450726f7879486173687d9c7c75641500006a00c3068b0a000000006e6c7566620300006c75665ac56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c356c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f1006a00c3068b0a000000006e6a55527ac46a55c3916427006a52c36a00c35bc36a00c351c3681253797374656d2e53746f726167652e507574620e006a52c36a55c37d9c7c75f16a52c3516a00c3064005000000006e6a53c3936a00c358c36a52c37e6a00c351c3681253797374656d2e53746f726167652e507574006a00c3060f05000000006e6a53c3936a00c35ac36a00c351c3681253797374656d2e53746f726167652e5075746a53c36a52c300087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c756655c56b6a00527ac46a51527ac46203006a00c352c36c756655c56b6a00527ac46a51527ac46203006a00c353c36c756655c56b6a00527ac46a51527ac46203006a00c354c36c756655c56b6a00527ac46a51527ac46203006a00c35ac36a00c351c3681253797374656d2e53746f726167652e4765746c756657c56b6a00527ac46a51527ac46a52527ac46203006a52c3c001147d9c7c75f16a00c358c36a52c37e6a00c351c3681253797374656d2e53746f726167652e4765746c75665cc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a53c3c001147d9c7c75f16a52c3c001147d9c7c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a54c3007da07c75f16a00c358c36a52c37e6a55527ac46a55c36a00c351c3681253797374656d2e53746f726167652e4765746a56527ac46a56c36a54c37da27c75f16a54c36a56c37d9c7c756425006a55c36a00c351c3681553797374656d2e53746f726167652e44656c6574656226006a56c36a54c3946a55c36a00c351c3681253797374656d2e53746f726167652e5075746a00c358c36a53c37e6a57527ac46a57c36a00c351c3681253797374656d2e53746f726167652e4765746a58527ac46a58c36a54c3936a57c36a00c351c3681253797374656d2e53746f726167652e5075746a54c36a53c36a52c3087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c75665ac56b6a00527ac46a51527ac46a52527ac4620300006a53527ac46a52c36a54527ac46a54c3c06a55527ac46a53c36a55c39f6442006a54c36a53c3c36a56527ac46a53c351936a53527ac46a56c3c0537d9c7c75f16a56c352c36a56c351c36a56c300c3536a00c3068505000000006ef162baff516c75665ac56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a52c3c001147d9c7c75f16a53c3c001147d9c7c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a54c3007da27c75f16a54c36a52c3516a00c3064005000000006e7da17c75f16a00c359c36a52c37e6a53c37e6a56527ac46a54c36a56c36a00c351c3681253797374656d2e53746f726167652e5075746a54c36a53c36a52c308617070726f76616c54c1681553797374656d2e52756e74696d652e4e6f74696679516c756660c56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46a55527ac46203006a54c3c001147d9c7c75f16a53c3c001147d9c7c75f16a52c3c001147d9c7c75f16a55c3007da27c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a00c358c36a53c37e6a56527ac46a56c36a00c351c3681253797374656d2e53746f726167652e4765746a57527ac46a57c36a55c37da27c75f16a00c359c36a53c37e6a52c37e6a58527ac46a58c36a00c351c3681253797374656d2e53746f726167652e4765746a59527ac46a00c358c36a54c37e6a5a527ac46a59c36a55c37da27c75f16a55c36a59c37d9c7c756448006a58c36a00c351c3681553797374656d2e53746f726167652e44656c6574656a57c36a55c3946a56c36a00c351c3681253797374656d2e53746f726167652e5075746249006a59c36a55c3946a58c36a00c351c3681253797374656d2e53746f726167652e5075746a57c36a55c3946a56c36a00c351c3681253797374656d2e53746f726167652e5075746a5ac36a00c351c3681253797374656d2e53746f726167652e4765746a5b527ac46a5bc36a55c3936a5ac36a00c351c3681253797374656d2e53746f726167652e5075746a55c36a54c36a53c3087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c359c36a52c37e6a53c37e6a54527ac46a54c36a00c351c3681253797374656d2e53746f726167652e4765746c756655c56b6a00527ac46a51527ac46203006a00c35bc36a00c351c3681253797374656d2e53746f726167652e4765746c7566 \ No newline at end of file diff --git a/chains/ont/avm/lock_proxy.avm b/chains/ont/avm/lock_proxy.avm index cf306f8..a40d7e9 100644 --- a/chains/ont/avm/lock_proxy.avm +++ b/chains/ont/avm/lock_proxy.avm @@ -1 +1 @@ -5dc56b1400000000000000000000000000000000000000006a00527ac41400000000000000000000000000000000000000016a51527ac41400000000000000000000000000000000000000026a52527ac41400000000000000000000000000000000000000096a53527ac4682d53797374656d2e457865637574696f6e456e67696e652e476574457865637574696e67536372697074486173686a54527ac40950726f7879486173686a55527ac40541737365746a56527ac40d46726f6d41737365744c6973746a57527ac42241647a5a32564b7566644a57654238743961386269586f4862624d65326b5a65794868204f6e746f6c6f67792e52756e74696d652e426173653538546f416464726573736a58527ac4682d53797374656d2e457865637574696f6e456e67696e652e476574457865637574696e67536372697074486173686a59527ac46c0128c56b6a00527ac46a51527ac46a52527ac46a51c30d62696e6450726f7879486173687d9c7c756439006a52c3c0527d9c7c75f16a52c300c36a53527ac46a52c351c36a54527ac46a54c36a53c3526a00c3061707000000006e6c75666203006a51c30d62696e644173736574486173687d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a56527ac46a52c351c36a53527ac46a52c352c36a57527ac46a57c36a53c36a56c3536a00c306c207000000006e6c75666203006a51c30c67657450726f7879486173687d9c7c75642c006a52c3c0517d9c7c75f16a52c300c36a53527ac46a53c3516a00c306a008000000006e6c75666203006a51c30c6765744173736574486173687d9c7c756439006a52c3c0527d9c7c75f16a52c300c36a56527ac46a52c351c36a53527ac46a53c36a56c3526a00c306f008000000006e6c75666203006a51c3046c6f636b7d9c7c756460006a52c3c0557d9c7c75f16a52c300c36a56527ac46a52c351c36a58527ac46a52c352c36a53527ac46a52c353c36a59527ac46a52c354c36a5a527ac46a5ac36a59c36a53c36a58c36a56c3556a00c3064909000000006e6c75666203006a51c306756e6c6f636b7d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a5b527ac46a52c351c36a5c527ac46a52c352c36a5d527ac46a5dc36a5cc36a5bc3536a00c306b70a000000006e6c75666203006a51c30d67657442616c616e6365466f727d9c7c75641a006a52c300c3516a00c306ae0b000000006e6c75666203006a51c307757067726164657d9c7c756482006a52c3c0577d9c7c75f16a52c300c36a5e527ac46a52c351c36a5f527ac46a52c352c36a60527ac46a52c353c36a0111527ac46a52c354c36a0112527ac46a52c355c36a0113527ac46a52c356c36a0114527ac46a0114c36a0113c36a0112c36a0111c36a60c36a5fc36a5ec3576a00c306f312000000006e6c75666203006a51c310746573745f646573657269616c697a657d9c7c75641a006a52c300c3516a00c306ad06000000006e6c75666203006a51c30e746573745f73657269616c697a657d9c7c756424006a52c352c36a52c351c36a52c300c3536a00c306d406000000006e6c7566620300516c75660111c56b6a00527ac46a51527ac46a51c300947600a0640c00c16a52527ac4620e007562030000c56a52527ac46a52c3c0517d9c7c75641c00006a53527ac46a52c300c36a54527ac4516a55527ac4625c006a52c3c0527d9c7c756421006a52c300c36a53527ac46a52c351c36a54527ac4516a55527ac4616232006a52c3c0537d9c7c756424006a52c300c36a53527ac46a52c351c36a54527ac46a52c352c36a55527ac462050000f100c176c96a56527ac46a53c36a57527ac46a57c36a54c37d9f7c756419006a56c36a57c3c86a57c36a55c3936a57527ac462e0ff6a56c36c75665fc56b6a00527ac46a51527ac46a52527ac46203006a52c3c06a53527ac4006a54527ac4006a55527ac46a53c300526a00c3068404000000006e76c96a57527ac46a57c3c06a58527ac46a55c36a58c39f6442006a57c36a55c3c36a59527ac46a55c351936a55527ac46a52c36a59c351936a59c37b6b766b946c6c52727f6a5a527ac46a54c36a5ac37e6a54527ac462baff6a54c36c75665ec56b6a00527ac46a51527ac46a52527ac4620300006a53527ac46a52c3c0007da07c75f16a52c3a96a54527ac4006a55527ac4011500526a00c3068404000000006e76c96a57527ac46a57c3c06a58527ac46a55c36a58c39f644b006a57c36a55c3c36a59527ac46a55c351936a55527ac46a59c3517d9f7c756409006227006203006a53c36a54c36a59c36a59c351947b6b766b946c6c52727f7e6a53527ac462b1ff6a53c36c756656c56b6a00527ac46a51527ac46a52527ac46203006a52c3516a00c306c90c000000006e6c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a52c36a53c36a54c353c176c9516a00c306450c000000006e6a56527ac46a56c36c756658c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c358c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a53c36a00c355c36a52c37e681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e5075740d62696e6450726f7879486173686a52c36a53c353c176c9681553797374656d2e52756e74696d652e4e6f74696679516c75665bc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a00c358c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a52c3516a00c3066711000000006ef16a54c36a00c356c36a52c36a53c37e7e681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e5075746a52c3516a00c306ae0b000000006e6a56527ac40d62696e644173736574486173686a52c36a53c36a54c36a56c355c176c9681553797374656d2e52756e74696d652e4e6f74696679516c756657c56b6a00527ac46a51527ac46a52527ac46203006a00c355c36a52c37e681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e4765746c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c356c36a52c36a53c37e7e681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e4765746c75665fc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46a55527ac46a56527ac46203006a56c3007da27c75f16a53c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a55c3c0007d9e7c75f16a56c36a53c36a52c3536a00c306d20d000000006ef16a54c36a52c3526a00c306f008000000006e6a58527ac46a58c3c0007d9e7c75f16a58c36a55c36a56c353c176c96a59527ac46a59c3516a00c306450c000000006e6a5a527ac46a54c3516a00c306a008000000006e6a5b527ac46a5bc3c0007d9e7c75f16a5ac306756e6c6f636b6a5bc36a54c354c66b6a00527ac46a51527ac46a52527ac46a53527ac46c6a5c527ac46a5cc31263726561746543726f7373436861696e54786a00c353c30068164f6e746f6c6f67792e4e61746976652e496e766f6b65f16a56c36a55c36a58c36a54c36a53c36a52c3046c6f636b57c1681553797374656d2e52756e74696d652e4e6f74696679516c75665cc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a00c353c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a52c3516a00c306c90c000000006e6a56527ac46a56c300c36a57527ac46a56c351c36a58527ac46a56c352c36a59527ac46a53c36a54c3516a00c306a008000000006e7d9c7c75f16a59c3007da27c75f16a57c3516a00c306bd15000000006ef16a58c3516a00c306bd15000000006ef16a59c36a58c36a57c3536a00c3065b0d000000006ef16a59c36a58c36a57c306756e6c6f636b54c1681553797374656d2e52756e74696d652e4e6f74696679516c756657c56b6a00527ac46a51527ac46a52527ac46203006a52c36a00c352c37d9c7c7576631000756a52c36a00c351c37d9c7c756434006a00c359c30962616c616e63654f666a52c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656c75666231006a00c359c351c176c90962616c616e63654f666a52c36700000000000000000000000000000000000000006c75666c75665dc56b6a00527ac46a51527ac46a52527ac4620300006a53527ac46a52c300c36a54527ac46a52c351c36a55527ac46a52c352c36a56527ac46a53c36a54c3526a00c306a118000000006e6a53527ac46a53c36a55c3526a00c306a118000000006e6a53527ac46a53c36a56c3526a00c3064117000000006e6a53527ac46a53c36c75665dc56b6a00527ac46a51527ac46a52527ac4620300006a53527ac46a53c36a52c3526a00c3066d1d000000006e6a55527ac46a55c300c36a56527ac46a55c351c36a52c3526a00c3066d1d000000006e6a55527ac46a55c300c36a57527ac46a55c351c36a52c3526a00c306971b000000006e6a55527ac46a55c300c36a58527ac46a56c36a57c36a58c353c176c96c756658c56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a52c36a00c352c37d9c7c7576631000756a52c36a00c351c37d9c7c756421006a54c36a53c36a00c359c36a52c3546a00c306490e000000006ef16219006a54c36a53c36a52c3536a00c306680f000000006ef1516c756658c56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a52c36a00c352c37d9c7c7576631000756a52c36a00c351c37d9c7c756421006a54c36a00c359c36a53c36a52c3546a00c306490e000000006ef16219006a54c36a53c36a52c3536a00c306e10e000000006ef1516c75665cc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46a55527ac46203006a55c36a54c36a53c353c66b6a00527ac46a51527ac46a52527ac46c6a56527ac46a56c351c176c9087472616e736665726a52c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656a57527ac46a57c376640d00756a57c301017d9c7c75640a00516c7566620700006c75666c75665bc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a00c359c36a53c36a00c359c36a54c354c176c96a55527ac46a55c30c7472616e7366657246726f6d6a52c36700000000000000000000000000000000000000006a56527ac46a56c376640d00756a56c301017d9c7c75640a00516c7566620700006c75666c75665bc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a00c359c36a53c36a54c353c176c96a55527ac46a55c3087472616e736665726a52c36700000000000000000000000000000000000000006a56527ac46a56c376640d00756a56c301017d9c7c75640a00516c7566620700006c75666c756656c56b6a00527ac46a51527ac46203006a00c354c351c66b6a00527ac46c0962616c616e63654f666a00c351c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656c756656c56b6a00527ac46a51527ac46203006a00c354c351c66b6a00527ac46c0962616c616e63654f666a00c352c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656c756656c56b6a00527ac46a51527ac46203006a00c354c36a00c351c352c66b6a00527ac46a51527ac46c09616c6c6f77616e63656a00c352c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656c756659c56b6a00527ac46a51527ac4620300006a00c3067810000000006e6a53527ac46a53c3007da07c75646f00006a00c3067810000000006e6a00c354c36a00c351c36a00c354c354c66b6a00527ac46a51527ac46a52527ac46a53527ac46c6a54527ac46a54c30c7472616e7366657246726f6d6a00c352c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656c7566620300516c75665dc56b6a00527ac46a51527ac46a52527ac46203006a00c357c3681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e4765746a53527ac400c176c96a54527ac46a53c3c0007d9c7c756412006a52c351c176c96a54527ac46227006a53c3681a53797374656d2e52756e74696d652e446573657269616c697a656a54527ac46a54c36a52c3526a00c3068712000000006e916473006a54c3c00200047da27c75640a00006c75666203006a54c36a52c3c86a54c3681853797374656d2e52756e74696d652e53657269616c697a656a00c357c3681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e507574620300516c75665cc56b6a00527ac46a51527ac46a52527ac46a53527ac4620300006a54527ac46a53c36a55527ac46a55c3c06a56527ac46a54c36a56c39f6430006a55c36a54c3c36a57527ac46a54c351936a54527ac46a52c36a57c37d9c7c75640a00516c756662030062ccff006c7566011dc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46a55527ac46a56527ac46a57527ac46a58527ac46203006a00c358c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a52c3516a00c3060206000000006e6a5a527ac46a5ac3516a00c3066905000000006e6a5b527ac4006a00c306e60f000000006e6a5c527ac46a5cc3007da07c756458006a5cc36a5bc36a00c354c353c66b6a00527ac46a51527ac46a52527ac46c51c176c9087472616e736665726a00c351c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656a5d527ac46a5dc3f1620300006a00c306cb10000000006ef1006a00c3062f10000000006e6a5e527ac46a5ec3007da07c756458006a5ec36a5bc36a00c354c353c66b6a00527ac46a51527ac46a52527ac46c51c176c9087472616e736665726a00c352c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656a5d527ac46a5dc3f16203006a00c357c3681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e4765746a5f527ac46a5fc3c0007da07c7564ab006a5fc3681a53797374656d2e52756e74696d652e446573657269616c697a656a60527ac4006a0111527ac46a60c36a0112527ac46a0112c3c06a0113527ac46a0111c36a0113c39f645d006a0112c36a0111c3c36a0114527ac46a0111c351936a0111527ac46a0114c3516a00c306ae0b000000006e6a0115527ac46a0115c3007da07c75641d006a5bc36a5bc36a0114c3536a00c3065b0d000000006ef1620300629dff6203006a58c36a57c36a56c36a55c36a54c36a53c36a52c368194f6e746f6c6f67792e436f6e74726163742e4d6967726174656a5d527ac46a5dc3f1167570677261646520736d61727420636f6e747261637451c176c9681553797374656d2e52756e74696d652e4e6f74696679516c756656c56b6a00527ac46a51527ac46a52527ac46203006a52c3c001147d9c7c7576641000756a52c36a00c300c37d9e7c75f1516c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c3007da27c7576640e00756a52c302ff007da17c75f16a53c3516a52c3526a00c306f018000000006e7e6a53527ac46a53c36c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c3007da27c7576640f00756a52c303ffff007da17c75f16a53c3526a52c3526a00c306f018000000006e7e6a53527ac46a53c36c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c3007da27c7576641100756a52c305ffffffff007da17c75f16a53c3546a52c3526a00c306f018000000006e7e6a53527ac46a53c36c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c3007da27c7576641500756a52c309ffffffffffffffff007da17c75f16a53c3586a52c3526a00c306f018000000006e7e6a53527ac46a53c36c756658c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c3007da27c7576642c00756a52c320ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f7da17c75f16a53c301206a52c3526a00c306f018000000006e526a00c3067d18000000006e6c75665dc56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c302fd007d9f7c75641b006a53c36a52c3526a00c306f215000000006e6c7566628a006a52c303ffff007da17c756427006a53c302fd007e6a53527ac46a53c36a52c3526a00c3064316000000006e6c75666258006a52c305ffffffff007da17c756427006a53c302fe007e6a53527ac46a53c36a52c3526a00c3069516000000006e6c75666224006a53c302ff007e6a53527ac46a53c36a52c3526a00c306e916000000006e6c75666c756657c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c36a52c37e6c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c3c06a54527ac46a53c36a54c3526a00c306b417000000006e6a53527ac46a53c36a52c3526a00c3067d18000000006e6c75665ec56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c3c06a54527ac46a54c36a53c37d9f7c75645b00006a55527ac46a53c36a54c394516a00c3068404000000006e6a57527ac46a57c3c06a58527ac46a55c36a58c39f6427006a57c36a55c3c36a59527ac46a55c351936a55527ac46a52c301007e6a52527ac462d5ff6203006a54c36a53c37da07c75641c006a52c36a53c3007b6b766b946c6c52727f6a52527ac46203006a52c36c756658c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c351936a52c3c07da07c756411000000519452c176c96c75666203006a52c36a53c351936a53c37b6b766b946c6c52727f6a53c3519352c176c96c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c352936a52c3c07da07c756411000000519452c176c96c75666203006a52c36a53c352936a53c37b6b766b946c6c52727f516a00c306ba1d000000006e6a55527ac46a55c3007da27c7576640f00756a55c303ffff007da17c75f16a55c36a53c3529352c176c96c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c354936a52c3c07da07c756411000000519452c176c96c75666203006a52c36a53c354936a53c37b6b766b946c6c52727f516a00c306ba1d000000006e6a55527ac46a55c3007da27c7576641100756a55c305ffffffff007da17c75f16a55c36a53c3549352c176c96c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c358936a52c3c07da07c756411000000519452c176c96c75666203006a52c36a53c358936a53c37b6b766b946c6c52727f516a00c306ba1d000000006e6a55527ac46a55c3007da27c7576641500756a55c309ffffffffffffffff007da17c75f16a55c36a53c3589352c176c96c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c30120936a52c3c07da07c756411000000519452c176c96c75666203006a52c36a53c30120936a53c37b6b766b946c6c52727f516a00c306ba1d000000006e6a55527ac46a55c3007da27c7576642c00756a55c320ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f7da17c75f16a55c36a53c301209352c176c96c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a53c36a54c3936a52c3c07da07c756411000000519452c176c96c75666203006a52c36a53c36a54c3936a53c37b6b766b946c6c52727f6a53c36a54c39352c176c96c75665dc56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c36a52c3526a00c306a419000000006e6a55527ac46a55c300c36a56527ac46a55c351c36a53527ac46a55c351c3007da07c75f16a56c301fd7d9c7c75641b006a53c36a52c3526a00c306fd19000000006e6c75666258006a56c301fe7d9c7c75641b006a53c36a52c3526a00c306831a000000006e6c75666234006a56c301ff7d9c7c75641b006a53c36a52c3526a00c3060b1b000000006e6c75666210006a56c36a53c352c176c96c75666c756658c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c36a52c3526a00c306a11c000000006e6a55527ac46a55c300c36a55c351c36a52c3536a00c3063d1c000000006e6c756659c56b6a00527ac46a51527ac46a52527ac46203006a52c3516a00c306301e000000006e6a54527ac46a54c3007da27c75f16a54c36a52c3c07da07c756422006a52c301007e6a52527ac46a52c3c001207da17c75f16a52c36c75666217006a52c36a54c3007b6b766b946c6c52727f6c75666c75665fc56b6a00527ac46a51527ac46a52527ac46203006a52c3c06a53527ac4006a54527ac46a53c3516a00c3068404000000006e6a56527ac46a56c3c06a57527ac46a54c36a57c39f647e006a56c36a54c3c36a58527ac46a54c351936a54527ac46a52c36a53c36a58c3946a53c36a58c39451947b6b766b946c6c52727f6a59527ac46a59c301007d9e7c756437006a59c301007e6a59527ac46a59c30280007da27c756412006a53c351936a58c3946c7566620d006a53c36a58c3946c7566620300627eff0051946c756603 \ No newline at end of file +5fc56b05322e302e306a00527ac41400000000000000000000000000000000000000006a51527ac41400000000000000000000000000000000000000016a52527ac41400000000000000000000000000000000000000026a53527ac41400000000000000000000000000000000000000096a54527ac4682d53797374656d2e457865637574696f6e456e67696e652e476574457865637574696e67536372697074486173686a55527ac40950726f7879486173686a56527ac40541737365746a57527ac4084f70657261746f726a58527ac40d46726f6d41737365744c6973746a59527ac42241647a5a32564b7566644a57654238743961386269586f4862624d65326b5a65794868204f6e746f6c6f67792e52756e74696d652e426173653538546f416464726573736a5a527ac4682d53797374656d2e457865637574696f6e456e67696e652e476574457865637574696e67536372697074486173686a5b527ac46c0129c56b6a00527ac46a51527ac46a52527ac46a51c304696e69747d9c7c75641500006a00c306c106000000006e6c75666203006a51c30d62696e6450726f7879486173687d9c7c756439006a52c3c0527d9c7c75f16a52c300c36a54527ac46a52c351c36a55527ac46a55c36a54c3526a00c3064907000000006e6c75666203006a51c30d62696e644173736574486173687d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a56527ac46a52c351c36a54527ac46a52c352c36a57527ac46a57c36a54c36a56c3536a00c3062308000000006e6c75666203006a51c3107472616e736665724f70657261746f727d9c7c75642c006a52c3c0517d9c7c75f16a52c300c36a58527ac46a58c3516a00c3063009000000006e6c75666203006a51c30c67657450726f7879486173687d9c7c75642c006a52c3c0517d9c7c75f16a52c300c36a54527ac46a54c3516a00c306d209000000006e6c75666203006a51c30c6765744173736574486173687d9c7c756439006a52c3c0527d9c7c75f16a52c300c36a56527ac46a52c351c36a54527ac46a54c36a56c3526a00c306220a000000006e6c75666203006a51c3046c6f636b7d9c7c756460006a52c3c0557d9c7c75f16a52c300c36a56527ac46a52c351c36a59527ac46a52c352c36a54527ac46a52c353c36a5a527ac46a52c354c36a5b527ac46a5bc36a5ac36a54c36a59c36a56c3556a00c3067b0a000000006e6c75666203006a51c306756e6c6f636b7d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a5c527ac46a52c351c36a5d527ac46a52c352c36a5e527ac46a5ec36a5dc36a5cc3536a00c306e90b000000006e6c75666203006a51c30d67657442616c616e6365466f727d9c7c75641a006a52c300c3516a00c306e00c000000006e6c75666203006a51c307757067726164657d9c7c756484006a52c3c0577d9c7c75f16a52c300c36a5f527ac46a52c351c36a60527ac46a52c352c36a0111527ac46a52c353c36a0112527ac46a52c354c36a0113527ac46a52c355c36a0114527ac46a52c356c36a0115527ac46a0115c36a0114c36a0113c36a0112c36a0111c36a60c36a5fc3576a00c3062514000000006e6c7566620300516c75660111c56b6a00527ac46a51527ac46a51c300947600a0640c00c16a52527ac4620e007562030000c56a52527ac46a52c3c0517d9c7c75641c00006a53527ac46a52c300c36a54527ac4516a55527ac4625c006a52c3c0527d9c7c756421006a52c300c36a53527ac46a52c351c36a54527ac4516a55527ac4616232006a52c3c0537d9c7c756424006a52c300c36a53527ac46a52c351c36a54527ac46a52c352c36a55527ac462050000f100c176c96a56527ac46a53c36a57527ac46a57c36a54c37d9f7c756419006a56c36a57c3c86a57c36a55c3936a57527ac462e0ff6a56c36c75665fc56b6a00527ac46a51527ac46a52527ac46203006a52c3c06a53527ac4006a54527ac4006a55527ac46a53c300526a00c3069804000000006e76c96a57527ac46a57c3c06a58527ac46a55c36a58c39f6442006a57c36a55c3c36a59527ac46a55c351936a55527ac46a52c36a59c351936a59c37b6b766b946c6c52727f6a5a527ac46a54c36a5ac37e6a54527ac462baff6a54c36c75665ec56b6a00527ac46a51527ac46a52527ac4620300006a53527ac46a52c3c0007da07c75f16a52c3a96a54527ac4006a55527ac4011500526a00c3069804000000006e76c96a57527ac46a57c3c06a58527ac46a55c36a58c39f644b006a57c36a55c3c36a59527ac46a55c351936a55527ac46a59c3517d9f7c756409006227006203006a53c36a54c36a59c36a59c351947b6b766b946c6c52727f7e6a53527ac462b1ff6a53c36c756658c56b6a00527ac46a51527ac46203006a00c358c3681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e476574c0007d9c7c75f16a00c35ac36a00c358c3681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e507574516c75665ac56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c358c3681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e476574681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a53c36a00c356c36a52c37e681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e5075740d62696e6450726f7879486173686a52c36a53c353c176c9681553797374656d2e52756e74696d652e4e6f74696679516c75665dc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a00c358c3681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e476574681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a52c3516a00c3069912000000006ef16a54c36a00c357c36a52c36a53c37e7e681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e5075746a52c3516a00c306e00c000000006e6a56527ac40d62696e644173736574486173686a52c36a53c36a54c36a56c355c176c9681553797374656d2e52756e74696d652e4e6f74696679516c756659c56b6a00527ac46a51527ac46a52527ac46203006a00c358c3681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e476574681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a52c36a00c358c3681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e507574516c756657c56b6a00527ac46a51527ac46a52527ac46203006a00c356c36a52c37e681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e4765746c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c357c36a52c36a53c37e7e681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e4765746c75665fc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46a55527ac46a56527ac46203006a56c3007da27c75f16a53c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a55c3c0007d9e7c75f16a56c36a53c36a52c3536a00c306040f000000006ef16a54c36a52c3526a00c306220a000000006e6a58527ac46a58c3c0007d9e7c75f16a58c36a55c36a56c353c176c96a59527ac46a59c3516a00c306770d000000006e6a5a527ac46a54c3516a00c306d209000000006e6a5b527ac46a5bc3c0007d9e7c75f16a5ac306756e6c6f636b6a5bc36a54c354c66b6a00527ac46a51527ac46a52527ac46a53527ac46c6a5c527ac46a5cc31263726561746543726f7373436861696e54786a00c354c30068164f6e746f6c6f67792e4e61746976652e496e766f6b65f16a56c36a55c36a58c36a54c36a53c36a52c3046c6f636b57c1681553797374656d2e52756e74696d652e4e6f74696679516c75665cc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a00c354c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a52c3516a00c306fb0d000000006e6a56527ac46a56c300c36a57527ac46a56c351c36a58527ac46a56c352c36a59527ac46a53c36a54c3516a00c306d209000000006e7d9c7c75f16a59c3007da27c75f16a57c3516a00c3061e17000000006ef16a58c3516a00c3061e17000000006ef16a59c36a58c36a57c3536a00c3068d0e000000006ef16a59c36a58c36a57c306756e6c6f636b54c1681553797374656d2e52756e74696d652e4e6f74696679516c756657c56b6a00527ac46a51527ac46a52527ac46203006a52c36a00c353c37d9c7c7576631000756a52c36a00c352c37d9c7c756434006a00c35bc30962616c616e63654f666a52c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656c75666231006a00c35bc351c176c90962616c616e63654f666a52c36700000000000000000000000000000000000000006c75666c75665dc56b6a00527ac46a51527ac46a52527ac4620300006a53527ac46a52c300c36a54527ac46a52c351c36a55527ac46a52c352c36a56527ac46a53c36a54c3526a00c306021a000000006e6a53527ac46a53c36a55c3526a00c306021a000000006e6a53527ac46a53c36a56c3526a00c306a218000000006e6a53527ac46a53c36c75665dc56b6a00527ac46a51527ac46a52527ac4620300006a53527ac46a53c36a52c3526a00c306ce1e000000006e6a55527ac46a55c300c36a56527ac46a55c351c36a52c3526a00c306ce1e000000006e6a55527ac46a55c300c36a57527ac46a55c351c36a52c3526a00c306f81c000000006e6a55527ac46a55c300c36a58527ac46a56c36a57c36a58c353c176c96c756658c56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a52c36a00c353c37d9c7c7576631000756a52c36a00c352c37d9c7c756421006a54c36a53c36a00c35bc36a52c3546a00c3067b0f000000006ef16219006a54c36a53c36a52c3536a00c3069a10000000006ef1516c756658c56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a52c36a00c353c37d9c7c7576631000756a52c36a00c352c37d9c7c756421006a54c36a00c35bc36a53c36a52c3546a00c3067b0f000000006ef16219006a54c36a53c36a52c3536a00c3061310000000006ef1516c75665cc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46a55527ac46203006a55c36a54c36a53c353c66b6a00527ac46a51527ac46a52527ac46c6a56527ac46a56c351c176c9087472616e736665726a52c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656a57527ac46a57c376640d00756a57c301017d9c7c75640a00516c7566620700006c75666c75665bc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a00c35bc36a53c36a00c35bc36a54c354c176c96a55527ac46a55c30c7472616e7366657246726f6d6a52c36700000000000000000000000000000000000000006a56527ac46a56c376640d00756a56c301017d9c7c75640a00516c7566620700006c75666c75665bc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a00c35bc36a53c36a54c353c176c96a55527ac46a55c3087472616e736665726a52c36700000000000000000000000000000000000000006a56527ac46a56c376640d00756a56c301017d9c7c75640a00516c7566620700006c75666c756656c56b6a00527ac46a51527ac46203006a00c355c351c66b6a00527ac46c0962616c616e63654f666a00c352c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656c756656c56b6a00527ac46a51527ac46203006a00c355c351c66b6a00527ac46c0962616c616e63654f666a00c353c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656c756656c56b6a00527ac46a51527ac46203006a00c355c36a00c352c352c66b6a00527ac46a51527ac46c09616c6c6f77616e63656a00c353c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656c756659c56b6a00527ac46a51527ac4620300006a00c306aa11000000006e6a53527ac46a53c3007da07c75646f00006a00c306aa11000000006e6a00c355c36a00c352c36a00c355c354c66b6a00527ac46a51527ac46a52527ac46a53527ac46c6a54527ac46a54c30c7472616e7366657246726f6d6a00c353c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656c7566620300516c75665dc56b6a00527ac46a51527ac46a52527ac46203006a00c359c3681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e4765746a53527ac400c176c96a54527ac46a53c3c0007d9c7c756412006a52c351c176c96a54527ac46227006a53c3681a53797374656d2e52756e74696d652e446573657269616c697a656a54527ac46a54c36a52c3526a00c306b913000000006e916473006a54c3c00200047da27c75640a00006c75666203006a54c36a52c3c86a54c3681853797374656d2e52756e74696d652e53657269616c697a656a00c359c3681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e507574620300516c75665cc56b6a00527ac46a51527ac46a52527ac46a53527ac4620300006a54527ac46a53c36a55527ac46a55c3c06a56527ac46a54c36a56c39f6430006a55c36a54c3c36a57527ac46a54c351936a54527ac46a52c36a57c37d9c7c75640a00516c756662030062ccff006c7566011fc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46a55527ac46a56527ac46a57527ac46a58527ac46203006a00c358c3681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e476574681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a52c3516a00c3061606000000006e6a5a527ac46a5ac3516a00c3067d05000000006e6a5b527ac4006a00c3061811000000006e6a5c527ac46a5cc3007da07c756458006a5cc36a5bc36a00c355c353c66b6a00527ac46a51527ac46a52527ac46c51c176c9087472616e736665726a00c352c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656a5d527ac46a5dc3f1620300006a00c306fd11000000006ef1006a00c3066111000000006e6a5e527ac46a5ec3007da07c756458006a5ec36a5bc36a00c355c353c66b6a00527ac46a51527ac46a52527ac46c51c176c9087472616e736665726a00c353c30068164f6e746f6c6f67792e4e61746976652e496e766f6b656a5d527ac46a5dc3f16203006a00c359c3681953797374656d2e53746f726167652e476574436f6e74657874681253797374656d2e53746f726167652e4765746a5f527ac46a5fc3c0007da07c7564ab006a5fc3681a53797374656d2e52756e74696d652e446573657269616c697a656a60527ac4006a0111527ac46a60c36a0112527ac46a0112c3c06a0113527ac46a0111c36a0113c39f645d006a0112c36a0111c3c36a0114527ac46a0111c351936a0111527ac46a0114c3516a00c306e00c000000006e6a0115527ac46a0115c3007da07c75641d006a5bc36a5bc36a0114c3536a00c3068d0e000000006ef1620300629dff6203006a58c36a57c36a56c36a55c36a54c36a53c36a52c368194f6e746f6c6f67792e436f6e74726163742e4d6967726174656a5d527ac46a5dc3f1167570677261646520736d61727420636f6e747261637451c176c9681553797374656d2e52756e74696d652e4e6f74696679516c756656c56b6a00527ac46a51527ac46a52527ac46203006a52c3c001147d9c7c7576641000756a52c36a00c351c37d9e7c75f1516c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c3007da27c7576640e00756a52c302ff007da17c75f16a53c3516a52c3526a00c306511a000000006e7e6a53527ac46a53c36c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c3007da27c7576640f00756a52c303ffff007da17c75f16a53c3526a52c3526a00c306511a000000006e7e6a53527ac46a53c36c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c3007da27c7576641100756a52c305ffffffff007da17c75f16a53c3546a52c3526a00c306511a000000006e7e6a53527ac46a53c36c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c3007da27c7576641500756a52c309ffffffffffffffff007da17c75f16a53c3586a52c3526a00c306511a000000006e7e6a53527ac46a53c36c756658c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c3007da27c7576642c00756a52c320ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f7da17c75f16a53c301206a52c3526a00c306511a000000006e526a00c306de19000000006e6c75665dc56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c302fd007d9f7c75641b006a53c36a52c3526a00c3065317000000006e6c7566628a006a52c303ffff007da17c756427006a53c302fd007e6a53527ac46a53c36a52c3526a00c306a417000000006e6c75666258006a52c305ffffffff007da17c756427006a53c302fe007e6a53527ac46a53c36a52c3526a00c306f617000000006e6c75666224006a53c302ff007e6a53527ac46a53c36a52c3526a00c3064a18000000006e6c75666c756657c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c36a52c37e6c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c3c06a54527ac46a53c36a54c3526a00c3061519000000006e6a53527ac46a53c36a52c3526a00c306de19000000006e6c75665ec56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a52c3c06a54527ac46a54c36a53c37d9f7c75645b00006a55527ac46a53c36a54c394516a00c3069804000000006e6a57527ac46a57c3c06a58527ac46a55c36a58c39f6427006a57c36a55c3c36a59527ac46a55c351936a55527ac46a52c301007e6a52527ac462d5ff6203006a54c36a53c37da07c75641c006a52c36a53c3007b6b766b946c6c52727f6a52527ac46203006a52c36c756658c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c351936a52c3c07da07c756411000000519452c176c96c75666203006a52c36a53c351936a53c37b6b766b946c6c52727f6a53c3519352c176c96c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c352936a52c3c07da07c756411000000519452c176c96c75666203006a52c36a53c352936a53c37b6b766b946c6c52727f516a00c3061b1f000000006e6a55527ac46a55c3007da27c7576640f00756a55c303ffff007da17c75f16a55c36a53c3529352c176c96c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c354936a52c3c07da07c756411000000519452c176c96c75666203006a52c36a53c354936a53c37b6b766b946c6c52727f516a00c3061b1f000000006e6a55527ac46a55c3007da27c7576641100756a55c305ffffffff007da17c75f16a55c36a53c3549352c176c96c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c358936a52c3c07da07c756411000000519452c176c96c75666203006a52c36a53c358936a53c37b6b766b946c6c52727f516a00c3061b1f000000006e6a55527ac46a55c3007da27c7576641500756a55c309ffffffffffffffff007da17c75f16a55c36a53c3589352c176c96c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c30120936a52c3c07da07c756411000000519452c176c96c75666203006a52c36a53c30120936a53c37b6b766b946c6c52727f516a00c3061b1f000000006e6a55527ac46a55c3007da27c7576642c00756a55c320ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f7da17c75f16a55c36a53c301209352c176c96c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a53c36a54c3936a52c3c07da07c756411000000519452c176c96c75666203006a52c36a53c36a54c3936a53c37b6b766b946c6c52727f6a53c36a54c39352c176c96c75665dc56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c36a52c3526a00c306051b000000006e6a55527ac46a55c300c36a56527ac46a55c351c36a53527ac46a55c351c3007da07c75f16a56c301fd7d9c7c75641b006a53c36a52c3526a00c3065e1b000000006e6c75666258006a56c301fe7d9c7c75641b006a53c36a52c3526a00c306e41b000000006e6c75666234006a56c301ff7d9c7c75641b006a53c36a52c3526a00c3066c1c000000006e6c75666210006a56c36a53c352c176c96c75666c756658c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a53c36a52c3526a00c306021e000000006e6a55527ac46a55c300c36a55c351c36a52c3536a00c3069e1d000000006e6c756659c56b6a00527ac46a51527ac46a52527ac46203006a52c3516a00c306911f000000006e6a54527ac46a54c3007da27c75f16a54c36a52c3c07da07c756422006a52c301007e6a52527ac46a52c3c001207da17c75f16a52c36c75666217006a52c36a54c3007b6b766b946c6c52727f6c75666c75665fc56b6a00527ac46a51527ac46a52527ac46203006a52c3c06a53527ac4006a54527ac46a53c3516a00c3069804000000006e6a56527ac46a56c3c06a57527ac46a54c36a57c39f647e006a56c36a54c3c36a58527ac46a54c351936a54527ac46a52c36a53c36a58c3946a53c36a58c39451947b6b766b946c6c52727f6a59527ac46a59c301007d9e7c756437006a59c301007e6a59527ac46a59c30280007da27c756412006a53c351936a58c3946c7566620d006a53c36a58c3946c7566620300627eff0051946c7566 \ No newline at end of file diff --git a/chains/ont/avm/obtc.avm b/chains/ont/avm/obtc.avm new file mode 100644 index 0000000..3862e47 --- /dev/null +++ b/chains/ont/avm/obtc.avm @@ -0,0 +1 @@ +5fc56b05322e302e306a00527ac4681953797374656d2e53746f726167652e476574436f6e746578746a51527ac4046f4254436a52527ac4046f4254436a53527ac4586a54527ac40400e1f5056a55527ac42241647a5a32564b7566644a57654238743961386269586f4862624d65326b5a65794868204f6e746f6c6f67792e52756e74696d652e426173653538546f416464726573736a56527ac41400000000000000000000000000000000000000096a57527ac401016a58527ac401026a59527ac40b546f74616c537570706c796a5a527ac40550726f78796a5b527ac46c0120c56b6a00527ac46a51527ac46a52527ac46a51c30f64656c6567617465546f50726f78797d9c7c75641f006a52c351c36a52c300c3526a00c306ae03000000006e6c75666203006a51c3046e616d657d9c7c75641500006a00c306db04000000006e6c75666203006a51c30673796d626f6c7d9c7c75641500006a00c306f304000000006e6c75666203006a51c308646563696d616c737d9c7c75641500006a00c3060b05000000006e6c75666203006a51c30b746f74616c537570706c797d9c7c75641500006a00c3062305000000006e6c75666203006a51c30962616c616e63654f667d9c7c75642c006a52c3c0517d9c7c75f16a52c300c36a54527ac46a54c3516a00c3065405000000006e6c75666203006a51c3087472616e736665727d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a55527ac46a52c351c36a56527ac46a52c352c36a57527ac46a57c36a56c36a55c3536a00c3069905000000006e6c75666203006a51c30d7472616e736665724d756c74697d9c7c756418006a52c3516a00c3060507000000006e6c75666203006a51c30c7472616e7366657246726f6d7d9c7c756453006a52c3c0547d9c7c75f16a52c300c36a58527ac46a52c351c36a55527ac46a52c352c36a56527ac46a52c353c36a57527ac46a57c36a56c36a55c36a58c3546a00c3065408000000006e6c75666203006a51c307617070726f76657d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a59527ac46a52c351c36a58527ac46a52c352c36a57527ac46a57c36a58c36a59c3536a00c3067e07000000006e6c75666203006a51c309616c6c6f77616e63657d9c7c756439006a52c3c0527d9c7c75f16a52c300c36a59527ac46a52c351c36a58527ac46a58c36a59c3526a00c306540a000000006e6c75666203006a51c30c67657450726f7879486173687d9c7c75641500006a00c3069f0a000000006e6c7566620300006c75665ac56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c356c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f1006a00c3069f0a000000006e6a55527ac46a55c3916427006a52c36a00c35bc36a00c351c3681253797374656d2e53746f726167652e507574620e006a52c36a55c37d9c7c75f16a52c3516a00c3065405000000006e6a53c3936a00c358c36a52c37e6a00c351c3681253797374656d2e53746f726167652e507574006a00c3062305000000006e6a53c3936a00c35ac36a00c351c3681253797374656d2e53746f726167652e507574006a00c3062305000000006e070040075af075077da17c75f16a53c36a52c300087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c756655c56b6a00527ac46a51527ac46203006a00c352c36c756655c56b6a00527ac46a51527ac46203006a00c353c36c756655c56b6a00527ac46a51527ac46203006a00c354c36c756655c56b6a00527ac46a51527ac46203006a00c35ac36a00c351c3681253797374656d2e53746f726167652e4765746c756657c56b6a00527ac46a51527ac46a52527ac46203006a52c3c001147d9c7c75f16a00c358c36a52c37e6a00c351c3681253797374656d2e53746f726167652e4765746c75665cc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a53c3c001147d9c7c75f16a52c3c001147d9c7c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a54c3007da07c75f16a00c358c36a52c37e6a55527ac46a55c36a00c351c3681253797374656d2e53746f726167652e4765746a56527ac46a56c36a54c37da27c75f16a54c36a56c37d9c7c756425006a55c36a00c351c3681553797374656d2e53746f726167652e44656c6574656226006a56c36a54c3946a55c36a00c351c3681253797374656d2e53746f726167652e5075746a00c358c36a53c37e6a57527ac46a57c36a00c351c3681253797374656d2e53746f726167652e4765746a58527ac46a58c36a54c3936a57c36a00c351c3681253797374656d2e53746f726167652e5075746a54c36a53c36a52c3087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c75665ac56b6a00527ac46a51527ac46a52527ac4620300006a53527ac46a52c36a54527ac46a54c3c06a55527ac46a53c36a55c39f6442006a54c36a53c3c36a56527ac46a53c351936a53527ac46a56c3c0537d9c7c75f16a56c352c36a56c351c36a56c300c3536a00c3069905000000006ef162baff516c75665ac56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a52c3c001147d9c7c75f16a53c3c001147d9c7c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a54c3007da27c75f16a54c36a52c3516a00c3065405000000006e7da17c75f16a00c359c36a52c37e6a53c37e6a56527ac46a54c36a56c36a00c351c3681253797374656d2e53746f726167652e5075746a54c36a53c36a52c308617070726f76616c54c1681553797374656d2e52756e74696d652e4e6f74696679516c756660c56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46a55527ac46203006a54c3c001147d9c7c75f16a53c3c001147d9c7c75f16a52c3c001147d9c7c75f16a55c3007da27c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a00c358c36a53c37e6a56527ac46a56c36a00c351c3681253797374656d2e53746f726167652e4765746a57527ac46a57c36a55c37da27c75f16a00c359c36a53c37e6a52c37e6a58527ac46a58c36a00c351c3681253797374656d2e53746f726167652e4765746a59527ac46a00c358c36a54c37e6a5a527ac46a59c36a55c37da27c75f16a55c36a59c37d9c7c756448006a58c36a00c351c3681553797374656d2e53746f726167652e44656c6574656a57c36a55c3946a56c36a00c351c3681253797374656d2e53746f726167652e5075746249006a59c36a55c3946a58c36a00c351c3681253797374656d2e53746f726167652e5075746a57c36a55c3946a56c36a00c351c3681253797374656d2e53746f726167652e5075746a5ac36a00c351c3681253797374656d2e53746f726167652e4765746a5b527ac46a5bc36a55c3936a5ac36a00c351c3681253797374656d2e53746f726167652e5075746a55c36a54c36a53c3087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c359c36a52c37e6a53c37e6a54527ac46a54c36a00c351c3681253797374656d2e53746f726167652e4765746c756655c56b6a00527ac46a51527ac46203006a00c35bc36a00c351c3681253797374656d2e53746f726167652e4765746c7566 \ No newline at end of file diff --git a/chains/ont/avm/odai.avm b/chains/ont/avm/odai.avm new file mode 100644 index 0000000..bf1d10e --- /dev/null +++ b/chains/ont/avm/odai.avm @@ -0,0 +1 @@ +5fc56b05322e302e306a00527ac4681953797374656d2e53746f726167652e476574436f6e746578746a51527ac4046f4461696a52527ac4046f4461696a53527ac401126a54527ac408000064a7b3b6e00d6a55527ac42241647a5a32564b7566644a57654238743961386269586f4862624d65326b5a65794868204f6e746f6c6f67792e52756e74696d652e426173653538546f416464726573736a56527ac41400000000000000000000000000000000000000096a57527ac401016a58527ac401026a59527ac40b546f74616c537570706c796a5a527ac40550726f78796a5b527ac46c0120c56b6a00527ac46a51527ac46a52527ac46a51c30f64656c6567617465546f50726f78797d9c7c75641f006a52c351c36a52c300c3526a00c306b303000000006e6c75666203006a51c3046e616d657d9c7c75641500006a00c306c704000000006e6c75666203006a51c30673796d626f6c7d9c7c75641500006a00c306df04000000006e6c75666203006a51c308646563696d616c737d9c7c75641500006a00c306f704000000006e6c75666203006a51c30b746f74616c537570706c797d9c7c75641500006a00c3060f05000000006e6c75666203006a51c30962616c616e63654f667d9c7c75642c006a52c3c0517d9c7c75f16a52c300c36a54527ac46a54c3516a00c3064005000000006e6c75666203006a51c3087472616e736665727d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a55527ac46a52c351c36a56527ac46a52c352c36a57527ac46a57c36a56c36a55c3536a00c3068505000000006e6c75666203006a51c30d7472616e736665724d756c74697d9c7c756418006a52c3516a00c306f106000000006e6c75666203006a51c30c7472616e7366657246726f6d7d9c7c756453006a52c3c0547d9c7c75f16a52c300c36a58527ac46a52c351c36a55527ac46a52c352c36a56527ac46a52c353c36a57527ac46a57c36a56c36a55c36a58c3546a00c3064008000000006e6c75666203006a51c307617070726f76657d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a59527ac46a52c351c36a58527ac46a52c352c36a57527ac46a57c36a58c36a59c3536a00c3066a07000000006e6c75666203006a51c309616c6c6f77616e63657d9c7c756439006a52c3c0527d9c7c75f16a52c300c36a59527ac46a52c351c36a58527ac46a58c36a59c3526a00c306400a000000006e6c75666203006a51c30c67657450726f7879486173687d9c7c75641500006a00c3068b0a000000006e6c7566620300006c75665ac56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c356c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f1006a00c3068b0a000000006e6a55527ac46a55c3916427006a52c36a00c35bc36a00c351c3681253797374656d2e53746f726167652e507574620e006a52c36a55c37d9c7c75f16a52c3516a00c3064005000000006e6a53c3936a00c358c36a52c37e6a00c351c3681253797374656d2e53746f726167652e507574006a00c3060f05000000006e6a53c3936a00c35ac36a00c351c3681253797374656d2e53746f726167652e5075746a53c36a52c300087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c756655c56b6a00527ac46a51527ac46203006a00c352c36c756655c56b6a00527ac46a51527ac46203006a00c353c36c756655c56b6a00527ac46a51527ac46203006a00c354c36c756655c56b6a00527ac46a51527ac46203006a00c35ac36a00c351c3681253797374656d2e53746f726167652e4765746c756657c56b6a00527ac46a51527ac46a52527ac46203006a52c3c001147d9c7c75f16a00c358c36a52c37e6a00c351c3681253797374656d2e53746f726167652e4765746c75665cc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a53c3c001147d9c7c75f16a52c3c001147d9c7c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a54c3007da07c75f16a00c358c36a52c37e6a55527ac46a55c36a00c351c3681253797374656d2e53746f726167652e4765746a56527ac46a56c36a54c37da27c75f16a54c36a56c37d9c7c756425006a55c36a00c351c3681553797374656d2e53746f726167652e44656c6574656226006a56c36a54c3946a55c36a00c351c3681253797374656d2e53746f726167652e5075746a00c358c36a53c37e6a57527ac46a57c36a00c351c3681253797374656d2e53746f726167652e4765746a58527ac46a58c36a54c3936a57c36a00c351c3681253797374656d2e53746f726167652e5075746a54c36a53c36a52c3087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c75665ac56b6a00527ac46a51527ac46a52527ac4620300006a53527ac46a52c36a54527ac46a54c3c06a55527ac46a53c36a55c39f6442006a54c36a53c3c36a56527ac46a53c351936a53527ac46a56c3c0537d9c7c75f16a56c352c36a56c351c36a56c300c3536a00c3068505000000006ef162baff516c75665ac56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a52c3c001147d9c7c75f16a53c3c001147d9c7c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a54c3007da27c75f16a54c36a52c3516a00c3064005000000006e7da17c75f16a00c359c36a52c37e6a53c37e6a56527ac46a54c36a56c36a00c351c3681253797374656d2e53746f726167652e5075746a54c36a53c36a52c308617070726f76616c54c1681553797374656d2e52756e74696d652e4e6f74696679516c756660c56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46a55527ac46203006a54c3c001147d9c7c75f16a53c3c001147d9c7c75f16a52c3c001147d9c7c75f16a55c3007da27c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a00c358c36a53c37e6a56527ac46a56c36a00c351c3681253797374656d2e53746f726167652e4765746a57527ac46a57c36a55c37da27c75f16a00c359c36a53c37e6a52c37e6a58527ac46a58c36a00c351c3681253797374656d2e53746f726167652e4765746a59527ac46a00c358c36a54c37e6a5a527ac46a59c36a55c37da27c75f16a55c36a59c37d9c7c756448006a58c36a00c351c3681553797374656d2e53746f726167652e44656c6574656a57c36a55c3946a56c36a00c351c3681253797374656d2e53746f726167652e5075746249006a59c36a55c3946a58c36a00c351c3681253797374656d2e53746f726167652e5075746a57c36a55c3946a56c36a00c351c3681253797374656d2e53746f726167652e5075746a5ac36a00c351c3681253797374656d2e53746f726167652e4765746a5b527ac46a5bc36a55c3936a5ac36a00c351c3681253797374656d2e53746f726167652e5075746a55c36a54c36a53c3087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c359c36a52c37e6a53c37e6a54527ac46a54c36a00c351c3681253797374656d2e53746f726167652e4765746c756655c56b6a00527ac46a51527ac46203006a00c35bc36a00c351c3681253797374656d2e53746f726167652e4765746c7566 \ No newline at end of file diff --git a/chains/ont/avm/ousdc.avm b/chains/ont/avm/ousdc.avm new file mode 100644 index 0000000..36cee89 --- /dev/null +++ b/chains/ont/avm/ousdc.avm @@ -0,0 +1 @@ +5fc56b05322e302e306a00527ac4681953797374656d2e53746f726167652e476574436f6e746578746a51527ac4056f555344436a52527ac4056f555344436a53527ac4566a54527ac40340420f6a55527ac42241647a5a32564b7566644a57654238743961386269586f4862624d65326b5a65794868204f6e746f6c6f67792e52756e74696d652e426173653538546f416464726573736a56527ac41400000000000000000000000000000000000000096a57527ac401016a58527ac401026a59527ac40b546f74616c537570706c796a5a527ac40550726f78796a5b527ac46c0120c56b6a00527ac46a51527ac46a52527ac46a51c30f64656c6567617465546f50726f78797d9c7c75641f006a52c351c36a52c300c3526a00c306af03000000006e6c75666203006a51c3046e616d657d9c7c75641500006a00c306c304000000006e6c75666203006a51c30673796d626f6c7d9c7c75641500006a00c306db04000000006e6c75666203006a51c308646563696d616c737d9c7c75641500006a00c306f304000000006e6c75666203006a51c30b746f74616c537570706c797d9c7c75641500006a00c3060b05000000006e6c75666203006a51c30962616c616e63654f667d9c7c75642c006a52c3c0517d9c7c75f16a52c300c36a54527ac46a54c3516a00c3063c05000000006e6c75666203006a51c3087472616e736665727d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a55527ac46a52c351c36a56527ac46a52c352c36a57527ac46a57c36a56c36a55c3536a00c3068105000000006e6c75666203006a51c30d7472616e736665724d756c74697d9c7c756418006a52c3516a00c306ed06000000006e6c75666203006a51c30c7472616e7366657246726f6d7d9c7c756453006a52c3c0547d9c7c75f16a52c300c36a58527ac46a52c351c36a55527ac46a52c352c36a56527ac46a52c353c36a57527ac46a57c36a56c36a55c36a58c3546a00c3063c08000000006e6c75666203006a51c307617070726f76657d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a59527ac46a52c351c36a58527ac46a52c352c36a57527ac46a57c36a58c36a59c3536a00c3066607000000006e6c75666203006a51c309616c6c6f77616e63657d9c7c756439006a52c3c0527d9c7c75f16a52c300c36a59527ac46a52c351c36a58527ac46a58c36a59c3526a00c3063c0a000000006e6c75666203006a51c30c67657450726f7879486173687d9c7c75641500006a00c306870a000000006e6c7566620300006c75665ac56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c356c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f1006a00c306870a000000006e6a55527ac46a55c3916427006a52c36a00c35bc36a00c351c3681253797374656d2e53746f726167652e507574620e006a52c36a55c37d9c7c75f16a52c3516a00c3063c05000000006e6a53c3936a00c358c36a52c37e6a00c351c3681253797374656d2e53746f726167652e507574006a00c3060b05000000006e6a53c3936a00c35ac36a00c351c3681253797374656d2e53746f726167652e5075746a53c36a52c300087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c756655c56b6a00527ac46a51527ac46203006a00c352c36c756655c56b6a00527ac46a51527ac46203006a00c353c36c756655c56b6a00527ac46a51527ac46203006a00c354c36c756655c56b6a00527ac46a51527ac46203006a00c35ac36a00c351c3681253797374656d2e53746f726167652e4765746c756657c56b6a00527ac46a51527ac46a52527ac46203006a52c3c001147d9c7c75f16a00c358c36a52c37e6a00c351c3681253797374656d2e53746f726167652e4765746c75665cc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a53c3c001147d9c7c75f16a52c3c001147d9c7c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a54c3007da07c75f16a00c358c36a52c37e6a55527ac46a55c36a00c351c3681253797374656d2e53746f726167652e4765746a56527ac46a56c36a54c37da27c75f16a54c36a56c37d9c7c756425006a55c36a00c351c3681553797374656d2e53746f726167652e44656c6574656226006a56c36a54c3946a55c36a00c351c3681253797374656d2e53746f726167652e5075746a00c358c36a53c37e6a57527ac46a57c36a00c351c3681253797374656d2e53746f726167652e4765746a58527ac46a58c36a54c3936a57c36a00c351c3681253797374656d2e53746f726167652e5075746a54c36a53c36a52c3087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c75665ac56b6a00527ac46a51527ac46a52527ac4620300006a53527ac46a52c36a54527ac46a54c3c06a55527ac46a53c36a55c39f6442006a54c36a53c3c36a56527ac46a53c351936a53527ac46a56c3c0537d9c7c75f16a56c352c36a56c351c36a56c300c3536a00c3068105000000006ef162baff516c75665ac56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a52c3c001147d9c7c75f16a53c3c001147d9c7c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a54c3007da27c75f16a54c36a52c3516a00c3063c05000000006e7da17c75f16a00c359c36a52c37e6a53c37e6a56527ac46a54c36a56c36a00c351c3681253797374656d2e53746f726167652e5075746a54c36a53c36a52c308617070726f76616c54c1681553797374656d2e52756e74696d652e4e6f74696679516c756660c56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46a55527ac46203006a54c3c001147d9c7c75f16a53c3c001147d9c7c75f16a52c3c001147d9c7c75f16a55c3007da27c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a00c358c36a53c37e6a56527ac46a56c36a00c351c3681253797374656d2e53746f726167652e4765746a57527ac46a57c36a55c37da27c75f16a00c359c36a53c37e6a52c37e6a58527ac46a58c36a00c351c3681253797374656d2e53746f726167652e4765746a59527ac46a00c358c36a54c37e6a5a527ac46a59c36a55c37da27c75f16a55c36a59c37d9c7c756448006a58c36a00c351c3681553797374656d2e53746f726167652e44656c6574656a57c36a55c3946a56c36a00c351c3681253797374656d2e53746f726167652e5075746249006a59c36a55c3946a58c36a00c351c3681253797374656d2e53746f726167652e5075746a57c36a55c3946a56c36a00c351c3681253797374656d2e53746f726167652e5075746a5ac36a00c351c3681253797374656d2e53746f726167652e4765746a5b527ac46a5bc36a55c3936a5ac36a00c351c3681253797374656d2e53746f726167652e5075746a55c36a54c36a53c3087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c359c36a52c37e6a53c37e6a54527ac46a54c36a00c351c3681253797374656d2e53746f726167652e4765746c756655c56b6a00527ac46a51527ac46203006a00c35bc36a00c351c3681253797374656d2e53746f726167652e4765746c7566 \ No newline at end of file diff --git a/chains/ont/avm/ousdt.avm b/chains/ont/avm/ousdt.avm new file mode 100644 index 0000000..1d65341 --- /dev/null +++ b/chains/ont/avm/ousdt.avm @@ -0,0 +1 @@ +5fc56b05322e302e306a00527ac4681953797374656d2e53746f726167652e476574436f6e746578746a51527ac4056f555344546a52527ac4056f555344546a53527ac4566a54527ac40340420f6a55527ac42241647a5a32564b7566644a57654238743961386269586f4862624d65326b5a65794868204f6e746f6c6f67792e52756e74696d652e426173653538546f416464726573736a56527ac41400000000000000000000000000000000000000096a57527ac401016a58527ac401026a59527ac40b546f74616c537570706c796a5a527ac40550726f78796a5b527ac46c0120c56b6a00527ac46a51527ac46a52527ac46a51c30f64656c6567617465546f50726f78797d9c7c75641f006a52c351c36a52c300c3526a00c306af03000000006e6c75666203006a51c3046e616d657d9c7c75641500006a00c306c304000000006e6c75666203006a51c30673796d626f6c7d9c7c75641500006a00c306db04000000006e6c75666203006a51c308646563696d616c737d9c7c75641500006a00c306f304000000006e6c75666203006a51c30b746f74616c537570706c797d9c7c75641500006a00c3060b05000000006e6c75666203006a51c30962616c616e63654f667d9c7c75642c006a52c3c0517d9c7c75f16a52c300c36a54527ac46a54c3516a00c3063c05000000006e6c75666203006a51c3087472616e736665727d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a55527ac46a52c351c36a56527ac46a52c352c36a57527ac46a57c36a56c36a55c3536a00c3068105000000006e6c75666203006a51c30d7472616e736665724d756c74697d9c7c756418006a52c3516a00c306ed06000000006e6c75666203006a51c30c7472616e7366657246726f6d7d9c7c756453006a52c3c0547d9c7c75f16a52c300c36a58527ac46a52c351c36a55527ac46a52c352c36a56527ac46a52c353c36a57527ac46a57c36a56c36a55c36a58c3546a00c3063c08000000006e6c75666203006a51c307617070726f76657d9c7c756446006a52c3c0537d9c7c75f16a52c300c36a59527ac46a52c351c36a58527ac46a52c352c36a57527ac46a57c36a58c36a59c3536a00c3066607000000006e6c75666203006a51c309616c6c6f77616e63657d9c7c756439006a52c3c0527d9c7c75f16a52c300c36a59527ac46a52c351c36a58527ac46a58c36a59c3526a00c3063c0a000000006e6c75666203006a51c30c67657450726f7879486173687d9c7c75641500006a00c306870a000000006e6c7566620300006c75665ac56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c356c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f1006a00c306870a000000006e6a55527ac46a55c3916427006a52c36a00c35bc36a00c351c3681253797374656d2e53746f726167652e507574620e006a52c36a55c37d9c7c75f16a52c3516a00c3063c05000000006e6a53c3936a00c358c36a52c37e6a00c351c3681253797374656d2e53746f726167652e507574006a00c3060b05000000006e6a53c3936a00c35ac36a00c351c3681253797374656d2e53746f726167652e5075746a53c36a52c300087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c756655c56b6a00527ac46a51527ac46203006a00c352c36c756655c56b6a00527ac46a51527ac46203006a00c353c36c756655c56b6a00527ac46a51527ac46203006a00c354c36c756655c56b6a00527ac46a51527ac46203006a00c35ac36a00c351c3681253797374656d2e53746f726167652e4765746c756657c56b6a00527ac46a51527ac46a52527ac46203006a52c3c001147d9c7c75f16a00c358c36a52c37e6a00c351c3681253797374656d2e53746f726167652e4765746c75665cc56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a53c3c001147d9c7c75f16a52c3c001147d9c7c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a54c3007da07c75f16a00c358c36a52c37e6a55527ac46a55c36a00c351c3681253797374656d2e53746f726167652e4765746a56527ac46a56c36a54c37da27c75f16a54c36a56c37d9c7c756425006a55c36a00c351c3681553797374656d2e53746f726167652e44656c6574656226006a56c36a54c3946a55c36a00c351c3681253797374656d2e53746f726167652e5075746a00c358c36a53c37e6a57527ac46a57c36a00c351c3681253797374656d2e53746f726167652e4765746a58527ac46a58c36a54c3936a57c36a00c351c3681253797374656d2e53746f726167652e5075746a54c36a53c36a52c3087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c75665ac56b6a00527ac46a51527ac46a52527ac4620300006a53527ac46a52c36a54527ac46a54c3c06a55527ac46a53c36a55c39f6442006a54c36a53c3c36a56527ac46a53c351936a53527ac46a56c3c0537d9c7c75f16a56c352c36a56c351c36a56c300c3536a00c3068105000000006ef162baff516c75665ac56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46203006a52c3c001147d9c7c75f16a53c3c001147d9c7c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a54c3007da27c75f16a54c36a52c3516a00c3063c05000000006e7da17c75f16a00c359c36a52c37e6a53c37e6a56527ac46a54c36a56c36a00c351c3681253797374656d2e53746f726167652e5075746a54c36a53c36a52c308617070726f76616c54c1681553797374656d2e52756e74696d652e4e6f74696679516c756660c56b6a00527ac46a51527ac46a52527ac46a53527ac46a54527ac46a55527ac46203006a54c3c001147d9c7c75f16a53c3c001147d9c7c75f16a52c3c001147d9c7c75f16a55c3007da27c75f16a52c3681b53797374656d2e52756e74696d652e436865636b5769746e657373f16a00c358c36a53c37e6a56527ac46a56c36a00c351c3681253797374656d2e53746f726167652e4765746a57527ac46a57c36a55c37da27c75f16a00c359c36a53c37e6a52c37e6a58527ac46a58c36a00c351c3681253797374656d2e53746f726167652e4765746a59527ac46a00c358c36a54c37e6a5a527ac46a59c36a55c37da27c75f16a55c36a59c37d9c7c756448006a58c36a00c351c3681553797374656d2e53746f726167652e44656c6574656a57c36a55c3946a56c36a00c351c3681253797374656d2e53746f726167652e5075746249006a59c36a55c3946a58c36a00c351c3681253797374656d2e53746f726167652e5075746a57c36a55c3946a56c36a00c351c3681253797374656d2e53746f726167652e5075746a5ac36a00c351c3681253797374656d2e53746f726167652e4765746a5b527ac46a5bc36a55c3936a5ac36a00c351c3681253797374656d2e53746f726167652e5075746a55c36a54c36a53c3087472616e7366657254c1681553797374656d2e52756e74696d652e4e6f74696679516c756659c56b6a00527ac46a51527ac46a52527ac46a53527ac46203006a00c359c36a52c37e6a53c37e6a54527ac46a54c36a00c351c3681253797374656d2e53746f726167652e4765746c756655c56b6a00527ac46a51527ac46203006a00c35bc36a00c351c3681253797374656d2e53746f726167652e4765746c7566 \ No newline at end of file diff --git a/chains/ont/ont_invoker.go b/chains/ont/ont_invoker.go index 1b21adf..652729e 100644 --- a/chains/ont/ont_invoker.go +++ b/chains/ont/ont_invoker.go @@ -18,6 +18,7 @@ package ont import ( "fmt" + common2 "github.com/ethereum/go-ethereum/common" goSdk "github.com/ontio/ontology-go-sdk" "github.com/ontio/ontology-go-sdk/utils" "github.com/ontio/ontology/common" @@ -39,6 +40,10 @@ var ( "ERC20Template", "OEP4Template", "ethx", + "obtc", + "odai", + "ousdc", + "ousdt", } ) @@ -119,34 +124,34 @@ func (invoker *OntInvoker) SetupEthAsset(lockProxy, etho, erc20, erc20o string, // etho ethoAddr, _ := common.AddressFromHexString(etho) ethAddr, _ := common.HexToBytes("0000000000000000000000000000000000000000") - assetLimt := big.NewInt(1e18) - - res, err := invoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(ethoAddr, []interface{}{"balanceOf", []interface{}{contractAddress[:]}}) - if err != nil { - return nil, fmt.Errorf("failed to check the ethx balance of proxy: %v", err) - } - val, err := res.Result.ToInteger() - if err != nil { - return nil, fmt.Errorf("failed to get value from result: %v", err) - } + //assetLimt := big.NewInt(1e18) + + //res, err := invoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(ethoAddr, []interface{}{"balanceOf", []interface{}{contractAddress[:]}}) + //if err != nil { + // return nil, fmt.Errorf("failed to check the ethx balance of proxy: %v", err) + //} + //val, err := res.Result.ToInteger() + //if err != nil { + // return nil, fmt.Errorf("failed to get value from result: %v", err) + //} tx2 := common.UINT256_EMPTY - if val.Uint64() == 0 { - tx2, err = invoker.OntSdk.NeoVM.InvokeNeoVMContract(gasPrice, gasLimit, - invoker.OntAcc, - invoker.OntAcc, - ethoAddr, - []interface{}{"delegateToProxy", []interface{}{contractAddress[:], assetLimt}}) - if err != nil { - return nil, fmt.Errorf("etho delegateToProxy error: %v", err) - } - invoker.WaitTxConfirmation(tx2) - } + //if val.Uint64() == 0 { + // tx2, err = invoker.OntSdk.NeoVM.InvokeNeoVMContract(gasPrice, gasLimit, + // invoker.OntAcc, + // invoker.OntAcc, + // ethoAddr, + // []interface{}{"delegateToProxy", []interface{}{contractAddress[:], assetLimt}}) + // if err != nil { + // return nil, fmt.Errorf("etho delegateToProxy error: %v", err) + // } + // invoker.WaitTxConfirmation(tx2) + //} tx1, err := invoker.OntSdk.NeoVM.InvokeNeoVMContract(gasPrice, gasLimit, invoker.OntAcc, invoker.OntAcc, contractAddress, - []interface{}{"bindAssetHash", []interface{}{ethoAddr[:], 2, ethAddr}}) + []interface{}{"bindAssetHash", []interface{}{ethoAddr[:], config.DefConfig.EthChainID, ethAddr}}) if err != nil { if !strings.Contains(err.Error(), "already") { return nil, fmt.Errorf("etho bindAssetHash error: %v", err) @@ -168,32 +173,32 @@ func (invoker *OntInvoker) SetupEthAsset(lockProxy, etho, erc20, erc20o string, // erc20 erc20oAddr, _ := common.AddressFromHexString(erc20o) erc20Addr, _ := common.HexToBytes(strings.Replace(erc20, "0x", "", 1)) - res, err = invoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(erc20oAddr, []interface{}{"balanceOf", []interface{}{contractAddress[:]}}) - if err != nil { - return nil, fmt.Errorf("failed to check the erc20 balance of proxy: %v", err) - } - val, err = res.Result.ToInteger() - if err != nil { - return nil, fmt.Errorf("failed to get value from result: %v", err) - } + //res, err = invoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(erc20oAddr, []interface{}{"balanceOf", []interface{}{contractAddress[:]}}) + //if err != nil { + // return nil, fmt.Errorf("failed to check the erc20 balance of proxy: %v", err) + //} + //val, err = res.Result.ToInteger() + //if err != nil { + // return nil, fmt.Errorf("failed to get value from result: %v", err) + //} tx4 := common.UINT256_EMPTY - if val.Uint64() == 0 { - tx4, err = invoker.OntSdk.NeoVM.InvokeNeoVMContract(gasPrice, gasLimit, - invoker.OntAcc, - invoker.OntAcc, - erc20oAddr, - []interface{}{"delegateToProxy", []interface{}{contractAddress[:], big.NewInt(1e13)}}) - if err != nil { - return nil, fmt.Errorf("erc20 delegateToProxy error: %v", err) - } - invoker.WaitTxConfirmation(tx4) - } + //if val.Uint64() == 0 { + // tx4, err = invoker.OntSdk.NeoVM.InvokeNeoVMContract(gasPrice, gasLimit, + // invoker.OntAcc, + // invoker.OntAcc, + // erc20oAddr, + // []interface{}{"delegateToProxy", []interface{}{contractAddress[:], big.NewInt(1e13)}}) + // if err != nil { + // return nil, fmt.Errorf("erc20 delegateToProxy error: %v", err) + // } + // invoker.WaitTxConfirmation(tx4) + //} tx3, err := invoker.OntSdk.NeoVM.InvokeNeoVMContract(gasPrice, gasLimit, invoker.OntAcc, invoker.OntAcc, contractAddress, - []interface{}{"bindAssetHash", []interface{}{erc20oAddr[:], 2, erc20Addr}}) + []interface{}{"bindAssetHash", []interface{}{erc20oAddr[:], config.DefConfig.EthChainID, erc20Addr}}) if err != nil { if !strings.Contains(err.Error(), "already") { return nil, fmt.Errorf("erc20 bindAssetHash error: %v", err) @@ -213,12 +218,160 @@ func (invoker *OntInvoker) SetupEthAsset(lockProxy, etho, erc20, erc20o string, log.Warnf("erc20 on cosmos is already binded: %v", err) } + //WBTC + owbtc, _ := common.AddressFromHexString(config.DefConfig.OntWBTC) + wbtc := common2.HexToAddress(config.DefConfig.EthWBTC) + //res, err = invoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(owbtc, []interface{}{"balanceOf", []interface{}{contractAddress[:]}}) + //if err != nil { + // return nil, fmt.Errorf("failed to check the wbtc balance of proxy: %v", err) + //} + //val, err = res.Result.ToInteger() + //if err != nil { + // return nil, fmt.Errorf("failed to get value from result: %v", err) + //} + tx10 := common.UINT256_EMPTY + //if val.Uint64() == 0 { + // tx10, err = invoker.OntSdk.NeoVM.InvokeNeoVMContract(gasPrice, gasLimit, + // invoker.OntAcc, + // invoker.OntAcc, + // owbtc, + // []interface{}{"delegateToProxy", []interface{}{contractAddress[:], big.NewInt(1e11)}}) + // if err != nil { + // return nil, fmt.Errorf("wbtc delegateToProxy error: %v", err) + // } + // invoker.WaitTxConfirmation(tx10) + //} + tx7, err := invoker.OntSdk.NeoVM.InvokeNeoVMContract(gasPrice, gasLimit, + invoker.OntAcc, + invoker.OntAcc, + contractAddress, + []interface{}{"bindAssetHash", []interface{}{owbtc, config.DefConfig.EthChainID, wbtc[:]}}) + if err != nil { + if !strings.Contains(err.Error(), "already") { + return nil, fmt.Errorf("wbtc on eth bindAssetHash error: %v", err) + } + log.Warnf("wbtc on ethereum is already binded: %v", err) + } + + //DAI + odai, _ := common.AddressFromHexString(config.DefConfig.OntDai) + dai := common2.HexToAddress(config.DefConfig.EthDai) + //res, err = invoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(odai, []interface{}{"balanceOf", []interface{}{contractAddress[:]}}) + //if err != nil { + // return nil, fmt.Errorf("failed to check the dai balance of proxy: %v", err) + //} + //val, err = res.Result.ToInteger() + //if err != nil { + // return nil, fmt.Errorf("failed to get value from result: %v", err) + //} + tx11 := common.UINT256_EMPTY + //if val.Uint64() == 0 { + // tx11, err = invoker.OntSdk.NeoVM.InvokeNeoVMContract(gasPrice, gasLimit, + // invoker.OntAcc, + // invoker.OntAcc, + // odai, + // []interface{}{"delegateToProxy", []interface{}{contractAddress[:], big.NewInt(math.MaxInt64)}}) + // if err != nil { + // return nil, fmt.Errorf("dai delegateToProxy error: %v", err) + // } + // invoker.WaitTxConfirmation(tx11) + //} + tx8, err := invoker.OntSdk.NeoVM.InvokeNeoVMContract(gasPrice, gasLimit, + invoker.OntAcc, + invoker.OntAcc, + contractAddress, + []interface{}{"bindAssetHash", []interface{}{odai, config.DefConfig.EthChainID, dai[:]}}) + if err != nil { + if !strings.Contains(err.Error(), "already") { + return nil, fmt.Errorf("dai on eth bindAssetHash error: %v", err) + } + log.Warnf("dai on ethereum is already binded: %v", err) + } + + // USDT + ousdt, _ := common.AddressFromHexString(config.DefConfig.OntUSDT) + usdt := common2.HexToAddress(config.DefConfig.EthUSDT) + //res, err = invoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(ousdt, []interface{}{"balanceOf", []interface{}{contractAddress[:]}}) + //if err != nil { + // return nil, fmt.Errorf("failed to check the ousdt balance of proxy: %v", err) + //} + //val, err = res.Result.ToInteger() + //if err != nil { + // return nil, fmt.Errorf("failed to get value from result: %v", err) + //} + tx12 := common.UINT256_EMPTY + //if val.Uint64() == 0 { + // tx12, err = invoker.OntSdk.NeoVM.InvokeNeoVMContract(gasPrice, gasLimit, + // invoker.OntAcc, + // invoker.OntAcc, + // ousdt, + // []interface{}{"delegateToProxy", []interface{}{contractAddress[:], big.NewInt(1e12)}}) + // if err != nil { + // return nil, fmt.Errorf("ousdt delegateToProxy error: %v", err) + // } + // invoker.WaitTxConfirmation(tx12) + //} + tx9, err := invoker.OntSdk.NeoVM.InvokeNeoVMContract(gasPrice, gasLimit, + invoker.OntAcc, + invoker.OntAcc, + contractAddress, + []interface{}{"bindAssetHash", []interface{}{ousdt, config.DefConfig.EthChainID, usdt[:]}}) + if err != nil { + if !strings.Contains(err.Error(), "already") { + return nil, fmt.Errorf("usdt on eth bindAssetHash error: %v", err) + } + log.Warnf("usdt on ethereum is already binded: %v", err) + } + + // USDC + ousdc, _ := common.AddressFromHexString(config.DefConfig.OntUSDC) + usdc := common2.HexToAddress(config.DefConfig.EthUSDC) + //res, err = invoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(ousdc, []interface{}{"balanceOf", []interface{}{contractAddress[:]}}) + //if err != nil { + // return nil, fmt.Errorf("failed to check the ousdt balance of proxy: %v", err) + //} + //val, err = res.Result.ToInteger() + //if err != nil { + // return nil, fmt.Errorf("failed to get value from result: %v", err) + //} + tx13 := common.UINT256_EMPTY + //if val.Uint64() == 0 { + // tx13, err = invoker.OntSdk.NeoVM.InvokeNeoVMContract(gasPrice, gasLimit, + // invoker.OntAcc, + // invoker.OntAcc, + // ousdc, + // []interface{}{"delegateToProxy", []interface{}{contractAddress[:], big.NewInt(1e12)}}) + // if err != nil { + // return nil, fmt.Errorf("ousdt delegateToProxy error: %v", err) + // } + // invoker.WaitTxConfirmation(tx13) + //} + tx14, err := invoker.OntSdk.NeoVM.InvokeNeoVMContract(gasPrice, gasLimit, + invoker.OntAcc, + invoker.OntAcc, + contractAddress, + []interface{}{"bindAssetHash", []interface{}{ousdc, config.DefConfig.EthChainID, usdc[:]}}) + if err != nil { + if !strings.Contains(err.Error(), "already") { + return nil, fmt.Errorf("usdt on eth bindAssetHash error: %v", err) + } + log.Warnf("usdt on ethereum is already binded: %v", err) + } + txs = append(txs, tx1) txs = append(txs, tx2) txs = append(txs, tx3) txs = append(txs, tx4) txs = append(txs, tx5) txs = append(txs, tx6) + txs = append(txs, tx7) + txs = append(txs, tx8) + txs = append(txs, tx9) + txs = append(txs, tx10) + txs = append(txs, tx11) + txs = append(txs, tx12) + txs = append(txs, tx13) + txs = append(txs, tx14) return txs, nil } @@ -250,7 +403,7 @@ func (invoker *OntInvoker) SetupOntAsset(lockProxy, onte, onge, oep4, oep4e stri invoker.OntAcc, invoker.OntAcc, contractAddress, - []interface{}{"bindAssetHash", []interface{}{utils2.OntContractAddress, 2, onteAddr}}) + []interface{}{"bindAssetHash", []interface{}{utils2.OntContractAddress, config.DefConfig.EthChainID, onteAddr}}) if err != nil { if !strings.Contains(err.Error(), "already") { return nil, fmt.Errorf("bindAssetHash Ont error: %s", err) @@ -278,7 +431,7 @@ func (invoker *OntInvoker) SetupOntAsset(lockProxy, onte, onge, oep4, oep4e stri invoker.OntAcc, invoker.OntAcc, contractAddress, - []interface{}{"bindAssetHash", []interface{}{utils2.OngContractAddress[:], 2, ongeAddr}}) + []interface{}{"bindAssetHash", []interface{}{utils2.OngContractAddress[:], config.DefConfig.EthChainID, ongeAddr}}) if err != nil { if !strings.Contains(err.Error(), "already") { return nil, fmt.Errorf("bindAssetHash ong error: %s", err) @@ -307,7 +460,7 @@ func (invoker *OntInvoker) SetupOntAsset(lockProxy, onte, onge, oep4, oep4e stri invoker.OntAcc, invoker.OntAcc, contractAddress, - []interface{}{"bindAssetHash", []interface{}{oep4Addr[:], 2, oep4eAddr}}) + []interface{}{"bindAssetHash", []interface{}{oep4Addr[:], config.DefConfig.EthChainID, oep4eAddr}}) if err != nil { if !strings.Contains(err.Error(), "already") { return nil, fmt.Errorf("bindAssetHash oep4 error: %s", err) @@ -379,7 +532,7 @@ func (invoker *OntInvoker) SetupBtcx(btcx string, redeem, rk []byte, limit, gasP return txs, nil } -func (invoker *OntInvoker) BindBtcx(btcx string, otherBtcx []byte, chainId int, gasPrice, gasLimit uint64) (common.Uint256, error) { +func (invoker *OntInvoker) BindBtcx(btcx string, otherBtcx []byte, chainId uint64, gasPrice, gasLimit uint64) (common.Uint256, error) { btcxAddr, err := utils.AddressFromHexString(btcx) if err != nil { return common.UINT256_EMPTY, fmt.Errorf("parse contract addr failed, err: %s", err) @@ -394,7 +547,7 @@ func (invoker *OntInvoker) BindBtcx(btcx string, otherBtcx []byte, chainId int, return tx, nil } -func (invoker *OntInvoker) SetOtherLockProxy(other []byte, toChainId int) (common.Uint256, error) { +func (invoker *OntInvoker) SetOtherLockProxy(other []byte, toChainId uint64) (common.Uint256, error) { addr, err := utils.AddressFromHexString(config.DefConfig.OntLockProxy) if err != nil { return common.UINT256_EMPTY, err @@ -480,18 +633,18 @@ func (invoker *OntInvoker) GetAccInfo() (string, error) { } oep4xInfo := fmt.Sprintf("oep4x: %d", bigVal.Uint64()) - btco, err := utils.AddressFromHexString(config.DefConfig.BtcoContractAddress) - if err != nil { - return "", err - } - res, err = invoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(btco, []interface{}{"balanceOf", []interface{}{invoker.OntAcc.Address[:]}}) - if err != nil { - return "", err - } - bigVal, err = res.Result.ToInteger() - if err != nil { - return "", err - } + //btco, err := utils.AddressFromHexString(config.DefConfig.BtcoContractAddress) + //if err != nil { + // return "", err + //} + //res, err = invoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(btco, []interface{}{"balanceOf", []interface{}{invoker.OntAcc.Address[:]}}) + //if err != nil { + // return "", err + //} + //bigVal, err = res.Result.ToInteger() + //if err != nil { + // return "", err + //} btcoInfo := fmt.Sprintf("btco: %d", bigVal.Uint64()) return fmt.Sprintf("ONTOLOGY: acc: %s, asset: [ %s, %s, %s, %s, %s, %s ]", diff --git a/chains/ont/ont_test.go b/chains/ont/ont_test.go new file mode 100644 index 0000000..6907e75 --- /dev/null +++ b/chains/ont/ont_test.go @@ -0,0 +1,48 @@ +package ont + +import ( + "fmt" + "github.com/ontio/ontology/common" + "github.com/polynetwork/poly-io-test/config" + "math/big" + "testing" +) + +func TestGetAccountByPassword(t *testing.T) { + config.DefConfig.Init("./config-test-cp.json") + inv, err := NewOntInvoker(config.DefConfig.OntJsonRpcAddress, config.DefConfig.OntContractsAvmPath, config.DefConfig.OntWallet, config.DefConfig.OntWalletPassword) + if err != nil { + t.Fatal(err) + } + + c, _ := common.AddressFromHexString(config.DefConfig.OntOep4) + res, err := inv.OntSdk.NeoVM.PreExecInvokeNeoVMContract(c, []interface{}{"balanceOf", []interface{}{inv.OntAcc.Address[:]}}) + if err != nil { + t.Fatal(err) + } + fmt.Println(res.Result.ToInteger()) + + amt, err := res.Result.ToInteger() + if err != nil { + t.Fatal(err) + } + + to, err := common.AddressFromBase58("AWuqAh23z13874ovnPW2BiHt9kMAEqs4ag") + if err != nil { + t.Fatal(err) + } + res, err = inv.OntSdk.NeoVM.PreExecInvokeNeoVMContract(c, []interface{}{"balanceOf", []interface{}{to[:]}}) + if err != nil { + t.Fatal(err) + } + fmt.Println(res.Result.ToInteger()) + + tx, err := inv.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + inv.OntAcc, inv.OntAcc, + c, + []interface{}{inv.OntAcc.Address, to, amt.Div(amt, big.NewInt(2))}) + if err != nil { + t.Fatal(err) + } + fmt.Println(tx.ToHexString()) +} diff --git a/cmd/btc_prepare/run.go b/cmd/btc_prepare/run.go index 19bda87..4af7f4d 100644 --- a/cmd/btc_prepare/run.go +++ b/cmd/btc_prepare/run.go @@ -24,9 +24,9 @@ import ( "github.com/ontio/ontology-go-sdk/utils" common2 "github.com/ontio/ontology/common" "github.com/ontio/ontology/common/log" + "github.com/polynetwork/eth-contracts/go_abi/btcx_abi" "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/eth" - btcx_abi "github.com/polynetwork/poly-io-test/chains/eth/abi/btcx" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/testcase" @@ -177,25 +177,25 @@ func SetupNewVendor(invoker *btc.BtcInvoker) { // btcx set each other auth, _ := ei.MakeSmartContractAuth() - tx, err := ebtcxContract.BindAssetHash(auth, config.ONT_CHAIN_ID, obtcx[:]) + tx, err := ebtcxContract.BindAssetHash(auth, config.DefConfig.OntChainID, obtcx[:]) if err != nil { panic(fmt.Errorf("bind obtc on ebtc failed: %v", err)) } ei.ETHUtil.WaitTransactionConfirm(tx.Hash()) - _, err = oi.BindBtcx(obtcx.ToHexString(), ebtcx.Bytes(), 2, + _, err = oi.BindBtcx(obtcx.ToHexString(), ebtcx.Bytes(), config.DefConfig.EthChainID, config.DefConfig.GasPrice, config.DefConfig.GasLimit) if err != nil { panic(fmt.Errorf("bind ebtc on obtc failed: %v", err)) } - txhash, err := invoker.BindBtcxWithVendor(ebtcx.String(), 2, vendor) + txhash, err := invoker.BindBtcxWithVendor(ebtcx.String(), config.DefConfig.EthChainID, vendor) if err != nil { panic(fmt.Errorf("failed to bind ebtcx: %v", err)) } testcase.WaitPolyTx(txhash, invoker.RChain) info += fmt.Sprintf("bind btcx on ether txhash: %s\n", txhash.ToHexString()) - txhash, err = invoker.BindBtcxWithVendor(obtcx.ToHexString(), config.ONT_CHAIN_ID, vendor) + txhash, err = invoker.BindBtcxWithVendor(obtcx.ToHexString(), config.DefConfig.OntChainID, vendor) if err != nil { panic(fmt.Errorf("failed to bind obtcx: %v", err)) } @@ -315,7 +315,7 @@ func SetupExistingVendor(invoker *btc.BtcInvoker) { // btcx set each other auth, _ := ei.MakeSmartContractAuth() - tx, err := ebtcxContract.BindAssetHash(auth, config.ONT_CHAIN_ID, obtcx[:]) + tx, err := ebtcxContract.BindAssetHash(auth, config.DefConfig.OntChainID, obtcx[:]) if err != nil { panic(fmt.Errorf("bind obtc on ebtc failed: %v", err)) } @@ -328,25 +328,25 @@ func SetupExistingVendor(invoker *btc.BtcInvoker) { } ei.ETHUtil.WaitTransactionConfirm(tx.Hash()) - _, err = oi.BindBtcx(obtcx.ToHexString(), ebtcx.Bytes(), 2, + _, err = oi.BindBtcx(obtcx.ToHexString(), ebtcx.Bytes(), config.DefConfig.EthChainID, config.DefConfig.GasPrice, config.DefConfig.GasLimit) if err != nil { panic(fmt.Errorf("bind ebtc on obtc failed: %v", err)) } - _, err = oi.BindBtcx(obtcx.ToHexString(), []byte(config.CM_BTCX), int(config.DefConfig.CMCrossChainId), + _, err = oi.BindBtcx(obtcx.ToHexString(), []byte(config.CM_BTCX), config.DefConfig.CMCrossChainId, config.DefConfig.GasPrice, config.DefConfig.GasLimit) if err != nil { panic(fmt.Errorf("bind cosmos-btc on obtc failed: %v", err)) } - txhash, err := invoker.BindBtcxWithVendor(ebtcx.String(), 2, vendor) + txhash, err := invoker.BindBtcxWithVendor(ebtcx.String(), config.DefConfig.EthChainID, vendor) if err != nil { panic(fmt.Errorf("failed to bind ebtcx: %v", err)) } testcase.WaitPolyTx(txhash, invoker.RChain) info += fmt.Sprintf("bind btcx on ether txhash: %s\n", txhash.ToHexString()) - txhash, err = invoker.BindBtcxWithVendor(obtcx.ToHexString(), config.ONT_CHAIN_ID, vendor) + txhash, err = invoker.BindBtcxWithVendor(obtcx.ToHexString(), config.DefConfig.OntChainID, vendor) if err != nil { panic(fmt.Errorf("failed to bind obtcx: %v", err)) } diff --git a/cmd/cctest/main.go b/cmd/cctest/main.go index 459f0e4..4f28b8c 100644 --- a/cmd/cctest/main.go +++ b/cmd/cctest/main.go @@ -23,6 +23,7 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" @@ -60,20 +61,24 @@ func main() { } ethInvoker := eth.NewEInvoker() - btcInvoker, err := btc.NewBtcInvoker(config.DefConfig.RchainJsonRpcAddress, config.DefConfig.RCWallet, - config.DefConfig.RCWalletPwd, config.DefConfig.BtcRestAddr, config.DefConfig.BtcRestUser, - config.DefConfig.BtcRestPwd, config.DefConfig.BtcSignerPrivateKey) - if err != nil { - log.Errorf("failed to new a btc invoker, do not test cases about BTC: %v", err) - } + //btcInvoker, err := btc.NewBtcInvoker(config.DefConfig.RchainJsonRpcAddress, config.DefConfig.RCWallet, + // config.DefConfig.RCWalletPwd, config.DefConfig.BtcRestAddr, config.DefConfig.BtcRestUser, + // config.DefConfig.BtcRestPwd, config.DefConfig.BtcSignerPrivateKey) + //if err != nil { + // log.Errorf("failed to new a btc invoker, do not test cases about BTC: %v", err) + //} ontInvoker, err := ont.NewOntInvoker(config.DefConfig.OntJsonRpcAddress, config.DefConfig.OntContractsAvmPath, config.DefConfig.OntWallet, config.DefConfig.OntWalletPassword) if err != nil { - log.Errorf("failed to new a ont invoker, do not test cases about ONT: %v", err) + log.Warnf("failed to new a ont invoker, do not test cases about ONT: %v", err) } cmInvoker, err := cosmos.NewCosmosInvoker() if err != nil { - log.Errorf("failed to new a cosmos invoker, do not test cases about COSMOS: %v", err) + log.Warnf("failed to new a cosmos invoker, do not test cases about COSMOS: %v", err) + } + neoInvoker, err := neo.NewNeoInvoker() + if err != nil { + log.Warnf("failed to new a neo invoker, do not test cases about NEO: %v", err) } testCases := make([]string, 0) @@ -82,9 +87,10 @@ func main() { } testframework.TFramework.SetRcSdk(rcSdk) testframework.TFramework.SetEthInvoker(ethInvoker) - testframework.TFramework.SetBtcInvoker(btcInvoker) + //testframework.TFramework.SetBtcInvoker(btcInvoker) testframework.TFramework.SetOntInvoker(ontInvoker) testframework.TFramework.SetCosmosInvoker(cmInvoker) + testframework.TFramework.SetNeoInvoker(neoInvoker) //Start run test case testframework.TFramework.Run(testCases, LoopNumber) diff --git a/cmd/cosmos_prepare/run.go b/cmd/cosmos_prepare/run.go index 9cf4561..f09b274 100644 --- a/cmd/cosmos_prepare/run.go +++ b/cmd/cosmos_prepare/run.go @@ -17,10 +17,12 @@ package main import ( + "encoding/hex" "flag" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" + "strings" ) var ( @@ -43,9 +45,13 @@ func main() { } res, err := invoker.CreateLockProxy() if err != nil { - panic(err) + if !strings.Contains(err.Error(), "already") { + panic(err) + } + log.Infof("already created lockproxy %s", hex.EncodeToString(invoker.Acc.Acc.Bytes())) + } else { + invoker.WaitTx(res.Hash) } - invoker.WaitTx(res.Hash) err = invoker.SetupAllAssets(invoker.Acc.Acc.Bytes()) if err != nil { panic(err) diff --git a/cmd/eth_deployer/run.go b/cmd/eth_deployer/run.go index e6b0e34..91271ba 100644 --- a/cmd/eth_deployer/run.go +++ b/cmd/eth_deployer/run.go @@ -47,13 +47,13 @@ func main() { switch fnEth { case "deploy": - SetupETHSmartContract() + DeployETHSmartContract() case "setup": - SetUpLockProxyForETH() + SetUpEthContracts() } } -func SetupETHSmartContract() { +func DeployETHSmartContract() { invoker := eth.NewEInvoker() var ( eccdAddr common2.Address @@ -150,23 +150,69 @@ func SetupETHSmartContract() { } func SetupERC20(ethInvoker *eth.EInvoker) { + if config.DefConfig.OntErc20 != "" { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.EthLockProxy, config.DefConfig.EthErc20, + config.DefConfig.OntErc20, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupERC20ToONT, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding erc20 of ontology on ethereum: ( txhash: %s )\n", hash.String()) + } + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.EthLockProxy, config.DefConfig.EthErc20, - config.DefConfig.OntErc20, config.ONT_CHAIN_ID, 0) + config.CM_ERC20, config.DefConfig.CMCrossChainId, 0) if err != nil { panic(fmt.Errorf("SetupERC20ToONT, failed to BindAssetHash: %v", err)) } ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() - fmt.Printf("binding erc20 of ontology on ethereum: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding erc20 of cosmos on ethereum: ( txhash: %s )\n", hash.String()) +} - bindTx, err = ethInvoker.BindAssetHash(config.DefConfig.EthLockProxy, config.DefConfig.EthErc20, - config.CM_ERC20, int(config.DefConfig.CMCrossChainId), 0) +func SetupWBTC(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.EthLockProxy, config.DefConfig.EthWBTC, + config.DefConfig.OntWBTC, config.DefConfig.OntChainID, 0) if err != nil { - panic(fmt.Errorf("SetupERC20ToONT, failed to BindAssetHash: %v", err)) + panic(fmt.Errorf("SetupWBTC, failed to BindAssetHash: %v", err)) } ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) - hash = bindTx.Hash() - fmt.Printf("binding erc20 of cosmos on ethereum: ( txhash: %s )\n", hash.String()) + hash := bindTx.Hash() + fmt.Printf("binding WBTC of ontology on ethereum: ( txhash: %s )\n", hash.String()) +} + +func SetupDAI(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.EthLockProxy, config.DefConfig.EthDai, + config.DefConfig.OntDai, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupDAI, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding DAI of ontology on ethereum: ( txhash: %s )\n", hash.String()) +} + +func SetupUSDT(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.EthLockProxy, config.DefConfig.EthUSDT, + config.DefConfig.OntUSDT, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupUSDT, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding USDT of ontology on ethereum: ( txhash: %s )\n", hash.String()) +} + +func SetupUSDC(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.EthLockProxy, config.DefConfig.EthUSDC, + config.DefConfig.OntUSDC, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupUSDC, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding USDC of ontology on ethereum: ( txhash: %s )\n", hash.String()) } func SetupOntAsset(invoker *eth.EInvoker) { @@ -200,68 +246,83 @@ func SetupOntAsset(invoker *eth.EInvoker) { func SetupETH(ethInvoker *eth.EInvoker) { ethNativeAddr := "0x0000000000000000000000000000000000000000" - if config.DefConfig.OntEth == "" { - panic(fmt.Errorf("ethx on ontology is blank")) - } - tx, err := ethInvoker.BindAssetHash(config.DefConfig.EthLockProxy, ethNativeAddr, config.DefConfig.OntEth, config.ONT_CHAIN_ID, 0) - if err != nil { - panic(fmt.Errorf("SetupETH2ONT, failed to bind asset hash: %v", err)) + if config.DefConfig.OntEth != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.EthLockProxy, ethNativeAddr, config.DefConfig.OntEth, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupETH2ONT, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding ethx of ontology on ethereum: ( txhash: %s )\n", hash.String()) } - hash := tx.Hash() - fmt.Printf("binding ethx of ontology on ethereum: ( txhash: %s )\n", hash.String()) - tx, err = ethInvoker.BindAssetHash(config.DefConfig.EthLockProxy, ethNativeAddr, config.CM_ETHX, int(config.DefConfig.CMCrossChainId), 0) + tx, err := ethInvoker.BindAssetHash(config.DefConfig.EthLockProxy, ethNativeAddr, config.CM_ETHX, config.DefConfig.CMCrossChainId, 0) if err != nil { panic(fmt.Errorf("SetupETH2ONT, failed to bind asset hash: %v", err)) } - hash = tx.Hash() + hash := tx.Hash() fmt.Printf("binding ethx of cosmos on ethereum: ( txhash: %s )\n", hash.String()) } func SetOtherLockProxy(invoker *eth.EInvoker) { - auth, contract, err := invoker.MakeLockProxy(config.DefConfig.EthLockProxy) + _, contract, err := invoker.MakeLockProxy(config.DefConfig.EthLockProxy) if err != nil { panic(fmt.Errorf("failed to MakeLockProxy: %v", err)) } - if config.DefConfig.OntLockProxy == "" { - panic(fmt.Errorf("OntLockProxy is blank")) - } - other, err := common.AddressFromHexString(config.DefConfig.OntLockProxy) - if err != nil { - panic(fmt.Errorf("failed to AddressFromHexString: %v", err)) - } - tx, err := contract.BindProxyHash(auth, config.ONT_CHAIN_ID, other[:]) - if err != nil { - panic(fmt.Errorf("failed to bind proxy: %")) + if config.DefConfig.OntLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other, err := common.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + panic(fmt.Errorf("failed to AddressFromHexString: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.OntChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %")) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding ont proxy: ( txhash: %s )\n", hash.String()) } - hash := tx.Hash() - invoker.ETHUtil.WaitTransactionConfirm(hash) - fmt.Printf("binding ont proxy: ( txhash: %s )\n", hash.String()) - auth, err = invoker.MakeSmartContractAuth() - if err != nil { - panic(fmt.Errorf("failed to get auth: %v", err)) - } - if config.DefConfig.CMLockProxy == "" { - panic(fmt.Errorf("COSMOS lockproxy is blank")) - } - raw, err := hex.DecodeString(config.DefConfig.CMLockProxy) - if err != nil { - panic(fmt.Errorf("failed to decode: %v", err)) - } - tx, err = contract.BindProxyHash(auth, config.DefConfig.CMCrossChainId, raw) - if err != nil { - panic(fmt.Errorf("failed to bind COSMOS proxy: %v", err)) + if config.DefConfig.CMLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + raw, err := hex.DecodeString(config.DefConfig.CMLockProxy) + if err != nil { + panic(fmt.Errorf("failed to decode: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.CMCrossChainId, raw) + if err != nil { + panic(fmt.Errorf("failed to bind COSMOS proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding cosmos proxy: ( txhash: %s )\n", hash.String()) } - hash = tx.Hash() - invoker.ETHUtil.WaitTransactionConfirm(hash) - fmt.Printf("binding cosmos proxy: ( txhash: %s )\n", hash.String()) } -func SetUpLockProxyForETH() { +func SetUpEthContracts() { invoker := eth.NewEInvoker() SetupETH(invoker) - SetupERC20(invoker) - SetupOntAsset(invoker) + if config.DefConfig.EthErc20 != "" { + SetupERC20(invoker) + } + if config.DefConfig.OntLockProxy != "" { + SetupOntAsset(invoker) + } + if config.DefConfig.EthWBTC != "" { + SetupWBTC(invoker) + } + if config.DefConfig.EthDai != "" { + SetupDAI(invoker) + } + if config.DefConfig.EthUSDT != "" { + SetupUSDT(invoker) + } + //SetupUSDC(invoker) SetOtherLockProxy(invoker) } diff --git a/cmd/ont_deployer/run.go b/cmd/ont_deployer/run.go index 39467cb..29e6f05 100644 --- a/cmd/ont_deployer/run.go +++ b/cmd/ont_deployer/run.go @@ -59,6 +59,10 @@ func main() { config.DefConfig.OntErc20 = addrs[3].ToHexString() config.DefConfig.OntOep4 = addrs[4].ToHexString() config.DefConfig.OntEth = addrs[5].ToHexString() + config.DefConfig.OntWBTC = addrs[6].ToHexString() + config.DefConfig.OntDai = addrs[7].ToHexString() + config.DefConfig.OntUSDC = addrs[8].ToHexString() + config.DefConfig.OntUSDT = addrs[9].ToHexString() err = config.DefConfig.Save(ontConfFile) if err != nil { @@ -96,7 +100,7 @@ func main() { } otherAddr := common2.HexToAddress(config.DefConfig.EthLockProxy) - txhash, err := invoker.SetOtherLockProxy(otherAddr.Bytes(), config.ETH_CHAIN_ID) + txhash, err := invoker.SetOtherLockProxy(otherAddr.Bytes(), config.DefConfig.EthChainID) if err != nil { panic(fmt.Errorf("failed to bind eth lock proxy on ont_proxy: %v", err)) } @@ -106,7 +110,7 @@ func main() { if err != nil { panic(fmt.Errorf("failed to decode proxy: %v", err)) } - txhash, err = invoker.SetOtherLockProxy(cmProxy, int(config.DefConfig.CMCrossChainId)) + txhash, err = invoker.SetOtherLockProxy(cmProxy, config.DefConfig.CMCrossChainId) if err != nil { panic(fmt.Errorf("failed to bind cosmos lock proxy: %v", err)) } diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 337dc59..ee6cae2 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -24,37 +24,46 @@ import ( "encoding/json" "flag" "fmt" + "math/big" + "os" + "strings" + "github.com/btcsuite/btcd/wire" types3 "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" common3 "github.com/ethereum/go-ethereum/common" + "github.com/joeqian10/neo-gogogo/block" + "github.com/joeqian10/neo-gogogo/helper/io" + "github.com/joeqian10/neo-gogogo/rpc" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology-go-sdk" + ontology_go_sdk "github.com/ontio/ontology-go-sdk" common2 "github.com/ontio/ontology/common" "github.com/ontio/ontology/core/types" "github.com/ontio/ontology/smartcontract/service/native/cross_chain/header_sync" "github.com/ontio/ontology/smartcontract/service/native/governance" utils2 "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/polynetwork/poly-go-sdk" + + "github.com/polynetwork/eth-contracts/go_abi/eccm_abi" + poly_go_sdk "github.com/polynetwork/poly-go-sdk" + "github.com/polynetwork/poly-io-test/chains/btc" cosmos2 "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" - "github.com/polynetwork/poly-io-test/chains/eth/abi/eccm" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" "github.com/polynetwork/poly-io-test/testcase" "github.com/polynetwork/poly/common" - "github.com/polynetwork/poly/consensus/vbft/config" + vconfig "github.com/polynetwork/poly/consensus/vbft/config" "github.com/polynetwork/poly/native/service/governance/node_manager" "github.com/polynetwork/poly/native/service/governance/relayer_manager" "github.com/polynetwork/poly/native/service/governance/side_chain_manager" + "github.com/polynetwork/poly/native/service/header_sync/bsc" "github.com/polynetwork/poly/native/service/header_sync/cosmos" "github.com/polynetwork/poly/native/service/utils" "github.com/tendermint/tendermint/rpc/client/http" types2 "github.com/tendermint/tendermint/types" - "math/big" - "os" - "strings" ) var ( @@ -71,6 +80,9 @@ var ( stateFile string id uint64 blockMsgDelay, hashMsgDelay, peerHandshakeTimeout, maxBlockChangeView uint64 + rootca string + chainId uint64 + fabricRelayerTy uint64 ) func init() { @@ -90,6 +102,9 @@ func init() { flag.Uint64Var(&hashMsgDelay, "hash_msg_delay", 5000, "") flag.Uint64Var(&peerHandshakeTimeout, "peer_handshake_timeout", 10, "") flag.Uint64Var(&maxBlockChangeView, "max_blk_change_view", 10000, "") + flag.StringVar(&rootca, "rootca", "", "file path for root CA") + flag.Uint64Var(&chainId, "chainid", 0, "default 0 means all chains") + flag.Uint64Var(&fabricRelayerTy, "fab_relayer_type", 1, "the relayer of fabric type: how many orgs need to sign CA for relayer") flag.Parse() } @@ -123,17 +138,50 @@ func main() { panic(fmt.Errorf("failed to decode no%d wallet %s with pwd %s", i, wArr[i], pArr[i])) } } - if RegisterBtcChain(poly, acc) { - ApproveRegisterSideChain(config.BTC_CHAIN_ID, poly, accArr) - } - if RegisterOntChain(poly, acc) { - ApproveRegisterSideChain(config.ONT_CHAIN_ID, poly, accArr) - } - if RegisterEthChain(poly, acc) { - ApproveRegisterSideChain(config.ETH_CHAIN_ID, poly, accArr) - } - if RegisterCosmos(poly, acc) { - ApproveRegisterSideChain(config.DefConfig.CMCrossChainId, poly, accArr) + switch chainId { + case config.DefConfig.BtcChainID: + if RegisterBtcChain(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.BtcChainID, poly, accArr) + } + case config.DefConfig.EthChainID: + if RegisterEthChain(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.EthChainID, poly, accArr) + } + case config.DefConfig.OntChainID: + if RegisterOntChain(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.OntChainID, poly, accArr) + } + case config.DefConfig.NeoChainID: + if RegisterNeoChain(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.NeoChainID, poly, accArr) + } + case config.DefConfig.CMCrossChainId: + if RegisterCosmos(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.CMCrossChainId, poly, accArr) + } + case config.DefConfig.BSCChainID: + if RegisterBSC(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.BSCChainID, poly, accArr) + } + case 0: + if RegisterBtcChain(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.BtcChainID, poly, accArr) + } + if RegisterOntChain(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.OntChainID, poly, accArr) + } + if RegisterEthChain(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.EthChainID, poly, accArr) + } + if RegisterCosmos(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.CMCrossChainId, poly, accArr) + } + if RegisterNeoChain(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.NeoChainID, poly, accArr) + } + if RegisterBSC(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.BSCChainID, poly, accArr) + } } case "sync_genesis_header": @@ -147,21 +195,45 @@ func main() { panic(fmt.Errorf("failed to decode no%d wallet %s with pwd %s", i, wArr[i], pArr[i])) } } - SyncBtcGenesisHeader(poly, acc) - SyncEthGenesisHeader(poly, accArr) - SyncOntGenesisHeader(poly, accArr) - SyncCosmosGenesisHeader(poly, accArr) + + switch chainId { + case config.DefConfig.BtcChainID: + SyncBtcGenesisHeader(poly, acc) + case config.DefConfig.EthChainID: + SyncEthGenesisHeader(poly, accArr) + case config.DefConfig.OntChainID: + SyncOntGenesisHeader(poly, accArr) + case config.DefConfig.NeoChainID: + SyncNeoGenesisHeader(poly, accArr) + case config.DefConfig.CMCrossChainId: + SyncCosmosGenesisHeader(poly, accArr) + case config.DefConfig.BSCChainID: + SyncBSCGenesisHeader(poly, accArr) + case 0: + SyncBtcGenesisHeader(poly, acc) + SyncEthGenesisHeader(poly, accArr) + SyncOntGenesisHeader(poly, accArr) + SyncCosmosGenesisHeader(poly, accArr) + SyncNeoGenesisHeader(poly, accArr) + SyncBSCGenesisHeader(poly, accArr) + } case "update_btc": accArr := getPolyAccounts(poly) if UpdateBtc(poly, acc) { - ApproveUpdateChain(config.BTC_CHAIN_ID, poly, accArr) + ApproveUpdateChain(config.DefConfig.BtcChainID, poly, accArr) } case "update_eth": accArr := getPolyAccounts(poly) if UpdateEth(poly, acc) { - ApproveUpdateChain(config.ETH_CHAIN_ID, poly, accArr) + ApproveUpdateChain(config.DefConfig.EthChainID, poly, accArr) + } + + case "update_neo": + accArr := getPolyAccounts(poly) + if UpdateNeo(poly, acc) { + ApproveUpdateChain(config.DefConfig.NeoChainID, poly, accArr) } case "init_ont_acc": @@ -212,9 +284,14 @@ func main() { case "add_relayer": accArr := getPolyAccounts(poly) signer := acc - acc, err = btc.GetAccountByPassword(poly, newWallet, []byte(newPwd)) - if err != nil { - panic(fmt.Errorf("failed to get new account: %v", err)) + acc = &poly_go_sdk.Account{} + if newPwd != "" { + acc, err = btc.GetAccountByPassword(poly, newWallet, []byte(newPwd)) + if err != nil { + panic(fmt.Errorf("failed to get new account: %v", err)) + } + } else { + acc.Address, _ = common.AddressFromBase58(newWallet) } ApproveRelayer(poly, RegisterRelayer(poly, acc, signer), accArr) case "reg_poly_node": @@ -371,7 +448,7 @@ func SyncBtcGenesisHeader(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) { hb := make([]byte, 4) binary.BigEndian.PutUint32(hb, uint32(start)) - txhash, err := poly.Native.Hs.SyncGenesisHeader(config.BTC_CHAIN_ID, append(buf.Bytes(), hb...), + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.BtcChainID, append(buf.Bytes(), hb...), []*poly_go_sdk.Account{acc}) if err != nil { if strings.Contains(err.Error(), "had been initialized") { @@ -401,7 +478,7 @@ func SyncEthGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou if err != nil { panic(err) } - txhash, err := poly.Native.Hs.SyncGenesisHeader(config.ETH_CHAIN_ID, raw, accArr) + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.EthChainID, raw, accArr) if err != nil { if strings.Contains(err.Error(), "had been initialized") { log.Info("eth already synced") @@ -414,7 +491,7 @@ func SyncEthGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou hdr.Hash().String(), txhash.ToHexString()) } - eccmContract, err := eccm.NewEthCrossChainManager(common3.HexToAddress(config.DefConfig.Eccm), tool.GetEthClient()) + eccmContract, err := eccm_abi.NewEthCrossChainManager(common3.HexToAddress(config.DefConfig.Eccm), tool.GetEthClient()) if err != nil { panic(err) } @@ -428,6 +505,127 @@ func SyncEthGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou panic(fmt.Errorf("SyncEthGenesisHeader, get suggest gas price failed error: %s", err.Error())) } gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + 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("SyncEthGenesisHeader - 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() + + contractabi, err := abi.JSON(strings.NewReader(eccm_abi.EthCrossChainManagerABI)) + if err != nil { + log.Errorf("SyncEthGenesisHeader, abi.JSON error: %v", err) + return + } + txData, err := contractabi.Pack("initGenesisBlock", rawHdr, publickeys) + if err != nil { + log.Errorf("SyncEthGenesisHeader, contractabi.Pack error: %v", err) + return + } + + eccm := common3.HexToAddress(config.DefConfig.Eccm) + callMsg := ethereum.CallMsg{ + From: signer.Address, To: &eccm, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(0), Data: txData, + } + gasLimit, err := tool.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + log.Errorf("SyncEthGenesisHeader, estimate gas limit error: %s", err.Error()) + return + } + + auth := testcase.MakeEthAuth(signer, nonce, gasPrice.Uint64(), gasLimit) + tx, err := eccmContract.InitGenesisBlock(auth, rawHdr, publickeys) + if err != nil { + log.Errorf("SyncEthGenesisHeader, failed to sync poly header to ETH: %v", err) + return + } + tool.WaitTransactionConfirm(tx.Hash()) + log.Infof("successful to sync poly genesis header to Ethereum: ( txhash: %s )", tx.Hash().String()) +} + +func SyncBSCGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { + tool := eth.NewEthTools(config.DefConfig.BSCURL) + height, err := tool.GetNodeHeight() + if err != nil { + panic(err) + } + + epochHeight := height - height%200 + pEpochHeight := epochHeight - 200 + + hdr, err := tool.GetBlockHeader(epochHeight) + if err != nil { + panic(err) + } + phdr, err := tool.GetBlockHeader(pEpochHeight) + if err != nil { + panic(err) + } + pvalidators, err := bsc.ParseValidators(phdr.Extra[32 : len(phdr.Extra)-65]) + if err != nil { + panic(err) + } + + if len(hdr.Extra) <= 65+32 { + panic(fmt.Sprintf("invalid epoch header at height:%d", epochHeight)) + } + if len(phdr.Extra) <= 65+32 { + panic(fmt.Sprintf("invalid epoch header at height:%d", pEpochHeight)) + } + + genesisHeader := bsc.GenesisHeader{Header: *hdr, PrevValidators: []bsc.HeightAndValidators{ + bsc.HeightAndValidators{Height: big.NewInt(int64(pEpochHeight)), Validators: pvalidators}, + }} + raw, err := json.Marshal(genesisHeader) + if err != nil { + panic(err) + } + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.BSCChainID, raw, accArr) + if err != nil { + if strings.Contains(err.Error(), "had been initialized") { + log.Info("bsc already synced") + } else { + panic(fmt.Errorf("SyncBSCGenesisHeader failed: %v", err)) + } + } else { + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to sync bsc genesis header: (height: %d, blk_hash: %s, txhash: %s )", epochHeight, + hdr.Hash().String(), txhash.ToHexString()) + } + + eccmContract, err := eccm_abi.NewEthCrossChainManager(common3.HexToAddress(config.DefConfig.Eccm), tool.GetEthClient()) + if err != nil { + panic(err) + } + signer, err := eth.NewEthSigner(config.DefConfig.BSCPrivateKey) + if err != nil { + panic(err) + } + nonce := eth.NewNonceManager(tool.GetEthClient()).GetAddressNonce(signer.Address) + gasPrice, err := tool.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + panic(fmt.Errorf("SyncBSCGenesisHeader, get suggest gas price failed error: %s", err.Error())) + } + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) auth := testcase.MakeEthAuth(signer, nonce, gasPrice.Uint64(), uint64(8000000)) gB, err := poly.GetBlockByHeight(config.DefConfig.RCEpoch) @@ -454,7 +652,7 @@ func SyncEthGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou tx, err := eccmContract.InitGenesisBlock(auth, gB.Header.ToArray(), publickeys) tool.WaitTransactionConfirm(tx.Hash()) - log.Infof("successful to sync poly genesis header to Ethereum: ( txhash: %s )", tx.Hash().String()) + log.Infof("successful to sync poly genesis header to BSC: ( txhash: %s )", tx.Hash().String()) } func SyncOntGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { @@ -465,7 +663,7 @@ func SyncOntGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou if err != nil { panic(err) } - txhash, err := poly.Native.Hs.SyncGenesisHeader(config.ONT_CHAIN_ID, genesisBlock.Header.ToArray(), accArr) + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.OntChainID, genesisBlock.Header.ToArray(), accArr) if err != nil { if strings.Contains(err.Error(), "had been initialized") { log.Info("ont already synced") @@ -504,6 +702,37 @@ func SyncOntGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou log.Infof("successful to sync poly genesis header to Ontology: ( txhash: %s )", txHash.ToHexString()) } +func SyncNeoGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) error { + cli := rpc.NewClient(config.DefConfig.NeoUrl) + resp := cli.GetBlockHeaderByIndex(config.DefConfig.NeoEpoch) + if resp.HasError() { + return fmt.Errorf("failed to get header: %v", resp.Error.Message) + } + header, err := block.NewBlockHeaderFromRPC(&resp.Result) + if err != nil { + return err + } + buf := io.NewBufBinaryWriter() + header.Serialize(buf.BinaryWriter) + if buf.Err != nil { + return buf.Err + } + + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.NeoChainID, buf.Bytes(), accArr) + if err != nil { + if strings.Contains(err.Error(), "had been initialized") { + log.Info("neo already synced") + } else { + panic(fmt.Errorf("SyncNeoGenesisHeader failed: %v", err)) + } + } else { + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to sync neo genesis header: ( txhash: %s )", txhash.ToHexString()) + } + + return nil +} + func SyncCosmosGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { invoker, err := cosmos2.NewCosmosInvoker() if err != nil { @@ -630,15 +859,15 @@ func RegisterBtcChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool rawTy := make([]byte, 8) binary.LittleEndian.PutUint64(rawTy, uint64(tyNet)) - txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.BTC_CHAIN_ID, config.BTC_CHAIN_ID, "btc", + txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.BtcChainID, config.DefConfig.BtcChainID, "btc", blkToWait, rawTy, acc) if err != nil { if strings.Contains(err.Error(), "already registered") { - log.Infof("btc chain %d already registered", config.BTC_CHAIN_ID) + log.Infof("btc chain %d already registered", config.DefConfig.BtcChainID) return false } if strings.Contains(err.Error(), "already requested") { - log.Infof("btc chain %d already requested", config.BTC_CHAIN_ID) + log.Infof("btc chain %d already requested", config.DefConfig.BtcChainID) return true } panic(fmt.Errorf("RegisterBtcChain failed: %v", err)) @@ -659,15 +888,15 @@ func RegisterEthChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool if err != nil { panic(fmt.Errorf("RegisterEthChain, failed to decode eccd '%s' : %v", config.DefConfig.Eccd, err)) } - txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.ETH_CHAIN_ID, config.ETH_CHAIN_ID, "eth", + txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.EthChainID, 2, "eth", blkToWait, eccd, acc) if err != nil { if strings.Contains(err.Error(), "already registered") { - log.Infof("eth chain %d already registered", config.ETH_CHAIN_ID) + log.Infof("eth chain %d already registered", config.DefConfig.EthChainID) return false } if strings.Contains(err.Error(), "already requested") { - log.Infof("eth chain %d already requested", config.ETH_CHAIN_ID) + log.Infof("eth chain %d already requested", config.DefConfig.EthChainID) return true } panic(fmt.Errorf("RegisterEthChain failed: %v", err)) @@ -678,6 +907,31 @@ func RegisterEthChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool return true } +func RegisterNeoChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + blkToWait := uint64(1) + eccd, err := common2.AddressFromHexString(strings.TrimPrefix(config.DefConfig.NeoCCMC, "0x")) + if err != nil { + panic(fmt.Errorf("RegisterNeoChain, failed to decode eccd '%s' : %v", config.DefConfig.Eccd, err)) + } + txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.NeoChainID, 4, "NEO", + blkToWait, eccd[:], acc) + if err != nil { + if strings.Contains(err.Error(), "already registered") { + log.Infof("neo chain %d already registered", config.DefConfig.NeoChainID) + return false + } + if strings.Contains(err.Error(), "already requested") { + log.Infof("neo chain %d already requested", config.DefConfig.NeoChainID) + return true + } + panic(fmt.Errorf("RegisterNeoChain failed: %v", err)) + } + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to register neo chain: ( txhash: %s )", txhash.ToHexString()) + + return true +} + func RegisterCosmos(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { blkToWait := uint64(1) txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.CMCrossChainId, 5, "switcheochain", @@ -698,46 +952,53 @@ func RegisterCosmos(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { log.Infof("successful to register cosmos chain: ( txhash: %s )", txhash.ToHexString()) return true + } -func RegisterOntChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { - txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.ONT_CHAIN_ID, 3, "ont", - 1, []byte{}, acc) +func RegisterBSC(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + blkToWait := uint64(15) + extra := bsc.ExtraInfo{ + // test id 97 + ChainID: big.NewInt(97), + } + extraBytes, _ := json.Marshal(extra) + txhash, err := poly.Native.Scm.RegisterSideChainExt(acc.Address, config.DefConfig.BSCChainID, 5, "bsc", + blkToWait, []byte{}, extraBytes, acc) if err != nil { if strings.Contains(err.Error(), "already registered") { - log.Infof("ont chain %d already registered", config.ONT_CHAIN_ID) + log.Infof("bsc chain %d already registered", config.DefConfig.BSCChainID) return false } if strings.Contains(err.Error(), "already requested") { - log.Infof("ont chain %d already requested", config.ONT_CHAIN_ID) + log.Infof("bsc chain %d already requested", config.DefConfig.BSCChainID) return true } - panic(fmt.Errorf("RegisterOntChain failed: %v", err)) + panic(fmt.Errorf("RegisterBSC failed: %v", err)) } testcase.WaitPolyTx(txhash, poly) - log.Infof("successful to register ont chain: ( txhash: %s )", txhash.ToHexString()) + log.Infof("successful to register bsc chain: ( txhash: %s )", txhash.ToHexString()) return true } -func RegisterNeoChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { - txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, 4, 4, "neo", +func RegisterOntChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.OntChainID, 3, "ont", 1, []byte{}, acc) if err != nil { if strings.Contains(err.Error(), "already registered") { - log.Infof("neo chain %d already registered", 4) + log.Infof("ont chain %d already registered", config.DefConfig.OntChainID) return false } if strings.Contains(err.Error(), "already requested") { - log.Infof("neo chain %d already requested", 4) + log.Infof("ont chain %d already requested", config.DefConfig.OntChainID) return true } - panic(fmt.Errorf("RegisterNeoChain failed: %v", err)) + panic(fmt.Errorf("RegisterOntChain failed: %v", err)) } testcase.WaitPolyTx(txhash, poly) - log.Infof("successful to register neo chain: ( txhash: %s )", txhash.ToHexString()) + log.Infof("successful to register ont chain: ( txhash: %s )", txhash.ToHexString()) return true } @@ -761,7 +1022,7 @@ func UpdateBtc(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { rawTy := make([]byte, 8) binary.LittleEndian.PutUint64(rawTy, uint64(tyNet)) - if err := updateSideChain(poly, acc, config.BTC_CHAIN_ID, blkToWait, "btc", rawTy); err != nil { + if err := updateSideChain(poly, acc, config.DefConfig.BtcChainID, 1, blkToWait, "btc", rawTy); err != nil { log.Errorf("failed to update btc: %v", err) return false } @@ -779,16 +1040,30 @@ func UpdateEth(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { log.Errorf("failed to decode eccd: %v", err) return false } - if err = updateSideChain(poly, acc, config.ETH_CHAIN_ID, blkToWait, "eth", eccd); err != nil { + if err = updateSideChain(poly, acc, config.DefConfig.EthChainID, 2, blkToWait, "eth", eccd); err != nil { log.Errorf("failed to update eth: %v", err) return false } return true } -func updateSideChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account, chainId, blkToWait uint64, name string, +func UpdateNeo(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + blkToWait := uint64(1) + eccd, err := common2.AddressFromHexString(strings.TrimPrefix(config.DefConfig.NeoCCMC, "0x")) + if err != nil { + log.Errorf("failed to decode eccd: %v", err) + return false + } + if err = updateSideChain(poly, acc, config.DefConfig.NeoChainID, 4, blkToWait, "NEO", eccd[:]); err != nil { + log.Errorf("failed to update neo: %v", err) + return false + } + return true +} + +func updateSideChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account, chainId, router, blkToWait uint64, name string, ccmc []byte) error { - txhash, err := poly.Native.Scm.UpdateSideChain(acc.Address, chainId, chainId, name, blkToWait, ccmc, acc) + txhash, err := poly.Native.Scm.UpdateSideChain(acc.Address, chainId, router, name, blkToWait, ccmc, acc) if err != nil { return err } diff --git a/config/config.go b/config/config.go index 916c589..507012d 100644 --- a/config/config.go +++ b/config/config.go @@ -19,17 +19,14 @@ package config import ( "encoding/json" "fmt" - "github.com/btcsuite/btcd/chaincfg" - "github.com/polynetwork/poly-io-test/log" "io/ioutil" "os" + + "github.com/btcsuite/btcd/chaincfg" + "github.com/polynetwork/poly-io-test/log" ) const ( - ONT_CHAIN_ID = 3 - ETH_CHAIN_ID = 2 - BTC_CHAIN_ID = 1 - CM_BTCX = "btcx" CM_ETHX = "ethx" CM_ERC20 = "erc20x" @@ -40,6 +37,12 @@ const ( //Config object used by ontology-instance type TestConfig struct { + BtcChainID uint64 + EthChainID uint64 + OntChainID uint64 + NeoChainID uint64 + BSCChainID uint64 + BtcRestAddr string BtcRestUser string BtcRestPwd string @@ -61,6 +64,10 @@ type TestConfig struct { EthURL string ETHPrivateKey string + // bsc urls + BSCURL string + BSCPrivateKey string + // ontology OntJsonRpcAddress string OntWallet string @@ -80,6 +87,11 @@ type TestConfig struct { CMCrossChainId uint64 CMEpoch int64 + // neo chain conf + NeoUrl string + NeoWif string + NeoEpoch uint32 + // relayer chain RCWallet string RCWalletPwd string @@ -103,6 +115,13 @@ type TestConfig struct { EthLockProxy string EthOngx string EthOntx string + EthOntd string + EthUSDT string + EthWBTC string + EthDai string + EthUSDC string + EthNeo string + EthRenBTC string BtceContractAddress string // ont contracts: auto set after deploy @@ -110,18 +129,41 @@ type TestConfig struct { OntOep4 string OntLockProxy string OntEth string + OntUSDT string + OntWBTC string + OntDai string + OntUSDC string + OntNeo string + OntONTD string + OntRenBTC string BtcoContractAddress string + // neo + NeoCCMC string + NeoLockProxy string + CNeo string + NeoOnt string + NeoOntd string + NeoEth string + // cosmos CMLockProxy string // transfer amount - BtcValLimit uint64 - OntValLimit uint64 - OngValLimit uint64 - EthValLimit uint64 - Oep4ValLimit uint64 - Erc20ValLimit uint64 + BtcValLimit uint64 + OntValLimit uint64 + OntdValLimit uint64 + OngValLimit uint64 + EthValLimit uint64 + Oep4ValLimit uint64 + Erc20ValLimit uint64 + USDTValLimit uint64 + NeoValLimit uint64 + WBTCValLimit uint64 + USDCValLimit uint64 + RenBTCValLimit uint64 + + OntdValFloor uint64 } //Default config instance diff --git a/go.mod b/go.mod index fe06896..d053e58 100644 --- a/go.mod +++ b/go.mod @@ -3,18 +3,35 @@ module github.com/polynetwork/poly-io-test go 1.14 require ( - github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect github.com/btcsuite/btcd v0.20.1-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/ontio/ontology v1.11.1-0.20200812075204-26cf1fa5dd47 + github.com/google/go-cmp v0.5.2 // indirect + github.com/gorilla/mux v1.8.0 // indirect + 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.4 - github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759 - github.com/polynetwork/poly v0.0.0-20200715030435-4f1d1a0adb44 - github.com/polynetwork/poly-go-sdk v0.0.0-20200730112529-d9c0c7ddf3d8 + github.com/ontio/ontology-go-sdk v1.11.9-0.20200819065441-7c4b7a8330f6 github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666 + github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759 + github.com/polynetwork/eth-contracts v0.0.0-20200903021827-c9212e419943 + github.com/polynetwork/poly v0.0.0-20201216061550-50185057319d + github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493 + github.com/stretchr/testify v1.6.1 github.com/tendermint/tendermint v0.33.7 - github.com/polynetwork/eth-contracts v0.0.0-20200814062128-70f58e22b014 + 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 ) + +replace github.com/polynetwork/eth-contracts => github.com/zouxyan/eth-contracts v0.0.0-20201215112041-6532ab4e12f4 + +replace github.com/polynetwork/poly => github.com/zhiqiangxu/poly v0.0.0-20201216075543-df86073d2575 + +replace github.com/polynetwork/poly-go-sdk => github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 diff --git a/go.sum b/go.sum index c63f019..c4458c2 100644 --- a/go.sum +++ b/go.sum @@ -15,8 +15,8 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= 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/ChainSafe/go-schnorrkel v0.0.0-20200102211924-4bcbc698314f h1:4O1om+UVU+Hfcihr1timk8YNXHxzZWgCo7ofnrZRApw= 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= @@ -30,24 +30,23 @@ github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdII github.com/OpenBazaar/jsonpb v0.0.0-20171123000858-37d32ddf4eef/go.mod h1:55mCznBcN9WQgrtgaAkv+p2LxeW/tQRdidyyE9D0I5k= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VictoriaMetrics/fastcache v1.5.3 h1:2odJnXLbFZcoV9KYtQ+7TH1UOq3dn3AssMgieaezkR4= github.com/VictoriaMetrics/fastcache v1.5.3/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE= github.com/VictoriaMetrics/fastcache v1.5.7 h1:4y6y0G8PRzszQUYIQHHssv/jgPHAb5qQuuDNdCbyAgw= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= +github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Workiva/go-datastructures v1.0.50 h1:slDmfW6KCHcC7U+LP3DDBbm4fqTwZGn1beOFPfGaLvo= github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/alecthomas/log4go v0.0.0-20180109082532-d146e6b86faa h1:0zdYOLyuQ3TWIgWNgEH+LnmZNMmkO1ze3wriQt093Mk= -github.com/alecthomas/log4go v0.0.0-20180109082532-d146e6b86faa/go.mod h1:iCVmQ9g4TfaRX5m5jq5sXY7RXYWPv9/PynM/GocbG3w= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -71,9 +70,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= -github.com/btcsuite/btcd v0.0.0-20190109040709-5bda5314ca95/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= 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= @@ -81,20 +78,22 @@ github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9 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= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.1/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0 h1:Tvd0BfvqX9o823q1j2UZ/epQo09eJh6dTcRp79ilIN4= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE= 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/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -104,6 +103,7 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= +github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e h1:0XBUw73chJ1VYSsfvcPvVT7auykAJce9FpRr10L6Qhw= github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:P13beTBKr5Q18lJe1rIoLUqjM+CB1zYrRg44ZqGuQSA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -111,32 +111,27 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/cosmos-sdk v0.37.4 h1:1ioXxkpiS+wOgaUbROeDIyuF7hciU5nti0TSyBmV2Ok= -github.com/cosmos/cosmos-sdk v0.37.4/go.mod h1:Axr+Q+G2Ffduxt4zMA6KwxxvyVSKPB9+nXZVPKgpC2c= -github.com/cosmos/cosmos-sdk v0.38.4 h1:jPZOvhMQkm7wwwzcLxuluhVpKfuIgddNGt999pAiz/Y= github.com/cosmos/cosmos-sdk v0.38.4/go.mod h1:rzWOofbKfRt3wxiylmYWEFHnxxGj0coyqgWl2I9obAw= -github.com/cosmos/cosmos-sdk v0.38.5/go.mod h1:o5V2eXScgPWh8BkKr2Z2Zq+NEt1RFW8l1HBk87JG+PY= +github.com/cosmos/cosmos-sdk v0.39.0/go.mod h1:3iKiqnQ48T0UG4IDw9EM8utQSwItutLUkmGkRSWpS5U= github.com/cosmos/cosmos-sdk v0.39.1 h1:vhjf9PZh9ph8btAj9aBpHoVITgVVjNBpM3x5Gl/Vwac= github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= -github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= -github.com/cosmos/ledger-cosmos-go v0.10.3/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= +github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= +github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -162,7 +157,6 @@ github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c h1:JHHhtb9XWJrGNMcr github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa h1:XKAhUk/dtp+CV0VO6mhG2V7jA9vbcGcnYF/Ay9NjZrY= github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= @@ -171,25 +165,22 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.2/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/go-ethereum v1.8.20/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= -github.com/ethereum/go-ethereum v1.9.6/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= -github.com/ethereum/go-ethereum v1.9.12/go.mod h1:PvsVkQmhZFx92Y+h2ylythYlheEDt/uBgFbl61Js/jo= -github.com/ethereum/go-ethereum v1.9.13 h1:rOPqjSngvs1VSYH2H+PMPiWt4VEulvNRbFgqiGqJM3E= github.com/ethereum/go-ethereum v1.9.13/go.mod h1:qwN9d1GLyDh0N7Ab8bMGd0H9knaji2jOBm2RrMGjXls= -github.com/ethereum/go-ethereum v1.9.14 h1:/rGoPYujLeajAHyDs8aZKYcLrurLdUJP9AzHk73QNr0= -github.com/ethereum/go-ethereum v1.9.14/go.mod h1:oP8FC5+TbICUyftkTWs+8JryntjIJLJvWvApK3z2AYw= github.com/ethereum/go-ethereum v1.9.15 h1:wrWl+QrtutRUJ9LZXdUqBoGoo2b1tOCYRDrAOQhCY3A= github.com/ethereum/go-ethereum v1.9.15/go.mod h1:slT8bPPRhXsyNTwHQxrOnjuTZ1sDXRajW11EkJ84QJ0= +github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= +github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= +github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc h1:jtW8jbpkO4YirRSyepBOH8E+2HEw6/hKkBvFPwhUN8c= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= @@ -198,24 +189,21 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gcash/bchd v0.14.7/go.mod h1:Gk/O1ktRVW5Kao0RsnVXp3bWxeYQadqawZ1Im9HE78M= -github.com/gcash/bchd v0.15.2 h1:gWy1qf20w7cxa94vZyR1hyCNrIZF5J+dbJkIERmytbI= github.com/gcash/bchd v0.15.2/go.mod h1:k9wIjgwnhbrAw+ruIPZ2tHZMzfFNdyUnORZZX7lqXGY= -github.com/gcash/bchd v0.16.4 h1:+aq3sk3MDTLLwfDldvJaQBbpALCiDMH1bT32qIeHYos= github.com/gcash/bchd v0.16.4/go.mod h1:gR67ljCexTNwbKYN3wjbRHi9lYLp4rMomy1UQ3E1USA= +github.com/gcash/bchd v0.16.5 h1:hkLUecfvcf2wf5vy05vp5X0OG9I5xWKnxdHU2/KI8PM= +github.com/gcash/bchd v0.16.5/go.mod h1:gR67ljCexTNwbKYN3wjbRHi9lYLp4rMomy1UQ3E1USA= github.com/gcash/bchlog v0.0.0-20180913005452-b4f036f92fa6 h1:3pZvWJ8MSfWstGrb8Hfh4ZpLyZNcXypcGx2Ju4ZibVM= github.com/gcash/bchlog v0.0.0-20180913005452-b4f036f92fa6/go.mod h1:PpfmXTLfjRp7Tf6v/DCGTRXHz+VFbiRcsoUxi7HvwlQ= github.com/gcash/bchutil v0.0.0-20190625002603-800e62fe9aff/go.mod h1:zXSP0Fg2L52wpSEDApQDQMiSygnQiK5HDquDl0a5BHg= github.com/gcash/bchutil v0.0.0-20191012211144-98e73ec336ba/go.mod h1:nUIrcbbtEQdCsRwcp+j/CndDKMQE9Fi8p2F8cIZmIqI= -github.com/gcash/bchutil v0.0.0-20200229194731-128fc9884722 h1:oeBQvSvKXcDbyoUbyeveB99CHJWgQfxiV9gKcPrXfhs= github.com/gcash/bchutil v0.0.0-20200229194731-128fc9884722/go.mod h1:wB++2ZcHUvGLN1OgO9swBmJK1vmyshJLW9SNS+apXwc= github.com/gcash/bchutil v0.0.0-20200506001747-c2894cd54b33 h1:HNO6rKAfeYm6hE+0KXMfRomDZ8cQNlBmWirH8PSk9MY= github.com/gcash/bchutil v0.0.0-20200506001747-c2894cd54b33/go.mod h1:wB++2ZcHUvGLN1OgO9swBmJK1vmyshJLW9SNS+apXwc= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/go-interpreter/wagon v0.6.0 h1:BBxDxjiJiHgw9EdkYXAWs8NHhwnazZ5P2EWBW5hFNWw= -github.com/go-interpreter/wagon v0.6.0/go.mod h1:5+b/MBYkclRZngKF5s6qrgWxSLgE9F5dFdO1hAueZLc= -github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= @@ -224,12 +212,12 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-redis/redis/v7 v7.2.0/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= @@ -240,7 +228,6 @@ github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFG github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -248,15 +235,14 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129 h1:tT8iWCYw4uOem71yYA3htfH+LNopJvcqZQshm56G5L4= github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c h1:zqAKixg3cTcIasAMJV+EcfVbWwLpOZ7LeoWJvcuD/5Q= github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4 h1:87PNWwrRvUSnqS4dlcBU/ftvOIBep4sYuBLlh6rX2wk= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -275,27 +261,27 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= 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= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -310,7 +296,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f h1:8N8XWLZelZNibkhM1FuF+3Ad3YIbgirjdMiVA0eUkaM= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= @@ -343,19 +328,19 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3 h1:DqD8eigqlUm0+znmx7zhL0xvTW3+e1jCekJMfBUADWI= github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= github.com/huin/goupnp v1.0.0 h1:wg75sLpL6DZqwHQN6E1Cfk6mtfzS45z8OV+ic+DtHRo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/improbable-eng/grpc-web v0.9.1/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= github.com/improbable-eng/grpc-web v0.12.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/itchyny/base58-go v0.0.5/go.mod h1:SrMWPE3DFuJJp1M/RUhu4fccp/y9AlB8AL3o3duPToU= github.com/itchyny/base58-go v0.1.0 h1:zF5spLDo956exUAD17o+7GamZTRkXOZlqJjRciZwd1I= github.com/itchyny/base58-go v0.1.0/go.mod h1:SrMWPE3DFuJJp1M/RUhu4fccp/y9AlB8AL3o3duPToU= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 h1:6OvNmYgJyexcZ3pYbTI9jWx5tHo1Dee/tWbLMfPe2TA= @@ -364,18 +349,19 @@ github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M github.com/jessevdk/go-flags v0.0.0-20181221193153-c0795c8afcf4/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/joeqian10/neo-gogogo v0.0.0-20200426085128-e6cdae98aa2d h1:Ol7pHz1sIixunBj65Utbx92vVrMowkV/pBc/SSk60IE= -github.com/joeqian10/neo-gogogo v0.0.0-20200426085128-e6cdae98aa2d/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= -github.com/joeqian10/neo-gogogo v0.0.0-20200611102831-c17de5e1f0f8 h1:C+PIS6p7oQ4DwT+1IJkIvS+BMLn9TodglcqcGzhE+fQ= github.com/joeqian10/neo-gogogo v0.0.0-20200611102831-c17de5e1f0f8/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/joeqian10/neo-gogogo v0.0.0-20200716075409-923bd4879b43/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= +github.com/joeqian10/neo-gogogo v0.0.0-20200811090937-d8aab8600241 h1:kfTkgo18r3VFWrr3z8arDU05yHiX/nU1ZaDgEApinMo= +github.com/joeqian10/neo-gogogo v0.0.0-20200811090937-d8aab8600241/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= @@ -390,14 +376,16 @@ github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6 github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 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/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= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= @@ -407,13 +395,13 @@ github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.0 h1:v2XXALHHh6zHfYTJ+cSkwtyffnaOyR1MXaA91mTrb8o= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -424,9 +412,9 @@ github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miguelmota/go-solidity-sha3 v0.1.0/go.mod h1:FuaBKCJUkJcmPqCuKvPFYfzK1auYGr5+8i2evSBIm/Q= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/minio/highwayhash v1.0.0 h1:iMSDhgUILCr0TNm8LWlSjF8N0ZIj2qbO8WHp6Q/J2BA= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -453,6 +441,8 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +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/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -462,41 +452,27 @@ github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c h1:1RHs3t github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b h1:UQDN12BzdWhXQL0t2QcRixHqAIG+JKNvQ20DhrIODtU= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b/go.mod h1:J0eVc7BEMmVVXbGv9PHoxjRSEwOwLr0qfzPk8Rdl5iw= -github.com/ontio/ontology v1.8.2/go.mod h1:byQJEyJE7TY0Rfmi1rQNp4YZOydD7T84lyl8ZwpQs0c= -github.com/ontio/ontology v1.9.0/go.mod h1:SZxX++4lKT1VY3WFJkHNUbQ96+5ojuXtYEC1dVDQm9E= -github.com/ontio/ontology v1.10.0 h1:4NG0gQVA7k9ndTKxQJrrlZU7Azvg0caobTNpAj0qZ48= -github.com/ontio/ontology v1.10.0/go.mod h1:iok/imHJVQXi5/Yr88dcbrKBRHGdiota1ZC6qh6l6Rc= -github.com/ontio/ontology v1.11.0 h1:0T/hxFDHQqRcs1+yEdgaym5YIvGx5yebOsHYdKVWgHI= github.com/ontio/ontology v1.11.0/go.mod h1:Qw74bfTBlIQka+jQX4nXuWvyOYGGt368/V7XFxaf4tY= -github.com/ontio/ontology v1.11.1-0.20200806113519-0f19d4e282f0/go.mod h1:Qw74bfTBlIQka+jQX4nXuWvyOYGGt368/V7XFxaf4tY= -github.com/ontio/ontology v1.11.1-0.20200812075204-26cf1fa5dd47 h1:9iZitqJe7SBGF8f6jOHjhotrB7ZLKKMM+g6S0tMbOL4= -github.com/ontio/ontology v1.11.1-0.20200812075204-26cf1fa5dd47/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= -github.com/ontio/ontology-crypto v1.0.5/go.mod h1:ebrQJ4/VS2F6pwHGktHDYtY/7Y2ca/ogfnlYABrQI2c= -github.com/ontio/ontology-crypto v1.0.7/go.mod h1:ebrQJ4/VS2F6pwHGktHDYtY/7Y2ca/ogfnlYABrQI2c= -github.com/ontio/ontology-crypto v1.0.8 h1:xft6K8I43vkl60kywT/9GZlUjdacaL7OF6MFFb32kE4= -github.com/ontio/ontology-crypto v1.0.8/go.mod h1:RW/HSgBTd6Qcuhr/C4luOftN+LNl5oZTQzAywHTsmtY= -github.com/ontio/ontology-crypto v1.0.9-0.20200427073653-7eba89bbe29b/go.mod h1:h/jeqqb9Ma/Leszxqh6zY3eTF2yks44hyRKikMni+YQ= +github.com/ontio/ontology v1.11.1-0.20200817111815-fb3d61fdc12e/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= +github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c h1:Q2PShm6Hu83e7p7UKE7SgMIxW6WRNyymgI738KMKlKE= +github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= github.com/ontio/ontology-crypto v1.0.9 h1:6fxBsz3W4CcdJk4/9QO7j0Qq7NdlP2ixPrViu8XpzzM= github.com/ontio/ontology-crypto v1.0.9/go.mod h1:h/jeqqb9Ma/Leszxqh6zY3eTF2yks44hyRKikMni+YQ= github.com/ontio/ontology-eventbus v0.9.1 h1:nt3AXWx3gOyqtLiU4EwI92Yc4ik/pWHu9xRK15uHSOs= github.com/ontio/ontology-eventbus v0.9.1/go.mod h1:hCQIlbdPckcfykMeVUdWrqHZ8d30TBdmLfXCVWGkYhM= -github.com/ontio/ontology-go-sdk v1.11.1 h1:tgeZ9IHtR7jiGzsFdgLVEtg4Za9OxLB+S1xz2nr5id4= -github.com/ontio/ontology-go-sdk v1.11.1/go.mod h1:L6W59mkdmShcr8YCu1BZBcDqDTnmee45u/h956UgPtg= -github.com/ontio/ontology-go-sdk v1.11.3 h1:FUFvR9JrXrQhmih5XnybdzYATVK9J/VVlf7ByjCMYkg= -github.com/ontio/ontology-go-sdk v1.11.3/go.mod h1:xA4OFerYgXMoQIdfQsyFCylM8QGyWCvuPPlfSCp+aRw= -github.com/ontio/ontology-go-sdk v1.11.4 h1:c89bf6BxahNpf7cM+k0/6RjJNNd33NdtsjdeOB5pT8s= -github.com/ontio/ontology-go-sdk v1.11.4/go.mod h1:fRhHYhFfYiUuIlTVtcXLVziiXOneBwVCSAX72+N7XVI= +github.com/ontio/ontology-go-sdk v1.11.9-0.20200819065441-7c4b7a8330f6 h1:Mg3uDLhUqbTyCDQLFxEGXRd8xTk587sobcQ87MpsNdQ= +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-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= @@ -513,7 +489,6 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= 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 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= 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= @@ -523,7 +498,6 @@ github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssy github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -532,33 +506,24 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666 h1:oV6NySvZhesxTYy7NOifrNAVuEHf1934Ny56ERcPrJs= github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666/go.mod h1:U8rR9X6vemlkBAJWfvzwSoalcJjX8B2aQjB0kPRhBUA= -github.com/polynetwork/cosmos-poly-module v0.0.0-20200618084422-1e7a29b91b14 h1:s2INOBG2OHXuidCy3LdnRAY/12AnFvFrlHa4gGfFvt4= -github.com/polynetwork/cosmos-poly-module v0.0.0-20200618084422-1e7a29b91b14/go.mod h1:xd+xtXSRyj8+5ns9wtkpuX5tGGVEuVRYQAVtsG+/nGg= -github.com/polynetwork/cosmos-poly-module v0.0.0-20200619030442-9e9b24423bac h1:bXtt0p6935Srz8vlLcCspTt5xHkfprcjEp2551zacqM= -github.com/polynetwork/cosmos-poly-module v0.0.0-20200619030442-9e9b24423bac/go.mod h1:xd+xtXSRyj8+5ns9wtkpuX5tGGVEuVRYQAVtsG+/nGg= -github.com/polynetwork/cosmos-poly-module v0.0.0-20200624032945-f3e838f0d6c3 h1:A9rGzGgzDHn5dwei4HCyFL0zh45XIk7X/BMk3HYZ/Lw= -github.com/polynetwork/cosmos-poly-module v0.0.0-20200624032945-f3e838f0d6c3/go.mod h1:tLtHmDsC06D9e3tTQKCy6rr7V2zgu1mmrhl0Vyhyj60= github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759 h1:M0DV6MUVXOZtdQ94i8oYuSAX+ljzEe+mMqb2Llnm/oM= github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759/go.mod h1:VMBJZ8GSZeoWBntd/rWx2Rr5roRKofO7siP1qd6A6pY= -github.com/polynetwork/eth-contracts v0.0.0-20200811090838-fe598aed785a h1:MA7OxMUS5Hw4c8z5s9SXA4HWZJnfWeZLs/XbJenMHMQ= -github.com/polynetwork/eth-contracts v0.0.0-20200811090838-fe598aed785a/go.mod h1:TeePrYZfWJAwuksPlie7RPequ51Ujp5l/JY6TcutsFc= -github.com/polynetwork/eth-contracts v0.0.0-20200814062128-70f58e22b014/go.mod h1:TeePrYZfWJAwuksPlie7RPequ51Ujp5l/JY6TcutsFc= -github.com/polynetwork/poly v0.0.0-20200710095239-0596a3d7afe5 h1:4y43NfxO1fiNL0tANhv5egVFXwa6gTRcpKW7vVFtM1E= github.com/polynetwork/poly v0.0.0-20200710095239-0596a3d7afe5/go.mod h1:UzlGEWk0eCGsuMJOZfBoZjRbmu4Yw/SudKAIFe1gPnY= -github.com/polynetwork/poly v0.0.0-20200715030435-4f1d1a0adb44 h1:QXznsPhBBa1vY6Fhav8S9+qoHBi8iGy6g1VeIMdYglI= github.com/polynetwork/poly v0.0.0-20200715030435-4f1d1a0adb44/go.mod h1:UzlGEWk0eCGsuMJOZfBoZjRbmu4Yw/SudKAIFe1gPnY= -github.com/polynetwork/poly-go-sdk v0.0.0-20200722030827-6875b6018b93 h1:w4Yk671JJhNFGMEQd3BMVme+bUT/LHfoaVGf2B1jQI8= +github.com/polynetwork/poly v0.0.0-20201215081835-44303924f13c h1:FI45q7Ej3ROUDtmThE13AAGGJnNCLst/FEECFvW7fSw= +github.com/polynetwork/poly v0.0.0-20201215081835-44303924f13c/go.mod h1:GLCHH85w+7Ca5P65hAd2qHgt5Azg0yuODLqAOfV1UTU= +github.com/polynetwork/poly v0.0.0-20201216061550-50185057319d h1:XAQNgWfPcBofzQEz7bAYs3ypGAHgkWF7eUzk0BkdtyY= +github.com/polynetwork/poly v0.0.0-20201216061550-50185057319d/go.mod h1:SrFSYe/3uWkouGvoSGkjDPm5sNT95dSFZkQtXRun148= +github.com/polynetwork/poly v1.11.0 h1:1xEWr9z9/TCs/XM7eXBTmF2RT061G1zTumqAVdjzR+A= github.com/polynetwork/poly-go-sdk v0.0.0-20200722030827-6875b6018b93/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= -github.com/polynetwork/poly-go-sdk v0.0.0-20200730112529-d9c0c7ddf3d8 h1:gCoU0VLS6Bbz6K5OuTTzsjLtXxnLnB/583VXVjapLDI= -github.com/polynetwork/poly-go-sdk v0.0.0-20200730112529-d9c0c7ddf3d8/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= +github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493 h1:wob4aH5NxiDFIOWlpKbmoIb88QOccDNa1+rl93czjr8= +github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/pressly/goose v2.7.0-rc4+incompatible/go.mod h1:m+QHWCqxR3k8D9l7qfzuC/djtlfzxr34mozWDYEu1z8= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= -github.com/prometheus/client_golang v1.5.0 h1:Ctq0iGpCmr3jeP77kbF2UxgvRwzWWz+4Bh9/vJTyg1A= github.com/prometheus/client_golang v1.5.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.5.1 h1:bdHYieyGlH+6OLEk2YQha8THib30KP0/yD0YH9m6xcA= github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= @@ -569,7 +534,6 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -583,15 +547,10 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150 h1:ZeU+auZj1iNzN8iVhff6M38Mfu73FQiJve/GEXYJBjE= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rakyll/statik v0.1.5 h1:Ly2UjURzxnsSYS0zI50fZ+srA+Fu7EbpV5hglvJvJG0= -github.com/rakyll/statik v0.1.5/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= -github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -604,8 +563,6 @@ github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -619,14 +576,11 @@ github.com/shirou/gopsutil v2.20.5-0.20200531151128-663af789c085+incompatible/go github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= 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.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/skyinglyh1/cosmos-poly-module v0.0.0-20200611071020-364a883092be h1:ET5pOh21hBPZSYR+BX6OL1Fm2OSHU2oTtVxvlfvWyYU= -github.com/skyinglyh1/cosmos-poly-module v0.0.0-20200611071020-364a883092be/go.mod h1:57FA+8GFxdZthrXg/WMV3TjbdUC1ytuSJNMlIBjBxrM= -github.com/skyinglyh1/cosmos-poly-module v0.0.0-20200715085758-6038c006fe79 h1:WieJBDmB0ah/vfNxCwz55rPgZY8zPGfJqlZclbsCA/4= -github.com/skyinglyh1/cosmos-poly-module v0.0.0-20200715085758-6038c006fe79/go.mod h1:VMBJZ8GSZeoWBntd/rWx2Rr5roRKofO7siP1qd6A6pY= -github.com/skyinglyh1/eth-contracts v0.0.0-20200814061207-5476c2ec9573/go.mod h1:AAr7vCKKtmutxPt1TxPkcH4vdHEwd+LoUIfRaAK0u0o= +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= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -638,10 +592,7 @@ 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/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v0.0.6 h1:breEStsVwemnKh2/s6gMvSdMEkwW0sK8vGStnlVBMCs= github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= @@ -649,14 +600,10 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.6.3 h1:pDDu1OyEDTKzpJwdq4TiuLyMsUgRa/BT5cn5O62NoHs= github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= @@ -670,79 +617,51 @@ github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3 github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stumble/gorocksdb v0.0.3/go.mod h1:v6IHdFBXk5DJ1K4FZ0xi+eY737quiiBxYtSWXadLybY= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= -github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= -github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5 h1:u8i49c+BxloX3XQ55cvzFNXplizZP/q00i+IlttUjAU= -github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= -github.com/tendermint/go-amino v0.15.0 h1:TC4e66P59W7ML9+bxio17CPKnxW3nKIRAYskntMAoRk= -github.com/tendermint/go-amino v0.15.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tendermint/go-amino v0.15.1 h1:D2uk35eT4iTsvJd9jWIetzthE5C0/k2QmMFkCN+4JgQ= github.com/tendermint/go-amino v0.15.1/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/iavl v0.12.4 h1:hd1woxUGISKkfUWBA4mmmTwOua6PQZTJM/F0FDrmMV8= -github.com/tendermint/iavl v0.12.4/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJkAUvEXT/o= -github.com/tendermint/iavl v0.13.2 h1:O1m08/Ciy53l9IYmf75uIRVvrNsfjEbre8u/yCu/oqk= github.com/tendermint/iavl v0.13.2/go.mod h1:vE1u0XAGXYjHykd4BLp8p/yivrw2PF1TuoljBcsQoGA= github.com/tendermint/iavl v0.14.0 h1:Jkff+IFrXxRWtH9Jn/ga/2cxNnzMTv58xEKgCJsKUBg= github.com/tendermint/iavl v0.14.0/go.mod h1:QmfViflFiXzxKLQE4tAUuWQHq+RSuQFxablW5oJZ6sE= -github.com/tendermint/tendermint v0.32.1/go.mod h1:jmPDAKuNkev9793/ivn/fTBnfpA9mGBww8MPRNPNxnU= -github.com/tendermint/tendermint v0.32.7/go.mod h1:D2+A3pNjY+Po72X0mTfaXorFhiVI8dh/Zg640FGyGtE= github.com/tendermint/tendermint v0.33.2/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk= -github.com/tendermint/tendermint v0.33.3 h1:6lMqjEoCGejCzAghbvfQgmw87snGSqEhDTo/jw+W8CI= github.com/tendermint/tendermint v0.33.3/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk= -github.com/tendermint/tendermint v0.33.5 h1:jYgRd9ImkzA9iOyhpmgreYsqSB6tpDa6/rXYPb8HKE8= github.com/tendermint/tendermint v0.33.5/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= github.com/tendermint/tendermint v0.33.6/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= github.com/tendermint/tendermint v0.33.7 h1:b5CQD8ggDtl4u0EbXzabi0MaOw9NrcXker6ijEkAE74= github.com/tendermint/tendermint v0.33.7/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= -github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= -github.com/tendermint/tm-db v0.4.1 h1:TvX7JWjJOVZ+N3y+I86wddrGttOdMmmBxXcu0/Y7ZJ0= github.com/tendermint/tm-db v0.4.1/go.mod h1:JsJ6qzYkCGiGwm5GHl/H5GLI9XLb6qZX7PRe425dHAY= -github.com/tendermint/tm-db v0.5.0 h1:qtM5UTr1dlRnHtDY6y7MZO5Di8XAE2j3lc/pCnKJ5hQ= github.com/tendermint/tm-db v0.5.0/go.mod h1:lSq7q5WRR/njf1LnhiZ/lIJHk2S8Y1Zyq5oP/3o9C2U= github.com/tendermint/tm-db v0.5.1 h1:H9HDq8UEA7Eeg13kdYckkgwwkQLBnJGgX4PgLJRhieY= github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= -github.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= -github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/twitchyliquid64/golang-asm v0.0.0-20190126203739-365674df15fc h1:RTUQlKzoZZVG3umWNzOYeFecQLIh+dbxXvJp1zPQJTI= -github.com/twitchyliquid64/golang-asm v0.0.0-20190126203739-365674df15fc/go.mod h1:NoCfSFWosfqMqmmD7hApkirIK9ozpHjxRnRxs1l413A= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2 h1:+t3w+KwLXO6154GNJY+qUtIxLTmFjfUmpguQT1OlOT8= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.3 h1:FpNT6zq26xNpHZy08emi755QwzLPs6Pukqjlc7RfOMU= -github.com/urfave/cli v1.22.3/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.4 h1:u7tSpNPPswAFymm8IehJhy4uJMlUuU/GmqSkvJ1InXA= github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= @@ -750,10 +669,18 @@ github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 h1:1cngl9mPEoITZG8s8 github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/zhiqiangxu/poly v0.0.0-20201216075543-df86073d2575 h1:6jmxr8/1WR2HdLPugksSPwOfUnQLlqrD/b9A/r3o/Ig= +github.com/zhiqiangxu/poly v0.0.0-20201216075543-df86073d2575/go.mod h1:SrFSYe/3uWkouGvoSGkjDPm5sNT95dSFZkQtXRun148= +github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 h1:Ogrd4dHjyNDNSLY6+89OfR1flM1CGI2CSee7QoXUYdU= +github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= +github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zouxyan/eth-contracts v0.0.0-20201215112041-6532ab4e12f4 h1:A+kC+RAocm9jwmwxUqzBYSbCMsz4bI7JBNT+uYzC6NY= +github.com/zouxyan/eth-contracts v0.0.0-20201215112041-6532ab4e12f4/go.mod h1:7+sPWP1/qbE3V8HbByvuoIJpBZ0TWZF50xHAJIXQ1pA= github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1 h1:1qKTeMTSIEvRIjvVYzgcRp0xVp0eoiRTTiHSncb5gD8= github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1/go.mod h1:bslhAiUxakrA6z6CHmVyvkfpnxx18RJBwVyx2TluJWw= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -770,33 +697,24 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191029031824-8986dd9e96cf/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4 h1:QmwruyY+bKbDDL0BaglrbZABEali68eoMFhTZpCjYVA= 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-20200427165652-729f1e841bcc/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 h1:cg5LA/zNPRzIXIWSCxQW10Rvpy94aQh3LT/ShoCpkHw= -golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 h1:vEg9joUBmeBcK9iSJftGNf3coIG4HqZElCPehJsfAYM= -golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= 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/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= @@ -826,17 +744,14 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0 h1:Jcxah/M+oLZ/R4/z5RzfPzGbPXnVDPkEDtf2JnuxN+U= 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 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/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/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -853,11 +768,8 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190306220234-b354f8bf4d9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -866,23 +778,23 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= 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/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= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -901,43 +813,38 @@ golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/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= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383 h1:Vo0fD5w0fUKriWlZLyrim2GXbumyN0D6euW79T9PgEE= google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 h1:pSLkPbrjnPyLDYUO2VM9mDLqo2V6CFBY84lFSZAfoi4= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= @@ -951,21 +858,26 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 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/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200316214253-d7b0ff38cac9/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc h1:17cdygvFw3DEyNMh81Bk687W74d5pcC5qEKQICv9N6g= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= @@ -973,18 +885,20 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= 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= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= -upper.io/db.v3 v3.6.4+incompatible/go.mod h1:FgTdD24eBjJAbPKsQSiHUNgXjOR4Lub3u1UMHSIh82Y= diff --git a/testcase/init.go b/testcase/init.go index 817d2d6..4d4bf73 100644 --- a/testcase/init.go +++ b/testcase/init.go @@ -71,4 +71,16 @@ func init() { testframework.TFramework.RegTestCase("SendOngToCosmosAndBack", SendOngToCosmosAndBack) testframework.TFramework.RegTestCase("SendOep4ToCosmosAndBack", SendOep4ToCosmosAndBack) testframework.TFramework.RegTestCase("SendZeroOntToEth", SendZeroOntToEth) + testframework.TFramework.RegTestCase("USDTCircle", USDTCircle) + testframework.TFramework.RegTestCase("WBTCCircle", WBTCCircle) + testframework.TFramework.RegTestCase("DAICircle", DAICircle) + testframework.TFramework.RegTestCase("NeoToEthCircle", NeoToEthCircle) + testframework.TFramework.RegTestCase("NeoToOntCircle", NeoToOntCircle) + testframework.TFramework.RegTestCase("OntToNeoAndBack", OntToNeoAndBack) + testframework.TFramework.RegTestCase("EthToNeoAndBack", EthToNeoAndBack) + testframework.TFramework.RegTestCase("OntdToNeoAndBack", OntdToNeoAndBack) + testframework.TFramework.RegTestCase("OntdToEthAndBack", OntdToEthAndBack) + testframework.TFramework.RegTestCase("USDCCircle", USDCCircle) + testframework.TFramework.RegTestCase("RenBTCCircle", RenBTCCircle) + testframework.TFramework.RegTestCase("EOntdToNeoAndBack", EOntdToNeoAndBack) } diff --git a/testcase/method.go b/testcase/method.go index 45cdd74..869438e 100644 --- a/testcase/method.go +++ b/testcase/method.go @@ -28,20 +28,25 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" + "github.com/joeqian10/neo-gogogo/helper" + "github.com/joeqian10/neo-gogogo/sc" + "github.com/joeqian10/neo-gogogo/tx" "github.com/ontio/ontology-go-sdk" ontcommon "github.com/ontio/ontology/common" nutils "github.com/ontio/ontology/smartcontract/service/native/utils" + "github.com/polynetwork/eth-contracts/go_abi/btcx_abi" + "github.com/polynetwork/eth-contracts/go_abi/erc20_abi" + "github.com/polynetwork/eth-contracts/go_abi/lock_proxy_abi" + "github.com/polynetwork/eth-contracts/go_abi/oep4_abi" + "github.com/polynetwork/eth-contracts/go_abi/ontx_abi" + "github.com/polynetwork/eth-contracts/go_abi/usdt_abi" "github.com/polynetwork/poly-io-test/chains/eth" - btcx_abi "github.com/polynetwork/poly-io-test/chains/eth/abi/btcx" - "github.com/polynetwork/poly-io-test/chains/eth/abi/erc20" - lock_proxy_abi "github.com/polynetwork/poly-io-test/chains/eth/abi/lockproxy" - oep4_abi "github.com/polynetwork/poly-io-test/chains/eth/abi/oep4" - "github.com/polynetwork/poly-io-test/chains/eth/abi/ongx" - "github.com/polynetwork/poly-io-test/chains/eth/abi/ontx" + "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" "github.com/polynetwork/poly-io-test/testframework" + "math" "math/big" "strings" "time" @@ -70,7 +75,7 @@ func SendOntCrossEth(ctx *testframework.TestFrameworkContext, status *testframew ctx.OntInvoker.OntAcc, proxyContractAddress, []interface{}{"lock", []interface{}{nutils.OntContractAddress[:], ctx.OntInvoker.OntAcc.Address[:], - config.ETH_CHAIN_ID, to, amount}}) + config.DefConfig.EthChainID, to, amount}}) if err != nil { return fmt.Errorf("SendOntCrossEth, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) } @@ -93,7 +98,7 @@ func SendEOntCrossOnt(ctx *testframework.TestFrameworkContext, status *testframe assetaddress := ethcommon.HexToAddress(onte) contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) - ontxContract, err := ontx.NewONTX(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + ontxContract, err := ontx_abi.NewONTX(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) if err != nil { return fmt.Errorf("SendEOntCrossOnt, NewONTX error: %v", err) } @@ -102,13 +107,14 @@ func SendEOntCrossOnt(ctx *testframework.TestFrameworkContext, status *testframe if err != nil { return fmt.Errorf("SendEOntCrossOnt, failed to get eth auth: %v", err) } + // 1 txhash, err := ontxContract.Approve(auth, contractAddr, big.NewInt(int64(amount))) if err != nil { return fmt.Errorf("SendEOntCrossOnt, failed to approve: %v", err) } ctx.EthInvoker.ETHUtil.WaitTransactionConfirm(txhash.Hash()) - - txData, err := contractabi.Pack("lock", assetaddress, uint64(config.ONT_CHAIN_ID), ctx.OntInvoker.OntAcc.Address[:], + //2 + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.OntChainID), ctx.OntInvoker.OntAcc.Address[:], big.NewInt(int64(amount))) if err != nil { return fmt.Errorf("SendEOntCrossOnt, contractabi.Pack error: %v", err) @@ -124,7 +130,7 @@ func SendEOntCrossOnt(ctx *testframework.TestFrameworkContext, status *testframe } nonce = ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) - tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) bf := new(bytes.Buffer) rlp.Encode(bf, tx) @@ -159,7 +165,7 @@ func SendOngCrossEth(ctx *testframework.TestFrameworkContext, status *testframew ctx.OntInvoker.OntAcc, proxyContractAddress, []interface{}{"lock", []interface{}{nutils.OngContractAddress[:], ctx.OntInvoker.OntAcc.Address[:], - config.ETH_CHAIN_ID, to, amount}}) + config.DefConfig.EthChainID, to, amount}}) if err != nil { return fmt.Errorf("SendOngCrossEth, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) } @@ -183,30 +189,28 @@ func SendOngeCrossOnt(ctx *testframework.TestFrameworkContext, status *testframe contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) // approve - ongxContract, err := ongx.NewONGX(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) - if err != nil { - return fmt.Errorf("SendOngeCrossOnt, NewONTX error:" + err.Error()) - } - nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) - auth := MakeEthAuth(ctx.EthInvoker.EthTestSigner, nonce, gasPrice.Uint64(), uint64(eth.DefaultGasLimit)) - if err != nil { - return fmt.Errorf("SendOngeCrossOnt, failed to get eth auth: %v", err) - } - txhash, err := ongxContract.Approve(auth, contractAddr, big.NewInt(int64(amount))) + token, err := eth.NewStandardToken(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) if err != nil { - return fmt.Errorf("SendOngeCrossOnt, failed to approve: %v", err) + return fmt.Errorf("SendOngeCrossOnt, NewStandardToken error: %v", err.Error()) } - ctx.EthInvoker.ETHUtil.WaitTransactionConfirm(txhash.Hash()) - - val, err := ongxContract.Allowance(nil, ctx.EthInvoker.EthTestSigner.Address, contractAddr) + val, err := token.Allowance(nil, ctx.EthInvoker.EthTestSigner.Address, contractAddr) if err != nil { - return fmt.Errorf("SendOngeCrossOnt, failed to Allowance: %v", err) + return fmt.Errorf("SendOngeCrossOnt, failed to get allowance: %v", err) } if val.Uint64() < amount { - return fmt.Errorf("SendOngeCrossOnt, allowance %d is less than amount %d", val.Uint64(), amount) - } - - txData, err := contractabi.Pack("lock", assetaddress, uint64(config.ONT_CHAIN_ID), ctx.OntInvoker.OntAcc.Address[:], + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + auth := MakeEthAuth(ctx.EthInvoker.EthTestSigner, nonce, gasPrice.Uint64(), uint64(eth.DefaultGasLimit)) + if err != nil { + return fmt.Errorf("SendOngeCrossOnt, failed to get eth auth: %v", err) + } + tx, err := token.Approve(auth, contractAddr, big.NewInt(math.MaxInt64)) + if err != nil { + return fmt.Errorf("SendOngeCrossOnt, failed to approve: %v", err) + } + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), tx.Hash()) + } + + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.OntChainID), ctx.OntInvoker.OntAcc.Address[:], big.NewInt(int64(amount))) if err != nil { return fmt.Errorf("SendOngeCrossOnt, contractabi.Pack error:" + err.Error()) @@ -221,8 +225,8 @@ func SendOngeCrossOnt(ctx *testframework.TestFrameworkContext, status *testframe return fmt.Errorf("SendOngeCrossOnt, estimate gas limit error: %s", err.Error()) } - nonce = ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) - tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) bf := new(bytes.Buffer) rlp.Encode(bf, tx) @@ -271,7 +275,7 @@ func SendOEP4CrossEth(ctx *testframework.TestFrameworkContext, status *testframe ctx.OntInvoker.OntAcc, proxyContractAddress, []interface{}{"lock", []interface{}{assetContractAddress[:], ctx.OntInvoker.OntAcc.Address[:], - config.ETH_CHAIN_ID, to, amount}}) + config.DefConfig.EthChainID, to, amount}}) if err != nil { return fmt.Errorf("SendOEP4CrossEth, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) } @@ -309,13 +313,13 @@ func SendEOEP4CrossOnt(ctx *testframework.TestFrameworkContext, status *testfram } ctx.EthInvoker.ETHUtil.WaitTransactionConfirm(txhash.Hash()) - txData, err := contractabi.Pack("lock", assetaddress, uint64(config.ONT_CHAIN_ID), ctx.OntInvoker.OntAcc.Address[:], + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.OntChainID), ctx.OntInvoker.OntAcc.Address[:], big.NewInt(int64(amount))) if err != nil { return fmt.Errorf("SendEOEP4CrossOnt, contractabi.Pack error:" + err.Error()) } nonce = ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) - tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), uint64(eth.DefaultGasLimit), gasPrice, txData) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), uint64(eth.DefaultGasLimit), gasPrice, txData) bf := new(bytes.Buffer) rlp.Encode(bf, tx) @@ -348,7 +352,7 @@ func SendBtcoCrossBtc(ctx *testframework.TestFrameworkContext, status *testframe ctx.OntInvoker.OntAcc, ctx.OntInvoker.OntAcc, btcxContractAddress, - []interface{}{"lock", []interface{}{config.BTC_CHAIN_ID, ctx.OntInvoker.OntAcc.Address[:], to, amount}}) + []interface{}{"lock", []interface{}{config.DefConfig.BtcChainID, ctx.OntInvoker.OntAcc.Address[:], to, amount}}) if err != nil { return fmt.Errorf("SendBtcxCrossBtc, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) } @@ -366,7 +370,7 @@ func SendBtcoCrossBtce(ctx *testframework.TestFrameworkContext, status *testfram ctx.OntInvoker.OntAcc, ctx.OntInvoker.OntAcc, btcxContractAddress, - []interface{}{"lock", []interface{}{config.ETH_CHAIN_ID, ctx.OntInvoker.OntAcc.Address[:], + []interface{}{"lock", []interface{}{config.DefConfig.EthChainID, ctx.OntInvoker.OntAcc.Address[:], ctx.EthInvoker.EthTestSigner.Address.Bytes(), amount}}) if err != nil { return fmt.Errorf("SendBtcoCrossBtce, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) @@ -388,7 +392,7 @@ func SendBtceCrossBtco(ctx *testframework.TestFrameworkContext, status *testfram return fmt.Errorf("SendBtceCrossOnt, abi.JSON error:" + err.Error()) } assetaddress := ethcommon.HexToAddress(config.DefConfig.BtceContractAddress) - txData, err := contractabi.Pack("lock", uint64(config.ONT_CHAIN_ID), ctx.OntInvoker.OntAcc.Address[:], uint64(amount)) + txData, err := contractabi.Pack("lock", uint64(config.DefConfig.OntChainID), ctx.OntInvoker.OntAcc.Address[:], uint64(amount)) if err != nil { return fmt.Errorf("SendBtceCrossOnt, contractabi.Pack error:" + err.Error()) } @@ -427,7 +431,7 @@ func SendBtceCrossBtco(ctx *testframework.TestFrameworkContext, status *testfram } func SendBtcCrossOnt(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount int64) error { - txid, err := sendBtcCross(ctx, config.ONT_CHAIN_ID, ctx.BtcInvoker.Signer, ctx.OntInvoker.OntAcc.Address.ToBase58(), amount) + txid, err := sendBtcCross(ctx, config.DefConfig.OntChainID, ctx.BtcInvoker.Signer, ctx.OntInvoker.OntAcc.Address.ToBase58(), amount) if err != nil { return fmt.Errorf("SendBtcCrossOnt, sendBtcCross error: %s", err) } @@ -436,7 +440,7 @@ func SendBtcCrossOnt(ctx *testframework.TestFrameworkContext, status *testframew } func SendBtcCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount int64) error { - txid, err := sendBtcCross(ctx, config.ETH_CHAIN_ID, ctx.BtcInvoker.Signer, ctx.EthInvoker.EthTestSigner.Address.String(), amount) + txid, err := sendBtcCross(ctx, config.DefConfig.EthChainID, ctx.BtcInvoker.Signer, ctx.EthInvoker.EthTestSigner.Address.String(), amount) if err != nil { return fmt.Errorf("SendBtcCrossEth, sendBtcCross error: %s", err) } @@ -459,7 +463,7 @@ func SendBtcFromCosmosToBitcoin(ctx *testframework.TestFrameworkContext, status if err != nil { return fmt.Errorf("SendBtcFromCosmosToBitcoin, failed to decode proxy: %v", err) } - tx, err := ctx.CMInvoker.SendAsset(config.CM_BTCX, config.BTC_CHAIN_ID, int64(amt), + tx, err := ctx.CMInvoker.SendAsset(config.CM_BTCX, config.DefConfig.BtcChainID, int64(amt), []byte(ctx.BtcInvoker.Signer.Address), lp) if err != nil { return fmt.Errorf("SendBtcFromCosmosToBitcoin, failed to send btc from cosmos to bitcoin: %v", err) @@ -473,7 +477,7 @@ func SendBtcFromCosmosToEthereum(ctx *testframework.TestFrameworkContext, status if err != nil { return fmt.Errorf("SendBtcFromCosmosToBitcoin, failed to decode proxy: %v", err) } - tx, err := ctx.CMInvoker.SendAsset(config.CM_BTCX, config.ETH_CHAIN_ID, int64(amt), + tx, err := ctx.CMInvoker.SendAsset(config.CM_BTCX, config.DefConfig.EthChainID, int64(amt), ctx.EthInvoker.EthTestSigner.Address[:], lp) if err != nil { return fmt.Errorf("SendBtcFromCosmosToEthereum, failed to send btc from cosmos to ethereum: %v", err) @@ -537,7 +541,7 @@ func SendBtcFromCosmosToOntology(ctx *testframework.TestFrameworkContext, status if err != nil { return fmt.Errorf("SendBtcFromCosmosToBitcoin, failed to decode proxy: %v", err) } - tx, err := ctx.CMInvoker.SendAsset(config.CM_BTCX, config.ONT_CHAIN_ID, int64(amt), ctx.OntInvoker.OntAcc.Address[:], lp) + tx, err := ctx.CMInvoker.SendAsset(config.CM_BTCX, config.DefConfig.OntChainID, int64(amt), ctx.OntInvoker.OntAcc.Address[:], lp) if err != nil { return fmt.Errorf("SendBtcFromCosmosToOntology, failed to send btc from cosmos to ontology: %v", err) } @@ -621,7 +625,7 @@ func SendEthFromCosmosToEthereum(ctx *testframework.TestFrameworkContext, status if err != nil { return fmt.Errorf("SendBtcFromCosmosToBitcoin, failed to decode proxy: %v", err) } - tx, err := ctx.CMInvoker.SendAsset(config.CM_ETHX, config.ETH_CHAIN_ID, int64(amt), + tx, err := ctx.CMInvoker.SendAsset(config.CM_ETHX, config.DefConfig.EthChainID, int64(amt), ctx.EthInvoker.EthTestSigner.Address[:], lp) if err != nil { return fmt.Errorf("SendEthFromCosmosToEthereum, failed to send eth: %v", err) @@ -635,7 +639,7 @@ func SendEthFromCosmosToOntology(ctx *testframework.TestFrameworkContext, status if err != nil { return fmt.Errorf("SendBtcFromCosmosToBitcoin, failed to decode proxy: %v", err) } - tx, err := ctx.CMInvoker.SendAsset(config.CM_ETHX, config.ONT_CHAIN_ID, int64(amt), ctx.OntInvoker.OntAcc.Address[:], lp) + tx, err := ctx.CMInvoker.SendAsset(config.CM_ETHX, config.DefConfig.OntChainID, int64(amt), ctx.OntInvoker.OntAcc.Address[:], lp) if err != nil { return fmt.Errorf("SendEthFromCosmosToOntology, failed to send eth: %v", err) } @@ -692,7 +696,7 @@ func SendErc20CrossCosmos(ctx *testframework.TestFrameworkContext, status *testf assetaddress := ethcommon.HexToAddress(erc20ContractAddress) contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) // approve - erc20Contract, err := erc20.NewERC20(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + erc20Contract, err := erc20_abi.NewERC20(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) if err != nil { return fmt.Errorf("SendErc20CrossCosmos, NewERC20 error:" + err.Error()) } @@ -750,7 +754,7 @@ func SendErc20FromCosmosToEthereum(ctx *testframework.TestFrameworkContext, stat if err != nil { return fmt.Errorf("SendBtcFromCosmosToBitcoin, failed to decode proxy: %v", err) } - tx, err := ctx.CMInvoker.SendAsset(config.CM_ERC20, config.ETH_CHAIN_ID, int64(amt), + tx, err := ctx.CMInvoker.SendAsset(config.CM_ERC20, config.DefConfig.EthChainID, int64(amt), ctx.EthInvoker.EthTestSigner.Address[:], lp) if err != nil { return fmt.Errorf("failed to send erc20: %v", err) @@ -764,7 +768,7 @@ func SendErc20FromCosmosToOntology(ctx *testframework.TestFrameworkContext, stat if err != nil { return fmt.Errorf("SendBtcFromCosmosToBitcoin, failed to decode proxy: %v", err) } - tx, err := ctx.CMInvoker.SendAsset(config.CM_ERC20, config.ONT_CHAIN_ID, int64(amt), ctx.OntInvoker.OntAcc.Address[:], lp) + tx, err := ctx.CMInvoker.SendAsset(config.CM_ERC20, config.DefConfig.OntChainID, int64(amt), ctx.OntInvoker.OntAcc.Address[:], lp) if err != nil { return fmt.Errorf("SendErc20FromCosmosToOntology, failed to send erc20: %v", err) } @@ -831,7 +835,7 @@ func SendOntFromCosmosToOntology(ctx *testframework.TestFrameworkContext, status if err != nil { return fmt.Errorf("SendBtcFromCosmosToBitcoin, failed to decode proxy: %v", err) } - tx, err := ctx.CMInvoker.SendAsset(config.CM_ONT, config.ONT_CHAIN_ID, int64(amt), ctx.OntInvoker.OntAcc.Address[:], lp) + tx, err := ctx.CMInvoker.SendAsset(config.CM_ONT, config.DefConfig.OntChainID, int64(amt), ctx.OntInvoker.OntAcc.Address[:], lp) if err != nil { return fmt.Errorf("SendOntFromCosmosToOntology, failed to send ont: %v", err) } @@ -844,7 +848,7 @@ func SendOntFromCosmosToEthereum(ctx *testframework.TestFrameworkContext, status if err != nil { return fmt.Errorf("SendBtcFromCosmosToBitcoin, failed to decode proxy: %v", err) } - tx, err := ctx.CMInvoker.SendAsset(config.CM_ONT, config.ETH_CHAIN_ID, int64(amt), + tx, err := ctx.CMInvoker.SendAsset(config.CM_ONT, config.DefConfig.EthChainID, int64(amt), ctx.EthInvoker.EthTestSigner.Address[:], lp) if err != nil { return fmt.Errorf("SendOntFromCosmosToEthereum, failed to send ont: %v", err) @@ -868,7 +872,7 @@ func SendOntFromEthereumToCosmos(ctx *testframework.TestFrameworkContext, status assetaddress := ethcommon.HexToAddress(config.DefConfig.EthOntx) contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) - ontxContract, err := ontx.NewONTX(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + ontxContract, err := ontx_abi.NewONTX(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) if err != nil { return fmt.Errorf("SendOntFromEthereumToCosmos, NewONTX error:" + err.Error()) } @@ -898,7 +902,7 @@ func SendOntFromEthereumToCosmos(ctx *testframework.TestFrameworkContext, status } nonce = ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) - tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) bf := new(bytes.Buffer) rlp.Encode(bf, tx) @@ -947,7 +951,7 @@ func SendOngFromCosmosToOntology(ctx *testframework.TestFrameworkContext, status if err != nil { return fmt.Errorf("SendBtcFromCosmosToBitcoin, failed to decode proxy: %v", err) } - tx, err := ctx.CMInvoker.SendAsset(config.CM_ONG, config.ONT_CHAIN_ID, int64(amt), ctx.OntInvoker.OntAcc.Address[:], lp) + tx, err := ctx.CMInvoker.SendAsset(config.CM_ONG, config.DefConfig.OntChainID, int64(amt), ctx.OntInvoker.OntAcc.Address[:], lp) if err != nil { return fmt.Errorf("SendOngFromCosmosToOntology, failed to send ong: %v", err) } @@ -960,7 +964,7 @@ func SendOngFromCosmosToEthereum(ctx *testframework.TestFrameworkContext, status if err != nil { return fmt.Errorf("SendBtcFromCosmosToBitcoin, failed to decode proxy: %v", err) } - tx, err := ctx.CMInvoker.SendAsset(config.CM_ONG, config.ETH_CHAIN_ID, int64(amt), + tx, err := ctx.CMInvoker.SendAsset(config.CM_ONG, config.DefConfig.EthChainID, int64(amt), ctx.EthInvoker.EthTestSigner.Address[:], lp) if err != nil { return fmt.Errorf("SendOngFromCosmosToEthereum, failed to send ong: %v", err) @@ -984,7 +988,7 @@ func SendOngFromEthereumToCosmos(ctx *testframework.TestFrameworkContext, status assetaddress := ethcommon.HexToAddress(config.DefConfig.EthOngx) contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) - ontxContract, err := ontx.NewONTX(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + ontxContract, err := ontx_abi.NewONTX(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) if err != nil { return fmt.Errorf("SendOngFromEthereumToCosmos, NewONGX error:" + err.Error()) } @@ -1015,7 +1019,7 @@ func SendOngFromEthereumToCosmos(ctx *testframework.TestFrameworkContext, status } nonce = ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) - tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) bf := new(bytes.Buffer) rlp.Encode(bf, tx) @@ -1080,7 +1084,7 @@ func SendOep4FromCosmosToOntology(ctx *testframework.TestFrameworkContext, statu if err != nil { return fmt.Errorf("SendBtcFromCosmosToBitcoin, failed to decode proxy: %v", err) } - tx, err := ctx.CMInvoker.SendAsset(config.CM_OEP4, config.ONT_CHAIN_ID, int64(amt), ctx.OntInvoker.OntAcc.Address[:], lp) + tx, err := ctx.CMInvoker.SendAsset(config.CM_OEP4, config.DefConfig.OntChainID, int64(amt), ctx.OntInvoker.OntAcc.Address[:], lp) if err != nil { return fmt.Errorf("SendOep4FromCosmosToOntology, failed to send oep4: %v", err) } @@ -1095,7 +1099,7 @@ func SendOep4FromCosmosToEthereum(ctx *testframework.TestFrameworkContext, statu return fmt.Errorf("SendBtcFromCosmosToBitcoin, failed to decode proxy: %v", err) } addr := ethcommon.HexToAddress(ethAddress) - tx, err := ctx.CMInvoker.SendAsset("oep4", config.ETH_CHAIN_ID, int64(amt), + tx, err := ctx.CMInvoker.SendAsset("oep4", config.DefConfig.EthChainID, int64(amt), addr[:], lp) if err != nil { return fmt.Errorf("SendOep4FromCosmosToEthereum, failed to send oep4: %v", err) @@ -1120,7 +1124,7 @@ func SendOep4FromEthereumToCosmos(ctx *testframework.TestFrameworkContext, statu assetaddress := ethcommon.HexToAddress(config.DefConfig.EthOep4) contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) - ontxContract, err := ontx.NewONTX(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + ontxContract, err := ontx_abi.NewONTX(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) if err != nil { return fmt.Errorf("SendOngFromEthereumToCosmos, NewONGX error:" + err.Error()) } @@ -1156,7 +1160,7 @@ func SendOep4FromEthereumToCosmos(ctx *testframework.TestFrameworkContext, statu } nonce = ctx.EthInvoker.NM.GetAddressNonce(signer.Address) - tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) bf := new(bytes.Buffer) rlp.Encode(bf, tx) @@ -1193,7 +1197,7 @@ func SendEthCrossOnt(ctx *testframework.TestFrameworkContext, status *testframew } assetaddress := ethcommon.HexToAddress("0000000000000000000000000000000000000000") - txData, err := contractabi.Pack("lock", assetaddress, uint64(config.ONT_CHAIN_ID), ctx.OntInvoker.OntAcc.Address[:], + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.OntChainID), ctx.OntInvoker.OntAcc.Address[:], big.NewInt(int64(amount))) if err != nil { return fmt.Errorf("SendEthCrossOnt, contractabi.Pack error:" + err.Error()) @@ -1254,13 +1258,13 @@ func SendEthoCrossEth(ctx *testframework.TestFrameworkContext, status *testframe } ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) - to := ctx.EthInvoker.EthTestSigner.Address.Bytes() + to := ctx.EthInvoker.EthTestSigner.Address.String() txHash, err = ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, ctx.OntInvoker.OntAcc, ctx.OntInvoker.OntAcc, proxyContractAddress, []interface{}{"lock", []interface{}{assetaddress, ctx.OntInvoker.OntAcc.Address[:], - config.ETH_CHAIN_ID, to, amount}}) + config.DefConfig.EthChainID, to, amount}}) if err != nil { return fmt.Errorf("SendEthoCrossEth, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) } @@ -1284,10 +1288,17 @@ func SendERC20CrossOnt(ctx *testframework.TestFrameworkContext, status *testfram contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) // approve - erc20Contract, err := erc20.NewERC20(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + erc20Contract, err := erc20_abi.NewERC20(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) if err != nil { return fmt.Errorf("SendERC20CrossOnt, NewERC20 error:" + err.Error()) } + val, err := erc20Contract.BalanceOf(nil, ctx.EthInvoker.EthTestSigner.Address) + if err != nil { + return fmt.Errorf("SendERC20CrossOnt, failed to get the balance: %v", err) + } + if val.Uint64() < amount { + return fmt.Errorf("SendERC20CrossOnt, balance %d is less than amount %d", val.Uint64(), amount) + } nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) auth := MakeEthAuth(ctx.EthInvoker.EthTestSigner, nonce, gasPrice.Uint64(), uint64(eth.DefaultGasLimit)) if err != nil { @@ -1299,7 +1310,7 @@ func SendERC20CrossOnt(ctx *testframework.TestFrameworkContext, status *testfram } ctx.EthInvoker.ETHUtil.WaitTransactionConfirm(txhash.Hash()) - txData, err := contractabi.Pack("lock", assetaddress, uint64(config.ONT_CHAIN_ID), ctx.OntInvoker.OntAcc.Address[:], + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.OntChainID), ctx.OntInvoker.OntAcc.Address[:], big.NewInt(int64(amount))) if err != nil { return fmt.Errorf("SendERC20CrossOnt, contractabi.Pack error:" + err.Error()) @@ -1363,7 +1374,7 @@ func SendOERC20CrossEth(ctx *testframework.TestFrameworkContext, status *testfra ctx.OntInvoker.OntAcc, proxyContractAddress, []interface{}{"lock", []interface{}{assetaddress, ctx.OntInvoker.OntAcc.Address[:], - config.ETH_CHAIN_ID, to, amount}}) + config.DefConfig.EthChainID, to, amount}}) if err != nil { return fmt.Errorf("SendOERC20CrossEth, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) } @@ -1384,7 +1395,7 @@ func SendBtceCrossBtc(ctx *testframework.TestFrameworkContext, status *testframe return fmt.Errorf("SendERC20CrossOnt, abi.JSON error:" + err.Error()) } assetaddress := ethcommon.HexToAddress(config.DefConfig.BtceContractAddress) - txData, err := contractabi.Pack("lock", uint64(config.BTC_CHAIN_ID), []byte(ctx.BtcInvoker.Signer.Address), uint64(amount)) + txData, err := contractabi.Pack("lock", uint64(config.DefConfig.BtcChainID), []byte(ctx.BtcInvoker.Signer.Address), uint64(amount)) if err != nil { return fmt.Errorf("SendERC20CrossOnt, contractabi.Pack error:" + err.Error()) } @@ -1422,6 +1433,1405 @@ func SendBtceCrossBtc(ctx *testframework.TestFrameworkContext, status *testframe return nil } +func SendUSDTCrossOnt(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.EthInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendUSDTCrossOnt, get suggest gas price failed error: %s", err.Error()) + } + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendUSDTCrossOnt, abi.JSON error:" + err.Error()) + } + assetaddress := ethcommon.HexToAddress(config.DefConfig.EthUSDT) + contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) + + // approve + usdt, err := usdt_abi.NewTetherToken(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + if err != nil { + return fmt.Errorf("SendUSDTCrossOnt, NewERC20 error:" + err.Error()) + } + val, err := usdt.BalanceOf(nil, ctx.EthInvoker.EthTestSigner.Address) + if err != nil { + return fmt.Errorf("SendUSDTCrossOnt, failed to get the balance: %v", err) + } + if val.Uint64() < amount { + return fmt.Errorf("SendUSDTCrossOnt, balance %d is less than amount %d", val.Uint64(), amount) + } + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + auth := MakeEthAuth(ctx.EthInvoker.EthTestSigner, nonce, gasPrice.Uint64(), uint64(eth.DefaultGasLimit)) + if err != nil { + return fmt.Errorf("SendUSDTCrossOnt, failed to get eth auth: %v", err) + } + txhash, err := usdt.Approve(auth, contractAddr, val) + if err != nil { + return fmt.Errorf("SendUSDTCrossOnt, approve error: %v", err.Error()) + } + ctx.EthInvoker.ETHUtil.WaitTransactionConfirm(txhash.Hash()) + + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.OntChainID), ctx.OntInvoker.OntAcc.Address[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendUSDTCrossOnt, contractabi.Pack error:" + err.Error()) + } + callMsg := ethereum.CallMsg{ + From: ctx.EthInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(0)), Data: txData, + } + gasLimit, err := ctx.EthInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendUSDTCrossOnt, estimate gas limit error: %s", err.Error()) + } + + nonce = ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendUSDTCrossOnt, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.EthInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendUSDTCrossOnt, types.SignTx error: %s", err.Error()) + } + + err = ctx.EthInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendUSDTCrossOnt, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"USDTToOnt", time.Now()}) + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + +func SendOUSDTCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + proxyContractAddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + return fmt.Errorf("SendOUSDTCrossEth, ontcommon.AddressFromHexString error: %s", err) + } + + assetaddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntUSDT) + if err != nil { + return err + } + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + assetaddress, + []interface{}{"approve", []interface{}{ctx.OntInvoker.OntAcc.Address, proxyContractAddress, amount}}) + if err != nil { + return fmt.Errorf("SendOUSDTCrossEth, approve error: %v", err) + } + ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) + + to := ctx.EthInvoker.EthTestSigner.Address.Bytes() + txHash, err = ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + proxyContractAddress, + []interface{}{"lock", []interface{}{assetaddress, ctx.OntInvoker.OntAcc.Address[:], + config.DefConfig.EthChainID, to, amount}}) + if err != nil { + return fmt.Errorf("SendOUSDTCrossEth, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) + } + status.AddTx(hex.EncodeToString(txHash[:]), &testframework.TxInfo{"OUSDTToEth", time.Now()}) + ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) + return nil +} + +func SendWBTCCrossOnt(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.EthInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendWBTCCrossOnt, get suggest gas price failed error: %s", err.Error()) + } + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendWBTCCrossOnt, abi.JSON error:" + err.Error()) + } + assetaddress := ethcommon.HexToAddress(config.DefConfig.EthWBTC) + contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) + + // approve + token, err := eth.NewStandardToken(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + if err != nil { + return fmt.Errorf("SendWBTCCrossOnt, NewStandardToken error: %v", err.Error()) + } + val, err := token.Allowance(nil, ctx.EthInvoker.EthTestSigner.Address, contractAddr) + if err != nil { + return fmt.Errorf("SendWBTCCrossOnt, failed to get allowance: %v", err) + } + if val.Uint64() < amount { + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + auth := MakeEthAuth(ctx.EthInvoker.EthTestSigner, nonce, gasPrice.Uint64(), uint64(eth.DefaultGasLimit)) + if err != nil { + return fmt.Errorf("SendWBTCCrossOnt, failed to get eth auth: %v", err) + } + tx, err := token.Approve(auth, contractAddr, big.NewInt(math.MaxInt64)) + if err != nil { + return fmt.Errorf("SendWBTCCrossOnt, failed to approve: %v", err) + } + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), tx.Hash()) + } + + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.OntChainID), ctx.OntInvoker.OntAcc.Address[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendWBTCCrossOnt, contractabi.Pack error:" + err.Error()) + } + callMsg := ethereum.CallMsg{ + From: ctx.EthInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(0)), Data: txData, + } + gasLimit, err := ctx.EthInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendWBTCCrossOnt, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendWBTCCrossOnt, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.EthInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendWBTCCrossOnt, types.SignTx error: %s", err.Error()) + } + + err = ctx.EthInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendWBTCCrossOnt, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"WBTCToOnt", time.Now()}) + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + +func SendOWBTCCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + proxyContractAddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + return fmt.Errorf("SendOWBTCCrossEth, ontcommon.AddressFromHexString error: %s", err) + } + + assetaddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntWBTC) + if err != nil { + return err + } + res, err := ctx.OntInvoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(assetaddress, []interface{}{"allowance", []interface{}{ctx.OntInvoker.OntAcc.Address, proxyContractAddress}}) + if err != nil { + return err + } + val, err := res.Result.ToInteger() + if err != nil { + return err + } + if val.Uint64() < amount { + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + assetaddress, + []interface{}{"approve", []interface{}{ctx.OntInvoker.OntAcc.Address, proxyContractAddress, math.MaxInt64}}) + if err != nil { + return fmt.Errorf("SendOWBTCCrossEth, approve error: %v", err) + } + ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) + } + + to := ctx.EthInvoker.EthTestSigner.Address.Bytes() + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + proxyContractAddress, + []interface{}{"lock", []interface{}{assetaddress, ctx.OntInvoker.OntAcc.Address[:], + config.DefConfig.EthChainID, to, amount}}) + if err != nil { + return fmt.Errorf("SendOWBTCCrossEth, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) + } + status.AddTx(hex.EncodeToString(txHash[:]), &testframework.TxInfo{"WBTCToEth", time.Now()}) + ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) + return nil +} + +func SendDAICrossOnt(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.EthInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + return fmt.Errorf("SendDAICrossOnt, get suggest gas price failed error: %s", err.Error()) + } + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendDAICrossOnt, abi.JSON error:" + err.Error()) + } + assetaddress := ethcommon.HexToAddress(config.DefConfig.EthDai) + contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) + + // approve + dai, err := eth.NewDai(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + if err != nil { + return fmt.Errorf("SendDAICrossOnt, NewERC20 error:" + err.Error()) + } + val, err := dai.BalanceOf(nil, ctx.EthInvoker.EthTestSigner.Address) + if err != nil { + return fmt.Errorf("SendDAICrossOnt, failed to get the balance: %v", err) + } + if val.Uint64() < amount { + return fmt.Errorf("SendDAICrossOnt, balance %d is less than amount %d", val.Uint64(), amount) + } + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + auth := MakeEthAuth(ctx.EthInvoker.EthTestSigner, nonce, gasPrice.Uint64(), uint64(eth.DefaultGasLimit)) + if err != nil { + return fmt.Errorf("SendDAICrossOnt, failed to get eth auth: %v", err) + } + txhash, err := dai.Approve(auth, contractAddr, big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendDAICrossOnt, approve error: %v", err.Error()) + } + ctx.EthInvoker.ETHUtil.WaitTransactionConfirm(txhash.Hash()) + + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.OntChainID), ctx.OntInvoker.OntAcc.Address[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendDAICrossOnt, contractabi.Pack error:" + err.Error()) + } + callMsg := ethereum.CallMsg{ + From: ctx.EthInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(0)), Data: txData, + } + gasLimit, err := ctx.EthInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendDAICrossOnt, estimate gas limit error: %s", err.Error()) + } + + nonce = ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendDAICrossOnt, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.EthInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendDAICrossOnt, types.SignTx error: %s", err.Error()) + } + + err = ctx.EthInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendDAICrossOnt, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"DAIToOnt", time.Now()}) + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + +func SendODAICrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + proxyContractAddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + return fmt.Errorf("SendODAICrossEth, ontcommon.AddressFromHexString error: %s", err) + } + + assetaddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntDai) + if err != nil { + return err + } + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + assetaddress, + []interface{}{"approve", []interface{}{ctx.OntInvoker.OntAcc.Address, proxyContractAddress, amount}}) + if err != nil { + return fmt.Errorf("SendODAICrossEth, approve error: %v", err) + } + ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) + + to := ctx.EthInvoker.EthTestSigner.Address.Bytes() + txHash, err = ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + proxyContractAddress, + []interface{}{"lock", []interface{}{assetaddress, ctx.OntInvoker.OntAcc.Address[:], + config.DefConfig.EthChainID, to, amount}}) + if err != nil { + return fmt.Errorf("SendODAICrossEth, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) + } + status.AddTx(hex.EncodeToString(txHash[:]), &testframework.TxInfo{"ODAIToEth", time.Now()}) + ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) + return nil +} + +func SendNeoCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + lpAddr, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) + if err != nil { + return err + } + + rawCNeo := helper.ReverseBytes(helper.HexToBytes(config.DefConfig.CNeo)) + fromAsset := sc.ContractParameter{ + Type: sc.ByteArray, + Value: rawCNeo, + } + rawFrom, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + fromAddr := sc.ContractParameter{ + Type: sc.ByteArray, + Value: rawFrom.Bytes(), + } + toChainId := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(int64(config.DefConfig.EthChainID)), + } + toAddr := sc.ContractParameter{ + Type: sc.ByteArray, + Value: ctx.EthInvoker.EthTestSigner.Address.Bytes(), + } + amt := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(int64(amount)), + } + idx := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(1), + } + + tb := tx.NewTransactionBuilder(config.DefConfig.NeoUrl) + sb := sc.NewScriptBuilder() + sb.MakeInvocationScript(lpAddr.Bytes(), "lock", []sc.ContractParameter{fromAsset, fromAddr, toChainId, toAddr, amt, idx}) + script := sb.ToArray() + + from, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero) + if err != nil { + return err + } + err = tx.AddSignature(itx, ctx.NeoInvoker.Acc.KeyPair) + if err != nil { + return err + } + response := tb.Client.SendRawTransaction(itx.RawTransactionString()) + if response.HasError() { + return fmt.Errorf(response.ErrorResponse.Error.Message) + } + _ = itx.HashString() + + status.AddTx(hex.EncodeToString(itx.Hash.Bytes()), &testframework.TxInfo{"NeoToEth", time.Now()}) + neo.WaitNeoTx(ctx.NeoInvoker.Cli, itx.Hash) + return nil +} + +func SendNeoCrossOnt(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + lpAddr, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) + if err != nil { + return err + } + + rawCNeo, _ := hex.DecodeString(config.DefConfig.CNeo) + fromAsset := sc.ContractParameter{ + Type: sc.ByteArray, + Value: helper.ReverseBytes(rawCNeo), + } + rawFrom, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + fromAddr := sc.ContractParameter{ + Type: sc.ByteArray, + Value: rawFrom.Bytes(), + } + toChainId := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(int64(config.DefConfig.OntChainID)), + } + toAddr := sc.ContractParameter{ + Type: sc.ByteArray, + Value: ctx.OntInvoker.OntAcc.Address[:], + } + amt := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(int64(amount)), + } + + tb := tx.NewTransactionBuilder(config.DefConfig.NeoUrl) + sb := sc.NewScriptBuilder() + sb.MakeInvocationScript(lpAddr.Bytes(), "lock", []sc.ContractParameter{fromAsset, fromAddr, toChainId, toAddr, amt}) + script := sb.ToArray() + + from, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero) + if err != nil { + return err + } + err = tx.AddSignature(itx, ctx.NeoInvoker.Acc.KeyPair) + if err != nil { + return err + } + response := tb.Client.SendRawTransaction(itx.RawTransactionString()) + if response.HasError() { + return fmt.Errorf(response.ErrorResponse.Error.Message) + } + _ = itx.HashString() + + status.AddTx(hex.EncodeToString(itx.Hash.Bytes()), &testframework.TxInfo{"NeoToOnt", time.Now()}) + neo.WaitNeoTx(ctx.NeoInvoker.Cli, itx.Hash) + + log.Infof("successful to send %d CNEO to Ontology", amount) + return nil +} + +func SendENeoCrossNeo(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.EthInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + return fmt.Errorf("SendENeoCrossNeo, get suggest gas price failed error: %s", err.Error()) + } + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendENeoCrossNeo, abi.JSON error:" + err.Error()) + } + assetaddress := ethcommon.HexToAddress(config.DefConfig.EthNeo) + contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) + + // approve + neox, err := erc20_abi.NewERC20(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + if err != nil { + return fmt.Errorf("SendENeoCrossNeo, NewERC20 error:" + err.Error()) + } + val, err := neox.Allowance(nil, ctx.EthInvoker.EthTestSigner.Address, contractAddr) + if err != nil { + return fmt.Errorf("SendENeoCrossNeo, failed to get the balance: %v", err) + } + if val.Uint64() < amount { + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + auth := MakeEthAuth(ctx.EthInvoker.EthTestSigner, nonce, gasPrice.Uint64(), uint64(eth.DefaultGasLimit)) + if err != nil { + return fmt.Errorf("SendEOntdCrossOnt, failed to get eth auth: %v", err) + } + tx, err := neox.Approve(auth, contractAddr, big.NewInt(math.MaxInt64)) + if err != nil { + return fmt.Errorf("SendEOntdCrossOnt, failed to approve: %v", err) + } + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), tx.Hash()) + } + + rawFrom, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.NeoChainID), rawFrom[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendENeoCrossNeo, contractabi.Pack error:" + err.Error()) + } + callMsg := ethereum.CallMsg{ + From: ctx.EthInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(0)), Data: txData, + } + gasLimit, err := ctx.EthInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendENeoCrossNeo, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendENeoCrossNeo, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.EthInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendENeoCrossNeo, types.SignTx error: %s", err.Error()) + } + + err = ctx.EthInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendENeoCrossNeo, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"ENeoToNeo", time.Now()}) + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + +func SendONeoCrossNeo(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + proxyContractAddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + return fmt.Errorf("SendONeoCrossNeo, ontcommon.AddressFromHexString error: %s", err) + } + + assetaddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntNeo) + if err != nil { + return err + } + res, err := ctx.OntInvoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(assetaddress, []interface{}{"allowance", []interface{}{ctx.OntInvoker.OntAcc.Address, proxyContractAddress}}) + if err != nil { + return err + } + val, err := res.Result.ToInteger() + if err != nil { + return err + } + if val.Uint64() < amount { + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + assetaddress, + []interface{}{"approve", []interface{}{ctx.OntInvoker.OntAcc.Address, proxyContractAddress, math.MaxInt64}}) + if err != nil { + return fmt.Errorf("SendONeoCrossNeo, approve error: %v", err) + } + ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) + } + + rawFrom, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + proxyContractAddress, + []interface{}{"lock", []interface{}{assetaddress, ctx.OntInvoker.OntAcc.Address[:], + config.DefConfig.NeoChainID, rawFrom.Bytes(), amount}}) + if err != nil { + return fmt.Errorf("SendONeoCrossNeo, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) + } + status.AddTx(hex.EncodeToString(txHash[:]), &testframework.TxInfo{"ONeoToNeo", time.Now()}) + ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) + return nil +} + +func SendOntCrossNeo(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + proxyContractAddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + return fmt.Errorf("SendOntCrossNeo, ontcommon.AddressFromHexString error: %s", err) + } + rawFrom, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + proxyContractAddress, + []interface{}{"lock", []interface{}{nutils.OntContractAddress[:], ctx.OntInvoker.OntAcc.Address[:], + config.DefConfig.NeoChainID, rawFrom.Bytes(), amount}}) + if err != nil { + return fmt.Errorf("SendOntCrossNeo, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) + } + status.AddTx(hex.EncodeToString(txHash[:]), &testframework.TxInfo{"OntToNeo", time.Now()}) + return nil +} + +func SendNOntCrossOnt(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + lpAddr, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) + if err != nil { + return err + } + + rawNOnt, _ := hex.DecodeString(config.DefConfig.NeoOnt) + rawNOnt = helper.ReverseBytes(rawNOnt) + fromAsset := sc.ContractParameter{ + Type: sc.ByteArray, + Value: rawNOnt, + } + rawFrom, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + fromAddr := sc.ContractParameter{ + Type: sc.ByteArray, + Value: rawFrom.Bytes(), + } + toChainId := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(int64(config.DefConfig.OntChainID)), + } + toAddr := sc.ContractParameter{ + Type: sc.ByteArray, + Value: ctx.OntInvoker.OntAcc.Address[:], + } + amt := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(int64(amount)), + } + tb := tx.NewTransactionBuilder(config.DefConfig.NeoUrl) + sb := sc.NewScriptBuilder() + sb.MakeInvocationScript(lpAddr.Bytes(), "lock", []sc.ContractParameter{fromAsset, fromAddr, toChainId, toAddr, amt}) + script := sb.ToArray() + + from, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero) + if err != nil { + return err + } + err = tx.AddSignature(itx, ctx.NeoInvoker.Acc.KeyPair) + if err != nil { + return err + } + response := tb.Client.SendRawTransaction(itx.RawTransactionString()) + if response.HasError() { + return fmt.Errorf(response.ErrorResponse.Error.Message) + } + _ = itx.HashString() + + status.AddTx(hex.EncodeToString(itx.Hash.Bytes()), &testframework.TxInfo{"NOntToOnt", time.Now()}) + neo.WaitNeoTx(ctx.NeoInvoker.Cli, itx.Hash) + + log.Infof("successful to send %d NOnt to ontology", amount) + return nil +} + +func SendEthCrossNeo(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.EthInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendEthCrossNeo, get suggest gas price failed error: %s", err.Error()) + } + //gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendEthCrossNeo, abi.JSON error:" + err.Error()) + } + rawFrom, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + assetaddress := ethcommon.HexToAddress("0000000000000000000000000000000000000000") + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.NeoChainID), rawFrom[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendEthCrossNeo, contractabi.Pack error:" + err.Error()) + } + + contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) + callMsg := ethereum.CallMsg{ + From: ctx.EthInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(amount)), Data: txData, + } + gasLimit, err := ctx.EthInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendEthCrossNeo, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendEthCrossNeo, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.EthInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendEthCrossNeo, types.SignTx error: %s", err.Error()) + } + + err = ctx.EthInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendEthCrossNeo, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"EthToNeo", time.Now()}) + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + +func SendNEthCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + lpAddr, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) + if err != nil { + return err + } + + rawNEth, _ := hex.DecodeString(config.DefConfig.NeoEth) + rawNEth = helper.ReverseBytes(rawNEth) + fromAsset := sc.ContractParameter{ + Type: sc.ByteArray, + Value: rawNEth, + } + rawFrom, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + fromAddr := sc.ContractParameter{ + Type: sc.ByteArray, + Value: rawFrom.Bytes(), + } + toChainId := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(int64(config.DefConfig.EthChainID)), + } + toAddr := sc.ContractParameter{ + Type: sc.ByteArray, + Value: ctx.EthInvoker.EthTestSigner.Address.Bytes(), + } + amt := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(int64(amount)), + } + tb := tx.NewTransactionBuilder(config.DefConfig.NeoUrl) + sb := sc.NewScriptBuilder() + sb.MakeInvocationScript(lpAddr.Bytes(), "lock", []sc.ContractParameter{fromAsset, fromAddr, toChainId, toAddr, amt}) + script := sb.ToArray() + + from, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero) + if err != nil { + return err + } + err = tx.AddSignature(itx, ctx.NeoInvoker.Acc.KeyPair) + if err != nil { + return err + } + response := tb.Client.SendRawTransaction(itx.RawTransactionString()) + if response.HasError() { + return fmt.Errorf(response.ErrorResponse.Error.Message) + } + _ = itx.HashString() + + status.AddTx(hex.EncodeToString(itx.Hash.Bytes()), &testframework.TxInfo{"NEthToEth", time.Now()}) + neo.WaitNeoTx(ctx.NeoInvoker.Cli, itx.Hash) + + log.Infof("successful to send %d NEth to Ethereum", amount) + return nil +} + +func SendOntdCrossNeo(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + proxyContractAddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + return fmt.Errorf("SendOntdCrossNeo, ontcommon.AddressFromHexString error: %s", err) + } + rawFrom, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + asset, err := ontcommon.AddressFromHexString(config.DefConfig.OntONTD) + if err != nil { + return err + } + + res, err := ctx.OntInvoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(asset, []interface{}{"allowance", []interface{}{ctx.OntInvoker.OntAcc.Address, proxyContractAddress}}) + if err != nil { + return err + } + val, err := res.Result.ToInteger() + if err != nil { + return err + } + if val.Uint64() < amount { + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + asset, + []interface{}{"approve", []interface{}{ctx.OntInvoker.OntAcc.Address, proxyContractAddress, math.MaxInt64}}) + if err != nil { + return fmt.Errorf("SendONeoCrossNeo, approve error: %v", err) + } + ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) + } + + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + proxyContractAddress, + []interface{}{"lock", []interface{}{asset[:], ctx.OntInvoker.OntAcc.Address[:], + config.DefConfig.NeoChainID, rawFrom.Bytes(), amount}}) + if err != nil { + return fmt.Errorf("SendOntdCrossNeo, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) + } + status.AddTx(hex.EncodeToString(txHash[:]), &testframework.TxInfo{"OntdToNeo", time.Now()}) + + return nil +} + +func SendOntdCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + proxyContractAddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + return fmt.Errorf("SendOntdCrossEth, ontcommon.AddressFromHexString error: %s", err) + } + to := ctx.EthInvoker.EthTestSigner.Address.Bytes() + asset, err := ontcommon.AddressFromHexString(config.DefConfig.OntONTD) + if err != nil { + return err + } + + res, err := ctx.OntInvoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(asset, []interface{}{"allowance", []interface{}{ctx.OntInvoker.OntAcc.Address, proxyContractAddress}}) + if err != nil { + return err + } + val, err := res.Result.ToInteger() + if err != nil { + return err + } + if val.Uint64() < amount { + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + asset, + []interface{}{"approve", []interface{}{ctx.OntInvoker.OntAcc.Address, proxyContractAddress, math.MaxInt64}}) + if err != nil { + return fmt.Errorf("SendONeoCrossNeo, approve error: %v", err) + } + ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) + } + + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + proxyContractAddress, + []interface{}{"lock", []interface{}{asset[:], ctx.OntInvoker.OntAcc.Address[:], + config.DefConfig.EthChainID, to, amount}}) + if err != nil { + return fmt.Errorf("SendOntdCrossEth, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) + } + status.AddTx(hex.EncodeToString(txHash[:]), &testframework.TxInfo{"OntdToEth", time.Now()}) + + return nil +} + +func SendEOntdCrossOnt(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.EthInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendEOntdCrossOnt, get suggest gas price failed error: %s", err.Error()) + } + //gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + assetaddress := ethcommon.HexToAddress(config.DefConfig.EthOntd) + contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) + token, err := eth.NewStandardToken(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + if err != nil { + return fmt.Errorf("SendEOntdCrossOnt, NewStandardToken error: %v", err.Error()) + } + val, err := token.Allowance(nil, ctx.EthInvoker.EthTestSigner.Address, contractAddr) + if err != nil { + return fmt.Errorf("SendEOntdCrossOnt, failed to get allowance: %v", err) + } + if val.Uint64() < amount { + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + auth := MakeEthAuth(ctx.EthInvoker.EthTestSigner, nonce, gasPrice.Uint64(), uint64(eth.DefaultGasLimit)) + if err != nil { + return fmt.Errorf("SendEOntdCrossOnt, failed to get eth auth: %v", err) + } + tx, err := token.Approve(auth, contractAddr, big.NewInt(math.MaxInt64)) + if err != nil { + return fmt.Errorf("SendEOntdCrossOnt, failed to approve: %v", err) + } + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), tx.Hash()) + } + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendEOntdCrossOnt, abi.JSON error:" + err.Error()) + } + + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.OntChainID), ctx.OntInvoker.OntAcc.Address[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendEOntdCrossOnt, contractabi.Pack error:" + err.Error()) + } + + callMsg := ethereum.CallMsg{ + From: ctx.EthInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(0)), Data: txData, + } + gasLimit, err := ctx.EthInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendEOntdCrossOnt, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendEOntdCrossOnt, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.EthInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendEOntdCrossOnt, types.SignTx error: %s", err.Error()) + } + + err = ctx.EthInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendEOntdCrossOnt, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"EONTDToOnt", time.Now()}) + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + +func SendEOntdCrossNeo(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.EthInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendEOntdCrossNeo, get suggest gas price failed error: %s", err.Error()) + } + //gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + assetaddress := ethcommon.HexToAddress(config.DefConfig.EthOntd) + contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) + token, err := eth.NewStandardToken(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + if err != nil { + return fmt.Errorf("SendEOntdCrossNeo, NewStandardToken error: %v", err.Error()) + } + val, err := token.Allowance(nil, ctx.EthInvoker.EthTestSigner.Address, contractAddr) + if err != nil { + return fmt.Errorf("SendEOntdCrossNeo, failed to get allowance: %v", err) + } + if val.Uint64() < amount { + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + auth := MakeEthAuth(ctx.EthInvoker.EthTestSigner, nonce, gasPrice.Uint64(), uint64(eth.DefaultGasLimit)) + if err != nil { + return fmt.Errorf("SendEOntdCrossNeo, failed to get eth auth: %v", err) + } + tx, err := token.Approve(auth, contractAddr, big.NewInt(math.MaxInt64)) + if err != nil { + return fmt.Errorf("SendEOntdCrossNeo, failed to approve: %v", err) + } + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), tx.Hash()) + } + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendEOntdCrossNeo, abi.JSON error:" + err.Error()) + } + rawFrom, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.NeoChainID), rawFrom[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendEOntdCrossNeo, contractabi.Pack error:" + err.Error()) + } + + callMsg := ethereum.CallMsg{ + From: ctx.EthInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(0)), Data: txData, + } + gasLimit, err := ctx.EthInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendEOntdCrossNeo, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendEOntdCrossNeo, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.EthInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendEOntdCrossNeo, types.SignTx error: %s", err.Error()) + } + + err = ctx.EthInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendEOntdCrossNeo, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"EONTDToNeo", time.Now()}) + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + +func SendNOntdCrossOnt(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + lpAddr, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) + if err != nil { + return err + } + + rawNOntd, _ := hex.DecodeString(config.DefConfig.NeoOntd) + rawNOntd = helper.ReverseBytes(rawNOntd) + fromAsset := sc.ContractParameter{ + Type: sc.ByteArray, + Value: rawNOntd, + } + rawFrom, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + fromAddr := sc.ContractParameter{ + Type: sc.ByteArray, + Value: rawFrom.Bytes(), + } + toChainId := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(int64(config.DefConfig.OntChainID)), + } + toAddr := sc.ContractParameter{ + Type: sc.ByteArray, + Value: ctx.OntInvoker.OntAcc.Address[:], + } + amt := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(int64(amount)), + } + tb := tx.NewTransactionBuilder(config.DefConfig.NeoUrl) + sb := sc.NewScriptBuilder() + sb.MakeInvocationScript(lpAddr.Bytes(), "lock", []sc.ContractParameter{fromAsset, fromAddr, toChainId, toAddr, amt}) + script := sb.ToArray() + + from, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero) + if err != nil { + return err + } + err = tx.AddSignature(itx, ctx.NeoInvoker.Acc.KeyPair) + if err != nil { + return err + } + response := tb.Client.SendRawTransaction(itx.RawTransactionString()) + if response.HasError() { + return fmt.Errorf(response.ErrorResponse.Error.Message) + } + _ = itx.HashString() + + status.AddTx(hex.EncodeToString(itx.Hash.Bytes()), &testframework.TxInfo{"NOntdToOnt", time.Now()}) + neo.WaitNeoTx(ctx.NeoInvoker.Cli, itx.Hash) + + log.Infof("successful to send %d NOntd to ontology", amount) + return nil +} + +func SendNOntdCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + lpAddr, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) + if err != nil { + return err + } + + rawNOntd, _ := hex.DecodeString(config.DefConfig.NeoOntd) + rawNOntd = helper.ReverseBytes(rawNOntd) + fromAsset := sc.ContractParameter{ + Type: sc.ByteArray, + Value: rawNOntd, + } + rawFrom, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + fromAddr := sc.ContractParameter{ + Type: sc.ByteArray, + Value: rawFrom.Bytes(), + } + toChainId := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(int64(config.DefConfig.EthChainID)), + } + toAddr := sc.ContractParameter{ + Type: sc.ByteArray, + Value: ctx.EthInvoker.EthTestSigner.Address.Bytes(), + } + amt := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(int64(amount)), + } + tb := tx.NewTransactionBuilder(config.DefConfig.NeoUrl) + sb := sc.NewScriptBuilder() + sb.MakeInvocationScript(lpAddr.Bytes(), "lock", []sc.ContractParameter{fromAsset, fromAddr, toChainId, toAddr, amt}) + script := sb.ToArray() + + from, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero) + if err != nil { + return err + } + err = tx.AddSignature(itx, ctx.NeoInvoker.Acc.KeyPair) + if err != nil { + return err + } + response := tb.Client.SendRawTransaction(itx.RawTransactionString()) + if response.HasError() { + return fmt.Errorf(response.ErrorResponse.Error.Message) + } + _ = itx.HashString() + + status.AddTx(hex.EncodeToString(itx.Hash.Bytes()), &testframework.TxInfo{"NOntdToEth", time.Now()}) + neo.WaitNeoTx(ctx.NeoInvoker.Cli, itx.Hash) + + log.Infof("successful to send %d NOntd to ethereum", amount) + return nil +} + +func SendUSDCCrossOnt(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.EthInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendUSDCCrossOnt, get suggest gas price failed error: %s", err.Error()) + } + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendUSDCCrossOnt, abi.JSON error:" + err.Error()) + } + assetaddress := ethcommon.HexToAddress(config.DefConfig.EthUSDC) + contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) + + // approve + token, err := eth.NewStandardToken(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + if err != nil { + return fmt.Errorf("SendUSDCCrossOnt, NewStandardToken error: %v", err.Error()) + } + val, err := token.Allowance(nil, ctx.EthInvoker.EthTestSigner.Address, contractAddr) + if err != nil { + return fmt.Errorf("SendUSDCCrossOnt, failed to get allowance: %v", err) + } + if val.Uint64() < amount { + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + auth := MakeEthAuth(ctx.EthInvoker.EthTestSigner, nonce, gasPrice.Uint64(), uint64(eth.DefaultGasLimit)) + if err != nil { + return fmt.Errorf("SendUSDCCrossOnt, failed to get eth auth: %v", err) + } + tx, err := token.Approve(auth, contractAddr, big.NewInt(math.MaxInt64)) + if err != nil { + return fmt.Errorf("SendUSDCCrossOnt, failed to approve: %v", err) + } + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), tx.Hash()) + } + + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.OntChainID), ctx.OntInvoker.OntAcc.Address[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendUSDCCrossOnt, contractabi.Pack error:" + err.Error()) + } + callMsg := ethereum.CallMsg{ + From: ctx.EthInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(0)), Data: txData, + } + gasLimit, err := ctx.EthInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendUSDCCrossOnt, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendUSDCCrossOnt, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.EthInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendUSDCCrossOnt, types.SignTx error: %s", err.Error()) + } + + err = ctx.EthInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendUSDCCrossOnt, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"USDCToOnt", time.Now()}) + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + +func SendOUSDCCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + proxyContractAddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + return fmt.Errorf("SendOUSDCCrossEth, ontcommon.AddressFromHexString error: %s", err) + } + + assetaddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntUSDC) + if err != nil { + return err + } + res, err := ctx.OntInvoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(assetaddress, + []interface{}{"allowance", []interface{}{ctx.OntInvoker.OntAcc.Address, proxyContractAddress}}) + if err != nil { + return err + } + val, err := res.Result.ToInteger() + if err != nil { + return err + } + if val.Uint64() < amount { + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + assetaddress, + []interface{}{"approve", []interface{}{ctx.OntInvoker.OntAcc.Address, proxyContractAddress, math.MaxInt64}}) + if err != nil { + return fmt.Errorf("SendOUSDCCrossEth, approve error: %v", err) + } + ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) + } + + to := ctx.EthInvoker.EthTestSigner.Address.Bytes() + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + proxyContractAddress, + []interface{}{"lock", []interface{}{assetaddress, ctx.OntInvoker.OntAcc.Address[:], + config.DefConfig.EthChainID, to, amount}}) + if err != nil { + return fmt.Errorf("SendOUSDCCrossEth, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) + } + status.AddTx(hex.EncodeToString(txHash[:]), &testframework.TxInfo{"OUSDCToEth", time.Now()}) + ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) + return nil +} + +func SendRenBTCCrossOnt(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.EthInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendRenBTCCrossOnt, get suggest gas price failed error: %s", err.Error()) + } + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendRenBTCCrossOnt, abi.JSON error:" + err.Error()) + } + assetaddress := ethcommon.HexToAddress(config.DefConfig.EthRenBTC) + contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) + + // approve + token, err := eth.NewStandardToken(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + if err != nil { + return fmt.Errorf("SendRenBTCCrossOnt, NewStandardToken error: %v", err.Error()) + } + val, err := token.Allowance(nil, ctx.EthInvoker.EthTestSigner.Address, contractAddr) + if err != nil { + return fmt.Errorf("SendRenBTCCrossOnt, failed to get allowance: %v", err) + } + if val.Uint64() < amount { + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + auth := MakeEthAuth(ctx.EthInvoker.EthTestSigner, nonce, gasPrice.Uint64(), uint64(eth.DefaultGasLimit)) + if err != nil { + return fmt.Errorf("SendRenBTCCrossOnt, failed to get eth auth: %v", err) + } + tx, err := token.Approve(auth, contractAddr, big.NewInt(math.MaxInt64)) + if err != nil { + return fmt.Errorf("SendRenBTCCrossOnt, failed to approve: %v", err) + } + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), tx.Hash()) + } + + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.OntChainID), ctx.OntInvoker.OntAcc.Address[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendRenBTCCrossOnt, contractabi.Pack error:" + err.Error()) + } + callMsg := ethereum.CallMsg{ + From: ctx.EthInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(0)), Data: txData, + } + gasLimit, err := ctx.EthInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendRenBTCCrossOnt, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendRenBTCCrossOnt, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.EthInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendRenBTCCrossOnt, types.SignTx error: %s", err.Error()) + } + + err = ctx.EthInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendRenBTCCrossOnt, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"RenBTCToOnt", time.Now()}) + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + +func SendORenBTCCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + proxyContractAddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + return fmt.Errorf("SendORenBTCCrossEth, ontcommon.AddressFromHexString error: %s", err) + } + + assetaddress, err := ontcommon.AddressFromHexString(config.DefConfig.OntRenBTC) + if err != nil { + return err + } + res, err := ctx.OntInvoker.OntSdk.NeoVM.PreExecInvokeNeoVMContract(assetaddress, + []interface{}{"allowance", []interface{}{ctx.OntInvoker.OntAcc.Address, proxyContractAddress}}) + if err != nil { + return err + } + val, err := res.Result.ToInteger() + if err != nil { + return err + } + if val.Uint64() < amount { + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + assetaddress, + []interface{}{"approve", []interface{}{ctx.OntInvoker.OntAcc.Address, proxyContractAddress, math.MaxInt64}}) + if err != nil { + return fmt.Errorf("SendORenBTCCrossEth, approve error: %v", err) + } + ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) + } + + to := ctx.EthInvoker.EthTestSigner.Address.Bytes() + txHash, err := ctx.OntInvoker.OntSdk.NeoVM.InvokeNeoVMContract(config.DefConfig.GasPrice, config.DefConfig.GasLimit, + ctx.OntInvoker.OntAcc, + ctx.OntInvoker.OntAcc, + proxyContractAddress, + []interface{}{"lock", []interface{}{assetaddress, ctx.OntInvoker.OntAcc.Address[:], + config.DefConfig.EthChainID, to, amount}}) + if err != nil { + return fmt.Errorf("SendORenBTCCrossEth, ctx.Ont.NeoVM.InvokeNeoVMContract error: %s", err) + } + status.AddTx(hex.EncodeToString(txHash[:]), &testframework.TxInfo{"ORenBTCToEth", time.Now()}) + ont.WaitOntTx(txHash, ctx.OntInvoker.OntSdk) + return nil +} + func ToArrayReverse(arr []byte) []byte { l := len(arr) x := make([]byte, 0) diff --git a/testcase/testcase.go b/testcase/testcase.go index c73c02d..9b0698b 100644 --- a/testcase/testcase.go +++ b/testcase/testcase.go @@ -30,7 +30,7 @@ func SendOntToEthChain(ctx *testframework.TestFrameworkContext, status *testfram return false } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -40,17 +40,17 @@ func SendEOntToOntChain(ctx *testframework.TestFrameworkContext, status *testfra return false } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } func SendEthToOntChain(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { - if err := SendEthCrossOnt(ctx, status, GetRandAmount(config.DefConfig.EthValLimit, 1)); err != nil { + if err := SendEthCrossOnt(ctx, status, 1); err != nil { log.Errorf("SendEthToOntChain error: %v", err) return false } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -60,7 +60,7 @@ func SendEthoToEthChain(ctx *testframework.TestFrameworkContext, status *testfra return false } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -71,7 +71,7 @@ func SendBtcoToBtcChain(ctx *testframework.TestFrameworkContext, status *testfra return false } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -82,7 +82,7 @@ func SendBtcToOntChain(ctx *testframework.TestFrameworkContext, status *testfram return false } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -92,7 +92,7 @@ func SendBtcToEthChain(ctx *testframework.TestFrameworkContext, status *testfram return false } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -103,7 +103,7 @@ func SendBtceToBtcChain(ctx *testframework.TestFrameworkContext, status *testfra return false } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -114,7 +114,7 @@ func SendBtcoToEthChain(ctx *testframework.TestFrameworkContext, status *testfra return false } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -125,7 +125,7 @@ func SendBtceToOntChain(ctx *testframework.TestFrameworkContext, status *testfra return false } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -190,7 +190,7 @@ func BtcCircle(ctx *testframework.TestFrameworkContext, status *testframework.Ca log.Infof("btc1&2 is back now") } - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -240,7 +240,7 @@ func OntCircle(ctx *testframework.TestFrameworkContext, status *testframework.Ca log.Infof("OntCircle, ont all received ( batch: %d )", i) } - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -287,7 +287,7 @@ func OngCircle(ctx *testframework.TestFrameworkContext, status *testframework.Ca WaitUntilClean(status) log.Infof("OngCircle, ong all received ( batch: %d )", i) } - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -338,7 +338,7 @@ func EthCircle(ctx *testframework.TestFrameworkContext, status *testframework.Ca log.Infof("EthCircle, eth all received ( batch: %d )", i) } - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -386,7 +386,7 @@ func Erc20Circle(ctx *testframework.TestFrameworkContext, status *testframework. log.Infof("Erc20Circle, erc20 all received ( batch: %d )", i) } - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -414,7 +414,7 @@ func Oep4Circle(ctx *testframework.TestFrameworkContext, status *testframework.C WaitUntilClean(status) } - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -425,7 +425,7 @@ func SendOngToEthChain(ctx *testframework.TestFrameworkContext, status *testfram } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -435,7 +435,7 @@ func SendOngeToOntChain(ctx *testframework.TestFrameworkContext, status *testfra return false } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -445,7 +445,7 @@ func SendERC20ToOntChain(ctx *testframework.TestFrameworkContext, status *testfr return false } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -455,7 +455,7 @@ func SendOERC20ToEthChain(ctx *testframework.TestFrameworkContext, status *testf return false } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -465,7 +465,7 @@ func SendOEP4ToEthChain(ctx *testframework.TestFrameworkContext, status *testfra return false } WaitUntilClean(status) - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -474,7 +474,7 @@ func SendOEP4eToOntChain(ctx *testframework.TestFrameworkContext, status *testfr log.Errorf("SendOEP4eToOntChain, SendEOEP4CrossOnt error: %s", err) return false } - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -495,7 +495,7 @@ func SendBtcToEthInBatch(ctx *testframework.TestFrameworkContext, status *testfr WaitUntilClean(status) log.Infof("btc is all received") - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -516,7 +516,7 @@ func SendBtcToOntInBatch(ctx *testframework.TestFrameworkContext, status *testfr WaitUntilClean(status) log.Infof("btc is all received") - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -537,7 +537,7 @@ func SendBtceToBtcInBatch(ctx *testframework.TestFrameworkContext, status *testf WaitUntilClean(status) log.Infof("ebtc is all received") - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -558,7 +558,7 @@ func SendBtcoToBtcInBatch(ctx *testframework.TestFrameworkContext, status *testf WaitUntilClean(status) log.Infof("obtc is all received") - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -579,7 +579,7 @@ func SendBtcoToBtceInBatch(ctx *testframework.TestFrameworkContext, status *test WaitUntilClean(status) log.Infof("obtc is all received") - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -600,7 +600,7 @@ func SendBtceToBtcoInBatch(ctx *testframework.TestFrameworkContext, status *test WaitUntilClean(status) log.Infof("ebtc is all received") - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -621,7 +621,7 @@ func SendOntToEthInBatch(ctx *testframework.TestFrameworkContext, status *testfr WaitUntilClean(status) log.Infof("ont is all received") - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -642,7 +642,7 @@ func SendOnteToOntInBatch(ctx *testframework.TestFrameworkContext, status *testf WaitUntilClean(status) log.Infof("ont is all received") - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -663,7 +663,7 @@ func SendEthToOntInBatch(ctx *testframework.TestFrameworkContext, status *testfr WaitUntilClean(status) log.Infof("eth is all received") - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -684,7 +684,7 @@ func SendEthoToEthInBatch(ctx *testframework.TestFrameworkContext, status *testf WaitUntilClean(status) log.Infof("eth is all received") - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -723,7 +723,7 @@ func BtcOntCircle(ctx *testframework.TestFrameworkContext, status *testframework WaitUntilClean(status) log.Infof("obtc is all received") - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -751,7 +751,7 @@ func SendBtcToCosmosAndBack(ctx *testframework.TestFrameworkContext, status *tes log.Info("btc from cosmos to bitcoin all received: ( batch: %d )", n) } - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -778,7 +778,7 @@ func SendEthToCosmosAndBack(ctx *testframework.TestFrameworkContext, status *tes log.Info("eth from cosmos to ethereum all received ( batch: %d )", n) } - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -805,7 +805,7 @@ func SendErc20ToCosmosAndBack(ctx *testframework.TestFrameworkContext, status *t WaitUntilClean(status) log.Info("erc20 from cosmos to ethereum all received ( batch: %d )", n) } - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -832,7 +832,7 @@ func SendOntToCosmosAndBack(ctx *testframework.TestFrameworkContext, status *tes WaitUntilClean(status) log.Infof("ont from cosmos to ontology all received ( batch: %d )", n) } - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -859,7 +859,7 @@ func SendOngToCosmosAndBack(ctx *testframework.TestFrameworkContext, status *tes WaitUntilClean(status) log.Infof("ong from cosmos to ontology all received ( batch: %d )", n) } - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -886,7 +886,7 @@ func SendOep4ToCosmosAndBack(ctx *testframework.TestFrameworkContext, status *te WaitUntilClean(status) log.Infof("oep4 from cosmos to ontology all received ( batch: %d )", n) } - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -900,7 +900,7 @@ func SendZeroOntToEth(ctx *testframework.TestFrameworkContext, status *testframe return false } log.Info("all success!") - status.SetItSuccess() + status.SetItSuccess(1) return true } @@ -928,6 +928,330 @@ func OntCircleWithoutCosmos(ctx *testframework.TestFrameworkContext, status *tes log.Infof("OntCircle, ont all received ( batch: %d )", i) } - status.SetItSuccess() + status.SetItSuccess(1) return true } + +func USDTCircle(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.USDTValLimit, 1) + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendUSDTCrossOnt(ctx, status, amt); err != nil { + log.Errorf("USDTCircle, SendUSDTCrossOnt error: %v", err) + return false + } + } + log.Infof("USDTCircle, send %d usdt to ontology, waiting for confirmation...", amt) + WaitUntilClean(status) + + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendOUSDTCrossEth(ctx, status, amt); err != nil { + log.Errorf("USDTCircle, SendOUSDTCrossEth error: %v", err) + return false + } + } + log.Infof("USDTCircle, send %d usdt from ontology to ethereum, waiting for confirmation...", amt) + WaitUntilClean(status) + log.Infof("USDTCircle, usdt all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + +func WBTCCircle(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.WBTCValLimit, 1) + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendWBTCCrossOnt(ctx, status, amt); err != nil { + log.Errorf("WBTCCircle, SendWBTCCrossOnt error: %v", err) + return false + } + } + log.Infof("WBTCCircle, send %d wbtc to ontology, waiting for confirmation...", amt) + WaitUntilClean(status) + + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendOWBTCCrossEth(ctx, status, amt); err != nil { + log.Errorf("WBTCCircle, SendOWBTCCrossEth error: %v", err) + return false + } + } + log.Infof("WBTCCircle, send %d wbtc from ontology to ethereum, waiting for confirmation...", amt) + WaitUntilClean(status) + log.Infof("WBTCCircle, wbtc all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + +func DAICircle(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.USDTValLimit, 1) + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendDAICrossOnt(ctx, status, amt); err != nil { + log.Errorf("DAICircle, SendDAICrossOnt error: %v", err) + return false + } + } + log.Infof("DAICircle, send %d dai to ontology, waiting for confirmation...", amt) + WaitUntilClean(status) + + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendODAICrossEth(ctx, status, amt); err != nil { + log.Errorf("DAICircle, SendODAICrossEth error: %v", err) + return false + } + } + log.Infof("DAICircle, send %d dai from ontology to ethereum, waiting for confirmation...", amt) + WaitUntilClean(status) + log.Infof("DAICircle, dai all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + +func NeoToEthCircle(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.NeoValLimit, 1) + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendNeoCrossEth(ctx, status, amt); err != nil { + log.Errorf("NeoToEthCircle, SendNeoCrossEth error: %v", err) + return false + } + } + log.Infof("NeoToEthCircle, send %d NEO to ethereum, waiting for confirmation...", amt) + WaitUntilClean(status) + + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendENeoCrossNeo(ctx, status, amt); err != nil { + log.Errorf("NeoToEthCircle, SendENeoCrossNeo error: %v", err) + return false + } + } + log.Infof("NeoToEthCircle, send %d NEO from ethereum to NEO, waiting for confirmation...", amt) + WaitUntilClean(status) + log.Infof("NeoToEthCircle, neo all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + +func NeoToOntCircle(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.NeoValLimit, 1) + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendNeoCrossOnt(ctx, status, amt); err != nil { + log.Errorf("NeoToOntCircle, SendNeoCrossOnt error: %v", err) + return false + } + } + log.Infof("NeoToOntCircle, send %d NEO to ontology, waiting for confirmation...", amt) + WaitUntilClean(status) + + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendONeoCrossNeo(ctx, status, amt); err != nil { + log.Errorf("NeoToOntCircle, SendONeoCrossNeo error: %v", err) + return false + } + } + log.Infof("NeoToOntCircle, send %d NEO from ontology to NEO, waiting for confirmation...", amt) + WaitUntilClean(status) + log.Infof("NeoToOntCircle, neo all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + +func OntToNeoAndBack(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.OntValLimit, 1) + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendOntCrossNeo(ctx, status, amt); err != nil { + log.Errorf("OntToNeoAndBack, SendOntCrossNeo error: %v", err) + return false + } + } + log.Infof("OntToNeoAndBack, send %d ont to NEO, waiting for confirmation...", amt) + WaitUntilClean(status) + + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendNOntCrossOnt(ctx, status, amt); err != nil { + log.Errorf("OntToNeoAndBack, SendNOntCrossOnt error: %v", err) + return false + } + } + log.Infof("OntToNeoAndBack, send %d ont from NEO to ontology, waiting for confirmation...", amt) + WaitUntilClean(status) + log.Infof("OntToNeoAndBack, ont all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + +func OntdToEthAndBack(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.OntdValLimit, config.DefConfig.OntdValFloor) + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendOntdCrossEth(ctx, status, amt); err != nil { + log.Errorf("OntdToEthAndBack, SendOntdCrossEth error: %v", err) + return false + } + } + log.Infof("OntdToEthAndBack, send %d ontd to Ethereum, waiting for confirmation...", amt) + WaitUntilClean(status) + + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendEOntdCrossOnt(ctx, status, amt); err != nil { + log.Errorf("OntdToEthAndBack, SendEOntdCrossOnt error: %v", err) + return false + } + } + log.Infof("OntdToEthAndBack, send %d ontd from Ethereum to ontology, waiting for confirmation...", amt) + WaitUntilClean(status) + log.Infof("OntdToEthAndBack, ontd all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + +func OntdToNeoAndBack(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.OntdValLimit, 1) + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendOntdCrossNeo(ctx, status, amt); err != nil { + log.Errorf("OntdToNeoAndBack, SendOntdCrossNeo error: %v", err) + return false + } + } + log.Infof("OntdToNeoAndBack, send %d ontd to NEO, waiting for confirmation...", amt) + WaitUntilClean(status) + + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendNOntdCrossOnt(ctx, status, amt); err != nil { + log.Errorf("OntToNeoAndBack, SendNOntCrossOnt error: %v", err) + return false + } + } + log.Infof("OntdToNeoAndBack, send %d ontd from NEO to ontology, waiting for confirmation...", amt) + WaitUntilClean(status) + log.Infof("OntdToNeoAndBack, ontd all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + +func EOntdToNeoAndBack(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.OntdValLimit, 1) + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendEOntdCrossNeo(ctx, status, amt); err != nil { + log.Errorf("EOntdToNeoAndBack, SendEOntdCrossNeo error: %v", err) + return false + } + } + log.Infof("EOntdToNeoAndBack, send %d ontd to NEO, waiting for confirmation...", amt) + WaitUntilClean(status) + + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendNOntdCrossEth(ctx, status, amt); err != nil { + log.Errorf("EOntdToNeoAndBack, SendNOntdCrossEth error: %v", err) + return false + } + } + log.Infof("EOntdToNeoAndBack, send %d ontd from NEO to ethereum, waiting for confirmation...", amt) + WaitUntilClean(status) + log.Infof("EOntdToNeoAndBack, ontd all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + +func EthToNeoAndBack(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.OntValLimit, 1) + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendEthCrossNeo(ctx, status, amt); err != nil { + log.Errorf("EthToNeoAndBack, SendEthCrossNeo error: %v", err) + return false + } + } + log.Infof("EthToNeoAndBack, send %d eth to NEO, waiting for confirmation...", amt) + WaitUntilClean(status) + + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendNEthCrossEth(ctx, status, amt); err != nil { + log.Errorf("EthToNeoAndBack, SendNEthCrossEth error: %v", err) + return false + } + } + log.Infof("EthToNeoAndBack, send %d eth from NEO to ontology, waiting for confirmation...", amt) + WaitUntilClean(status) + log.Infof("EthToNeoAndBack, eth all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + +func USDCCircle(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.USDCValLimit, 1) + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendUSDCCrossOnt(ctx, status, amt); err != nil { + log.Errorf("USDCCircle, SendUSDCCrossOnt error: %v", err) + return false + } + } + log.Infof("USDCCircle, send %d USDC to ontology, waiting for confirmation...", amt) + WaitUntilClean(status) + + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendOUSDCCrossEth(ctx, status, amt); err != nil { + log.Errorf("USDCCircle, SendOUSDCCrossEth error: %v", err) + return false + } + } + log.Infof("USDCCircle, send %d USDC from ontology to ethereum, waiting for confirmation...", amt) + WaitUntilClean(status) + log.Infof("USDCCircle, USDC all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + +func RenBTCCircle(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.RenBTCValLimit, 1) + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendRenBTCCrossOnt(ctx, status, amt); err != nil { + log.Errorf("RenBTCCircle, SendRenBTCCrossOnt error: %v", err) + return false + } + } + log.Infof("RenBTCCircle, send %d renBTC to ontology, waiting for confirmation...", amt) + WaitUntilClean(status) + + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendORenBTCCrossEth(ctx, status, amt); err != nil { + log.Errorf("RenBTCCircle, SendORenBTCCrossEth error: %v", err) + return false + } + } + log.Infof("RenBTCCircle, send %d renBTC from ontology to ethereum, waiting for confirmation...", amt) + WaitUntilClean(status) + log.Infof("RenBTCCircle, renBTC all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} \ No newline at end of file diff --git a/testframework/check.go b/testframework/check.go index 0a06fe2..fbef2e7 100644 --- a/testframework/check.go +++ b/testframework/check.go @@ -23,6 +23,7 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" + "github.com/polynetwork/poly/common" "io/ioutil" "math/big" "os" @@ -212,7 +213,6 @@ func parseRelayChainBlock(ctx *TestFrameworkContext, height uint32) error { return err } - //log.Infof("parseRelayChainBlock, relay chain block height: %d, events num: %d", height, len(events)) for _, event := range events { for _, notify := range event.Notify { states, ok := notify.States.([]interface{}) @@ -232,6 +232,15 @@ func parseRelayChainBlock(ctx *TestFrameworkContext, height uint32) error { caseStatus.AddTx(txid.String(), &TxInfo{"RCToBtc", time.Now()}) caseStatus.Del(txHash) } + } else if ok && name == "makeProof" && uint64(states[2].(float64)) == config.DefConfig.NeoChainID { + txHash, _ := states[3].(string) + if ok, idx := ctx.Status.IsTxPending(txHash); ok { + pHash, _ := common.Uint256FromHexString(event.TxHash) + log.Infof("receive cross chain tx on relay chain, tx hash: %s, raw tx hash: %s", event.TxHash, txHash) + caseStatus := ctx.Status.GetCaseStatus(idx) + caseStatus.AddTx(hex.EncodeToString(pHash[:]), &TxInfo{"PolyToNeo", time.Now()}) + caseStatus.Del(txHash) + } } } } @@ -290,6 +299,62 @@ func MonitorCosmos(ctx *TestFrameworkContext) { } } +func MonitorNeo(ctx *TestFrameworkContext) { + res := ctx.NeoInvoker.Cli.GetBlockCount() + if res.HasError() { + log.Errorf("failed to get curr height: %s", res.Error.Message) + os.Exit(1) + } + left := uint32(res.Result - 1) + + updateTicker := time.NewTicker(time.Second * 1) + for { + select { + case <-updateTicker.C: + res := ctx.NeoInvoker.Cli.GetBlockCount() + if res.HasError() { + continue + } + right := uint32(res.Result) - 3 + if left >= right { + continue + } + for i := uint32(left); i < right; i++ { + res := ctx.NeoInvoker.Cli.GetBlockByIndex(i) + for _, tx := range res.Result.Tx { + if tx.Type != "InvocationTransaction" { + continue + } + appLogResp := ctx.NeoInvoker.Cli.GetApplicationLog(tx.Txid) + if appLogResp.ErrorResponse.Error.Message != "" { + continue + } + appLog := appLogResp.Result + for _, exeitem := range appLog.Executions { + for _, notify := range exeitem.Notifications { + if notify.Contract != config.DefConfig.NeoCCMC { + continue + } + if len(notify.State.Value) == 0 { + continue + } + contractMethod, _ := hex.DecodeString(notify.State.Value[0].Value) + if string(contractMethod) != "CrossChainUnlockEvent" { + continue + } + if ok, idx := ctx.Status.IsTxPending(notify.State.Value[3].Value); ok { + ctx.Status.DelWithIndex(notify.State.Value[3].Value, idx) + log.Infof("neo unlock, txhash: %s, fromTxHash: %s", tx.Txid, notify.State.Value[3].Value) + } + } + } + } + } + left = right + } + } +} + func ReportPending(ctx *TestFrameworkContext) { reportTicker := time.NewTicker(time.Second * time.Duration(config.DefConfig.ReportInterval)) _ = os.RemoveAll(config.DefConfig.ReportDir) diff --git a/testframework/framework.go b/testframework/framework.go index 121ad53..ea1d392 100644 --- a/testframework/framework.go +++ b/testframework/framework.go @@ -21,6 +21,7 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" @@ -57,6 +58,7 @@ type TestFramework struct { btcInvoker *btc.BtcInvoker ontInvoker *ont.OntInvoker cosmosInvoker *cosmos.CosmosInvoker + neoInvoker *neo.NeoInvoker } //NewTestFramework return a TestFramework instance @@ -113,7 +115,7 @@ func (this *TestFramework) runTestList(testCaseList []TestCase, loopNumber int) defer this.onTestFinish(testCaseList) ctx := NewTestFrameworkContext(this, testCaseList, this.rcSdk, this.ethInvoker, this.btcInvoker, - this.ontInvoker, this.cosmosInvoker) + this.ontInvoker, this.cosmosInvoker, this.neoInvoker) if this.ontInvoker != nil { go MonitorOnt(ctx) } @@ -127,6 +129,9 @@ func (this *TestFramework) runTestList(testCaseList []TestCase, loopNumber int) if this.cosmosInvoker != nil { go MonitorCosmos(ctx) } + if this.neoInvoker != nil { + go MonitorNeo(ctx) + } go ReportPending(ctx) wg := &sync.WaitGroup{} @@ -147,6 +152,7 @@ func (this *TestFramework) runTest(index int, ctx *TestFrameworkContext, testCas this.onAfterTestCaseFinish(index, loopNum, testCase, ok) this.testCaseRes[this.getTestCaseId(testCase)] = ok if !ok { + status.SetItSuccess(-1) log.Errorf("case %s failed (loop: %d)", this.getTestCaseName(testCase), i) break } @@ -177,43 +183,47 @@ func (this *TestFramework) SetCosmosInvoker(cmInvoker *cosmos.CosmosInvoker) { this.cosmosInvoker = cmInvoker } +func (this *TestFramework) SetNeoInvoker(neoInvoker *neo.NeoInvoker) { + this.neoInvoker = neoInvoker +} + //onTestStart invoke at the beginning of test func (this *TestFramework) onTestStart() { - version, _ := this.ontInvoker.OntSdk.GetVersion() + version, _ := this.rcSdk.GetVersion() log.Info("===============================================================") log.Infof("-------CrossChain Test Start Version: %s", version) log.Info("===============================================================") log.Info("") this.startTime = time.Now() str := "" - if this.btcInvoker != nil { - btcInfo, err := this.btcInvoker.GetAccInfo() - if err != nil { - panic(err) - } - str += btcInfo + "\n" - } - if this.ethInvoker != nil { - ethInfo, err := this.ethInvoker.GetAccInfo() - if err != nil { - panic(err) - } - str += ethInfo + "\n" - } - if this.ontInvoker != nil { - ontInfo, err := this.ontInvoker.GetAccInfo() - if err != nil { - panic(err) - } - str += ontInfo + "\n" - } - if this.cosmosInvoker != nil { - cmInfo, err := this.cosmosInvoker.GetAccInfo() - if err != nil { - panic(err) - } - str += cmInfo + "\n" - } + //if this.btcInvoker != nil { + // btcInfo, err := this.btcInvoker.GetAccInfo() + // if err != nil { + // panic(err) + // } + // str += btcInfo + "\n" + //} + //if this.ethInvoker != nil { + // ethInfo, err := this.ethInvoker.GetAccInfo() + // if err != nil { + // panic(err) + // } + // str += ethInfo + "\n" + //} + //if this.ontInvoker != nil { + // ontInfo, err := this.ontInvoker.GetAccInfo() + // if err != nil { + // panic(err) + // } + // str += ontInfo + "\n" + //} + //if this.cosmosInvoker != nil { + // cmInfo, err := this.cosmosInvoker.GetAccInfo() + // if err != nil { + // panic(err) + // } + // str += cmInfo + "\n" + //} log.Infof("account info: {\n %s}", str) } diff --git a/testframework/framework_context.go b/testframework/framework_context.go index 18636c5..451f08b 100644 --- a/testframework/framework_context.go +++ b/testframework/framework_context.go @@ -22,6 +22,7 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" "sync" "time" @@ -34,23 +35,25 @@ type TestFrameworkContext struct { RcSdk *poly_go_sdk.PolySdk Status *CtxStatus // invokers - EthInvoker *eth.EInvoker - BtcInvoker *btc.BtcInvoker - OntInvoker *ont.OntInvoker - CMInvoker *cosmos.CosmosInvoker + EthInvoker *eth.EInvoker + BtcInvoker *btc.BtcInvoker + OntInvoker *ont.OntInvoker + CMInvoker *cosmos.CosmosInvoker + NeoInvoker *neo.NeoInvoker } //NewTestFrameworkContext return a TestFrameworkContext instance func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_go_sdk.PolySdk, eInvkr *eth.EInvoker, - btcInvkr *btc.BtcInvoker, ontInvkr *ont.OntInvoker, cmInvoker *cosmos.CosmosInvoker) *TestFrameworkContext { + btcInvkr *btc.BtcInvoker, ontInvkr *ont.OntInvoker, cmInvoker *cosmos.CosmosInvoker, neoInvoker *neo.NeoInvoker) *TestFrameworkContext { ctx := &TestFrameworkContext{ - Framework: fw, - Cases: caseArr, - RcSdk: rcSdk, - EthInvoker: eInvkr, - BtcInvoker: btcInvkr, - OntInvoker: ontInvkr, - CMInvoker: cmInvoker, + Framework: fw, + Cases: caseArr, + RcSdk: rcSdk, + EthInvoker: eInvkr, + BtcInvoker: btcInvkr, + OntInvoker: ontInvkr, + CMInvoker: cmInvoker, + NeoInvoker: neoInvoker, } ctx.Status = NewCtxStatus(ctx) return ctx @@ -132,7 +135,7 @@ func (status *CtxStatus) Info() map[int]string { res[idx] = "no tx for now" continue } - if str == "success!" { + if str == "success!" || str == "failed!" { res[idx] = str continue } @@ -151,7 +154,7 @@ type CaseStatus struct { lock *sync.Mutex CaseIdx int txMap map[string]*TxInfo - isSuccess bool + isSuccess int } func NewCaseStatus(idx int) *CaseStatus { @@ -159,7 +162,7 @@ func NewCaseStatus(idx int) *CaseStatus { lock: &sync.Mutex{}, CaseIdx: idx, txMap: make(map[string]*TxInfo), - isSuccess: false, + isSuccess: 0, } } @@ -195,8 +198,10 @@ func (cs *CaseStatus) Info() string { cs.lock.Lock() defer cs.lock.Unlock() info := "" - if cs.isSuccess { + if cs.isSuccess == 1 { info = "success!" + } else if cs.isSuccess == -1 { + info = "failed!" } else { for k, v := range cs.txMap { info += fmt.Sprintf("\t[ txhash: %s, type: %s, sec_not_confirm: %.1f ]\n", k, v.Ty, time.Now().Sub(v.StartTime).Seconds()) @@ -225,8 +230,8 @@ func (cs *CaseStatus) Len() int { return len(cs.txMap) } -func (cs *CaseStatus) SetItSuccess() { +func (cs *CaseStatus) SetItSuccess(status int) { cs.lock.Lock() defer cs.lock.Unlock() - cs.isSuccess = true + cs.isSuccess = status } From d7f7f01d464894059c23228aea8012de0c0a45cd Mon Sep 17 00:00:00 2001 From: zhiqiangxu <652732310@qq.com> Date: Mon, 21 Dec 2020 13:57:19 +0800 Subject: [PATCH 02/96] refactor (#4) --- chains/eth/eth_invoker.go | 42 +++- chains/eth/eth_test.go | 15 +- chains/eth/eth_tools.go | 17 +- cmd/bsc_deployer/run.go | 351 +++++++++++++++++++++++++++++ cmd/cctest/main.go | 31 ++- cmd/eth_deployer/run.go | 27 ++- cmd/tools/run.go | 37 ++- config/config.go | 22 +- testcase/init.go | 1 + testcase/method.go | 64 +++++- testcase/testcase.go | 24 +- testframework/check.go | 48 +++- testframework/framework.go | 24 +- testframework/framework_context.go | 37 +-- 14 files changed, 656 insertions(+), 84 deletions(-) create mode 100644 cmd/bsc_deployer/run.go diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index 6983085..ac95174 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -21,6 +21,9 @@ import ( "crypto/ecdsa" "encoding/hex" "fmt" + "log" + "math/big" + "github.com/ethereum/go-ethereum/accounts/abi/bind" ethComm "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -37,13 +40,11 @@ import ( "github.com/polynetwork/eth-contracts/go_abi/ongx_abi" "github.com/polynetwork/eth-contracts/go_abi/ontx_abi" "github.com/polynetwork/poly-io-test/config" - "log" - "math/big" ) type EInvoker struct { PrivateKey *ecdsa.PrivateKey - ChainId int8 + ChainID uint64 TConfiguration *config.TestConfig ETHUtil *ETHTools NM *NonceManager @@ -54,16 +55,39 @@ var ( DefaultGasLimit = 5000000 ) -func NewEInvoker() *EInvoker { +func NewEInvoker(chainID uint64) *EInvoker { instance := &EInvoker{} + instance.ChainID = chainID instance.TConfiguration = config.DefConfig - instance.ETHUtil = NewEthTools(instance.TConfiguration.EthURL) + instance.ETHUtil = NewEthTools(instance.url()) instance.NM = NewNonceManager(instance.ETHUtil.GetEthClient()) - instance.EthTestSigner, _ = NewEthSigner(instance.TConfiguration.ETHPrivateKey) + instance.EthTestSigner, _ = NewEthSigner(instance.privateKey()) instance.PrivateKey = instance.EthTestSigner.PrivateKey return instance } +func (ethInvoker *EInvoker) url() string { + switch ethInvoker.ChainID { + case ethInvoker.TConfiguration.BscChainID: + return ethInvoker.TConfiguration.BSCURL + case ethInvoker.TConfiguration.EthChainID: + return ethInvoker.TConfiguration.EthURL + default: + panic(fmt.Sprintf("unknown chain id:%d", ethInvoker.ChainID)) + } +} + +func (ethInvoker *EInvoker) privateKey() string { + switch ethInvoker.ChainID { + case ethInvoker.TConfiguration.BscChainID: + return ethInvoker.TConfiguration.BSCPrivateKey + case ethInvoker.TConfiguration.EthChainID: + return ethInvoker.TConfiguration.ETHPrivateKey + default: + panic(fmt.Sprintf("unknown chain id:%d", ethInvoker.ChainID)) + } +} + func (ethInvoker *EInvoker) MakeSmartContractAuth() (*bind.TransactOpts, error) { publicKey := ethInvoker.PrivateKey.Public() publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) @@ -108,7 +132,7 @@ func (ethInvoker *EInvoker) DeployECCMContract(eccdAddress string) (ethComm.Addr } address := ethComm.HexToAddress(eccdAddress) contractAddress, tx, contract, err := eccm_abi.DeployEthCrossChainManager(auth, - ethInvoker.ETHUtil.GetEthClient(), address, config.DefConfig.EthChainID) + ethInvoker.ETHUtil.GetEthClient(), address, ethInvoker.ChainID) if err != nil { return ethComm.Address{}, nil, fmt.Errorf("DeployECCMContract, err: %v", err) } @@ -180,6 +204,10 @@ func (ethInvoker *EInvoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetH toAddr = addr[:] } else if uint64(toChainId) == config.DefConfig.CMCrossChainId { toAddr = []byte(toAssetHash) + } else if uint64(toChainId) == config.DefConfig.EthChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.BscChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } tx, err := contract.BindAssetHash(auth, ethComm.HexToAddress(fromAssetHash), uint64(toChainId), toAddr[:]) diff --git a/chains/eth/eth_test.go b/chains/eth/eth_test.go index 6f3e8d6..9b8ba06 100644 --- a/chains/eth/eth_test.go +++ b/chains/eth/eth_test.go @@ -5,21 +5,22 @@ import ( "encoding/hex" "encoding/json" "fmt" + "math/big" + "testing" + "time" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/joeqian10/neo-gogogo/wallet" "github.com/ontio/ontology-crypto/keypair" - "github.com/ontio/ontology-go-sdk" - "github.com/ontio/ontology/consensus/vbft/config" - "github.com/polynetwork/poly-go-sdk" + ontology_go_sdk "github.com/ontio/ontology-go-sdk" + vconfig "github.com/ontio/ontology/consensus/vbft/config" + poly_go_sdk "github.com/polynetwork/poly-go-sdk" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" vconfig2 "github.com/polynetwork/poly/consensus/vbft/config" common3 "github.com/polynetwork/poly/native/service/cross_chain_manager/common" "github.com/polynetwork/poly/native/service/utils" - "math/big" - "testing" - "time" ) func MakeEthAuth(signer *EthSigner, nonce, gasPrice, gasLimit uint64) *bind.TransactOpts { @@ -75,7 +76,7 @@ func TestNewNonceManager(t *testing.T) { tx := "0x05a873aba68598585b0d22553de8a86a158992b2ddca77e82eea95d06205d550" txhash := common.HexToHash(tx) - invoker := NewEInvoker() + invoker := NewEInvoker(config.DefConfig.EthChainID) invoker.ETHUtil.WaitTransactionConfirm(txhash) gasPrice := big.NewInt(100 * 1e9) diff --git a/chains/eth/eth_tools.go b/chains/eth/eth_tools.go index a30c4a5..a8a424f 100644 --- a/chains/eth/eth_tools.go +++ b/chains/eth/eth_tools.go @@ -23,6 +23,13 @@ import ( "encoding/hex" "encoding/json" "fmt" + "io/ioutil" + "math/big" + "net/http" + "strconv" + "strings" + "time" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -30,12 +37,6 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/polynetwork/eth-contracts/go_abi/eccm_abi" "github.com/polynetwork/poly-io-test/log" - "io/ioutil" - "math/big" - "net/http" - "strconv" - "strings" - "time" ) type ETHTools struct { @@ -160,6 +161,10 @@ func (self *ETHTools) GetBlockHeader(height uint64) (*types.Header, error) { return rsp.Result, nil } +func (self *ETHTools) GetChainID() (*big.Int, error) { + return self.ethclient.ChainID(context.Background()) +} + func (self *ETHTools) GetSmartContractEventByBlock(contractAddr string, height uint64) ([]*LockEvent, []*UnlockEvent, error) { eccmAddr := common.HexToAddress(contractAddr) instance, err := eccm_abi.NewEthCrossChainManager(eccmAddr, self.ethclient) diff --git a/cmd/bsc_deployer/run.go b/cmd/bsc_deployer/run.go new file mode 100644 index 0000000..9e2a8cc --- /dev/null +++ b/cmd/bsc_deployer/run.go @@ -0,0 +1,351 @@ +/* +* Copyright (C) 2020 The poly network Authors +* This file is part of The poly network library. +* +* The poly network is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* The poly network is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* You should have received a copy of the GNU Lesser General Public License +* along with The poly network . If not, see . + */ +package main + +import ( + "encoding/hex" + "flag" + "fmt" + + common2 "github.com/ethereum/go-ethereum/common" + "github.com/ontio/ontology/common" + "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/config" +) + +var ( + fnEth string + ethConfFile string + eccmRedeploy int +) + +func init() { + flag.StringVar(&fnEth, "func", "deploy", "choose function to run: deploy or setup") + flag.StringVar(ðConfFile, "conf", "./config.json", "config file path") + flag.IntVar(&eccmRedeploy, "redeploy_eccm", 1, "redeploy eccd, eccm and eccmp or not") + flag.Parse() +} + +func main() { + err := config.DefConfig.Init(ethConfFile) + if err != nil { + panic(err) + } + + switch fnEth { + case "deploy": + DeployETHSmartContract() + case "setup": + SetUpEthContracts() + } +} + +func DeployETHSmartContract() { + invoker := eth.NewEInvoker(config.DefConfig.BscChainID) + var ( + eccdAddr common2.Address + eccmAddr common2.Address + eccmpAddr common2.Address + err error + ) + if eccmRedeploy == 1 { + eccdAddr, _, err = invoker.DeployEthChainDataContract() + if err != nil { + panic(err) + } + + eccmAddr, _, err = invoker.DeployECCMContract(eccdAddr.Hex()) + if err != nil { + panic(err) + } + eccmpAddr, _, err = invoker.DeployECCMPContract(eccmAddr.Hex()) + if err != nil { + panic(err) + } + _, err = invoker.TransferOwnershipForECCD(eccdAddr.Hex(), eccmAddr.Hex()) + if err != nil { + panic(err) + } + _, err = invoker.TransferOwnershipForECCM(eccmAddr.Hex(), eccmpAddr.Hex()) + if err != nil { + panic(err) + } + } else { + eccdAddr = common2.HexToAddress(config.DefConfig.BscEccd) + eccmAddr = common2.HexToAddress(config.DefConfig.BscEccm) + eccmpAddr = common2.HexToAddress(config.DefConfig.BscEccmp) + } + + lockProxyAddr, _, err := invoker.DeployLockProxyContract(eccmpAddr) + if err != nil { + panic(err) + } + + lockproxyAddrHex := lockProxyAddr.Hex() + erc20Addr, erc20, err := invoker.DeployERC20() + if err != nil { + panic(err) + } + + total, err := erc20.TotalSupply(nil) + if err != nil { + panic(fmt.Errorf("failed to get total supply for erc20: %v", err)) + } + auth, _ := invoker.MakeSmartContractAuth() + tx, err := erc20.Approve(auth, lockProxyAddr, total) + if err != nil { + panic(fmt.Errorf("failed to approve erc20 to lockproxy: %v", err)) + } + invoker.ETHUtil.WaitTransactionConfirm(tx.Hash()) + + oep4Addr, _, err := invoker.DeployOEP4(lockproxyAddrHex) + if err != nil { + panic(err) + } + ongxAddr, _, err := invoker.DeployONGXContract(lockproxyAddrHex) + if err != nil { + panic(err) + } + ontxAddr, _, err := invoker.DeployONTXContract(lockproxyAddrHex) + if err != nil { + panic(err) + } + + fmt.Println("=============================ETH info=============================") + fmt.Println("bsc erc20:", erc20Addr.Hex()) + fmt.Println("bsc ope4:", oep4Addr.Hex()) + fmt.Println("bsc eccd address:", eccdAddr.Hex()) + fmt.Println("bsc eccm address:", eccmAddr.Hex()) + fmt.Println("bsc eccmp address:", eccmpAddr.Hex()) + fmt.Println("bsc lock proxy address: ", lockProxyAddr.Hex()) + fmt.Println("bsc ongx address: ", ongxAddr.Hex()) + fmt.Println("bsc ontx proxy address: ", ontxAddr.Hex()) + fmt.Println("==================================================================") + + config.DefConfig.Bep20 = erc20Addr.Hex() + config.DefConfig.BscOep4 = oep4Addr.Hex() + config.DefConfig.BscEccd = eccdAddr.Hex() + config.DefConfig.BscEccm = eccmAddr.Hex() + config.DefConfig.BscEccmp = eccmpAddr.Hex() + config.DefConfig.BscLockProxy = lockProxyAddr.Hex() + config.DefConfig.BscOngx = ongxAddr.Hex() + config.DefConfig.BscOntx = ontxAddr.Hex() + + if err := config.DefConfig.Save(ethConfFile); err != nil { + panic(fmt.Errorf("failed to save config, you better save it youself: %v", err)) + } +} + +func SetupBep20(ethInvoker *eth.EInvoker) { + if config.DefConfig.OntBep20 != "" { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, config.DefConfig.Bep20, + config.DefConfig.OntBep20, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding bep20 of ontology on bsc: ( txhash: %s )\n", hash.String()) + } + + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, config.DefConfig.Bep20, + config.CM_BEP20, config.DefConfig.CMCrossChainId, 0) + if err != nil { + panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding bep20 of cosmos on bsc: ( txhash: %s )\n", hash.String()) +} + +func SetupWBTC(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, config.DefConfig.BscWBTC, + config.DefConfig.OntWBTC, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupWBTC, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding WBTC of ontology on bsc: ( txhash: %s )\n", hash.String()) +} + +func SetupDAI(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, config.DefConfig.BscDai, + config.DefConfig.OntDai, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupDAI, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding DAI of ontology on bsc: ( txhash: %s )\n", hash.String()) +} + +func SetupUSDT(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, config.DefConfig.BscUSDT, + config.DefConfig.OntUSDT, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupUSDT, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding USDT of ontology on bsc: ( txhash: %s )\n", hash.String()) +} + +func SetupUSDC(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, config.DefConfig.BscUSDC, + config.DefConfig.OntUSDC, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupUSDC, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding USDC of ontology on ethereum: ( txhash: %s )\n", hash.String()) +} + +func SetupOntAsset(invoker *eth.EInvoker) { + if config.DefConfig.BscLockProxy == "" { + panic(fmt.Errorf("BscLockProxy is blank")) + } + if config.DefConfig.BscOntx == "" { + panic(fmt.Errorf("BscOntx is blank")) + } + if config.DefConfig.BscOngx == "" { + panic(fmt.Errorf("BscOngx is blank")) + } + if config.DefConfig.BscOep4 == "" { + panic(fmt.Errorf("BscOep4 is blank")) + } + if config.DefConfig.OntOep4 == "" { + panic(fmt.Errorf("OntOep4 is blank")) + } + + txs, err := invoker.BindOntAsset(config.DefConfig.BscLockProxy, config.DefConfig.BscOntx, config.DefConfig.BscOngx, + config.DefConfig.BscOep4, config.DefConfig.OntOep4) + if err != nil { + panic(err) + } + hash1, hash2, hash3 := txs[0].Hash(), txs[1].Hash(), txs[2].Hash() + fmt.Printf("ont/ong/oep4 binding tx on ontology: %s/%s/%s\n", hash1.String(), hash2.String(), hash3.String()) + + hash4, hash5, hash6 := txs[3].Hash(), txs[4].Hash(), txs[5].Hash() + fmt.Printf("ont/ong/oep4 binding tx on cosmos: %s/%s/%s\n", hash4.String(), hash5.String(), hash6.String()) +} + +func SetupBnb(ethInvoker *eth.EInvoker) { + ethNativeAddr := "0x0000000000000000000000000000000000000000" + if config.DefConfig.OntBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, ethNativeAddr, config.DefConfig.OntBnb, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnbx of ontology on bsc: ( txhash: %s )\n", hash.String()) + } + + tx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, ethNativeAddr, config.CM_BNBX, config.DefConfig.CMCrossChainId, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2COSMOS, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnbx of cosmos on bsc: ( txhash: %s )\n", hash.String()) + + tx, err = ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, ethNativeAddr, ethNativeAddr, config.DefConfig.BscChainID, 0) + if err != nil { + panic(fmt.Errorf("BindAssetHash, failed to bind asset hash: %v", err)) + } + hash = tx.Hash() + fmt.Printf("binding bnb of bsc on bsc: ( txhash: %s )\n", hash.String()) +} + +func SetOtherLockProxy(invoker *eth.EInvoker) { + _, contract, err := invoker.MakeLockProxy(config.DefConfig.BscLockProxy) + if err != nil { + panic(fmt.Errorf("failed to MakeLockProxy: %v", err)) + } + if config.DefConfig.OntLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other, err := common.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + panic(fmt.Errorf("failed to AddressFromHexString: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.OntChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %")) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding ont proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.CMLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + raw, err := hex.DecodeString(config.DefConfig.CMLockProxy) + if err != nil { + panic(fmt.Errorf("failed to decode: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.CMCrossChainId, raw) + if err != nil { + panic(fmt.Errorf("failed to bind COSMOS proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding cosmos proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.BscLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other := common2.HexToAddress(config.DefConfig.BscLockProxy) + tx, err := contract.BindProxyHash(auth, config.DefConfig.BscChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding eth proxy: ( txhash: %s )\n", hash.String()) + } +} + +func SetUpEthContracts() { + invoker := eth.NewEInvoker(config.DefConfig.BscChainID) + SetupBnb(invoker) + if config.DefConfig.Bep20 != "" { + SetupBep20(invoker) + } + if config.DefConfig.OntLockProxy != "" { + SetupOntAsset(invoker) + } + if config.DefConfig.EthWBTC != "" { + SetupWBTC(invoker) + } + if config.DefConfig.EthDai != "" { + SetupDAI(invoker) + } + if config.DefConfig.EthUSDT != "" { + SetupUSDT(invoker) + } + //SetupUSDC(invoker) + SetOtherLockProxy(invoker) +} diff --git a/cmd/cctest/main.go b/cmd/cctest/main.go index 4f28b8c..3738d80 100644 --- a/cmd/cctest/main.go +++ b/cmd/cctest/main.go @@ -19,7 +19,12 @@ package main import ( "flag" "fmt" - "github.com/polynetwork/poly-go-sdk" + "os" + "os/signal" + "strings" + "syscall" + + poly_go_sdk "github.com/polynetwork/poly-go-sdk" "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" @@ -29,10 +34,6 @@ import ( "github.com/polynetwork/poly-io-test/log" _ "github.com/polynetwork/poly-io-test/testcase" "github.com/polynetwork/poly-io-test/testframework" - "os" - "os/signal" - "strings" - "syscall" ) var ( @@ -60,7 +61,18 @@ func main() { panic(err) } - ethInvoker := eth.NewEInvoker() + var ( + ethInvoker *eth.EInvoker + bscInvoker *eth.EInvoker + ) + if config.DefConfig.EthChainID > 0 { + ethInvoker = eth.NewEInvoker(config.DefConfig.EthChainID) + } + + if config.DefConfig.BscChainID > 0 { + bscInvoker = eth.NewEInvoker(config.DefConfig.BscChainID) + } + //btcInvoker, err := btc.NewBtcInvoker(config.DefConfig.RchainJsonRpcAddress, config.DefConfig.RCWallet, // config.DefConfig.RCWalletPwd, config.DefConfig.BtcRestAddr, config.DefConfig.BtcRestUser, // config.DefConfig.BtcRestPwd, config.DefConfig.BtcSignerPrivateKey) @@ -86,7 +98,12 @@ func main() { testCases = strings.Split(TestCases, ",") } testframework.TFramework.SetRcSdk(rcSdk) - testframework.TFramework.SetEthInvoker(ethInvoker) + if ethInvoker != nil { + testframework.TFramework.SetEthInvoker(ethInvoker) + } + if bscInvoker != nil { + testframework.TFramework.SetBSCInvoker(bscInvoker) + } //testframework.TFramework.SetBtcInvoker(btcInvoker) testframework.TFramework.SetOntInvoker(ontInvoker) testframework.TFramework.SetCosmosInvoker(cmInvoker) diff --git a/cmd/eth_deployer/run.go b/cmd/eth_deployer/run.go index 91271ba..0c43158 100644 --- a/cmd/eth_deployer/run.go +++ b/cmd/eth_deployer/run.go @@ -20,6 +20,7 @@ import ( "encoding/hex" "flag" "fmt" + common2 "github.com/ethereum/go-ethereum/common" "github.com/ontio/ontology/common" "github.com/polynetwork/poly-io-test/chains/eth" @@ -54,7 +55,7 @@ func main() { } func DeployETHSmartContract() { - invoker := eth.NewEInvoker() + invoker := eth.NewEInvoker(config.DefConfig.EthChainID) var ( eccdAddr common2.Address eccmAddr common2.Address @@ -261,6 +262,13 @@ func SetupETH(ethInvoker *eth.EInvoker) { } hash := tx.Hash() fmt.Printf("binding ethx of cosmos on ethereum: ( txhash: %s )\n", hash.String()) + + tx, err = ethInvoker.BindAssetHash(config.DefConfig.EthLockProxy, ethNativeAddr, ethNativeAddr, config.DefConfig.EthChainID, 0) + if err != nil { + panic(fmt.Errorf("BindAssetHash, failed to bind asset hash: %v", err)) + } + hash = tx.Hash() + fmt.Printf("binding eth of ethereum on ethereum: ( txhash: %s )\n", hash.String()) } func SetOtherLockProxy(invoker *eth.EInvoker) { @@ -303,10 +311,25 @@ func SetOtherLockProxy(invoker *eth.EInvoker) { invoker.ETHUtil.WaitTransactionConfirm(hash) fmt.Printf("binding cosmos proxy: ( txhash: %s )\n", hash.String()) } + + if config.DefConfig.EthLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other := common2.HexToAddress(config.DefConfig.EthLockProxy) + tx, err := contract.BindProxyHash(auth, config.DefConfig.EthChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %")) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding eth proxy: ( txhash: %s )\n", hash.String()) + } } func SetUpEthContracts() { - invoker := eth.NewEInvoker() + invoker := eth.NewEInvoker(config.DefConfig.EthChainID) SetupETH(invoker) if config.DefConfig.EthErc20 != "" { SetupERC20(invoker) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index ee6cae2..4032448 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -159,9 +159,9 @@ func main() { if RegisterCosmos(poly, acc) { ApproveRegisterSideChain(config.DefConfig.CMCrossChainId, poly, accArr) } - case config.DefConfig.BSCChainID: + case config.DefConfig.BscChainID: if RegisterBSC(poly, acc) { - ApproveRegisterSideChain(config.DefConfig.BSCChainID, poly, accArr) + ApproveRegisterSideChain(config.DefConfig.BscChainID, poly, accArr) } case 0: if RegisterBtcChain(poly, acc) { @@ -180,7 +180,7 @@ func main() { ApproveRegisterSideChain(config.DefConfig.NeoChainID, poly, accArr) } if RegisterBSC(poly, acc) { - ApproveRegisterSideChain(config.DefConfig.BSCChainID, poly, accArr) + ApproveRegisterSideChain(config.DefConfig.BscChainID, poly, accArr) } } @@ -207,7 +207,7 @@ func main() { SyncNeoGenesisHeader(poly, accArr) case config.DefConfig.CMCrossChainId: SyncCosmosGenesisHeader(poly, accArr) - case config.DefConfig.BSCChainID: + case config.DefConfig.BscChainID: SyncBSCGenesisHeader(poly, accArr) case 0: SyncBtcGenesisHeader(poly, acc) @@ -593,13 +593,13 @@ func SyncBSCGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou } genesisHeader := bsc.GenesisHeader{Header: *hdr, PrevValidators: []bsc.HeightAndValidators{ - bsc.HeightAndValidators{Height: big.NewInt(int64(pEpochHeight)), Validators: pvalidators}, + {Height: big.NewInt(int64(pEpochHeight)), Validators: pvalidators}, }} raw, err := json.Marshal(genesisHeader) if err != nil { panic(err) } - txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.BSCChainID, raw, accArr) + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.BscChainID, raw, accArr) if err != nil { if strings.Contains(err.Error(), "had been initialized") { log.Info("bsc already synced") @@ -956,21 +956,34 @@ func RegisterCosmos(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { } func RegisterBSC(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + tool := eth.NewEthTools(config.DefConfig.BSCURL) + chainID, err := tool.GetChainID() + if err != nil { + panic(err) + } + blkToWait := uint64(15) extra := bsc.ExtraInfo{ - // test id 97 - ChainID: big.NewInt(97), + ChainID: chainID, } + extraBytes, _ := json.Marshal(extra) - txhash, err := poly.Native.Scm.RegisterSideChainExt(acc.Address, config.DefConfig.BSCChainID, 5, "bsc", - blkToWait, []byte{}, extraBytes, acc) + + eccd, err := hex.DecodeString(strings.Replace(config.DefConfig.BscEccd, "0x", "", 1)) + if err != nil { + panic(fmt.Errorf("RegisterBSC, failed to decode eccd '%s' : %v", config.DefConfig.BscEccd, err)) + } + + fmt.Println("config.DefConfig.BSCChainID", config.DefConfig.BscChainID, "extraBytes", string(extraBytes), "BscEccd", config.DefConfig.BscEccd) + txhash, err := poly.Native.Scm.RegisterSideChainExt(acc.Address, config.DefConfig.BscChainID, 6, "bsc", + blkToWait, eccd, extraBytes, acc) if err != nil { if strings.Contains(err.Error(), "already registered") { - log.Infof("bsc chain %d already registered", config.DefConfig.BSCChainID) + log.Infof("bsc chain %d already registered", config.DefConfig.BscChainID) return false } if strings.Contains(err.Error(), "already requested") { - log.Infof("bsc chain %d already requested", config.DefConfig.BSCChainID) + log.Infof("bsc chain %d already requested", config.DefConfig.BscChainID) return true } panic(fmt.Errorf("RegisterBSC failed: %v", err)) diff --git a/config/config.go b/config/config.go index 507012d..1423f01 100644 --- a/config/config.go +++ b/config/config.go @@ -29,7 +29,9 @@ import ( const ( CM_BTCX = "btcx" CM_ETHX = "ethx" + CM_BNBX = "bnbx" CM_ERC20 = "erc20x" + CM_BEP20 = "bep20x" CM_ONT = "ontx" CM_ONG = "ongx" CM_OEP4 = "oep4x" @@ -41,7 +43,7 @@ type TestConfig struct { EthChainID uint64 OntChainID uint64 NeoChainID uint64 - BSCChainID uint64 + BscChainID uint64 BtcRestAddr string BtcRestUser string @@ -106,6 +108,22 @@ type TestConfig struct { // Circle batch TxNumPerBatch uint64 + // bsc contracts: auto set after deploy + BscEccd string + BscEccm string + BscEccmp string + BscLockProxy string + Bep20 string + BscOep4 string + BscOngx string + BscOntx string + BscWBTC string + BscUSDT string + BscDai string + BscUSDC string + BscNeo string + BscRenBTC string + // eth contracts: auto set after deploy EthErc20 string EthOep4 string @@ -126,9 +144,11 @@ type TestConfig struct { // ont contracts: auto set after deploy OntErc20 string + OntBep20 string OntOep4 string OntLockProxy string OntEth string + OntBnb string OntUSDT string OntWBTC string OntDai string diff --git a/testcase/init.go b/testcase/init.go index 4d4bf73..c7f2471 100644 --- a/testcase/init.go +++ b/testcase/init.go @@ -81,6 +81,7 @@ func init() { testframework.TFramework.RegTestCase("OntdToNeoAndBack", OntdToNeoAndBack) testframework.TFramework.RegTestCase("OntdToEthAndBack", OntdToEthAndBack) testframework.TFramework.RegTestCase("USDCCircle", USDCCircle) + testframework.TFramework.RegTestCase("BnbToBsc", BnbToBsc) testframework.TFramework.RegTestCase("RenBTCCircle", RenBTCCircle) testframework.TFramework.RegTestCase("EOntdToNeoAndBack", EOntdToNeoAndBack) } diff --git a/testcase/method.go b/testcase/method.go index 869438e..08a2f53 100644 --- a/testcase/method.go +++ b/testcase/method.go @@ -21,6 +21,11 @@ import ( "context" "encoding/hex" "fmt" + "math" + "math/big" + "strings" + "time" + types2 "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" @@ -31,7 +36,7 @@ import ( "github.com/joeqian10/neo-gogogo/helper" "github.com/joeqian10/neo-gogogo/sc" "github.com/joeqian10/neo-gogogo/tx" - "github.com/ontio/ontology-go-sdk" + ontology_go_sdk "github.com/ontio/ontology-go-sdk" ontcommon "github.com/ontio/ontology/common" nutils "github.com/ontio/ontology/smartcontract/service/native/utils" "github.com/polynetwork/eth-contracts/go_abi/btcx_abi" @@ -46,10 +51,6 @@ import ( "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" "github.com/polynetwork/poly-io-test/testframework" - "math" - "math/big" - "strings" - "time" ) func GetAccountByPath(path string) (*ontology_go_sdk.Account, error) { @@ -2164,6 +2165,59 @@ func SendEthCrossNeo(ctx *testframework.TestFrameworkContext, status *testframew return nil } +func SendBnbCrossBsc(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.BscInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendBnbCrossBsc, get suggest gas price failed error: %s", err.Error()) + } + //gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendBnbCrossBsc, abi.JSON error:" + err.Error()) + } + rawFrom := ctx.BscInvoker.EthTestSigner.Address.Bytes() + assetaddress := ethcommon.HexToAddress("0000000000000000000000000000000000000000") + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.BscChainID), rawFrom[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendBnbCrossBsc, contractabi.Pack error:" + err.Error()) + } + + contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) + callMsg := ethereum.CallMsg{ + From: ctx.BscInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(amount)), Data: txData, + } + gasLimit, err := ctx.BscInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendBnbCrossBsc, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.BscInvoker.NM.GetAddressNonce(ctx.BscInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendBnbCrossBsc, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.BscInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendBnbCrossBnb, types.SignTx error: %s", err.Error()) + } + + err = ctx.BscInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendBnbCrossBnb, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"BnbToBsc", time.Now()}) + WaitTransactionConfirm(ctx.BscInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + func SendNEthCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { lpAddr, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) if err != nil { diff --git a/testcase/testcase.go b/testcase/testcase.go index 9b0698b..21ea2ea 100644 --- a/testcase/testcase.go +++ b/testcase/testcase.go @@ -17,10 +17,11 @@ package testcase import ( + "time" + "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" "github.com/polynetwork/poly-io-test/testframework" - "time" ) func SendOntToEthChain(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { @@ -1202,6 +1203,25 @@ func EthToNeoAndBack(ctx *testframework.TestFrameworkContext, status *testframew return true } +func BnbToBsc(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.EthValLimit, 1) + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendBnbCrossBsc(ctx, status, amt); err != nil { + log.Errorf("BnbToBsc, SendBnbCrossBsc error: %v", err) + return false + } + } + log.Infof("BnbToBsc, send %d eth to Eth, waiting for confirmation...", amt) + WaitUntilClean(status) + + log.Infof("BnbToBsc, eth all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + func USDCCircle(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { amt := GetRandAmount(config.DefConfig.USDCValLimit, 1) @@ -1254,4 +1274,4 @@ func RenBTCCircle(ctx *testframework.TestFrameworkContext, status *testframework status.SetItSuccess(1) return true -} \ No newline at end of file +} diff --git a/testframework/check.go b/testframework/check.go index fbef2e7..ff92c57 100644 --- a/testframework/check.go +++ b/testframework/check.go @@ -20,15 +20,17 @@ import ( "bytes" "encoding/hex" "fmt" - "github.com/btcsuite/btcd/wire" - "github.com/polynetwork/poly-io-test/config" - "github.com/polynetwork/poly-io-test/log" - "github.com/polynetwork/poly/common" "io/ioutil" "math/big" "os" "path" "time" + + "github.com/btcsuite/btcd/wire" + "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/config" + "github.com/polynetwork/poly-io-test/log" + "github.com/polynetwork/poly/common" ) func MonitorOnt(ctx *TestFrameworkContext) { @@ -99,10 +101,34 @@ func parseOntologyChainBlock(ctx *TestFrameworkContext, height uint32) error { return nil } -func MonitorEthChain(ctx *TestFrameworkContext) { - currentHeight, err := ctx.EthInvoker.ETHUtil.GetNodeHeight() +func getInvoker(ctx *TestFrameworkContext, chainID uint64) *eth.EInvoker { + switch chainID { + case config.DefConfig.EthChainID: + return ctx.EthInvoker + case config.DefConfig.BscChainID: + return ctx.BscInvoker + default: + panic(fmt.Sprintf("unknown chain id:%d", chainID)) + } +} + +func getEccm(chainID uint64) string { + switch chainID { + case config.DefConfig.EthChainID: + return config.DefConfig.Eccm + case config.DefConfig.BscChainID: + return config.DefConfig.BscEccm + default: + panic(fmt.Sprintf("unknown chain id:%d", chainID)) + } +} + +func MonitorEthLikeChain(ctx *TestFrameworkContext, chainID uint64) { + invoker := getInvoker(ctx, chainID) + + currentHeight, err := invoker.ETHUtil.GetNodeHeight() if err != nil { - log.Errorf("ctx.EthTools.GetNodeHeight error: %s", err) + log.Errorf("MonitorEthChain - ctx.EthTools.GetNodeHeight error: %s", err) os.Exit(1) } ethHeight := uint32(currentHeight) - 5 @@ -110,7 +136,7 @@ func MonitorEthChain(ctx *TestFrameworkContext) { for { select { case <-updateTicker.C: - currentHeight, err := ctx.EthInvoker.ETHUtil.GetNodeHeight() + currentHeight, err := invoker.ETHUtil.GetNodeHeight() if err != nil { log.Errorf("ctx.EthTools.GetNodeHeight error: %s", err) continue @@ -120,7 +146,7 @@ func MonitorEthChain(ctx *TestFrameworkContext) { } for uint32(currentHeight) > ethHeight+5 { ethHeight++ - err = parseEthChainBlock(ctx, ethHeight) // TODO: influenced by forks + err = parseEthChainBlock(ctx, invoker, ethHeight) // TODO: influenced by forks if err != nil { log.Errorf("parseEthChainBlock error: %s", err) ethHeight-- @@ -131,9 +157,9 @@ func MonitorEthChain(ctx *TestFrameworkContext) { } } -func parseEthChainBlock(ctx *TestFrameworkContext, height uint32) error { +func parseEthChainBlock(ctx *TestFrameworkContext, invoker *eth.EInvoker, height uint32) error { // contract is different - lockevents, unlockevents, err := ctx.EthInvoker.ETHUtil.GetSmartContractEventByBlock(config.DefConfig.Eccm, uint64(height)) + lockevents, unlockevents, err := invoker.ETHUtil.GetSmartContractEventByBlock(getEccm(invoker.ChainID), uint64(height)) if err != nil { return err } diff --git a/testframework/framework.go b/testframework/framework.go index ea1d392..8588006 100644 --- a/testframework/framework.go +++ b/testframework/framework.go @@ -18,6 +18,11 @@ package testframework import ( "fmt" + "os" + "reflect" + "sync" + "time" + "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" @@ -25,12 +30,8 @@ import ( "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" - "os" - "reflect" - "sync" - "time" - "github.com/polynetwork/poly-go-sdk" + poly_go_sdk "github.com/polynetwork/poly-go-sdk" ) //Default TestFramework instance @@ -55,6 +56,7 @@ type TestFramework struct { rcSdk *poly_go_sdk.PolySdk // invokers ethInvoker *eth.EInvoker + bscInvoker *eth.EInvoker btcInvoker *btc.BtcInvoker ontInvoker *ont.OntInvoker cosmosInvoker *cosmos.CosmosInvoker @@ -114,14 +116,17 @@ func (this *TestFramework) runTestList(testCaseList []TestCase, loopNumber int) this.onTestStart() defer this.onTestFinish(testCaseList) - ctx := NewTestFrameworkContext(this, testCaseList, this.rcSdk, this.ethInvoker, this.btcInvoker, + ctx := NewTestFrameworkContext(this, testCaseList, this.rcSdk, this.ethInvoker, this.bscInvoker, this.btcInvoker, this.ontInvoker, this.cosmosInvoker, this.neoInvoker) if this.ontInvoker != nil { go MonitorOnt(ctx) } go MonitorRChain(ctx) if this.ethInvoker != nil { - go MonitorEthChain(ctx) + go MonitorEthLikeChain(ctx, config.DefConfig.EthChainID) + } + if this.bscInvoker != nil { + go MonitorEthLikeChain(ctx, config.DefConfig.BscChainID) } if this.btcInvoker != nil { go MonitorBtc(ctx) @@ -170,6 +175,11 @@ func (this *TestFramework) SetEthInvoker(invoker *eth.EInvoker) { this.ethInvoker = invoker } +//SetBSC instance to test framework +func (this *TestFramework) SetBSCInvoker(invoker *eth.EInvoker) { + this.bscInvoker = invoker +} + //SetBtcCli instance to test framework func (this *TestFramework) SetBtcInvoker(invoker *btc.BtcInvoker) { this.btcInvoker = invoker diff --git a/testframework/framework_context.go b/testframework/framework_context.go index 451f08b..5bb95d5 100644 --- a/testframework/framework_context.go +++ b/testframework/framework_context.go @@ -18,14 +18,15 @@ package testframework import ( "fmt" - "github.com/polynetwork/poly-go-sdk" + "sync" + "time" + + poly_go_sdk "github.com/polynetwork/poly-go-sdk" "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" - "sync" - "time" ) //TestFrameworkContext is the context for test case @@ -35,25 +36,27 @@ type TestFrameworkContext struct { RcSdk *poly_go_sdk.PolySdk Status *CtxStatus // invokers - EthInvoker *eth.EInvoker - BtcInvoker *btc.BtcInvoker - OntInvoker *ont.OntInvoker - CMInvoker *cosmos.CosmosInvoker - NeoInvoker *neo.NeoInvoker + EthInvoker *eth.EInvoker + BscInvoker *eth.EInvoker + BtcInvoker *btc.BtcInvoker + OntInvoker *ont.OntInvoker + CMInvoker *cosmos.CosmosInvoker + NeoInvoker *neo.NeoInvoker } //NewTestFrameworkContext return a TestFrameworkContext instance -func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_go_sdk.PolySdk, eInvkr *eth.EInvoker, +func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_go_sdk.PolySdk, eInvkr *eth.EInvoker, bscInvkr *eth.EInvoker, btcInvkr *btc.BtcInvoker, ontInvkr *ont.OntInvoker, cmInvoker *cosmos.CosmosInvoker, neoInvoker *neo.NeoInvoker) *TestFrameworkContext { ctx := &TestFrameworkContext{ - Framework: fw, - Cases: caseArr, - RcSdk: rcSdk, - EthInvoker: eInvkr, - BtcInvoker: btcInvkr, - OntInvoker: ontInvkr, - CMInvoker: cmInvoker, - NeoInvoker: neoInvoker, + Framework: fw, + Cases: caseArr, + RcSdk: rcSdk, + EthInvoker: eInvkr, + BscInvoker: bscInvkr, + BtcInvoker: btcInvkr, + OntInvoker: ontInvkr, + CMInvoker: cmInvoker, + NeoInvoker: neoInvoker, } ctx.Status = NewCtxStatus(ctx) return ctx From 401b0fd53b8d6dce70d8e91a2414092b4b7f78a6 Mon Sep 17 00:00:00 2001 From: zhiqiangxu <652732310@qq.com> Date: Mon, 21 Dec 2020 14:16:11 +0800 Subject: [PATCH 03/96] mod text (#5) --- cmd/bsc_deployer/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/bsc_deployer/run.go b/cmd/bsc_deployer/run.go index 9e2a8cc..52ee372 100644 --- a/cmd/bsc_deployer/run.go +++ b/cmd/bsc_deployer/run.go @@ -324,7 +324,7 @@ func SetOtherLockProxy(invoker *eth.EInvoker) { } hash := tx.Hash() invoker.ETHUtil.WaitTransactionConfirm(hash) - fmt.Printf("binding eth proxy: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding bsc proxy: ( txhash: %s )\n", hash.String()) } } From df2b459d76596b1d369ee5c409ed6210e1fea906 Mon Sep 17 00:00:00 2001 From: zhiqiangxu <652732310@qq.com> Date: Mon, 21 Dec 2020 14:23:07 +0800 Subject: [PATCH 04/96] add config.json to gitignore (#6) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index cbda1bb..1842786 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ config-*.json test.go fisco_sdk.toml *.yaml +config.json \ No newline at end of file From 8fe4b2bc5e0ae15242647bc1d49ddaff51949d98 Mon Sep 17 00:00:00 2001 From: zhiqiangxu <652732310@qq.com> Date: Mon, 21 Dec 2020 16:28:05 +0800 Subject: [PATCH 05/96] fix (#8) --- cmd/tools/run.go | 2 +- testcase/method.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 4032448..7c7fb16 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -612,7 +612,7 @@ func SyncBSCGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou hdr.Hash().String(), txhash.ToHexString()) } - eccmContract, err := eccm_abi.NewEthCrossChainManager(common3.HexToAddress(config.DefConfig.Eccm), tool.GetEthClient()) + eccmContract, err := eccm_abi.NewEthCrossChainManager(common3.HexToAddress(config.DefConfig.BscEccm), tool.GetEthClient()) if err != nil { panic(err) } diff --git a/testcase/method.go b/testcase/method.go index 08a2f53..ab52a6a 100644 --- a/testcase/method.go +++ b/testcase/method.go @@ -2184,7 +2184,7 @@ func SendBnbCrossBsc(ctx *testframework.TestFrameworkContext, status *testframew return fmt.Errorf("SendBnbCrossBsc, contractabi.Pack error:" + err.Error()) } - contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) + contractAddr := ethcommon.HexToAddress(config.DefConfig.BscLockProxy) callMsg := ethereum.CallMsg{ From: ctx.BscInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, Value: big.NewInt(int64(amount)), Data: txData, From 0cfa9d576cd922888452690d557e6ceba65acee5 Mon Sep 17 00:00:00 2001 From: zhiqiangxu <652732310@qq.com> Date: Tue, 22 Dec 2020 10:08:11 +0800 Subject: [PATCH 06/96] add SendBnbCrossEth (#9) * add SendBnbCrossEth * fix --- cmd/bsc_deployer/run.go | 33 +++++++++++-- config/config.go | 1 + testcase/init.go | 1 + testcase/method.go | 106 ++++++++++++++++++++++++++++++++++++++++ testcase/testcase.go | 28 +++++++++++ 5 files changed, 165 insertions(+), 4 deletions(-) diff --git a/cmd/bsc_deployer/run.go b/cmd/bsc_deployer/run.go index 52ee372..dd808c7 100644 --- a/cmd/bsc_deployer/run.go +++ b/cmd/bsc_deployer/run.go @@ -213,7 +213,7 @@ func SetupUSDC(ethInvoker *eth.EInvoker) { } ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() - fmt.Printf("binding USDC of ontology on ethereum: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding USDC of ontology on bsc: ( txhash: %s )\n", hash.String()) } func SetupOntAsset(invoker *eth.EInvoker) { @@ -256,6 +256,15 @@ func SetupBnb(ethInvoker *eth.EInvoker) { fmt.Printf("binding bnbx of ontology on bsc: ( txhash: %s )\n", hash.String()) } + if config.DefConfig.EthBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, ethNativeAddr, config.DefConfig.EthBnb, config.DefConfig.EthChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnb of bsc on ethereum: ( txhash: %s )\n", hash.String()) + } + tx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, ethNativeAddr, config.CM_BNBX, config.DefConfig.CMCrossChainId, 0) if err != nil { panic(fmt.Errorf("SetupBnb2COSMOS, failed to bind asset hash: %v", err)) @@ -326,6 +335,21 @@ func SetOtherLockProxy(invoker *eth.EInvoker) { invoker.ETHUtil.WaitTransactionConfirm(hash) fmt.Printf("binding bsc proxy: ( txhash: %s )\n", hash.String()) } + + if config.DefConfig.EthLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other := common2.HexToAddress(config.DefConfig.EthLockProxy) + tx, err := contract.BindProxyHash(auth, config.DefConfig.EthChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding eth proxy: ( txhash: %s )\n", hash.String()) + } } func SetUpEthContracts() { @@ -337,15 +361,16 @@ func SetUpEthContracts() { if config.DefConfig.OntLockProxy != "" { SetupOntAsset(invoker) } - if config.DefConfig.EthWBTC != "" { + if config.DefConfig.BscWBTC != "" { SetupWBTC(invoker) } - if config.DefConfig.EthDai != "" { + if config.DefConfig.BscDai != "" { SetupDAI(invoker) } - if config.DefConfig.EthUSDT != "" { + if config.DefConfig.BscUSDT != "" { SetupUSDT(invoker) } + //SetupUSDC(invoker) SetOtherLockProxy(invoker) } diff --git a/config/config.go b/config/config.go index 1423f01..7926f50 100644 --- a/config/config.go +++ b/config/config.go @@ -125,6 +125,7 @@ type TestConfig struct { BscRenBTC string // eth contracts: auto set after deploy + EthBnb string EthErc20 string EthOep4 string Eccd string diff --git a/testcase/init.go b/testcase/init.go index c7f2471..e26f1e1 100644 --- a/testcase/init.go +++ b/testcase/init.go @@ -82,6 +82,7 @@ func init() { testframework.TFramework.RegTestCase("OntdToEthAndBack", OntdToEthAndBack) testframework.TFramework.RegTestCase("USDCCircle", USDCCircle) testframework.TFramework.RegTestCase("BnbToBsc", BnbToBsc) + testframework.TFramework.RegTestCase("BnbToEthAndBack", BnbToEthAndBack) testframework.TFramework.RegTestCase("RenBTCCircle", RenBTCCircle) testframework.TFramework.RegTestCase("EOntdToNeoAndBack", EOntdToNeoAndBack) } diff --git a/testcase/method.go b/testcase/method.go index ab52a6a..9b715a0 100644 --- a/testcase/method.go +++ b/testcase/method.go @@ -2218,6 +2218,112 @@ func SendBnbCrossBsc(ctx *testframework.TestFrameworkContext, status *testframew return nil } +func SendBnbCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.BscInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendBnbCrossEth, get suggest gas price failed error: %s", err.Error()) + } + //gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendBnbCrossEth, abi.JSON error:" + err.Error()) + } + rawFrom := ctx.BscInvoker.EthTestSigner.Address.Bytes() + assetaddress := ethcommon.HexToAddress("0000000000000000000000000000000000000000") + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.EthChainID), rawFrom[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendBnbCrossEth, contractabi.Pack error:" + err.Error()) + } + + contractAddr := ethcommon.HexToAddress(config.DefConfig.BscLockProxy) + callMsg := ethereum.CallMsg{ + From: ctx.BscInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(amount)), Data: txData, + } + gasLimit, err := ctx.BscInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendBnbCrossEth, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.BscInvoker.NM.GetAddressNonce(ctx.BscInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendBnbCrossEth, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.BscInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendBnbCrossEth, types.SignTx error: %s", err.Error()) + } + + err = ctx.BscInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendBnbCrossEth, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"SendBnbCrossEth", time.Now()}) + WaitTransactionConfirm(ctx.BscInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + +func SendEthBnbCrossBsc(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.EthInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendEthBnbCrossBsc, get suggest gas price failed error: %s", err.Error()) + } + //gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendEthBnbCrossBsc, abi.JSON error:" + err.Error()) + } + rawFrom := ctx.EthInvoker.EthTestSigner.Address.Bytes() + assetaddress := ethcommon.HexToAddress(config.DefConfig.EthBnb) + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.BscChainID), rawFrom[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendEthBnbCrossBsc, contractabi.Pack error:" + err.Error()) + } + + contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) + callMsg := ethereum.CallMsg{ + From: ctx.EthInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(amount)), Data: txData, + } + gasLimit, err := ctx.EthInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendEthBnbCrossBsc, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendEthBnbCrossBsc, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.EthInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendEthBnbCrossBsc, types.SignTx error: %s", err.Error()) + } + + err = ctx.EthInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendEthBnbCrossBsc, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"SendEthBnbCrossBsc", time.Now()}) + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + func SendNEthCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { lpAddr, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) if err != nil { diff --git a/testcase/testcase.go b/testcase/testcase.go index 21ea2ea..632611a 100644 --- a/testcase/testcase.go +++ b/testcase/testcase.go @@ -1222,6 +1222,34 @@ func BnbToBsc(ctx *testframework.TestFrameworkContext, status *testframework.Cas return true } +func BnbToEthAndBack(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.EthValLimit, 1) + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendBnbCrossEth(ctx, status, amt); err != nil { + log.Errorf("BnbToEthAndBack, SendBnbCrossEth error: %v", err) + return false + } + } + log.Infof("BnbToEthAndBack, send %d bnb to Eth, waiting for confirmation...", amt) + WaitUntilClean(status) + + for j := uint64(0); j < config.DefConfig.TxNumPerBatch; j++ { + if err := SendEthBnbCrossBsc(ctx, status, amt); err != nil { + log.Errorf("BnbToEthAndBack, SendEthBnbCrossBsc error: %v", err) + return false + } + } + log.Infof("BnbToEthAndBack, send %d eth bnb from Eth to bsc, waiting for confirmation...", amt) + WaitUntilClean(status) + + log.Infof("BnbToEthAndBack, bnb all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + func USDCCircle(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { amt := GetRandAmount(config.DefConfig.USDCValLimit, 1) From 58b03956be2c1ac6ce07a87923a8c2a20cf50391 Mon Sep 17 00:00:00 2001 From: zhiqiangxu <652732310@qq.com> Date: Tue, 22 Dec 2020 11:13:56 +0800 Subject: [PATCH 07/96] fix testcase (#10) * fix test * fix test * fix test --- testcase/method.go | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/testcase/method.go b/testcase/method.go index 9b715a0..a38f5e7 100644 --- a/testcase/method.go +++ b/testcase/method.go @@ -2229,7 +2229,7 @@ func SendBnbCrossEth(ctx *testframework.TestFrameworkContext, status *testframew if err != nil { return fmt.Errorf("SendBnbCrossEth, abi.JSON error:" + err.Error()) } - rawFrom := ctx.BscInvoker.EthTestSigner.Address.Bytes() + rawFrom := ctx.EthInvoker.EthTestSigner.Address.Bytes() assetaddress := ethcommon.HexToAddress("0000000000000000000000000000000000000000") txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.EthChainID), rawFrom[:], big.NewInt(int64(amount))) @@ -2282,7 +2282,7 @@ func SendEthBnbCrossBsc(ctx *testframework.TestFrameworkContext, status *testfra if err != nil { return fmt.Errorf("SendEthBnbCrossBsc, abi.JSON error:" + err.Error()) } - rawFrom := ctx.EthInvoker.EthTestSigner.Address.Bytes() + rawFrom := ctx.BscInvoker.EthTestSigner.Address.Bytes() assetaddress := ethcommon.HexToAddress(config.DefConfig.EthBnb) txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.BscChainID), rawFrom[:], big.NewInt(int64(amount))) @@ -2291,9 +2291,29 @@ func SendEthBnbCrossBsc(ctx *testframework.TestFrameworkContext, status *testfra } contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) + token, err := eth.NewStandardToken(assetaddress, ctx.EthInvoker.ETHUtil.GetEthClient()) + if err != nil { + return fmt.Errorf("SendEthBnbCrossBsc, failed to NewStandardToken: %v", err) + } + val, err := token.Allowance(nil, ctx.EthInvoker.EthTestSigner.Address, contractAddr) + if err != nil { + return fmt.Errorf("SendEthBnbCrossBsc, failed to get allowance: %v", err) + } + if val.Uint64() < amount { + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + auth := MakeEthAuth(ctx.EthInvoker.EthTestSigner, nonce, gasPrice.Uint64(), uint64(eth.DefaultGasLimit)) + if err != nil { + return fmt.Errorf("SendEthBnbCrossBsc, failed to get eth auth: %v", err) + } + tx, err := token.Approve(auth, contractAddr, big.NewInt(math.MaxInt64)) + if err != nil { + return fmt.Errorf("SendEthBnbCrossBsc, failed to approve: %v", err) + } + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), tx.Hash()) + } callMsg := ethereum.CallMsg{ From: ctx.EthInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, - Value: big.NewInt(int64(amount)), Data: txData, + Value: big.NewInt(0), Data: txData, } gasLimit, err := ctx.EthInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) if err != nil { From 08d6ddebc7da4b6ae9ebc4a972167590aab31073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Tue, 22 Dec 2020 11:20:37 +0800 Subject: [PATCH 08/96] fix test --- testcase/method.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcase/method.go b/testcase/method.go index a38f5e7..d03370d 100644 --- a/testcase/method.go +++ b/testcase/method.go @@ -2321,7 +2321,7 @@ func SendEthBnbCrossBsc(ctx *testframework.TestFrameworkContext, status *testfra } nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) - tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(0), gasLimit, gasPrice, txData) bf := new(bytes.Buffer) rlp.Encode(bf, tx) From d5364034f88429988d2e76ca5f39db5f3ad72ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Fri, 25 Dec 2020 10:06:19 +0800 Subject: [PATCH 09/96] log --- testframework/check.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testframework/check.go b/testframework/check.go index ff92c57..0179da4 100644 --- a/testframework/check.go +++ b/testframework/check.go @@ -181,7 +181,7 @@ func parseEthChainBlock(ctx *TestFrameworkContext, invoker *eth.EInvoker, height } ethTxIdByte = append(ethTxIdByte, indexInt.Bytes()...) ethTxIdStr := hex.EncodeToString(ethTxIdByte) - log.Infof("send cross chain tx on eth, tx hash: %s, tx id: %s", ethTxHash, ethTxIdStr) + log.Infof("send cross chain tx on eth, tx hash: %s, tx id: %s chainID:%d", ethTxHash, ethTxIdStr, invoker.ChainID) caseStatus := ctx.Status.GetCaseStatus(idx) caseStatus.AddTx(ethTxIdStr, &TxInfo{ethTxHash, time.Now()}) caseStatus.Del(ethTxHash) From afe2135a2d324a6232696c5408884fb27881ffc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Fri, 25 Dec 2020 10:11:55 +0800 Subject: [PATCH 10/96] log --- testframework/check.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testframework/check.go b/testframework/check.go index 0179da4..14de683 100644 --- a/testframework/check.go +++ b/testframework/check.go @@ -193,7 +193,7 @@ func parseEthChainBlock(ctx *TestFrameworkContext, invoker *eth.EInvoker, height allianceTxHash := event.RTxid rawTxHash := event.FromTxId if ok, idx := ctx.Status.IsTxPending(rawTxHash); ok { - log.Infof("receive cross chain tx on eth, txhash: %s, alliance tx hash: %s, raw tx hash: %s", event.Txid, allianceTxHash, rawTxHash) + log.Infof("receive cross chain tx on eth, txhash: %s, alliance tx hash: %s, raw tx hash: %s chainID:%d", event.Txid, allianceTxHash, rawTxHash, invoker.ChainID) ctx.Status.DelWithIndex(rawTxHash, idx) } } From 32c71f3d358bb0c1fb7bcb7fc98a0e7c74be83bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Mon, 28 Dec 2020 11:47:01 +0800 Subject: [PATCH 11/96] add GetBlockHeaderByHash --- chains/eth/eth_tools.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chains/eth/eth_tools.go b/chains/eth/eth_tools.go index a8a424f..a3da411 100644 --- a/chains/eth/eth_tools.go +++ b/chains/eth/eth_tools.go @@ -136,6 +136,15 @@ func (self *ETHTools) GetNodeHeight() (uint64, error) { } } +func (self *ETHTools) GetBlockHeaderByHash(hash common.Hash) (*types.Header, error) { + b, err := self.ethclient.BlockByHash(context.Background(), hash) + if err != nil { + return nil, err + } + + return b.Header(), nil +} + func (self *ETHTools) GetBlockHeader(height uint64) (*types.Header, error) { params := []interface{}{fmt.Sprintf("0x%x", height), true} req := &BlockReq{ From 96ac0341fc9c3135a15c18008a08ac8de1a51068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Wed, 30 Dec 2020 11:26:01 +0800 Subject: [PATCH 12/96] mod .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1842786..dcd271d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,11 @@ .idea/ .idea/* .wallets/* +.alliance-wallets/* .vscode report/* config-*.json test.go fisco_sdk.toml *.yaml -config.json \ No newline at end of file +config.json From 259f09873998e5f5e16e7c5dcd6196e4adbc0744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Wed, 30 Dec 2020 11:31:35 +0800 Subject: [PATCH 13/96] mod bsc blkToWait --- cmd/tools/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 7c7fb16..d22c622 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -962,7 +962,7 @@ func RegisterBSC(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { panic(err) } - blkToWait := uint64(15) + blkToWait := uint64(20) extra := bsc.ExtraInfo{ ChainID: chainID, } From 31235e4bc346e46f7eaf0f5436f427406e217fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Wed, 30 Dec 2020 11:38:17 +0800 Subject: [PATCH 14/96] Revert "mod bsc blkToWait" This reverts commit 259f09873998e5f5e16e7c5dcd6196e4adbc0744. --- cmd/tools/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index d22c622..7c7fb16 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -962,7 +962,7 @@ func RegisterBSC(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { panic(err) } - blkToWait := uint64(20) + blkToWait := uint64(15) extra := bsc.ExtraInfo{ ChainID: chainID, } From bbdf771ff3ea78fa242d4fc776d9ced0ab3605c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Wed, 30 Dec 2020 15:26:02 +0800 Subject: [PATCH 15/96] add testcase --- testcase/testcase.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/testcase/testcase.go b/testcase/testcase.go index 632611a..d120d64 100644 --- a/testcase/testcase.go +++ b/testcase/testcase.go @@ -1250,6 +1250,32 @@ func BnbToEthAndBack(ctx *testframework.TestFrameworkContext, status *testframew return true } +func BnbToEthOnce(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + amt := GetRandAmount(config.DefConfig.EthValLimit, 1) + if err := SendBnbCrossEth(ctx, status, amt); err != nil { + log.Errorf("BnbToEthOnce, SendBnbCrossEth error: %v", err) + return false + } + log.Infof("BnbToEthOnce, send %d bnb to Eth, waiting for confirmation...", amt) + WaitUntilClean(status) + + status.SetItSuccess(1) + return true +} + +func EthBnbToBscOnce(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + amt := GetRandAmount(config.DefConfig.EthValLimit, 1) + if err := SendEthBnbCrossBsc(ctx, status, amt); err != nil { + log.Errorf("EthBnbToBscOnce, SendBnbCrossEth error: %v", err) + return false + } + log.Infof("EthBnbToBscOnce, send %d ethbnb to Bsc, waiting for confirmation...", amt) + WaitUntilClean(status) + + status.SetItSuccess(1) + return true +} + func USDCCircle(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { amt := GetRandAmount(config.DefConfig.USDCValLimit, 1) From 51459c0690fe636fc760fce60aadccbea951d0d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Wed, 30 Dec 2020 15:29:54 +0800 Subject: [PATCH 16/96] add testcase --- testcase/init.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testcase/init.go b/testcase/init.go index e26f1e1..ce682b6 100644 --- a/testcase/init.go +++ b/testcase/init.go @@ -83,6 +83,8 @@ func init() { testframework.TFramework.RegTestCase("USDCCircle", USDCCircle) testframework.TFramework.RegTestCase("BnbToBsc", BnbToBsc) testframework.TFramework.RegTestCase("BnbToEthAndBack", BnbToEthAndBack) + testframework.TFramework.RegTestCase("EthBnbToBscOnce", EthBnbToBscOnce) + testframework.TFramework.RegTestCase("BnbToEthOnce", BnbToEthOnce) testframework.TFramework.RegTestCase("RenBTCCircle", RenBTCCircle) testframework.TFramework.RegTestCase("EOntdToNeoAndBack", EOntdToNeoAndBack) } From d4fb0b74ef0b1c5c734e5c5b8f8ad82a85c202d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Wed, 30 Dec 2020 17:07:44 +0800 Subject: [PATCH 17/96] add neo support to bsc --- chains/eth/eth_invoker.go | 7 +++++++ cmd/bsc_deployer/run.go | 27 +++++++++++++++++++++++++++ config/config.go | 1 + 3 files changed, 35 insertions(+) diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index ac95174..a0164d5 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -28,6 +28,7 @@ import ( ethComm "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/joeqian10/neo-gogogo/helper" ontcommon "github.com/ontio/ontology/common" utils2 "github.com/ontio/ontology/smartcontract/service/native/utils" "github.com/polynetwork/eth-contracts/go_abi/btcx_abi" @@ -208,6 +209,12 @@ func (ethInvoker *EInvoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetH toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.BscChainID { toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.NeoChainID { + other, err := helper.UInt160FromString(toAssetHash) + if err != nil { + return nil, err + } + toAddr = other[:] } tx, err := contract.BindAssetHash(auth, ethComm.HexToAddress(fromAssetHash), uint64(toChainId), toAddr[:]) diff --git a/cmd/bsc_deployer/run.go b/cmd/bsc_deployer/run.go index dd808c7..47c37fc 100644 --- a/cmd/bsc_deployer/run.go +++ b/cmd/bsc_deployer/run.go @@ -22,6 +22,7 @@ import ( "fmt" common2 "github.com/ethereum/go-ethereum/common" + "github.com/joeqian10/neo-gogogo/helper" "github.com/ontio/ontology/common" "github.com/polynetwork/poly-io-test/chains/eth" "github.com/polynetwork/poly-io-test/config" @@ -264,6 +265,14 @@ func SetupBnb(ethInvoker *eth.EInvoker) { hash := tx.Hash() fmt.Printf("binding bnb of bsc on ethereum: ( txhash: %s )\n", hash.String()) } + if config.DefConfig.NeoBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, ethNativeAddr, config.DefConfig.NeoBnb, config.DefConfig.NeoChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2Neo, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnb of bsc on neo: ( txhash: %s )\n", hash.String()) + } tx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, ethNativeAddr, config.CM_BNBX, config.DefConfig.CMCrossChainId, 0) if err != nil { @@ -350,6 +359,24 @@ func SetOtherLockProxy(invoker *eth.EInvoker) { invoker.ETHUtil.WaitTransactionConfirm(hash) fmt.Printf("binding eth proxy: ( txhash: %s )\n", hash.String()) } + + if config.DefConfig.NeoLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) + if err != nil { + panic(fmt.Errorf("UInt160FromString error: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.NeoChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding neo proxy: ( txhash: %s )\n", hash.String()) + } } func SetUpEthContracts() { diff --git a/config/config.go b/config/config.go index 7926f50..904849e 100644 --- a/config/config.go +++ b/config/config.go @@ -165,6 +165,7 @@ type TestConfig struct { CNeo string NeoOnt string NeoOntd string + NeoBnb string NeoEth string // cosmos From 91beffa3ea92423aeea211e31d6b3ab644e0b5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Tue, 19 Jan 2021 14:55:12 +0800 Subject: [PATCH 18/96] testcase for eth->bsc --- testcase/init.go | 2 + testcase/method.go | 127 +++++++++++++++++++++++++++++++++++++++++++ testcase/testcase.go | 36 ++++++++++++ 3 files changed, 165 insertions(+) diff --git a/testcase/init.go b/testcase/init.go index ce682b6..0722583 100644 --- a/testcase/init.go +++ b/testcase/init.go @@ -82,6 +82,8 @@ func init() { testframework.TFramework.RegTestCase("OntdToEthAndBack", OntdToEthAndBack) testframework.TFramework.RegTestCase("USDCCircle", USDCCircle) testframework.TFramework.RegTestCase("BnbToBsc", BnbToBsc) + testframework.TFramework.RegTestCase("EthToBsc", EthToBsc) + testframework.TFramework.RegTestCase("EthEthToBscAndBack", EthEthToBscAndBack) testframework.TFramework.RegTestCase("BnbToEthAndBack", BnbToEthAndBack) testframework.TFramework.RegTestCase("EthBnbToBscOnce", EthBnbToBscOnce) testframework.TFramework.RegTestCase("BnbToEthOnce", BnbToEthOnce) diff --git a/testcase/method.go b/testcase/method.go index d03370d..5d5e881 100644 --- a/testcase/method.go +++ b/testcase/method.go @@ -2271,6 +2271,133 @@ func SendBnbCrossEth(ctx *testframework.TestFrameworkContext, status *testframew return nil } +func SendBscEthCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.BscInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendBscEthCrossEth, get suggest gas price failed error: %s", err.Error()) + } + //gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendBscEthCrossEth, abi.JSON error:" + err.Error()) + } + rawFrom := ctx.EthInvoker.EthTestSigner.Address.Bytes() + assetaddress := ethcommon.HexToAddress("0xb9478391eec218defa96f7b9a7938cf44e7a2fd5") + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.EthChainID), rawFrom[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendBscEthCrossEth, contractabi.Pack error:" + err.Error()) + } + + contractAddr := ethcommon.HexToAddress(config.DefConfig.BscLockProxy) + token, err := eth.NewStandardToken(assetaddress, ctx.BscInvoker.ETHUtil.GetEthClient()) + if err != nil { + return fmt.Errorf("SendBscEthCrossEth, failed to NewStandardToken: %v", err) + } + val, err := token.Allowance(nil, ctx.BscInvoker.EthTestSigner.Address, contractAddr) + if err != nil { + return fmt.Errorf("SendBscEthCrossEth, failed to get allowance: %v", err) + } + if val.Uint64() < amount { + nonce := ctx.BscInvoker.NM.GetAddressNonce(ctx.BscInvoker.EthTestSigner.Address) + auth := MakeEthAuth(ctx.BscInvoker.EthTestSigner, nonce, gasPrice.Uint64(), uint64(eth.DefaultGasLimit)) + if err != nil { + return fmt.Errorf("SendBscEthCrossEth, failed to get eth auth: %v", err) + } + tx, err := token.Approve(auth, contractAddr, big.NewInt(math.MaxInt64)) + if err != nil { + return fmt.Errorf("SendBscEthCrossEth, failed to approve: %v", err) + } + WaitTransactionConfirm(ctx.BscInvoker.ETHUtil.GetEthClient(), tx.Hash()) + } + + callMsg := ethereum.CallMsg{ + From: ctx.BscInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(0)), Data: txData, + } + gasLimit, err := ctx.BscInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendBscEthCrossEth, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.BscInvoker.NM.GetAddressNonce(ctx.BscInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendBscEthCrossEth, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.BscInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendBscEthCrossEth, types.SignTx error: %s", err.Error()) + } + + err = ctx.BscInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendBscEthCrossEth, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"SendBscEthCrossEth", time.Now()}) + WaitTransactionConfirm(ctx.BscInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + +func SendEthCrossBsc(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.EthInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendEthCrossBsc, get suggest gas price failed error: %s", err.Error()) + } + //gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendEthCrossBsc, abi.JSON error:" + err.Error()) + } + rawFrom := ctx.BscInvoker.EthTestSigner.Address.Bytes() + assetaddress := ethcommon.HexToAddress("0000000000000000000000000000000000000000") + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.BscChainID), rawFrom[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendEthCrossBsc, contractabi.Pack error:" + err.Error()) + } + + contractAddr := ethcommon.HexToAddress(config.DefConfig.EthLockProxy) + callMsg := ethereum.CallMsg{ + From: ctx.EthInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(amount)), Data: txData, + } + gasLimit, err := ctx.EthInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendEthCrossBsc, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.EthInvoker.NM.GetAddressNonce(ctx.EthInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendEthCrossBsc, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.EthInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendEthCrossBsc, types.SignTx error: %s", err.Error()) + } + + err = ctx.EthInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendEthCrossBsc, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"SendEthCrossBsc", time.Now()}) + WaitTransactionConfirm(ctx.EthInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + func SendEthBnbCrossBsc(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { gasPrice, err := ctx.EthInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) if err != nil { diff --git a/testcase/testcase.go b/testcase/testcase.go index d120d64..13bfab7 100644 --- a/testcase/testcase.go +++ b/testcase/testcase.go @@ -1203,6 +1203,42 @@ func EthToNeoAndBack(ctx *testframework.TestFrameworkContext, status *testframew return true } +func EthToBsc(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + amt := GetRandAmount(config.DefConfig.EthValLimit, 1) + + if err := SendEthCrossBsc(ctx, status, amt); err != nil { + log.Errorf("BnbToBsc, SendBnbCrossBsc error: %v", err) + return false + } + + WaitUntilClean(status) + + return true +} + +func EthEthToBscAndBack(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.EthValLimit, 1) + if err := SendEthCrossBsc(ctx, status, amt); err != nil { + log.Errorf("EthEthToBscAndBack, SendEthCrossBsc error: %v", err) + return false + } + log.Infof("EthEthToBscAndBack, send %d eth to Bsc, waiting for confirmation...", amt) + WaitUntilClean(status) + + if err := SendBscEthCrossEth(ctx, status, amt); err != nil { + log.Errorf("EthEthToBscAndBack, SendBscEthCrossEth error: %v", err) + return false + } + WaitUntilClean(status) + log.Infof("EthEthToBscAndBack, eth all received ( batch: %d )", i) + break + } + + status.SetItSuccess(1) + return true +} + func BnbToBsc(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { amt := GetRandAmount(config.DefConfig.EthValLimit, 1) From 3baf4ae744dd95b9b98aa5b874c7d541730f870a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Tue, 19 Jan 2021 15:52:33 +0800 Subject: [PATCH 19/96] add NeoToBscCircle --- testcase/init.go | 1 + testcase/method.go | 142 +++++++++++++++++++++++++++++++++++++++++++ testcase/testcase.go | 23 +++++++ 3 files changed, 166 insertions(+) diff --git a/testcase/init.go b/testcase/init.go index 0722583..802fd1d 100644 --- a/testcase/init.go +++ b/testcase/init.go @@ -75,6 +75,7 @@ func init() { testframework.TFramework.RegTestCase("WBTCCircle", WBTCCircle) testframework.TFramework.RegTestCase("DAICircle", DAICircle) testframework.TFramework.RegTestCase("NeoToEthCircle", NeoToEthCircle) + testframework.TFramework.RegTestCase("NeoToBscCircle", NeoToBscCircle) testframework.TFramework.RegTestCase("NeoToOntCircle", NeoToOntCircle) testframework.TFramework.RegTestCase("OntToNeoAndBack", OntToNeoAndBack) testframework.TFramework.RegTestCase("EthToNeoAndBack", EthToNeoAndBack) diff --git a/testcase/method.go b/testcase/method.go index 5d5e881..d38c81a 100644 --- a/testcase/method.go +++ b/testcase/method.go @@ -1773,6 +1773,70 @@ func SendODAICrossEth(ctx *testframework.TestFrameworkContext, status *testframe return nil } +func SendNeoCrossBsc(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + lpAddr, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) + if err != nil { + return err + } + + rawCNeo := helper.ReverseBytes(helper.HexToBytes(config.DefConfig.CNeo)) + fromAsset := sc.ContractParameter{ + Type: sc.ByteArray, + Value: rawCNeo, + } + rawFrom, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + fromAddr := sc.ContractParameter{ + Type: sc.ByteArray, + Value: rawFrom.Bytes(), + } + toChainId := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(int64(config.DefConfig.BscChainID)), + } + toAddr := sc.ContractParameter{ + Type: sc.ByteArray, + Value: ctx.BscInvoker.EthTestSigner.Address.Bytes(), + } + amt := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(int64(amount)), + } + idx := sc.ContractParameter{ + Type: sc.Integer, + Value: *big.NewInt(1), + } + + tb := tx.NewTransactionBuilder(config.DefConfig.NeoUrl) + sb := sc.NewScriptBuilder() + sb.MakeInvocationScript(lpAddr.Bytes(), "lock", []sc.ContractParameter{fromAsset, fromAddr, toChainId, toAddr, amt, idx}) + script := sb.ToArray() + + from, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero) + if err != nil { + return err + } + err = tx.AddSignature(itx, ctx.NeoInvoker.Acc.KeyPair) + if err != nil { + return err + } + response := tb.Client.SendRawTransaction(itx.RawTransactionString()) + if response.HasError() { + return fmt.Errorf(response.ErrorResponse.Error.Message) + } + _ = itx.HashString() + + status.AddTx(hex.EncodeToString(itx.Hash.Bytes()), &testframework.TxInfo{"SendNeoCrossBsc", time.Now()}) + neo.WaitNeoTx(ctx.NeoInvoker.Cli, itx.Hash) + return nil +} + func SendNeoCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { lpAddr, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) if err != nil { @@ -1899,6 +1963,84 @@ func SendNeoCrossOnt(ctx *testframework.TestFrameworkContext, status *testframew return nil } +func SendBscNeoCrossNeo(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.BscInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + return fmt.Errorf("SendBscNeoCrossNeo, get suggest gas price failed error: %s", err.Error()) + } + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendBscNeoCrossNeo, abi.JSON error:" + err.Error()) + } + assetaddress := ethcommon.HexToAddress(config.DefConfig.BscNeo) + contractAddr := ethcommon.HexToAddress(config.DefConfig.BscLockProxy) + + // approve + neox, err := erc20_abi.NewERC20(assetaddress, ctx.BscInvoker.ETHUtil.GetEthClient()) + if err != nil { + return fmt.Errorf("SendBscNeoCrossNeo, NewERC20 error:" + err.Error()) + } + val, err := neox.Allowance(nil, ctx.BscInvoker.EthTestSigner.Address, contractAddr) + if err != nil { + return fmt.Errorf("SendBscNeoCrossNeo, failed to get the balance: %v", err) + } + if val.Uint64() < amount { + nonce := ctx.BscInvoker.NM.GetAddressNonce(ctx.BscInvoker.EthTestSigner.Address) + auth := MakeEthAuth(ctx.BscInvoker.EthTestSigner, nonce, gasPrice.Uint64(), uint64(eth.DefaultGasLimit)) + if err != nil { + return fmt.Errorf("SendBscNeoCrossNeo, failed to get eth auth: %v", err) + } + tx, err := neox.Approve(auth, contractAddr, big.NewInt(math.MaxInt64)) + if err != nil { + return fmt.Errorf("SendBscNeoCrossNeo, failed to approve: %v", err) + } + WaitTransactionConfirm(ctx.BscInvoker.ETHUtil.GetEthClient(), tx.Hash()) + } + + rawFrom, err := helper.AddressToScriptHash(ctx.NeoInvoker.Acc.Address) + if err != nil { + return err + } + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.NeoChainID), rawFrom[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendBscNeoCrossNeo, contractabi.Pack error:" + err.Error()) + } + callMsg := ethereum.CallMsg{ + From: ctx.BscInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(0)), Data: txData, + } + gasLimit, err := ctx.BscInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendBscNeoCrossNeo, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.BscInvoker.NM.GetAddressNonce(ctx.BscInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(0)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendBscNeoCrossNeo, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.BscInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendBscNeoCrossNeo, types.SignTx error: %s", err.Error()) + } + + err = ctx.BscInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendBscNeoCrossNeo, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"SendBscNeoCrossNeo", time.Now()}) + WaitTransactionConfirm(ctx.BscInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + func SendENeoCrossNeo(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { gasPrice, err := ctx.EthInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) if err != nil { diff --git a/testcase/testcase.go b/testcase/testcase.go index 13bfab7..8dd6289 100644 --- a/testcase/testcase.go +++ b/testcase/testcase.go @@ -1014,6 +1014,29 @@ func DAICircle(ctx *testframework.TestFrameworkContext, status *testframework.Ca return true } +func NeoToBscCircle(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.NeoValLimit, 1) + if err := SendNeoCrossBsc(ctx, status, amt); err != nil { + log.Errorf("NeoToBscCircle, SendNeoCrossBsc error: %v", err) + return false + } + log.Infof("NeoToBscCircle, send %d NEO to bsc, waiting for confirmation...", amt) + WaitUntilClean(status) + + if err := SendBscNeoCrossNeo(ctx, status, amt); err != nil { + log.Errorf("NeoToBscCircle, SendBscNeoCrossNeo error: %v", err) + return false + } + log.Infof("NeoToBscCircle, send %d NEO from bsc to NEO, waiting for confirmation...", amt) + WaitUntilClean(status) + log.Infof("NeoToBscCircle, neo all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + func NeoToEthCircle(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { amt := GetRandAmount(config.DefConfig.NeoValLimit, 1) From 6a1faf9dccb525e1ac6407d51b6ed9b3e1313c8b Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Tue, 2 Mar 2021 22:33:27 +0800 Subject: [PATCH 20/96] feat: register and sync for zilliqa devnet --- cmd/tools/run.go | 235 +++++++++++++++++++++++++++++++++++++++++++++++ config.json | 7 +- config/config.go | 11 +++ go.mod | 5 +- go.sum | 63 +++++++++++++ 5 files changed, 316 insertions(+), 5 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 7c7fb16..b798bf1 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -24,8 +24,14 @@ import ( "encoding/json" "flag" "fmt" + "github.com/Zilliqa/gozilliqa-sdk/account" + "github.com/Zilliqa/gozilliqa-sdk/core" + "github.com/Zilliqa/gozilliqa-sdk/crosschain/polynetwork" + "github.com/Zilliqa/gozilliqa-sdk/provider" + zilutil "github.com/Zilliqa/gozilliqa-sdk/util" "math/big" "os" + "strconv" "strings" "github.com/btcsuite/btcd/wire" @@ -163,6 +169,10 @@ func main() { if RegisterBSC(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BscChainID, poly, accArr) } + case config.DefConfig.ZilChainId: + if RegisterZIL(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.ZilChainId, poly, accArr) + } case 0: if RegisterBtcChain(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BtcChainID, poly, accArr) @@ -182,6 +192,9 @@ func main() { if RegisterBSC(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BscChainID, poly, accArr) } + if RegisterZIL(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.ZilChainId, poly, accArr) + } } case "sync_genesis_header": @@ -209,6 +222,8 @@ func main() { SyncCosmosGenesisHeader(poly, accArr) case config.DefConfig.BscChainID: SyncBSCGenesisHeader(poly, accArr) + case config.DefConfig.ZilChainId: + SyncZILGenesisHeader(poly, accArr) case 0: SyncBtcGenesisHeader(poly, acc) SyncEthGenesisHeader(poly, accArr) @@ -216,6 +231,7 @@ func main() { SyncCosmosGenesisHeader(poly, accArr) SyncNeoGenesisHeader(poly, accArr) SyncBSCGenesisHeader(poly, accArr) + SyncZILGenesisHeader(poly, accArr) } case "update_btc": @@ -562,6 +578,172 @@ func SyncEthGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou log.Infof("successful to sync poly genesis header to Ethereum: ( txhash: %s )", tx.Hash().String()) } +func SyncZILGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { + type TxBlockAndDsComm struct { + TxBlock *core.TxBlock + DsBlock *core.DsBlock + DsComm []core.PairOfNode + } + + zilSdk := provider.NewProvider(config.DefConfig.ZilURL) + networkId, err := zilSdk.GetNetworkId() + if err != nil { + panic(fmt.Errorf("SyncZILGenesisHeader failed: %s", err.Error())) + } + + var dsComm []core.PairOfNode + var initDsBlockNum string + var initTxBlockNum string + + // for devnet + if networkId == "111" { + + initDsBlockNum = "1" + initTxBlockNum = "1" + + ipAndAddr, _ := new(big.Int).SetString("2390748178", 10) + dsComm = []core.PairOfNode{ + { + PubKey: "02105342331FCD7CA95648DF8C5373C596982544F35E90849B1E619DFC59F03D48", + }, + { + PubKey: "021D439D1CCCAE17C3D6E855BC78E96438C808D16D1CBF8D7ABD391E41CEE9B1BF", + }, + { + PubKey: "021EDDE95598F5F59708D2E728E00EDB2ECF278C16BD389384320B1AF998DCC2FD", + }, + { + PubKey: "02445FE498E7FBB240BDF9185EB5E7642AF1AF36852D1E132E198A222FBAC617A0", + }, + { + PubKey: "0256EC4BC62FB56C83A3F6160E67499A9E381CF7A613EBF34B9ECDB9E64171DDF4", + }, + { + PubKey: "0264D991762D81DD6557BCB33EC8AA3F621B4CB790852F2231C864921387B76862", + }, + { + PubKey: "027A00916BDD3CF954ED13A0494BFB73FF95BF28C54004F2749F1A8E8CC1AB5B3D", + }, + { + PubKey: "0297C693FBEBAF397CBDE616F605920EF70D7F6E5EC8DD82E71AE1E812E5E0B303", + }, + { + PubKey: "02AE5ADF63E9161000713987B5EBB490B5E6B57CF5B7F9799B4AB907BA19D468F6", + }, + { + PubKey: "0374A5CA5D76BEE5A1DE132AE72184AB084D23EC7A4867CCD562C58405BBB663E2", + Peer: core.Peer{ + IpAddress: ipAndAddr, + ListenPortHost: 33133, + }, + }, + } + } + + // for testnet + if networkId == "333" { + // todo impl this + } + + // for mainnet + if networkId == "1" { + // todo impl this + } + + dsBlockT, err := zilSdk.GetDsBlockVerbose(initDsBlockNum) + if err != nil { + panic(fmt.Errorf("SyncZILGenesisHeader get ds block 1 failed: %s", err.Error())) + } + dsBlock := core.NewDsBlockFromDsBlockT(dsBlockT) + + txBlockT, err := zilSdk.GetTxBlockVerbose(initTxBlockNum) + if err != nil { + panic(fmt.Errorf("SyncZILGenesisHeader get tx block 1 failed: %s", err.Error())) + } + + txBlock := core.NewTxBlockFromTxBlockT(txBlockT) + + txBlockAndDsComm := TxBlockAndDsComm{ + TxBlock: txBlock, + DsBlock: dsBlock, + DsComm: dsComm, + } + + raw, err := json.Marshal(txBlockAndDsComm) + if err != nil { + panic(fmt.Errorf("SyncZILGenesisHeader marshal genesis info failed: %s", err.Error())) + } + + // sync zilliqa genesis info onto polynetwork + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.ZilChainId, raw, accArr) + if err != nil { + if strings.Contains(err.Error(), "had been initialized") { + log.Info("zil already synced") + } else { + panic(fmt.Errorf("SyncZILGenesisHeader failed: %v", err)) + } + } else { + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to sync zil genesis header, ds block: %s, tx block: %s, ds comm: %+v\n", dsBlock.BlockHash, txBlock.BlockHash, dsComm) + } + + // sycn poly network info to zilliqa cross chain manager + 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)...) + } + + genesisHeader := zilutil.EncodeHex(gB.Header.ToArray()) + genesisPubKey := zilutil.EncodeHex(publickeys) + + publicKeys, err := polynetwork.SplitPubKeys(genesisPubKey) + if err != nil { + panic(err) + } + + wallet := account.NewWallet() + wallet.AddByPrivateKey(config.DefConfig.ZilPrivateKey) + chainIdInt, _ := strconv.ParseInt(networkId, 10, 64) + p := &polynetwork.Proxy{ + ProxyAddr: config.DefConfig.ZilEccdProxy, + ImplAddr: config.DefConfig.ZilEccdImpl, + Wallet: wallet, + Client: zilSdk, + ChainId: int(chainIdInt), + MsgVersion: 1, + } + + tx, err := p.InitGenesisBlock(genesisHeader, publicKeys) + if err != nil { + panic(fmt.Errorf("SyncZILGenesisHeader failed at init genesis block to zilliqa: %v", err)) + } + + hash, _ := tx.Hash() + if tx.Receipt.Success { + log.Infof("succeed to sync poly genesis header to ZIL: ( txhash: %s )", zilutil.EncodeHex(hash)) + } else { + log.Infof("failed to sync poly genesis header to ZIL: ( txhash: %s )", zilutil.EncodeHex(hash)) + } + +} + func SyncBSCGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { tool := eth.NewEthTools(config.DefConfig.BSCURL) height, err := tool.GetNodeHeight() @@ -995,6 +1177,59 @@ func RegisterBSC(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { return true } +func RegisterZIL(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + + type ExtraInfo struct { + NumOfGuardList int + } + + numOfGuardList := 0 + zilSdk := provider.NewProvider(config.DefConfig.ZilURL) + networkId, err := zilSdk.GetNetworkId() + if err != nil { + panic(fmt.Errorf("RegisterZIL failed: %s", err.Error())) + } + + if networkId == "111" { + numOfGuardList = 9 + } else if networkId == "333" { + // todo impl this + } else if networkId == "1" { + // todo impl this + } + + fmt.Println("register zil") + blkToWait := uint64(15) + + extra := ExtraInfo{NumOfGuardList: numOfGuardList} + extraBytes, _ := json.Marshal(extra) + + // todo cross chain manger or its proxy + eccd, err := hex.DecodeString(strings.Replace(config.DefConfig.ZilEccdProxy, "0x", "", 1)) + if err != nil { + panic(fmt.Errorf("RegisterZIL, failed to decode eccd '%s' : %v", config.DefConfig.ZilEccdProxy, err)) + } + + txhash, err := poly.Native.Scm.RegisterSideChainExt(acc.Address, config.DefConfig.ZilChainId, 9, "zil", + blkToWait, eccd, extraBytes, acc) + + if err != nil { + if strings.Contains(err.Error(), "already registered") { + log.Infof("zil chain %d already registered", config.DefConfig.ZilChainId) + return false + } + if strings.Contains(err.Error(), "already requested") { + log.Infof("zil chain %d already requested", config.DefConfig.ZilChainId) + return true + } + panic(fmt.Errorf("RegisterZIL failed: %v", err)) + } + + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to register zil chain: ( txhash: %s )", txhash.ToHexString()) + return true +} + func RegisterOntChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.OntChainID, 3, "ont", 1, []byte{}, acc) diff --git a/config.json b/config.json index 0405f1e..f2be010 100644 --- a/config.json +++ b/config.json @@ -15,8 +15,9 @@ "BtcMinOutputValFromContract": 20000, "BtcSignerPrivateKey": "cRRMYv...rAcX", "BtcExistingVendorPrivks": "cTqbqaR...wY6QSag,cT2HP4Q...PXH9Jk2ua,cSQmGg6...9mWzTxEY5A,cPYAx61...zPSbkkZqrzQ5b,cVV9Umt...qvwD5zg,cNK7Bw...oq1vWau8,cUZdDF9s...RePVbQTZ", - "EthURL": "http://ethereum_node" + "EthURL": "http://ethereum_node", "ETHPrivateKey": "AEE6358...A2608A9", + "ZilURL": "https://dev-api.zilliqa.vom", "OntJsonRpcAddress": "http://ontology:20336", "OntWallet": ".wallets/ont_dev.dat", "OntWalletPassword": "admin", @@ -33,8 +34,8 @@ "CMCrossChainId": 5, "CMEpoch": 1, "RCWallet": ".wallets/wallet.dat", - "RCWalletPwd": "", - "RchainJsonRpcAddress": "http://poly:20336", + "RCWalletPwd": "xiaohuo110", + "RchainJsonRpcAddress": "http://138.91.6.226:40336", "RCEpoch": 0, "ReportInterval": 60, "ReportDir": "./report", diff --git a/config/config.go b/config/config.go index 904849e..f98875a 100644 --- a/config/config.go +++ b/config/config.go @@ -44,6 +44,7 @@ type TestConfig struct { OntChainID uint64 NeoChainID uint64 BscChainID uint64 + ZilChainId uint64 BtcRestAddr string BtcRestUser string @@ -70,6 +71,10 @@ type TestConfig struct { BSCURL string BSCPrivateKey string + // zil urls + ZilURL string + ZilPrivateKey string + // ontology OntJsonRpcAddress string OntWallet string @@ -124,6 +129,10 @@ type TestConfig struct { BscNeo string BscRenBTC string + // zil contracts + ZilEccdProxy string + ZilEccdImpl string + // eth contracts: auto set after deploy EthBnb string EthErc20 string @@ -200,6 +209,8 @@ func NewTestConfig() *TestConfig { func NewDefaultTestConfig() *TestConfig { var config = NewTestConfig() + // todo delete me + config.ZilChainId = 9 err := config.Init(DefaultConfigFile) if err != nil { return &TestConfig{} diff --git a/go.mod b/go.mod index d053e58..a68509e 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,11 @@ module github.com/polynetwork/poly-io-test go 1.14 require ( + github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210224095650-0f974c79345b // indirect github.com/btcsuite/btcd v0.20.1-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/ethereum/go-ethereum v1.9.24 github.com/google/go-cmp v0.5.2 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/joeqian10/neo-gogogo v0.0.0-20200811090937-d8aab8600241 @@ -30,7 +31,7 @@ require ( gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect ) -replace github.com/polynetwork/eth-contracts => github.com/zouxyan/eth-contracts v0.0.0-20201215112041-6532ab4e12f4 +replace github.com/polynetwork/eth-contracts => github.com/zouxyan/eth-contracts v0.0.0-20210115072359-e4cac6edc20c replace github.com/polynetwork/poly => github.com/zhiqiangxu/poly v0.0.0-20201216075543-df86073d2575 diff --git a/go.sum b/go.sum index c4458c2..4044224 100644 --- a/go.sum +++ b/go.sum @@ -17,6 +17,7 @@ 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/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 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= @@ -40,6 +41,8 @@ github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/ github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= +github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210224095650-0f974c79345b h1:vE7Bhxe291jW59cW278jpoNnfqK03FYMQ5+fKgVrVKY= +github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210224095650-0f974c79345b/go.mod h1:pFTR1kiObhgi/4GYERw7/WHz+P5BD7ecE49uG12tqAY= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -72,11 +75,13 @@ 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.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= 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/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= +github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= @@ -147,9 +152,11 @@ github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8 github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= +github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a h1:mq+R6XEM6lJX5VlLyZIrUSP8tSuJp82xTK89hvBwJbU= github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= +github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= @@ -169,6 +176,8 @@ github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHj github.com/ethereum/go-ethereum v1.9.13/go.mod h1:qwN9d1GLyDh0N7Ab8bMGd0H9knaji2jOBm2RrMGjXls= github.com/ethereum/go-ethereum v1.9.15 h1:wrWl+QrtutRUJ9LZXdUqBoGoo2b1tOCYRDrAOQhCY3A= github.com/ethereum/go-ethereum v1.9.15/go.mod h1:slT8bPPRhXsyNTwHQxrOnjuTZ1sDXRajW11EkJ84QJ0= +github.com/ethereum/go-ethereum v1.9.24 h1:6AK+ORt3EMDO+FTjzXy/AQwHMbu52J2nYHIjyQX9azQ= +github.com/ethereum/go-ethereum v1.9.24/go.mod h1:JIfVb6esrqALTExdz9hRYvrP0xBDf6wCncIu1hNwHpM= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= @@ -186,6 +195,8 @@ github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVB github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gcash/bchd v0.14.7/go.mod h1:Gk/O1ktRVW5Kao0RsnVXp3bWxeYQadqawZ1Im9HE78M= @@ -251,9 +262,13 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W 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.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26 h1:lMm2hD9Fy0ynom5+85/pbdkiYcBqM1JWmhpAXLmy0fw= +github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -266,9 +281,12 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -327,6 +345,8 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/holiman/uint256 v1.1.1 h1:4JywC80b+/hSfljFlEBLHrrh+CIONLDz9NuFl0af4Mw= +github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -443,6 +463,7 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= 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/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -454,13 +475,19 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b h1:UQDN12BzdWhXQL0t2QcRixHqAIG+JKNvQ20DhrIODtU= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b/go.mod h1:J0eVc7BEMmVVXbGv9PHoxjRSEwOwLr0qfzPk8Rdl5iw= +github.com/ontio/ontology v1.10.0/go.mod h1:iok/imHJVQXi5/Yr88dcbrKBRHGdiota1ZC6qh6l6Rc= github.com/ontio/ontology v1.11.0/go.mod h1:Qw74bfTBlIQka+jQX4nXuWvyOYGGt368/V7XFxaf4tY= +github.com/ontio/ontology v1.11.1-0.20200812075204-26cf1fa5dd47/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= github.com/ontio/ontology v1.11.1-0.20200817111815-fb3d61fdc12e/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c h1:Q2PShm6Hu83e7p7UKE7SgMIxW6WRNyymgI738KMKlKE= github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= @@ -468,6 +495,7 @@ github.com/ontio/ontology-crypto v1.0.9 h1:6fxBsz3W4CcdJk4/9QO7j0Qq7NdlP2ixPrViu github.com/ontio/ontology-crypto v1.0.9/go.mod h1:h/jeqqb9Ma/Leszxqh6zY3eTF2yks44hyRKikMni+YQ= github.com/ontio/ontology-eventbus v0.9.1 h1:nt3AXWx3gOyqtLiU4EwI92Yc4ik/pWHu9xRK15uHSOs= github.com/ontio/ontology-eventbus v0.9.1/go.mod h1:hCQIlbdPckcfykMeVUdWrqHZ8d30TBdmLfXCVWGkYhM= +github.com/ontio/ontology-go-sdk v1.11.4/go.mod h1:fRhHYhFfYiUuIlTVtcXLVziiXOneBwVCSAX72+N7XVI= github.com/ontio/ontology-go-sdk v1.11.9-0.20200819065441-7c4b7a8330f6 h1:Mg3uDLhUqbTyCDQLFxEGXRd8xTk587sobcQ87MpsNdQ= 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= @@ -518,6 +546,7 @@ github.com/polynetwork/poly v1.11.0 h1:1xEWr9z9/TCs/XM7eXBTmF2RT061G1zTumqAVdjzR github.com/polynetwork/poly-go-sdk v0.0.0-20200722030827-6875b6018b93/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493 h1:wob4aH5NxiDFIOWlpKbmoIb88QOccDNa1+rl93czjr8= github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= +github.com/polynetwork/poly-io-test v0.0.0-20200819093740-8cf514b07750/go.mod h1:Y/xz9uHdO0HPz0p+x0bZxNuo1ufVcln3dDjmchSUgso= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -573,6 +602,8 @@ github.com/scylladb/go-set v1.0.2/go.mod h1:DkpGd78rljTxKAnTDPFqXSGxvETQnJyuSOQw github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v2.20.5-0.20200531151128-663af789c085+incompatible h1:+gAR1bMhuoQnZMTWFIvp7ukynULPsteLzG+siZKLtD8= github.com/shirou/gopsutil v2.20.5-0.20200531151128-663af789c085+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v2.20.5+incompatible h1:tYH07UPoQt0OCQdgWWMgYHy3/a9bcxNpBIysykNIP7I= +github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= 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= @@ -630,6 +661,8 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= +github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= +github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= @@ -669,14 +702,20 @@ github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 h1:1cngl9mPEoITZG8s8 github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/ybbus/jsonrpc v2.1.2+incompatible h1:V4mkE9qhbDQ92/MLMIhlhMSbz8jNXdagC3xBR5NDwaQ= +github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= github.com/zhiqiangxu/poly v0.0.0-20201216075543-df86073d2575 h1:6jmxr8/1WR2HdLPugksSPwOfUnQLlqrD/b9A/r3o/Ig= github.com/zhiqiangxu/poly v0.0.0-20201216075543-df86073d2575/go.mod h1:SrFSYe/3uWkouGvoSGkjDPm5sNT95dSFZkQtXRun148= +github.com/zhiqiangxu/poly v0.0.0-20210224100133-c34ee4015214 h1:CY0A/yDW1X/PL7TJxf4s6AWKMjPMWauok1Dg/oU8tU8= +github.com/zhiqiangxu/poly v0.0.0-20210224100133-c34ee4015214/go.mod h1:rYsyjG/DIHtYexF51WvuqC2NlfS4zxCrCnOzrRxKGLs= github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 h1:Ogrd4dHjyNDNSLY6+89OfR1flM1CGI2CSee7QoXUYdU= github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zouxyan/eth-contracts v0.0.0-20201215112041-6532ab4e12f4 h1:A+kC+RAocm9jwmwxUqzBYSbCMsz4bI7JBNT+uYzC6NY= github.com/zouxyan/eth-contracts v0.0.0-20201215112041-6532ab4e12f4/go.mod h1:7+sPWP1/qbE3V8HbByvuoIJpBZ0TWZF50xHAJIXQ1pA= +github.com/zouxyan/eth-contracts v0.0.0-20210115072359-e4cac6edc20c h1:3gzrpowqz7P1Uj7l/DqiYGBWLi+dvjzjjjxxzSIvVCI= +github.com/zouxyan/eth-contracts v0.0.0-20210115072359-e4cac6edc20c/go.mod h1:7+sPWP1/qbE3V8HbByvuoIJpBZ0TWZF50xHAJIXQ1pA= github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1 h1:1qKTeMTSIEvRIjvVYzgcRp0xVp0eoiRTTiHSncb5gD8= github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1/go.mod h1:bslhAiUxakrA6z6CHmVyvkfpnxx18RJBwVyx2TluJWw= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -716,13 +755,20 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh 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/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 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= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -749,7 +795,10 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 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-20200520004742-59133d7f0dd7/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-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +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/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -776,8 +825,11 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -786,6 +838,10 @@ golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7w 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-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8 h1:AvbQYmiaaaza3cW3QXRyPo5kYgpFIzOAfeAAN7m3qQ4= +golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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= @@ -803,6 +859,7 @@ golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -810,7 +867,9 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -855,6 +914,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE 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= @@ -874,7 +935,9 @@ gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHN gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200316214253-d7b0ff38cac9/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc h1:17cdygvFw3DEyNMh81Bk687W74d5pcC5qEKQICv9N6g= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= From 0fb4bf0f47a41a1e1a232aeed5978fd73d1ada3c Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Tue, 2 Mar 2021 22:35:36 +0800 Subject: [PATCH 21/96] chore: remove testcode --- config/config.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/config.go b/config/config.go index f98875a..e7df4bc 100644 --- a/config/config.go +++ b/config/config.go @@ -209,8 +209,6 @@ func NewTestConfig() *TestConfig { func NewDefaultTestConfig() *TestConfig { var config = NewTestConfig() - // todo delete me - config.ZilChainId = 9 err := config.Init(DefaultConfigFile) if err != nil { return &TestConfig{} From c370cc32611317223644bec03dd2403a431ce1f0 Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Tue, 2 Mar 2021 22:48:33 +0800 Subject: [PATCH 22/96] fix: register ccmc address --- cmd/tools/run.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index b798bf1..373bed8 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -1205,9 +1205,9 @@ func RegisterZIL(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { extraBytes, _ := json.Marshal(extra) // todo cross chain manger or its proxy - eccd, err := hex.DecodeString(strings.Replace(config.DefConfig.ZilEccdProxy, "0x", "", 1)) + eccd, err := hex.DecodeString(strings.Replace(config.DefConfig.ZilEccdImpl, "0x", "", 1)) if err != nil { - panic(fmt.Errorf("RegisterZIL, failed to decode eccd '%s' : %v", config.DefConfig.ZilEccdProxy, err)) + panic(fmt.Errorf("RegisterZIL, failed to decode eccd '%s' : %v", config.DefConfig.ZilEccdImpl, err)) } txhash, err := poly.Native.Scm.RegisterSideChainExt(acc.Address, config.DefConfig.ZilChainId, 9, "zil", From 23168ead1751e3ac12f8d3a3e48d1514fec61dce Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Tue, 2 Mar 2021 22:54:29 +0800 Subject: [PATCH 23/96] chore: update config file --- config.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config.json b/config.json index f2be010..96048ad 100644 --- a/config.json +++ b/config.json @@ -17,7 +17,10 @@ "BtcExistingVendorPrivks": "cTqbqaR...wY6QSag,cT2HP4Q...PXH9Jk2ua,cSQmGg6...9mWzTxEY5A,cPYAx61...zPSbkkZqrzQ5b,cVV9Umt...qvwD5zg,cNK7Bw...oq1vWau8,cUZdDF9s...RePVbQTZ", "EthURL": "http://ethereum_node", "ETHPrivateKey": "AEE6358...A2608A9", - "ZilURL": "https://dev-api.zilliqa.vom", + "ZilURL": "https://zilliqa", + "ZilPrivateKey": "", + "ZilEccdProxy": "", + "ZilEccdImpl": "", "OntJsonRpcAddress": "http://ontology:20336", "OntWallet": ".wallets/ont_dev.dat", "OntWalletPassword": "admin", From 808fb29669a321f1d191852a366cc69c789a040e Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Wed, 3 Mar 2021 10:08:21 +0800 Subject: [PATCH 24/96] chore: recovery some default config --- config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.json b/config.json index 96048ad..2a0642a 100644 --- a/config.json +++ b/config.json @@ -37,8 +37,8 @@ "CMCrossChainId": 5, "CMEpoch": 1, "RCWallet": ".wallets/wallet.dat", - "RCWalletPwd": "xiaohuo110", - "RchainJsonRpcAddress": "http://138.91.6.226:40336", + "RCWalletPwd": "", + "RchainJsonRpcAddress": "http://poly:20336", "RCEpoch": 0, "ReportInterval": 60, "ReportDir": "./report", From 7acc0091d8f5bbb7b96ba5c72533849ef7b0450b Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Wed, 3 Mar 2021 13:00:29 +0800 Subject: [PATCH 25/96] fix: one node's ipaddr --- cmd/tools/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 373bed8..f3ba7c3 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -601,7 +601,7 @@ func SyncZILGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou initDsBlockNum = "1" initTxBlockNum = "1" - ipAndAddr, _ := new(big.Int).SetString("2390748178", 10) + ipAndAddr, _ := new(big.Int).SetString("875154230", 10) dsComm = []core.PairOfNode{ { PubKey: "02105342331FCD7CA95648DF8C5373C596982544F35E90849B1E619DFC59F03D48", From 8969b702b52a810ec769de767e9220a0401929cd Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Wed, 3 Mar 2021 15:04:15 +0800 Subject: [PATCH 26/96] chore: update zilliqa sdk version --- go.mod | 4 +-- go.sum | 88 ++-------------------------------------------------------- 2 files changed, 4 insertions(+), 88 deletions(-) diff --git a/go.mod b/go.mod index a68509e..2a570a0 100644 --- a/go.mod +++ b/go.mod @@ -3,11 +3,11 @@ module github.com/polynetwork/poly-io-test go 1.14 require ( - github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210224095650-0f974c79345b // indirect + github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210303070214-e9f060dd9677 github.com/btcsuite/btcd v0.20.1-beta github.com/btcsuite/btcutil v1.0.2 github.com/cosmos/cosmos-sdk v0.39.1 - github.com/ethereum/go-ethereum v1.9.24 + github.com/ethereum/go-ethereum v1.9.15 github.com/google/go-cmp v0.5.2 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/joeqian10/neo-gogogo v0.0.0-20200811090937-d8aab8600241 diff --git a/go.sum b/go.sum index 4044224..db9dc8d 100644 --- a/go.sum +++ b/go.sum @@ -15,7 +15,6 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= 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/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200102211924-4bcbc698314f/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= @@ -31,25 +30,24 @@ github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdII github.com/OpenBazaar/jsonpb v0.0.0-20171123000858-37d32ddf4eef/go.mod h1:55mCznBcN9WQgrtgaAkv+p2LxeW/tQRdidyyE9D0I5k= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.5.3/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE= github.com/VictoriaMetrics/fastcache v1.5.7 h1:4y6y0G8PRzszQUYIQHHssv/jgPHAb5qQuuDNdCbyAgw= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= -github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210224095650-0f974c79345b h1:vE7Bhxe291jW59cW278jpoNnfqK03FYMQ5+fKgVrVKY= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210224095650-0f974c79345b/go.mod h1:pFTR1kiObhgi/4GYERw7/WHz+P5BD7ecE49uG12tqAY= +github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210303070214-e9f060dd9677 h1:BczNHdGYMiLdVgENX9cNkza+b24gIHUx6iNygpxtG4c= +github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210303070214-e9f060dd9677/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -88,17 +86,14 @@ github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3L github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/goleveldb v1.0.0 h1:Tvd0BfvqX9o823q1j2UZ/epQo09eJh6dTcRp79ilIN4= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE= 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/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -108,7 +103,6 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= -github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e h1:0XBUw73chJ1VYSsfvcPvVT7auykAJce9FpRr10L6Qhw= github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:P13beTBKr5Q18lJe1rIoLUqjM+CB1zYrRg44ZqGuQSA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -127,16 +121,13 @@ github.com/cosmos/cosmos-sdk v0.39.1 h1:vhjf9PZh9ph8btAj9aBpHoVITgVVjNBpM3x5Gl/V github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= -github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= -github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -160,7 +151,6 @@ github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c h1:JHHhtb9XWJrGNMcrVP6vyzO4dusgi/HnceHTgxSejUM= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= @@ -178,18 +168,13 @@ github.com/ethereum/go-ethereum v1.9.15 h1:wrWl+QrtutRUJ9LZXdUqBoGoo2b1tOCYRDrAO github.com/ethereum/go-ethereum v1.9.15/go.mod h1:slT8bPPRhXsyNTwHQxrOnjuTZ1sDXRajW11EkJ84QJ0= github.com/ethereum/go-ethereum v1.9.24 h1:6AK+ORt3EMDO+FTjzXy/AQwHMbu52J2nYHIjyQX9azQ= github.com/ethereum/go-ethereum v1.9.24/go.mod h1:JIfVb6esrqALTExdz9hRYvrP0xBDf6wCncIu1hNwHpM= -github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= -github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= -github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc h1:jtW8jbpkO4YirRSyepBOH8E+2HEw6/hKkBvFPwhUN8c= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= @@ -201,7 +186,6 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqG github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gcash/bchd v0.14.7/go.mod h1:Gk/O1ktRVW5Kao0RsnVXp3bWxeYQadqawZ1Im9HE78M= github.com/gcash/bchd v0.15.2/go.mod h1:k9wIjgwnhbrAw+ruIPZ2tHZMzfFNdyUnORZZX7lqXGY= -github.com/gcash/bchd v0.16.4/go.mod h1:gR67ljCexTNwbKYN3wjbRHi9lYLp4rMomy1UQ3E1USA= github.com/gcash/bchd v0.16.5 h1:hkLUecfvcf2wf5vy05vp5X0OG9I5xWKnxdHU2/KI8PM= github.com/gcash/bchd v0.16.5/go.mod h1:gR67ljCexTNwbKYN3wjbRHi9lYLp4rMomy1UQ3E1USA= github.com/gcash/bchlog v0.0.0-20180913005452-b4f036f92fa6 h1:3pZvWJ8MSfWstGrb8Hfh4ZpLyZNcXypcGx2Ju4ZibVM= @@ -214,7 +198,6 @@ github.com/gcash/bchutil v0.0.0-20200506001747-c2894cd54b33/go.mod h1:wB++2ZcHUv github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= @@ -223,7 +206,6 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= @@ -246,7 +228,6 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129 h1:tT8iWCYw4uOem71yYA3htfH+LNopJvcqZQshm56G5L4= github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= @@ -260,7 +241,6 @@ 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= @@ -276,24 +256,19 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= 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= @@ -304,7 +279,6 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gosuri/uilive v0.0.3/go.mod h1:qkLSc0A5EXSP6B04TrN4oQoxqFI7A8XvoXSlJi8cwk8= -github.com/gosuri/uilive v0.0.4/go.mod h1:V/epo5LjjlDE5RJUcqx8dbw+zc93y5Ya3yg8tfZ74VI= github.com/gosuri/uiprogress v0.0.1/go.mod h1:C1RTYn4Sc7iEyf6j8ft5dyoZ4212h8G1ol9QQluh5+0= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -348,7 +322,6 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/holiman/uint256 v1.1.1 h1:4JywC80b+/hSfljFlEBLHrrh+CIONLDz9NuFl0af4Mw= github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= @@ -357,7 +330,6 @@ github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7 github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/improbable-eng/grpc-web v0.9.1/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= github.com/improbable-eng/grpc-web v0.12.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= @@ -369,9 +341,7 @@ github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M github.com/jessevdk/go-flags v0.0.0-20181221193153-c0795c8afcf4/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/joeqian10/neo-gogogo v0.0.0-20200611102831-c17de5e1f0f8/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= github.com/joeqian10/neo-gogogo v0.0.0-20200716075409-923bd4879b43/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= github.com/joeqian10/neo-gogogo v0.0.0-20200811090937-d8aab8600241 h1:kfTkgo18r3VFWrr3z8arDU05yHiX/nU1ZaDgEApinMo= github.com/joeqian10/neo-gogogo v0.0.0-20200811090937-d8aab8600241/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= @@ -381,13 +351,11 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356 h1:I/yrLt2WilKxlQKCM52clh5rGzTKpVctGT1lH4Dc8Jw= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -397,12 +365,9 @@ github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec/go.mod h1:J+Gs4SYgM6 github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 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/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= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= @@ -415,7 +380,6 @@ github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.0 h1:v2XXALHHh6zHfYTJ+cSkwtyffnaOyR1MXaA91mTrb8o= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= @@ -434,7 +398,6 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/minio/highwayhash v1.0.0 h1:iMSDhgUILCr0TNm8LWlSjF8N0ZIj2qbO8WHp6Q/J2BA= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -461,7 +424,6 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -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/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= @@ -473,21 +435,17 @@ github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c h1:1RHs3t github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b h1:UQDN12BzdWhXQL0t2QcRixHqAIG+JKNvQ20DhrIODtU= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b/go.mod h1:J0eVc7BEMmVVXbGv9PHoxjRSEwOwLr0qfzPk8Rdl5iw= -github.com/ontio/ontology v1.10.0/go.mod h1:iok/imHJVQXi5/Yr88dcbrKBRHGdiota1ZC6qh6l6Rc= github.com/ontio/ontology v1.11.0/go.mod h1:Qw74bfTBlIQka+jQX4nXuWvyOYGGt368/V7XFxaf4tY= -github.com/ontio/ontology v1.11.1-0.20200812075204-26cf1fa5dd47/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= github.com/ontio/ontology v1.11.1-0.20200817111815-fb3d61fdc12e/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c h1:Q2PShm6Hu83e7p7UKE7SgMIxW6WRNyymgI738KMKlKE= github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= @@ -495,12 +453,10 @@ github.com/ontio/ontology-crypto v1.0.9 h1:6fxBsz3W4CcdJk4/9QO7j0Qq7NdlP2ixPrViu github.com/ontio/ontology-crypto v1.0.9/go.mod h1:h/jeqqb9Ma/Leszxqh6zY3eTF2yks44hyRKikMni+YQ= github.com/ontio/ontology-eventbus v0.9.1 h1:nt3AXWx3gOyqtLiU4EwI92Yc4ik/pWHu9xRK15uHSOs= github.com/ontio/ontology-eventbus v0.9.1/go.mod h1:hCQIlbdPckcfykMeVUdWrqHZ8d30TBdmLfXCVWGkYhM= -github.com/ontio/ontology-go-sdk v1.11.4/go.mod h1:fRhHYhFfYiUuIlTVtcXLVziiXOneBwVCSAX72+N7XVI= github.com/ontio/ontology-go-sdk v1.11.9-0.20200819065441-7c4b7a8330f6 h1:Mg3uDLhUqbTyCDQLFxEGXRd8xTk587sobcQ87MpsNdQ= 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-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= @@ -536,17 +492,6 @@ github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666 h1:oV github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666/go.mod h1:U8rR9X6vemlkBAJWfvzwSoalcJjX8B2aQjB0kPRhBUA= github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759 h1:M0DV6MUVXOZtdQ94i8oYuSAX+ljzEe+mMqb2Llnm/oM= github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759/go.mod h1:VMBJZ8GSZeoWBntd/rWx2Rr5roRKofO7siP1qd6A6pY= -github.com/polynetwork/poly v0.0.0-20200710095239-0596a3d7afe5/go.mod h1:UzlGEWk0eCGsuMJOZfBoZjRbmu4Yw/SudKAIFe1gPnY= -github.com/polynetwork/poly v0.0.0-20200715030435-4f1d1a0adb44/go.mod h1:UzlGEWk0eCGsuMJOZfBoZjRbmu4Yw/SudKAIFe1gPnY= -github.com/polynetwork/poly v0.0.0-20201215081835-44303924f13c h1:FI45q7Ej3ROUDtmThE13AAGGJnNCLst/FEECFvW7fSw= -github.com/polynetwork/poly v0.0.0-20201215081835-44303924f13c/go.mod h1:GLCHH85w+7Ca5P65hAd2qHgt5Azg0yuODLqAOfV1UTU= -github.com/polynetwork/poly v0.0.0-20201216061550-50185057319d h1:XAQNgWfPcBofzQEz7bAYs3ypGAHgkWF7eUzk0BkdtyY= -github.com/polynetwork/poly v0.0.0-20201216061550-50185057319d/go.mod h1:SrFSYe/3uWkouGvoSGkjDPm5sNT95dSFZkQtXRun148= -github.com/polynetwork/poly v1.11.0 h1:1xEWr9z9/TCs/XM7eXBTmF2RT061G1zTumqAVdjzR+A= -github.com/polynetwork/poly-go-sdk v0.0.0-20200722030827-6875b6018b93/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= -github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493 h1:wob4aH5NxiDFIOWlpKbmoIb88QOccDNa1+rl93czjr8= -github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= -github.com/polynetwork/poly-io-test v0.0.0-20200819093740-8cf514b07750/go.mod h1:Y/xz9uHdO0HPz0p+x0bZxNuo1ufVcln3dDjmchSUgso= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -589,7 +534,6 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= @@ -607,11 +551,8 @@ github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= 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.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= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -663,7 +604,6 @@ github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+ github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= @@ -706,20 +646,14 @@ github.com/ybbus/jsonrpc v2.1.2+incompatible h1:V4mkE9qhbDQ92/MLMIhlhMSbz8jNXdag github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= github.com/zhiqiangxu/poly v0.0.0-20201216075543-df86073d2575 h1:6jmxr8/1WR2HdLPugksSPwOfUnQLlqrD/b9A/r3o/Ig= github.com/zhiqiangxu/poly v0.0.0-20201216075543-df86073d2575/go.mod h1:SrFSYe/3uWkouGvoSGkjDPm5sNT95dSFZkQtXRun148= -github.com/zhiqiangxu/poly v0.0.0-20210224100133-c34ee4015214 h1:CY0A/yDW1X/PL7TJxf4s6AWKMjPMWauok1Dg/oU8tU8= -github.com/zhiqiangxu/poly v0.0.0-20210224100133-c34ee4015214/go.mod h1:rYsyjG/DIHtYexF51WvuqC2NlfS4zxCrCnOzrRxKGLs= github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 h1:Ogrd4dHjyNDNSLY6+89OfR1flM1CGI2CSee7QoXUYdU= github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= -github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zouxyan/eth-contracts v0.0.0-20201215112041-6532ab4e12f4 h1:A+kC+RAocm9jwmwxUqzBYSbCMsz4bI7JBNT+uYzC6NY= -github.com/zouxyan/eth-contracts v0.0.0-20201215112041-6532ab4e12f4/go.mod h1:7+sPWP1/qbE3V8HbByvuoIJpBZ0TWZF50xHAJIXQ1pA= github.com/zouxyan/eth-contracts v0.0.0-20210115072359-e4cac6edc20c h1:3gzrpowqz7P1Uj7l/DqiYGBWLi+dvjzjjjxxzSIvVCI= github.com/zouxyan/eth-contracts v0.0.0-20210115072359-e4cac6edc20c/go.mod h1:7+sPWP1/qbE3V8HbByvuoIJpBZ0TWZF50xHAJIXQ1pA= github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1 h1:1qKTeMTSIEvRIjvVYzgcRp0xVp0eoiRTTiHSncb5gD8= github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1/go.mod h1:bslhAiUxakrA6z6CHmVyvkfpnxx18RJBwVyx2TluJWw= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -750,7 +684,6 @@ golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4/go.mod h1:LzIPMQfyMNhhGPh 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-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= @@ -843,14 +776,11 @@ golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8 h1:AvbQYmiaaaza3cW3QXRyPo5kYgpFIzOAfeAAN7m3qQ4= golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -872,9 +802,7 @@ golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/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= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -912,35 +840,26 @@ 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/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200316214253-d7b0ff38cac9/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc h1:17cdygvFw3DEyNMh81Bk687W74d5pcC5qEKQICv9N6g= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= @@ -951,17 +870,14 @@ 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= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= From a9f6e79aac36735b67e84657abe7e456b9c94cad Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Wed, 3 Mar 2021 15:41:55 +0800 Subject: [PATCH 27/96] fix(synczil): add 0x for raw header --- cmd/tools/run.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index f3ba7c3..7908c1c 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -684,7 +684,7 @@ func SyncZILGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou } } else { testcase.WaitPolyTx(txhash, poly) - log.Infof("successful to sync zil genesis header, ds block: %s, tx block: %s, ds comm: %+v\n", dsBlock.BlockHash, txBlock.BlockHash, dsComm) + log.Infof("successful to sync zil genesis header, ds block: %s, tx block: %s, ds comm: %+v\n", zilutil.EncodeHex(dsBlock.BlockHash[:]), zilutil.EncodeHex(txBlock.BlockHash[:]), dsComm) } // sycn poly network info to zilliqa cross chain manager @@ -710,7 +710,7 @@ func SyncZILGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou publickeys = append(publickeys, ont.GetOntNoCompressKey(key)...) } - genesisHeader := zilutil.EncodeHex(gB.Header.ToArray()) + genesisHeader := "0x" + zilutil.EncodeHex(gB.Header.ToArray()) genesisPubKey := zilutil.EncodeHex(publickeys) publicKeys, err := polynetwork.SplitPubKeys(genesisPubKey) From a6cff00034dfcb6aee60d1e65d287dbbc0560b65 Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Thu, 4 Mar 2021 19:11:50 +0800 Subject: [PATCH 28/96] chore(zil): ds node ip --- cmd/tools/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 7908c1c..751981c 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -601,7 +601,7 @@ func SyncZILGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou initDsBlockNum = "1" initTxBlockNum = "1" - ipAndAddr, _ := new(big.Int).SetString("875154230", 10) + ipAndAddr, _ := new(big.Int).SetString("3672036406", 10) dsComm = []core.PairOfNode{ { PubKey: "02105342331FCD7CA95648DF8C5373C596982544F35E90849B1E619DFC59F03D48", From 085527bd77779d39c77360cccb04cf8acb1bcf60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Mon, 15 Mar 2021 11:40:51 +0800 Subject: [PATCH 29/96] fix ide warning --- cmd/tools/run.go | 25 +++++++++++++------------ config/config.go | 6 +++--- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 751981c..253ae5f 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -24,15 +24,16 @@ import ( "encoding/json" "flag" "fmt" + "math/big" + "os" + "strconv" + "strings" + "github.com/Zilliqa/gozilliqa-sdk/account" "github.com/Zilliqa/gozilliqa-sdk/core" "github.com/Zilliqa/gozilliqa-sdk/crosschain/polynetwork" "github.com/Zilliqa/gozilliqa-sdk/provider" zilutil "github.com/Zilliqa/gozilliqa-sdk/util" - "math/big" - "os" - "strconv" - "strings" "github.com/btcsuite/btcd/wire" types3 "github.com/cosmos/cosmos-sdk/types" @@ -169,9 +170,9 @@ func main() { if RegisterBSC(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BscChainID, poly, accArr) } - case config.DefConfig.ZilChainId: + case config.DefConfig.ZilChainID: if RegisterZIL(poly, acc) { - ApproveRegisterSideChain(config.DefConfig.ZilChainId, poly, accArr) + ApproveRegisterSideChain(config.DefConfig.ZilChainID, poly, accArr) } case 0: if RegisterBtcChain(poly, acc) { @@ -193,7 +194,7 @@ func main() { ApproveRegisterSideChain(config.DefConfig.BscChainID, poly, accArr) } if RegisterZIL(poly, acc) { - ApproveRegisterSideChain(config.DefConfig.ZilChainId, poly, accArr) + ApproveRegisterSideChain(config.DefConfig.ZilChainID, poly, accArr) } } @@ -222,7 +223,7 @@ func main() { SyncCosmosGenesisHeader(poly, accArr) case config.DefConfig.BscChainID: SyncBSCGenesisHeader(poly, accArr) - case config.DefConfig.ZilChainId: + case config.DefConfig.ZilChainID: SyncZILGenesisHeader(poly, accArr) case 0: SyncBtcGenesisHeader(poly, acc) @@ -675,7 +676,7 @@ func SyncZILGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou } // sync zilliqa genesis info onto polynetwork - txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.ZilChainId, raw, accArr) + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.ZilChainID, raw, accArr) if err != nil { if strings.Contains(err.Error(), "had been initialized") { log.Info("zil already synced") @@ -1210,16 +1211,16 @@ func RegisterZIL(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { panic(fmt.Errorf("RegisterZIL, failed to decode eccd '%s' : %v", config.DefConfig.ZilEccdImpl, err)) } - txhash, err := poly.Native.Scm.RegisterSideChainExt(acc.Address, config.DefConfig.ZilChainId, 9, "zil", + txhash, err := poly.Native.Scm.RegisterSideChainExt(acc.Address, config.DefConfig.ZilChainID, 9, "zil", blkToWait, eccd, extraBytes, acc) if err != nil { if strings.Contains(err.Error(), "already registered") { - log.Infof("zil chain %d already registered", config.DefConfig.ZilChainId) + log.Infof("zil chain %d already registered", config.DefConfig.ZilChainID) return false } if strings.Contains(err.Error(), "already requested") { - log.Infof("zil chain %d already requested", config.DefConfig.ZilChainId) + log.Infof("zil chain %d already requested", config.DefConfig.ZilChainID) return true } panic(fmt.Errorf("RegisterZIL failed: %v", err)) diff --git a/config/config.go b/config/config.go index e7df4bc..c353092 100644 --- a/config/config.go +++ b/config/config.go @@ -44,7 +44,7 @@ type TestConfig struct { OntChainID uint64 NeoChainID uint64 BscChainID uint64 - ZilChainId uint64 + ZilChainID uint64 BtcRestAddr string BtcRestUser string @@ -72,7 +72,7 @@ type TestConfig struct { BSCPrivateKey string // zil urls - ZilURL string + ZilURL string ZilPrivateKey string // ontology @@ -131,7 +131,7 @@ type TestConfig struct { // zil contracts ZilEccdProxy string - ZilEccdImpl string + ZilEccdImpl string // eth contracts: auto set after deploy EthBnb string From de7937f7ebbc0739b442e3c37dde7937da418787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Mon, 15 Mar 2021 22:28:45 +0800 Subject: [PATCH 30/96] add msc --- chains/eth/eth_invoker.go | 8 + cmd/cctest/main.go | 8 + cmd/msc_deployer/run.go | 378 +++++++++++++++++++++++++++++ cmd/tools/run.go | 131 ++++++++++ config/config.go | 20 ++ go.mod | 2 +- go.sum | 19 ++ testcase/init.go | 1 + testcase/method.go | 53 ++++ testcase/testcase.go | 17 ++ testframework/check.go | 4 + testframework/framework.go | 11 +- testframework/framework_context.go | 4 +- 13 files changed, 653 insertions(+), 3 deletions(-) create mode 100644 cmd/msc_deployer/run.go diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index a0164d5..a02d058 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -71,6 +71,8 @@ func (ethInvoker *EInvoker) url() string { switch ethInvoker.ChainID { case ethInvoker.TConfiguration.BscChainID: return ethInvoker.TConfiguration.BSCURL + case ethInvoker.TConfiguration.MscChainID: + return ethInvoker.TConfiguration.MSCURL case ethInvoker.TConfiguration.EthChainID: return ethInvoker.TConfiguration.EthURL default: @@ -82,6 +84,8 @@ func (ethInvoker *EInvoker) privateKey() string { switch ethInvoker.ChainID { case ethInvoker.TConfiguration.BscChainID: return ethInvoker.TConfiguration.BSCPrivateKey + case ethInvoker.TConfiguration.MscChainID: + return ethInvoker.TConfiguration.MSCPrivateKey case ethInvoker.TConfiguration.EthChainID: return ethInvoker.TConfiguration.ETHPrivateKey default: @@ -209,12 +213,16 @@ func (ethInvoker *EInvoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetH toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.BscChainID { toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.MscChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.NeoChainID { other, err := helper.UInt160FromString(toAssetHash) if err != nil { return nil, err } toAddr = other[:] + } else { + panic(fmt.Sprintf("unkown toChainId:%d", toChainId)) } tx, err := contract.BindAssetHash(auth, ethComm.HexToAddress(fromAssetHash), uint64(toChainId), toAddr[:]) diff --git a/cmd/cctest/main.go b/cmd/cctest/main.go index 3738d80..eb22910 100644 --- a/cmd/cctest/main.go +++ b/cmd/cctest/main.go @@ -64,6 +64,7 @@ func main() { var ( ethInvoker *eth.EInvoker bscInvoker *eth.EInvoker + mscInvoker *eth.EInvoker ) if config.DefConfig.EthChainID > 0 { ethInvoker = eth.NewEInvoker(config.DefConfig.EthChainID) @@ -73,6 +74,10 @@ func main() { bscInvoker = eth.NewEInvoker(config.DefConfig.BscChainID) } + if config.DefConfig.MscChainID > 0 { + mscInvoker = eth.NewEInvoker(config.DefConfig.MscChainID) + } + //btcInvoker, err := btc.NewBtcInvoker(config.DefConfig.RchainJsonRpcAddress, config.DefConfig.RCWallet, // config.DefConfig.RCWalletPwd, config.DefConfig.BtcRestAddr, config.DefConfig.BtcRestUser, // config.DefConfig.BtcRestPwd, config.DefConfig.BtcSignerPrivateKey) @@ -104,6 +109,9 @@ func main() { if bscInvoker != nil { testframework.TFramework.SetBSCInvoker(bscInvoker) } + if mscInvoker != nil { + testframework.TFramework.SetMSCInvoker(mscInvoker) + } //testframework.TFramework.SetBtcInvoker(btcInvoker) testframework.TFramework.SetOntInvoker(ontInvoker) testframework.TFramework.SetCosmosInvoker(cmInvoker) diff --git a/cmd/msc_deployer/run.go b/cmd/msc_deployer/run.go new file mode 100644 index 0000000..ded26e6 --- /dev/null +++ b/cmd/msc_deployer/run.go @@ -0,0 +1,378 @@ +/* +* Copyright (C) 2020 The poly network Authors +* This file is part of The poly network library. +* +* The poly network is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* The poly network is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* You should have received a copy of the GNU Lesser General Public License +* along with The poly network . If not, see . + */ +package main + +import ( + "encoding/hex" + "flag" + "fmt" + + common2 "github.com/ethereum/go-ethereum/common" + "github.com/joeqian10/neo-gogogo/helper" + "github.com/ontio/ontology/common" + "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/config" +) + +var ( + fnEth string + ethConfFile string + eccmRedeploy int +) + +func init() { + flag.StringVar(&fnEth, "func", "deploy", "choose function to run: deploy or setup") + flag.StringVar(ðConfFile, "conf", "./config.json", "config file path") + flag.IntVar(&eccmRedeploy, "redeploy_eccm", 1, "redeploy eccd, eccm and eccmp or not") + flag.Parse() +} + +func main() { + err := config.DefConfig.Init(ethConfFile) + if err != nil { + panic(err) + } + + switch fnEth { + case "deploy": + DeployETHSmartContract() + case "setup": + SetUpEthContracts() + } +} + +func DeployETHSmartContract() { + invoker := eth.NewEInvoker(config.DefConfig.MscChainID) + var ( + eccdAddr common2.Address + eccmAddr common2.Address + eccmpAddr common2.Address + err error + ) + if eccmRedeploy == 1 { + eccdAddr, _, err = invoker.DeployEthChainDataContract() + if err != nil { + panic(err) + } + + eccmAddr, _, err = invoker.DeployECCMContract(eccdAddr.Hex()) + if err != nil { + panic(err) + } + eccmpAddr, _, err = invoker.DeployECCMPContract(eccmAddr.Hex()) + if err != nil { + panic(err) + } + _, err = invoker.TransferOwnershipForECCD(eccdAddr.Hex(), eccmAddr.Hex()) + if err != nil { + panic(err) + } + _, err = invoker.TransferOwnershipForECCM(eccmAddr.Hex(), eccmpAddr.Hex()) + if err != nil { + panic(err) + } + } else { + eccdAddr = common2.HexToAddress(config.DefConfig.MscEccd) + eccmAddr = common2.HexToAddress(config.DefConfig.MscEccm) + eccmpAddr = common2.HexToAddress(config.DefConfig.MscEccmp) + } + + lockProxyAddr, _, err := invoker.DeployLockProxyContract(eccmpAddr) + if err != nil { + panic(err) + } + + lockproxyAddrHex := lockProxyAddr.Hex() + erc20Addr, erc20, err := invoker.DeployERC20() + if err != nil { + panic(err) + } + + total, err := erc20.TotalSupply(nil) + if err != nil { + panic(fmt.Errorf("failed to get total supply for erc20: %v", err)) + } + auth, _ := invoker.MakeSmartContractAuth() + tx, err := erc20.Approve(auth, lockProxyAddr, total) + if err != nil { + panic(fmt.Errorf("failed to approve erc20 to lockproxy: %v", err)) + } + invoker.ETHUtil.WaitTransactionConfirm(tx.Hash()) + + oep4Addr, _, err := invoker.DeployOEP4(lockproxyAddrHex) + if err != nil { + panic(err) + } + ongxAddr, _, err := invoker.DeployONGXContract(lockproxyAddrHex) + if err != nil { + panic(err) + } + ontxAddr, _, err := invoker.DeployONTXContract(lockproxyAddrHex) + if err != nil { + panic(err) + } + + fmt.Println("=============================ETH info=============================") + fmt.Println("msc erc20:", erc20Addr.Hex()) + fmt.Println("msc ope4:", oep4Addr.Hex()) + fmt.Println("msc eccd address:", eccdAddr.Hex()) + fmt.Println("msc eccm address:", eccmAddr.Hex()) + fmt.Println("msc eccmp address:", eccmpAddr.Hex()) + fmt.Println("msc lock proxy address: ", lockProxyAddr.Hex()) + fmt.Println("msc ongx address: ", ongxAddr.Hex()) + fmt.Println("msc ontx proxy address: ", ontxAddr.Hex()) + fmt.Println("==================================================================") + + config.DefConfig.Mep20 = erc20Addr.Hex() + config.DefConfig.MscOep4 = oep4Addr.Hex() + config.DefConfig.MscEccd = eccdAddr.Hex() + config.DefConfig.MscEccm = eccmAddr.Hex() + config.DefConfig.MscEccmp = eccmpAddr.Hex() + config.DefConfig.MscLockProxy = lockProxyAddr.Hex() + config.DefConfig.MscOngx = ongxAddr.Hex() + config.DefConfig.MscOntx = ontxAddr.Hex() + + if err := config.DefConfig.Save(ethConfFile); err != nil { + panic(fmt.Errorf("failed to save config, you better save it youself: %v", err)) + } +} + +func SetupWBTC(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.MscLockProxy, config.DefConfig.MscWBTC, + config.DefConfig.OntWBTC, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupWBTC, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding WBTC of ontology on msc: ( txhash: %s )\n", hash.String()) +} + +func SetupDAI(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.MscLockProxy, config.DefConfig.MscDai, + config.DefConfig.OntDai, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupDAI, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding DAI of ontology on msc: ( txhash: %s )\n", hash.String()) +} + +func SetupUSDT(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.MscLockProxy, config.DefConfig.MscUSDT, + config.DefConfig.OntUSDT, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupUSDT, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding USDT of ontology on msc: ( txhash: %s )\n", hash.String()) +} + +func SetupUSDC(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.MscLockProxy, config.DefConfig.MscUSDC, + config.DefConfig.OntUSDC, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupUSDC, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding USDC of ontology on msc: ( txhash: %s )\n", hash.String()) +} + +func SetupOntAsset(invoker *eth.EInvoker) { + if config.DefConfig.MscLockProxy == "" { + panic(fmt.Errorf("MscLockProxy is blank")) + } + if config.DefConfig.MscOntx == "" { + panic(fmt.Errorf("MscOntx is blank")) + } + if config.DefConfig.MscOngx == "" { + panic(fmt.Errorf("MscOngx is blank")) + } + if config.DefConfig.MscOep4 == "" { + panic(fmt.Errorf("MscOep4 is blank")) + } + if config.DefConfig.OntOep4 == "" { + panic(fmt.Errorf("OntOep4 is blank")) + } + + txs, err := invoker.BindOntAsset(config.DefConfig.MscLockProxy, config.DefConfig.MscOntx, config.DefConfig.MscOngx, + config.DefConfig.MscOep4, config.DefConfig.OntOep4) + if err != nil { + panic(err) + } + hash1, hash2, hash3 := txs[0].Hash(), txs[1].Hash(), txs[2].Hash() + fmt.Printf("ont/ong/oep4 binding tx on ontology: %s/%s/%s\n", hash1.String(), hash2.String(), hash3.String()) + + hash4, hash5, hash6 := txs[3].Hash(), txs[4].Hash(), txs[5].Hash() + fmt.Printf("ont/ong/oep4 binding tx on cosmos: %s/%s/%s\n", hash4.String(), hash5.String(), hash6.String()) +} + +func SetupBnb(ethInvoker *eth.EInvoker) { + ethNativeAddr := "0x0000000000000000000000000000000000000000" + if config.DefConfig.OntBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.MscLockProxy, ethNativeAddr, config.DefConfig.OntBnb, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnbx of ontology on msc: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.EthBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.MscLockProxy, ethNativeAddr, config.DefConfig.EthBnb, config.DefConfig.EthChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnb of msc on ethereum: ( txhash: %s )\n", hash.String()) + } + if config.DefConfig.NeoBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.MscLockProxy, ethNativeAddr, config.DefConfig.NeoBnb, config.DefConfig.NeoChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2Neo, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnb of msc on neo: ( txhash: %s )\n", hash.String()) + } + + tx, err := ethInvoker.BindAssetHash(config.DefConfig.MscLockProxy, ethNativeAddr, config.CM_BNBX, config.DefConfig.CMCrossChainId, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2COSMOS, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnbx of cosmos on msc: ( txhash: %s )\n", hash.String()) + + tx, err = ethInvoker.BindAssetHash(config.DefConfig.MscLockProxy, ethNativeAddr, ethNativeAddr, config.DefConfig.MscChainID, 0) + if err != nil { + panic(fmt.Errorf("BindAssetHash, failed to bind asset hash: %v", err)) + } + hash = tx.Hash() + fmt.Printf("binding bnb of msc on msc: ( txhash: %s )\n", hash.String()) +} + +func SetOtherLockProxy(invoker *eth.EInvoker) { + _, contract, err := invoker.MakeLockProxy(config.DefConfig.MscLockProxy) + if err != nil { + panic(fmt.Errorf("failed to MakeLockProxy: %v", err)) + } + if config.DefConfig.OntLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other, err := common.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + panic(fmt.Errorf("failed to AddressFromHexString: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.OntChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %")) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding ont proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.CMLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + raw, err := hex.DecodeString(config.DefConfig.CMLockProxy) + if err != nil { + panic(fmt.Errorf("failed to decode: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.CMCrossChainId, raw) + if err != nil { + panic(fmt.Errorf("failed to bind COSMOS proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding cosmos proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.MscLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other := common2.HexToAddress(config.DefConfig.MscLockProxy) + tx, err := contract.BindProxyHash(auth, config.DefConfig.MscChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding msc proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.EthLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other := common2.HexToAddress(config.DefConfig.EthLockProxy) + tx, err := contract.BindProxyHash(auth, config.DefConfig.EthChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding eth proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.NeoLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) + if err != nil { + panic(fmt.Errorf("UInt160FromString error: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.NeoChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding neo proxy: ( txhash: %s )\n", hash.String()) + } +} + +func SetUpEthContracts() { + invoker := eth.NewEInvoker(config.DefConfig.MscChainID) + SetupBnb(invoker) + if config.DefConfig.OntLockProxy != "" { + SetupOntAsset(invoker) + } + if config.DefConfig.MscWBTC != "" { + SetupWBTC(invoker) + } + if config.DefConfig.MscDai != "" { + SetupDAI(invoker) + } + if config.DefConfig.MscUSDT != "" { + SetupUSDT(invoker) + } + + //SetupUSDC(invoker) + SetOtherLockProxy(invoker) +} diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 7c7fb16..25758a9 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -61,6 +61,7 @@ import ( "github.com/polynetwork/poly/native/service/governance/side_chain_manager" "github.com/polynetwork/poly/native/service/header_sync/bsc" "github.com/polynetwork/poly/native/service/header_sync/cosmos" + "github.com/polynetwork/poly/native/service/header_sync/msc" "github.com/polynetwork/poly/native/service/utils" "github.com/tendermint/tendermint/rpc/client/http" types2 "github.com/tendermint/tendermint/types" @@ -163,6 +164,10 @@ func main() { if RegisterBSC(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BscChainID, poly, accArr) } + case config.DefConfig.MscChainID: + if registerMSC(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.MscChainID, poly, accArr) + } case 0: if RegisterBtcChain(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BtcChainID, poly, accArr) @@ -182,6 +187,9 @@ func main() { if RegisterBSC(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BscChainID, poly, accArr) } + if registerMSC(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.MscChainID, poly, accArr) + } } case "sync_genesis_header": @@ -209,6 +217,8 @@ func main() { SyncCosmosGenesisHeader(poly, accArr) case config.DefConfig.BscChainID: SyncBSCGenesisHeader(poly, accArr) + case config.DefConfig.MscChainID: + SyncMSCGenesisHeader(poly, accArr) case 0: SyncBtcGenesisHeader(poly, acc) SyncEthGenesisHeader(poly, accArr) @@ -216,6 +226,7 @@ func main() { SyncCosmosGenesisHeader(poly, accArr) SyncNeoGenesisHeader(poly, accArr) SyncBSCGenesisHeader(poly, accArr) + SyncMSCGenesisHeader(poly, accArr) } case "update_btc": @@ -562,6 +573,84 @@ func SyncEthGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou log.Infof("successful to sync poly genesis header to Ethereum: ( txhash: %s )", tx.Hash().String()) } +func SyncMSCGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { + tool := eth.NewEthTools(config.DefConfig.MSCURL) + height, err := tool.GetNodeHeight() + if err != nil { + panic(err) + } + + epochHeight := height - height%30000 + + hdr, err := tool.GetBlockHeader(epochHeight) + if err != nil { + panic(err) + } + + if len(hdr.Extra) <= 65+32 { + panic(fmt.Sprintf("invalid epoch header at height:%d", epochHeight)) + } + + raw, err := json.Marshal(hdr) + if err != nil { + panic(err) + } + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.MscChainID, raw, accArr) + if err != nil { + if strings.Contains(err.Error(), "had been initialized") { + log.Info("msc already synced") + } else { + panic(fmt.Errorf("SyncMSCGenesisHeader failed: %v", err)) + } + } else { + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to sync msc genesis header to poly: (height: %d, blk_hash: %s, txhash: %s )", epochHeight, + hdr.Hash().String(), txhash.ToHexString()) + } + + eccmContract, err := eccm_abi.NewEthCrossChainManager(common3.HexToAddress(config.DefConfig.MscEccm), tool.GetEthClient()) + if err != nil { + panic(err) + } + signer, err := eth.NewEthSigner(config.DefConfig.MSCPrivateKey) + if err != nil { + panic(err) + } + nonce := eth.NewNonceManager(tool.GetEthClient()).GetAddressNonce(signer.Address) + gasPrice, err := tool.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + panic(fmt.Errorf("SyncBSCGenesisHeader, get suggest gas price failed error: %s", err.Error())) + } + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + auth := testcase.MakeEthAuth(signer, nonce, gasPrice.Uint64(), uint64(8000000)) + + 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)...) + } + + tx, err := eccmContract.InitGenesisBlock(auth, gB.Header.ToArray(), publickeys) + tool.WaitTransactionConfirm(tx.Hash()) + log.Infof("successful to sync poly genesis header to MSC: ( txhash: %s )", tx.Hash().String()) +} + func SyncBSCGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { tool := eth.NewEthTools(config.DefConfig.BSCURL) height, err := tool.GetNodeHeight() @@ -955,6 +1044,48 @@ func RegisterCosmos(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { } +func registerMSC(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + tool := eth.NewEthTools(config.DefConfig.MSCURL) + chainID, err := tool.GetChainID() + if err != nil { + panic(err) + } + + blkToWait := uint64(15) + extra := msc.ExtraInfo{ + ChainID: chainID, + Period: 15, + Epoch: 30000, + } + + extraBytes, _ := json.Marshal(extra) + + eccd, err := hex.DecodeString(strings.Replace(config.DefConfig.MscEccd, "0x", "", 1)) + if err != nil { + panic(fmt.Errorf("registerMSC, failed to decode eccd '%s' : %v", config.DefConfig.MscEccd, err)) + } + + fmt.Println("config.DefConfig.MSCChainID", config.DefConfig.MscChainID, "extraBytes", string(extraBytes), "MscEccd", config.DefConfig.MscEccd) + txhash, err := poly.Native.Scm.RegisterSideChainExt(acc.Address, config.DefConfig.MscChainID, 10, "msc", + blkToWait, eccd, extraBytes, acc) + if err != nil { + if strings.Contains(err.Error(), "already registered") { + log.Infof("bsc chain %d already registered", config.DefConfig.MscChainID) + return false + } + if strings.Contains(err.Error(), "already requested") { + log.Infof("bsc chain %d already requested", config.DefConfig.MscChainID) + return true + } + panic(fmt.Errorf("registerMSC failed: %v", err)) + } + + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to register msc chain: ( txhash: %s )", txhash.ToHexString()) + + return true +} + func RegisterBSC(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { tool := eth.NewEthTools(config.DefConfig.BSCURL) chainID, err := tool.GetChainID() diff --git a/config/config.go b/config/config.go index 904849e..c6c4127 100644 --- a/config/config.go +++ b/config/config.go @@ -44,6 +44,7 @@ type TestConfig struct { OntChainID uint64 NeoChainID uint64 BscChainID uint64 + MscChainID uint64 BtcRestAddr string BtcRestUser string @@ -66,6 +67,10 @@ type TestConfig struct { EthURL string ETHPrivateKey string + // msc urls + MSCURL string + MSCPrivateKey string + // bsc urls BSCURL string BSCPrivateKey string @@ -108,6 +113,21 @@ type TestConfig struct { // Circle batch TxNumPerBatch uint64 + // msc contracts: auto set after deploy + MscEccd string + MscEccm string + MscEccmp string + MscLockProxy string + Mep20 string + MscOep4 string + MscOngx string + MscOntx string + MscWBTC string + MscUSDT string + MscDai string + MscUSDC string + MscNeo string + MscRenBTC string // bsc contracts: auto set after deploy BscEccd string BscEccm string diff --git a/go.mod b/go.mod index d053e58..037ee99 100644 --- a/go.mod +++ b/go.mod @@ -32,6 +32,6 @@ require ( replace github.com/polynetwork/eth-contracts => github.com/zouxyan/eth-contracts v0.0.0-20201215112041-6532ab4e12f4 -replace github.com/polynetwork/poly => github.com/zhiqiangxu/poly v0.0.0-20201216075543-df86073d2575 +replace github.com/polynetwork/poly => github.com/zhiqiangxu/poly v0.0.0-20210315055227-f937bd40dbe9 replace github.com/polynetwork/poly-go-sdk => github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 diff --git a/go.sum b/go.sum index c4458c2..ca3905d 100644 --- a/go.sum +++ b/go.sum @@ -40,6 +40,8 @@ github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/ github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= +github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210304105042-c4327211a4ba h1:o5WzAWqRXTI8RMwkkS1DJsNg/8TQMk2Z19HaH3bmtOs= +github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210304105042-c4327211a4ba/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -72,11 +74,13 @@ 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.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= 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/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= +github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= @@ -251,6 +255,8 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W 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.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -269,6 +275,8 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -460,7 +468,9 @@ github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b h1:UQDN12BzdWhXQL0t2QcRixHqAIG+JKNvQ20DhrIODtU= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b/go.mod h1:J0eVc7BEMmVVXbGv9PHoxjRSEwOwLr0qfzPk8Rdl5iw= +github.com/ontio/ontology v1.10.0/go.mod h1:iok/imHJVQXi5/Yr88dcbrKBRHGdiota1ZC6qh6l6Rc= github.com/ontio/ontology v1.11.0/go.mod h1:Qw74bfTBlIQka+jQX4nXuWvyOYGGt368/V7XFxaf4tY= +github.com/ontio/ontology v1.11.1-0.20200812075204-26cf1fa5dd47/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= github.com/ontio/ontology v1.11.1-0.20200817111815-fb3d61fdc12e/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c h1:Q2PShm6Hu83e7p7UKE7SgMIxW6WRNyymgI738KMKlKE= github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= @@ -468,6 +478,7 @@ github.com/ontio/ontology-crypto v1.0.9 h1:6fxBsz3W4CcdJk4/9QO7j0Qq7NdlP2ixPrViu github.com/ontio/ontology-crypto v1.0.9/go.mod h1:h/jeqqb9Ma/Leszxqh6zY3eTF2yks44hyRKikMni+YQ= github.com/ontio/ontology-eventbus v0.9.1 h1:nt3AXWx3gOyqtLiU4EwI92Yc4ik/pWHu9xRK15uHSOs= github.com/ontio/ontology-eventbus v0.9.1/go.mod h1:hCQIlbdPckcfykMeVUdWrqHZ8d30TBdmLfXCVWGkYhM= +github.com/ontio/ontology-go-sdk v1.11.4/go.mod h1:fRhHYhFfYiUuIlTVtcXLVziiXOneBwVCSAX72+N7XVI= github.com/ontio/ontology-go-sdk v1.11.9-0.20200819065441-7c4b7a8330f6 h1:Mg3uDLhUqbTyCDQLFxEGXRd8xTk587sobcQ87MpsNdQ= 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= @@ -518,6 +529,7 @@ github.com/polynetwork/poly v1.11.0 h1:1xEWr9z9/TCs/XM7eXBTmF2RT061G1zTumqAVdjzR github.com/polynetwork/poly-go-sdk v0.0.0-20200722030827-6875b6018b93/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493 h1:wob4aH5NxiDFIOWlpKbmoIb88QOccDNa1+rl93czjr8= github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= +github.com/polynetwork/poly-io-test v0.0.0-20200819093740-8cf514b07750/go.mod h1:Y/xz9uHdO0HPz0p+x0bZxNuo1ufVcln3dDjmchSUgso= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -669,8 +681,11 @@ github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 h1:1cngl9mPEoITZG8s8 github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= github.com/zhiqiangxu/poly v0.0.0-20201216075543-df86073d2575 h1:6jmxr8/1WR2HdLPugksSPwOfUnQLlqrD/b9A/r3o/Ig= github.com/zhiqiangxu/poly v0.0.0-20201216075543-df86073d2575/go.mod h1:SrFSYe/3uWkouGvoSGkjDPm5sNT95dSFZkQtXRun148= +github.com/zhiqiangxu/poly v0.0.0-20210315055227-f937bd40dbe9 h1:wm4irkgb2+bDjNb8HoNT5o1yBxyW12T7Uh+AfwkuV9U= +github.com/zhiqiangxu/poly v0.0.0-20210315055227-f937bd40dbe9/go.mod h1:LSfP6ahqUcgpFOwVTXE4xx085QLurBFefeH5u2J2SQo= github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 h1:Ogrd4dHjyNDNSLY6+89OfR1flM1CGI2CSee7QoXUYdU= github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= @@ -750,6 +765,7 @@ 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/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/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -855,6 +871,8 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE 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= @@ -875,6 +893,7 @@ gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200316214253-d7b0ff38cac9/go.mod h1:uAJ gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc h1:17cdygvFw3DEyNMh81Bk687W74d5pcC5qEKQICv9N6g= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= diff --git a/testcase/init.go b/testcase/init.go index 802fd1d..65cb386 100644 --- a/testcase/init.go +++ b/testcase/init.go @@ -83,6 +83,7 @@ func init() { testframework.TFramework.RegTestCase("OntdToEthAndBack", OntdToEthAndBack) testframework.TFramework.RegTestCase("USDCCircle", USDCCircle) testframework.TFramework.RegTestCase("BnbToBsc", BnbToBsc) + testframework.TFramework.RegTestCase("MscMxToMsc", MscMxToMsc) testframework.TFramework.RegTestCase("EthToBsc", EthToBsc) testframework.TFramework.RegTestCase("EthEthToBscAndBack", EthEthToBscAndBack) testframework.TFramework.RegTestCase("BnbToEthAndBack", BnbToEthAndBack) diff --git a/testcase/method.go b/testcase/method.go index d38c81a..6d91995 100644 --- a/testcase/method.go +++ b/testcase/method.go @@ -2307,6 +2307,59 @@ func SendEthCrossNeo(ctx *testframework.TestFrameworkContext, status *testframew return nil } +func SendMxCrossMsc(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.MscInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendMxCrossMsc, get suggest gas price failed error: %s", err.Error()) + } + //gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendMxCrossMsc, abi.JSON error:" + err.Error()) + } + rawFrom := ctx.MscInvoker.EthTestSigner.Address.Bytes() + assetaddress := ethcommon.HexToAddress("0000000000000000000000000000000000000000") + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.MscChainID), rawFrom[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendMxCrossMsc, contractabi.Pack error:" + err.Error()) + } + + contractAddr := ethcommon.HexToAddress(config.DefConfig.MscLockProxy) + callMsg := ethereum.CallMsg{ + From: ctx.MscInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(amount)), Data: txData, + } + gasLimit, err := ctx.MscInvoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendMxCrossMsc, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.MscInvoker.NM.GetAddressNonce(ctx.MscInvoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendMxCrossMsc, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.MscInvoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendMxCrossMsc, types.SignTx error: %s", err.Error()) + } + + err = ctx.MscInvoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendMxCrossMsc, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"MxCrossMsc", time.Now()}) + WaitTransactionConfirm(ctx.MscInvoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + func SendBnbCrossBsc(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { gasPrice, err := ctx.BscInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) if err != nil { diff --git a/testcase/testcase.go b/testcase/testcase.go index 8dd6289..06ea06f 100644 --- a/testcase/testcase.go +++ b/testcase/testcase.go @@ -1262,6 +1262,23 @@ func EthEthToBscAndBack(ctx *testframework.TestFrameworkContext, status *testfra return true } +func MscMxToMsc(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.EthValLimit, 1) + if err := SendMxCrossMsc(ctx, status, amt); err != nil { + log.Errorf("MscMxToMsc, SendMxCrossMsc error: %v", err) + return false + } + log.Infof("MscMxToMsc, send %d mx to Msc, waiting for confirmation...", amt) + WaitUntilClean(status) + + log.Infof("MscMxToMsc, mx all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + func BnbToBsc(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { amt := GetRandAmount(config.DefConfig.EthValLimit, 1) diff --git a/testframework/check.go b/testframework/check.go index 14de683..ec8354a 100644 --- a/testframework/check.go +++ b/testframework/check.go @@ -107,6 +107,8 @@ func getInvoker(ctx *TestFrameworkContext, chainID uint64) *eth.EInvoker { return ctx.EthInvoker case config.DefConfig.BscChainID: return ctx.BscInvoker + case config.DefConfig.MscChainID: + return ctx.MscInvoker default: panic(fmt.Sprintf("unknown chain id:%d", chainID)) } @@ -118,6 +120,8 @@ func getEccm(chainID uint64) string { return config.DefConfig.Eccm case config.DefConfig.BscChainID: return config.DefConfig.BscEccm + case config.DefConfig.MscChainID: + return config.DefConfig.MscEccm default: panic(fmt.Sprintf("unknown chain id:%d", chainID)) } diff --git a/testframework/framework.go b/testframework/framework.go index 8588006..6fc4f0d 100644 --- a/testframework/framework.go +++ b/testframework/framework.go @@ -57,6 +57,7 @@ type TestFramework struct { // invokers ethInvoker *eth.EInvoker bscInvoker *eth.EInvoker + mscInvoker *eth.EInvoker btcInvoker *btc.BtcInvoker ontInvoker *ont.OntInvoker cosmosInvoker *cosmos.CosmosInvoker @@ -116,7 +117,7 @@ func (this *TestFramework) runTestList(testCaseList []TestCase, loopNumber int) this.onTestStart() defer this.onTestFinish(testCaseList) - ctx := NewTestFrameworkContext(this, testCaseList, this.rcSdk, this.ethInvoker, this.bscInvoker, this.btcInvoker, + ctx := NewTestFrameworkContext(this, testCaseList, this.rcSdk, this.ethInvoker, this.bscInvoker, this.mscInvoker, this.btcInvoker, this.ontInvoker, this.cosmosInvoker, this.neoInvoker) if this.ontInvoker != nil { go MonitorOnt(ctx) @@ -128,6 +129,9 @@ func (this *TestFramework) runTestList(testCaseList []TestCase, loopNumber int) if this.bscInvoker != nil { go MonitorEthLikeChain(ctx, config.DefConfig.BscChainID) } + if this.mscInvoker != nil { + go MonitorEthLikeChain(ctx, config.DefConfig.MscChainID) + } if this.btcInvoker != nil { go MonitorBtc(ctx) } @@ -180,6 +184,11 @@ func (this *TestFramework) SetBSCInvoker(invoker *eth.EInvoker) { this.bscInvoker = invoker } +//SetMSCInvoker instance to test framework +func (this *TestFramework) SetMSCInvoker(invoker *eth.EInvoker) { + this.mscInvoker = invoker +} + //SetBtcCli instance to test framework func (this *TestFramework) SetBtcInvoker(invoker *btc.BtcInvoker) { this.btcInvoker = invoker diff --git a/testframework/framework_context.go b/testframework/framework_context.go index 5bb95d5..a6ce6ff 100644 --- a/testframework/framework_context.go +++ b/testframework/framework_context.go @@ -38,6 +38,7 @@ type TestFrameworkContext struct { // invokers EthInvoker *eth.EInvoker BscInvoker *eth.EInvoker + MscInvoker *eth.EInvoker BtcInvoker *btc.BtcInvoker OntInvoker *ont.OntInvoker CMInvoker *cosmos.CosmosInvoker @@ -45,7 +46,7 @@ type TestFrameworkContext struct { } //NewTestFrameworkContext return a TestFrameworkContext instance -func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_go_sdk.PolySdk, eInvkr *eth.EInvoker, bscInvkr *eth.EInvoker, +func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_go_sdk.PolySdk, eInvkr *eth.EInvoker, bscInvkr *eth.EInvoker, mscInvkr *eth.EInvoker, btcInvkr *btc.BtcInvoker, ontInvkr *ont.OntInvoker, cmInvoker *cosmos.CosmosInvoker, neoInvoker *neo.NeoInvoker) *TestFrameworkContext { ctx := &TestFrameworkContext{ Framework: fw, @@ -53,6 +54,7 @@ func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_ RcSdk: rcSdk, EthInvoker: eInvkr, BscInvoker: bscInvkr, + MscInvoker: mscInvkr, BtcInvoker: btcInvkr, OntInvoker: ontInvkr, CMInvoker: cmInvoker, From 48932df7a3484332a5e8fde6946dfb68b7c31d70 Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Tue, 16 Mar 2021 19:48:42 +0800 Subject: [PATCH 31/96] feat(zil) contract deploy --- chains/zil/contracts/FungibleToken.scilla | 195 +++++++ chains/zil/contracts/LockProxy.scilla | 380 ++++++++++++++ .../zil/contracts/ZilCrossChainManager.scilla | 477 ++++++++++++++++++ .../ZilCrossChainManagerProxy.scilla | 145 ++++++ chains/zil/deployer.go | 163 ++++++ cmd/zil_deployer/run.go | 116 +++++ config/config.go | 4 + 7 files changed, 1480 insertions(+) create mode 100644 chains/zil/contracts/FungibleToken.scilla create mode 100644 chains/zil/contracts/LockProxy.scilla create mode 100644 chains/zil/contracts/ZilCrossChainManager.scilla create mode 100644 chains/zil/contracts/ZilCrossChainManagerProxy.scilla create mode 100644 chains/zil/deployer.go create mode 100644 cmd/zil_deployer/run.go diff --git a/chains/zil/contracts/FungibleToken.scilla b/chains/zil/contracts/FungibleToken.scilla new file mode 100644 index 0000000..0624fad --- /dev/null +++ b/chains/zil/contracts/FungibleToken.scilla @@ -0,0 +1,195 @@ +scilla_version 0 + +(***************************************************) +(* Associated library *) +(***************************************************) +import IntUtils +library FungibleToken + +let one_msg = + fun (msg : Message) => + let nil_msg = Nil {Message} in + Cons {Message} msg nil_msg + +let two_msgs = +fun (msg1 : Message) => +fun (msg2 : Message) => + let msgs_tmp = one_msg msg2 in + Cons {Message} msg1 msgs_tmp + +(* Error events *) +type Error = +| CodeIsSender +| CodeInsufficientFunds +| CodeInsufficientAllowance + +let make_error = + fun (result : Error) => + let result_code = + match result with + | CodeIsSender => Int32 -1 + | CodeInsufficientFunds => Int32 -2 + | CodeInsufficientAllowance => Int32 -3 + end + in + { _exception : "Error"; code : result_code } + +let zero = Uint128 0 + +(* Dummy user-defined ADT *) +type Unit = +| Unit + +let get_val = + fun (some_val: Option Uint128) => + match some_val with + | Some val => val + | None => zero + end + +(***************************************************) +(* The contract definition *) +(***************************************************) + +contract FungibleToken +( + contract_owner: ByStr20, + name : String, + symbol: String, + decimals: Uint32, + init_supply : Uint128 +) + +(* Mutable fields *) + +field total_supply : Uint128 = init_supply + +field balances: Map ByStr20 Uint128 + = let emp_map = Emp ByStr20 Uint128 in + builtin put emp_map contract_owner init_supply + +field allowances: Map ByStr20 (Map ByStr20 Uint128) + = Emp ByStr20 (Map ByStr20 Uint128) + +(**************************************) +(* Procedures *) +(**************************************) + +procedure ThrowError(err : Error) + e = make_error err; + throw e +end + +procedure IsNotSender(address: ByStr20) + is_sender = builtin eq _sender address; + match is_sender with + | True => + err = CodeIsSender; + ThrowError err + | False => + end +end + +procedure AuthorizedMoveIfSufficientBalance(from: ByStr20, to: ByStr20, amount: Uint128) + o_from_bal <- balances[from]; + bal = get_val o_from_bal; + can_do = uint128_le amount bal; + match can_do with + | True => + (* Subtract amount from from and add it to to address *) + new_from_bal = builtin sub bal amount; + balances[from] := new_from_bal; + (* Adds amount to to address *) + get_to_bal <- balances[to]; + new_to_bal = match get_to_bal with + | Some bal => builtin add bal amount + | None => amount + end; + balances[to] := new_to_bal + | False => + (* Balance not sufficient *) + err = CodeInsufficientFunds; + ThrowError err + end +end + +(***************************************) +(* Transitions *) +(***************************************) + +(* @dev: Increase the allowance of an approved_spender over the caller tokens. Only token_owner allowed to invoke. *) +(* param spender: Address of the designated approved_spender. *) +(* param amount: Number of tokens to be increased as allowance for the approved_spender. *) +transition IncreaseAllowance(spender: ByStr20, amount: Uint128) + IsNotSender spender; + some_current_allowance <- allowances[_sender][spender]; + current_allowance = get_val some_current_allowance; + new_allowance = builtin add current_allowance amount; + allowances[_sender][spender] := new_allowance; + e = {_eventname : "IncreasedAllowance"; token_owner : _sender; spender: spender; new_allowance : new_allowance}; + event e +end + +(* @dev: Decrease the allowance of an approved_spender over the caller tokens. Only token_owner allowed to invoke. *) +(* param spender: Address of the designated approved_spender. *) +(* param amount: Number of tokens to be decreased as allowance for the approved_spender. *) +transition DecreaseAllowance(spender: ByStr20, amount: Uint128) + IsNotSender spender; + some_current_allowance <- allowances[_sender][spender]; + current_allowance = get_val some_current_allowance; + new_allowance = + let amount_le_allowance = uint128_le amount current_allowance in + match amount_le_allowance with + | True => builtin sub current_allowance amount + | False => zero + end; + allowances[_sender][spender] := new_allowance; + e = {_eventname : "DecreasedAllowance"; token_owner : _sender; spender: spender; new_allowance : new_allowance}; + event e +end + +(* @dev: Moves an amount tokens from _sender to the recipient. Used by token_owner. *) +(* @dev: Balance of recipient will increase. Balance of _sender will decrease. *) +(* @param to: Address of the recipient whose balance is increased. *) +(* @param amount: Amount of tokens to be sent. *) +transition Transfer(to: ByStr20, amount: Uint128) + AuthorizedMoveIfSufficientBalance _sender to amount; + e = {_eventname : "TransferSuccess"; sender : _sender; recipient : to; amount : amount}; + event e; + (* Prevent sending to a contract address that does not support transfers of token *) + msg_to_recipient = {_tag : "RecipientAcceptTransfer"; _recipient : to; _amount : zero; + sender : _sender; recipient : to; amount : amount}; + msg_to_sender = {_tag : "TransferSuccessCallBack"; _recipient : _sender; _amount : zero; + sender : _sender; recipient : to; amount : amount}; + msgs = two_msgs msg_to_recipient msg_to_sender; + send msgs +end + +(* @dev: Move a given amount of tokens from one address to another using the allowance mechanism. The caller must be an approved_spender. *) +(* @dev: Balance of recipient will increase. Balance of token_owner will decrease. *) +(* @param from: Address of the token_owner whose balance is decreased. *) +(* @param to: Address of the recipient whose balance is increased. *) +(* @param amount: Amount of tokens to be transferred. *) +transition TransferFrom(from: ByStr20, to: ByStr20, amount: Uint128) + o_spender_allowed <- allowances[from][_sender]; + allowed = get_val o_spender_allowed; + can_do = uint128_le amount allowed; + match can_do with + | True => + AuthorizedMoveIfSufficientBalance from to amount; + e = {_eventname : "TransferFromSuccess"; initiator : _sender; sender : from; recipient : to; amount : amount}; + event e; + new_allowed = builtin sub allowed amount; + allowances[from][_sender] := new_allowed; + (* Prevent sending to a contract address that does not support transfers of token *) + msg_to_recipient = {_tag: "RecipientAcceptTransferFrom"; _recipient : to; _amount: zero; + initiator: _sender; sender : from; recipient: to; amount: amount}; + msg_to_sender = {_tag: "TransferFromSuccessCallBack"; _recipient: _sender; _amount: zero; + initiator: _sender; sender: from; recipient: to; amount: amount}; + msgs = two_msgs msg_to_recipient msg_to_sender; + send msgs + | False => + err = CodeInsufficientAllowance; + ThrowError err + end +end \ No newline at end of file diff --git a/chains/zil/contracts/LockProxy.scilla b/chains/zil/contracts/LockProxy.scilla new file mode 100644 index 0000000..1679472 --- /dev/null +++ b/chains/zil/contracts/LockProxy.scilla @@ -0,0 +1,380 @@ +scilla_version 0 + +import Polynetwork IntUtils Conversions + +library LockProxy + +(* toAssetHash, toAddress, amount *) +type TxArgs = +| TxArgs of ByStr ByStr Uint256 + +type Error = + | AdminValidationFailed + | AmountCannotBeZero + | LockAmountMismatch + | IllegalToAssetHash + | IllegalToAmount + | IllegalTargetProxy + | ManagerValidationFailed + | IllegalFromProxy + | ParseToAssetAddressFailed + | ParseToAddressFailed + | IllegalAmount + | EmptyFromProxy + | FromProxyNotExist + +let make_error = + fun (result: Error) => + let result_code = + match result with + | AdminValidationFailed => Int32 -1 + | AmountCannotBeZero => Int32 -2 + | LockAmountMismatch => Int32 -3 + | IllegalToAssetHash => Int32 -4 + | IllegalToAmount => Int32 -5 + | IllegalTargetProxy => Int32 -6 + | ManagerValidationFailed => Int32 -7 + | IllegalFromProxy => Int32 -8 + | ParseToAssetAddressFailed => Int32 -9 + | ParseToAddressFailed => Int32 -10 + | IllegalAmount => Int32 -11 + | EmptyFromProxy => Int32 -12 + | FromProxyNotExist => Int32 -13 + end + in + { _exception: "Error"; code: result_code } + + +let one_msg = + fun (m : Message) => + let e = Nil {Message} in + Cons {Message} m e + + +let big_endian = BigEndian +let extract_uint256_be = extract_uint256 big_endian +let append_uint256_be = append_uint256 big_endian + +let serialize_tx_args = + fun (args: TxArgs) => + match args with + | TxArgs toAssetHash toAddress amount => + let empty_str_0x = 0x in + let empty_str = builtin to_bystr empty_str_0x in + let to_asset_hash_str = append_varbytes empty_str toAssetHash in + let to_address = append_varbytes to_asset_hash_str toAddress in + let amount = append_uint256_be to_address amount in + amount + end + +let deserialize_tx_args = + fun (value: ByStr) => + fun (nextpos: Uint32) => + let to_asset_hash_o = extract_bystr value nextpos in + match to_asset_hash_o with + | Some (Pair to_asset_hash nextpos) => + let to_address_o = extract_bystr value nextpos in + match to_address_o with + | Some (Pair to_address nextpos) => + let amount_o = extract_uint256_be value nextpos in + match amount_o with + | Some (Pair amount nextpos) => + let tx_args = TxArgs to_asset_hash to_address amount in + Some { TxArgs } tx_args + | None => None { TxArgs } + end + | None => None { TxArgs } + end + | None => None { TxArgs } + end + +let uint128_zero = Uint128 0 +let uint32_zero = Uint32 0 +let zero_address = 0x0000000000000000000000000000000000000000 +let zero_bystr = let a = 0x in builtin to_bystr a +(* it is unlock *) +let unclock = let a = 0x756e6c6f636b in builtin to_bystr a +let uint128_max = Uint256 340282366920938463463374607431768211455 + +(***************************************************) +(* The contract definition *) +(***************************************************) +contract LockProxy( + init_admin: ByStr20, + init_manager_proxy: ByStr20, + init_manager: ByStr20 +) + +field contractadmin: ByStr20 = init_admin +field asset_map: Map ByStr20 (Map Uint64 ByStr) = Emp ByStr20 (Map Uint64 ByStr) +(* The LockProxy in other blockchains *) +field proxy_hash_map: Map Uint64 ByStr = Emp Uint64 ByStr +field manager: ByStr20 = init_manager +field manager_proxy: ByStr20 = init_manager_proxy + +(* Procedures *) +procedure ThrowError(err: Error) + e = make_error err; + throw e +end + +procedure IsAdmin(initiator: ByStr20) + contractadmin_tmp <- contractadmin; + is_admin = builtin eq initiator contractadmin_tmp; + match is_admin with + | True => + | False => + e = AdminValidationFailed; + ThrowError e + end +end + +procedure IsManagerContract(initiator: ByStr20) + manager_l <- manager; + is_manager = builtin eq manager_l initiator; + match is_manager with + | True => + | False => + e = ManagerValidationFailed; + ThrowError e + end +end + +(* lock amount should not be zero *) +procedure ValidateAmount(amount: Uint128) + is_zero = builtin eq amount uint128_zero; + match is_zero with + | True => + e = AmountCannotBeZero; + ThrowError e + | False => + end +end + +procedure validateFromProxy(fromContractAddr: ByStr) + is_equal = builtin eq zero_bystr fromContractAddr; + match is_equal with + | True => + e = EmptyFromProxy; + ThrowError e + | False => + end +end + +procedure ValidateToAssetHash(toAssetHash: ByStr) + is_equal = builtin eq zero_bystr toAssetHash; + match is_equal with + | True => + e = IllegalToAssetHash; + ThrowError e + | False => + end +end + +procedure ValidateFromProxy(fromContractAddr: ByStr, fromChainId: Uint64) + e = { _eventname: "ValidateFromProxy"; fromContractAddr: fromContractAddr; fromChainId: fromChainId }; + event e; + validateFromProxy fromContractAddr; + targetAddr_o <- proxy_hash_map[fromChainId]; + match targetAddr_o with + | Some targetAddr => + is_equal = builtin eq targetAddr fromContractAddr; + match is_equal with + | True => + | False => + e = IllegalFromProxy; + ThrowError e + end + | None => + e = FromProxyNotExist; + ThrowError e + end +end + +(* @param fromAssetHash: The asset address in current chain, uniformly named as fromAssetHash *) +(* @param fromAddress: obtained by _sender *) +(* @param toAddress: address is this contract: _this_address *) +(* @param amount: The amount of tokens to be crossed from ethereum to the chain with chainId *) +procedure transferZRC2ToContract(fromAssetHash: ByStr20, fromAddress: ByStr20, toAddress: ByStr20, amount: Uint128) + msg_to_zrc2 = {_tag: "TransferFrom"; _recipient: fromAssetHash; _amount: uint128_zero; + from: fromAddress; to: toAddress; amount: amount}; + msgs = one_msg msg_to_zrc2; + send msgs +end + +procedure transferZRC2FromContract(toAssetHash: ByStr20, address: ByStr20, amount: Uint128) + msg_to_zrc2 = {_tag: "Transfer"; _recipient: toAssetHash; _amount: uint128_zero; + to: address; amount: amount}; + msgs = one_msg msg_to_zrc2; + send msgs +end + +procedure transferNativeZILFromContract(address: ByStr20, amount: Uint128) + msg = {_tag: "AddFunds"; _recipient: address; _amount: amount }; + msgs = one_msg msg; + send msgs +end + +(* transfer asset from LockProxy contract to address *) +procedure TransferFromContract(toAssetHash: ByStr20, address: ByStr20, amount: Uint256) + (* convert Uint256 amount to Uint128 amount, so it cannot be greater than uint128_max *) + is_greater = uint256_gt amount uint128_max; + match is_greater with + | True => + e = IllegalAmount; + ThrowError e + | False => + uint128_amount_o = builtin to_uint128 amount; + match uint128_amount_o with + | Some uint128_amount => + (* if toAssetHash is zero address, then transfer native zil, otherwise, transfer zrc2 *) + is_native_transfer = builtin eq toAssetHash zero_address; + match is_native_transfer with + | True => + transferNativeZILFromContract address uint128_amount; + e = { _eventname: "TransferFromContract"; toAssetHash: toAssetHash; address: address; amount: amount }; + event e + | False => + transferZRC2FromContract toAssetHash address uint128_amount; + e = { _eventname: "TransferFromContract"; toAssetHash: toAssetHash; address: address; amount: amount }; + event e + end + | None => + e = IllegalAmount; + ThrowError e + end + end +end + +(* transfer asset from fromAddress to LockProxy contract *) +procedure TransferToContract(fromAssetHash: ByStr20, amount: Uint128) + (* if people choose to lock native zil, then fromAssetHash should be 0x0000000000000000000000000000000000000000 *) + is_asset_zil = builtin eq fromAssetHash zero_address; + match is_asset_zil with + | True => + accept; + is_amount_correct = builtin eq _amount amount; + match is_amount_correct with + | True => + e = { _eventname: "TransferToContract"; fromAssetHash: fromAssetHash; amount: amount }; + event e + | False => + e = LockAmountMismatch; + ThrowError e + end + | False => + (* no accept here, so even some zils is transfered, there is no harm *) + (* see IncreaseAllowance in ZRC2 *) + transferZRC2ToContract fromAssetHash _sender _this_address amount; + e = { _eventname: "TransferToContract"; fromAssetHash: fromAssetHash; amount: amount }; + event e + end +end + +procedure CrossChain(toChainId: Uint64, toContract: ByStr, method: ByStr, txData: ByStr) + manager_proxy_l <- manager_proxy; + msg = {_tag: "CrossChain"; _recipient: manager_proxy_l; _amount: uint128_zero; + toChainId: toChainId; toContract: toContract; method: method; txData: txData }; + msgs = one_msg msg; + send msgs +end + + +(* This function is meant to be invoked by the user *) +(* a certin amount teokens will be locked in the proxy contract the invoker/msg.sender immediately.*) +(* Then the same amount of tokens will be unloked from target chain proxy contract at the target chain with chainId later. *) +(* @param fromAssetHash: The asset address in current chain, uniformly named as `fromAssetHash` *) +(* @param toChainId: The target chain id *) +(* @param toAddress: The address in bytes format to receive same amount of tokens in target chain *) +(* @param amount: The amount of tokens to be crossed from ethereum to the chain with chainId *) +transition lock(fromAssetHash: ByStr20, toChainId: Uint64, toAddress: ByStr, amount: Uint128) + ValidateAmount amount; + TransferToContract fromAssetHash amount; + toAssetHash_o <- asset_map[fromAssetHash][toChainId]; + match toAssetHash_o with + | Some toAssetHash => + amount_256_o = builtin to_uint256 amount; + match amount_256_o with + | Some amount_256 => + txArgs = TxArgs toAssetHash toAddress amount_256; + tx_data = serialize_tx_args txArgs; + target_proxy_o <- proxy_hash_map[toChainId]; + match target_proxy_o with + | Some target_proxy => + CrossChain toChainId target_proxy unclock tx_data; + e = { _eventname: "Lock"; fromAssetHash: fromAssetHash; fromAddress: _sender; toChainId: toChainId; + toAssetHash: toAssetHash; toAddress: toAddress; amount: amount; tx_data: tx_data}; + event e + | None => + e = IllegalTargetProxy; + ThrowError e + end + | None => + e = IllegalToAmount; + ThrowError e + end + | None => + e = IllegalToAssetHash; + ThrowError e + end +end + +(* This function is meant to be invoked by the Zilliqa crosschain management contract *) +(* then mint a certin amount of tokens to the designated address since a certain amount *) +(* was burnt from the source chain invoker. *) +(* @param args: The argument bytes recevied by the zilliqa lock proxy contract, need to be deserialized. *) +(* based on the way of serialization in the source chain proxy contract. *) +(* @param fromContractAddr: The source chain contract address. *) +(* @param fromChainId: The source chain id. *) +transition unlock(args: ByStr, fromContractAddr: ByStr, fromChainId: Uint64) + IsManagerContract _sender; + ValidateFromProxy fromContractAddr fromChainId; + tx_args_o = deserialize_tx_args args uint32_zero; + match tx_args_o with + | Some (TxArgs toAssetHash toAddressHash amount) => + (* ValidateToAssetHash toAssetHash; *) + toAssetAddress_o = builtin to_bystr20 toAssetHash; + toAddress_o = builtin to_bystr20 toAddressHash; + match toAssetAddress_o with + | Some toAssetAddress => + match toAddress_o with + | Some toAddress => + e = { _eventname: "Unlock"; toAssetHash: toAssetAddress; toAddressHash: toAddress; amount: amount }; + event e; + TransferFromContract toAssetAddress toAddress amount + | None => + e = ParseToAddressFailed; + ThrowError e + end + | None => + e = ParseToAssetAddressFailed; + ThrowError e + end + + | None => + end +end + +transition BindAssetHash(fromAssetHash: ByStr20, toChainId: Uint64, toAssetHash: ByStr) + IsAdmin _sender; + asset_map[fromAssetHash][toChainId] := toAssetHash; + e = { _eventname: "BindAssetHash" }; + event e +end + +transition BindProxyHash(toChainId: Uint64, targetProxyHash: ByStr) + IsAdmin _sender; + proxy_hash_map[toChainId] := targetProxyHash; + e = { _eventname: "BindProxyHash" }; + event e +end + +transition SetManager(new_manager: ByStr20) + IsAdmin _sender; + manager := new_manager +end + +transition SetManagerProxy(new_manager_proxy: ByStr20) + IsAdmin _sender; + manager_proxy := new_manager_proxy +end \ No newline at end of file diff --git a/chains/zil/contracts/ZilCrossChainManager.scilla b/chains/zil/contracts/ZilCrossChainManager.scilla new file mode 100644 index 0000000..3cd0cbf --- /dev/null +++ b/chains/zil/contracts/ZilCrossChainManager.scilla @@ -0,0 +1,477 @@ +scilla_version 0 + +import Polynetwork BoolUtils + +library ZilCrossChainManager + +let nullAddress = 0x0000000000000000000000000000000000000000 + +let one_msg = + fun (msg : Message) => + let nil_msg = Nil {Message} in + Cons {Message} msg nil_msg + +let bool_active = True +let bool_inactive = False + + +type Error = + | ContractFrozenFailure + | ConPubKeysAlreadyInitialized + | ErrorDeserializeHeader + | NextBookersIllegal + | SignatureVerificationFailed + | HeaderLowerOrBookKeeperEmpty + | InvalidMerkleProof + | IncorrectMerkleProof + | MerkleProofDeserializeFailed + | AddressFormatMismatch + | WrongTransaction + | TransactionAlreadyExecuted + | TransactionHashInvalid + | AdminValidationFailed + | ProxyValidationFailed + | StagingAdminValidationFailed + | StagingAdminNotExist + +let make_error = + fun (result: Error) => + let result_code = + match result with + | ContractFrozenFailure => Int32 -1 + | ConPubKeysAlreadyInitialized => Int32 -2 + | ErrorDeserializeHeader => Int32 -3 + | NextBookersIllegal => Int32 -4 + | SignatureVerificationFailed => Int32 -5 + | HeaderLowerOrBookKeeperEmpty => Int32 -6 + | InvalidMerkleProof => Int32 -7 + | IncorrectMerkleProof => Int32 -8 + | MerkleProofDeserializeFailed => Int32 -9 + | AddressFormatMismatch => Int32 -10 + | WrongTransaction => Int32 -11 + | TransactionAlreadyExecuted => Int32 -12 + | TransactionHashInvalid => Int32 -13 + | AdminValidationFailed => Int32 -14 + | ProxyValidationFailed => Int32 -15 + | StagingAdminValidationFailed => Int32 -16 + | StagingAdminNotExist => Int32 -17 + end + in + { _exception: "Error"; code: result_code } +(***************************************************) +(* The contract definition *) +(***************************************************) +contract ZilCrossChainManager( + this_chain_id : Uint64, + init_proxy_address: ByStr20, + init_admin: ByStr20 +) + +field paused: Bool = True +(* When Poly chain switches the consensus epoch book keepers, *) +(* the consensus peers public keys of Poly chain should be *) +(* changed into no-compressed version so that solidity smart *) +(* contract can convert it to address type and verify the *) +(* signature derived from Poly chain account signature. *) +(* conKeepersPublicKeyList means Consensus book Keepers *) +(* Public Key List *) +field conKeepersPublicKeyList: List ByStr20 = Nil {ByStr20} +(* Current Epoch Start Height of Poly chain block *) +field curEpochStartHeight: Uint32 = Uint32 0 +(* Zilliqa cross chain tx hash indexed by the automatically increased index. *) +(* This map exists for the reason that Poly chain can verify the existence of *) +(* cross chain request tx coming from Zilliqa *) +field zilToPolyTxHashMap: Map Uint256 ByStr32 = Emp Uint256 ByStr32 +(* This index records the current Map length *) +field zilToPolyTxHashIndex: Uint256 = Uint256 0 +(* Record the from chain txs that have been processed *) +field fromChainTxExist : Map Uint64 (Map ByStr32 Unit) = Emp Uint64 (Map ByStr32 Unit) +field contractadmin: ByStr20 = init_admin +field stagingcontractadmin: Option ByStr20 = None {ByStr20} + + +(* Procedures *) + +procedure ThrowError(err: Error) + e = make_error err; + throw e +end + +procedure IsProxy() + is_proxy = builtin eq _sender init_proxy_address; + match is_proxy with + | True => + | False => + e = ProxyValidationFailed; + ThrowError e + end +end + +procedure IsNotPaused() + paused_tmp <- paused; + match paused_tmp with + | False => + | True => + e = ContractFrozenFailure; + ThrowError e + end +end + +procedure IsAdmin(initiator: ByStr20) + contractadmin_tmp <- contractadmin; + is_admin = builtin eq initiator contractadmin_tmp; + match is_admin with + | True => + | False => + e = AdminValidationFailed; + ThrowError e + end +end + +procedure verifyPubkeysAndUpdate(pubkeys: List Pubkey, h_nextBookkeeper: ByStr20, h_height: Uint32) + nextbookkeeper_keepers = verifyPubkey pubkeys; + match nextbookkeeper_keepers with + | Pair nextBookKeeper keepers => + (* Ensure that Header's nextBookKeeper is same as the one from verifyPubkey *) + nbk_eq = builtin eq nextBookKeeper h_nextBookkeeper; + match nbk_eq with + | True => + curEpochStartHeight := h_height; + conKeepersPublicKeyList := keepers + | False => + e = NextBookersIllegal; + ThrowError e + end + end +end + +procedure executeCrossChainTxn (txparam: TxParam, fromChainId: Uint64, crossChainTxHash: ByStr) + match txparam with + | TxParam txHash crossChainID fromContract toChainID toContract method args => + toChainIDOk = builtin eq toChainID this_chain_id; + match toChainIDOk with + | True => + toContractAddr_o = builtin to_bystr20 toContract; + match toContractAddr_o with + | Some toContractAddr => + method_name = builtin to_ascii method; + m = { _tag : method_name; args : args; + fromContractAddr : fromContract; + fromChainId : fromChainId; + _amount : Uint128 0; + _recipient : toContractAddr }; + mo = one_msg m; + send mo; + e = { _eventname : "VerifyHeaderAndExecuteTxEvent"; + fromChainId : fromChainId; + toContractAddr : toContractAddr; + crossChainTxHash : crossChainTxHash; + fromChainTxHash : txHash + }; + event e + | None => + e = AddressFormatMismatch; + ThrowError e + end + | False => + e = WrongTransaction; + ThrowError e + end + end +end + +procedure updateZilTxHash(txHashIndex : Uint256, rawParamHash : ByStr32) + zilToPolyTxHashMap[txHashIndex] := rawParamHash; + one_uint256 = Uint256 1; + newTxHashIndex = builtin add txHashIndex one_uint256; + zilToPolyTxHashIndex := newTxHashIndex +end + +procedure checkAndMarkFromChainTxn(chainID : Uint64, txHash : ByStr) + txHash32_o = builtin to_bystr32 txHash; + match txHash32_o with + | Some txHash32 => + already_exists <- exists fromChainTxExist[chainID][txHash32]; + match already_exists with + | True => + e = TransactionAlreadyExecuted; + ThrowError e + | False => + fromChainTxExist[chainID][txHash32] := unit + end + | None => + e = TransactionHashInvalid; + ThrowError e + end +end + +(***************************************************) +(* Transition *) +(***************************************************) + +(***************************************************) +(* House keeping transition *) +(***************************************************) + +(* @dev: Start a proposal for new contract admin. Used by admin only. *) +(* @param admin: New admin value *) +(* @param initiator: The original caller who called the proxy. *) +transition UpdateAdmin(newAdmin: ByStr20, initiator: ByStr20) + IsProxy; + IsAdmin initiator; + staging_admin = Some {ByStr20} newAdmin; + stagingcontractadmin := staging_admin +end + +(* @dev: Claim to be the new admin of contract. *) +(* @param initiator: The original caller who called the proxy. *) +transition ClaimAdmin(initiator: ByStr20) + IsProxy; + staging_admin <- stagingcontractadmin; + match staging_admin with + | Some admin => + is_valid = builtin eq initiator admin; + match is_valid with + | True => + contractadmin := admin; + staging_admin = None {ByStr20}; + stagingcontractadmin := staging_admin; + e = { _eventname: "ClaimAdmin"; new_admin: admin }; + event e + | False => + e = StagingAdminValidationFailed; + ThrowError e + end + | None => + e = StagingAdminNotExist; + ThrowError e + end +end + +(* @dev: pause the contract. Used by admin only. *) +(* @param initiator: The original caller who called the proxy. *) +transition Pause(initiator: ByStr20) + IsProxy; + IsAdmin initiator; + paused := bool_active +end + +(* @dev: unpause/unfreeze the contract. Used by admin only. *) +(* @param initiator: The original caller who called the proxy. *) +transition UnPause(initiator: ByStr20) + IsProxy; + IsAdmin initiator; + paused := bool_inactive +end + +(***************************************************) +(* Cross chain transition *) +(***************************************************) + +(* @dev: sync Poly chain genesis block header to smart contrat. *) +(* @param rawHeader: Poly chain genesis block raw header or raw *) +(* Header including switching consensus peers info *) +(* @param pubkeys: Poly chain consensus nodes public key list. *) +transition InitGenesisBlock(rawHeader: ByStr, pubkeys: List Pubkey) + IsProxy; + IsNotPaused; + current_keepers_o <- conKeepersPublicKeyList; + match current_keepers_o with + | Nil => + header_o = deserialize_Header rawHeader zero_uint32; + match header_o with + | Some + (Pair + (Header h_version h_chainid h_prevBlockHash h_txnroot h_crossStatesRoot + h_blockRoot h_timestamp h_height h_consensusData h_consensusPayload + h_nextBookkeeper) + nextpos) + => + verifyPubkeysAndUpdate pubkeys h_nextBookkeeper h_height; + e = { _eventname : "GenesisBlock"; height : h_height; header : rawHeader }; + event e + | None => + e = ErrorDeserializeHeader; + ThrowError e + end + | Cons _ _ => + e = ConPubKeysAlreadyInitialized; + ThrowError e + end +end + +(* @dev: change Poly chain consensus book keeper. *) +(* @param rawHeader: Poly chain change book keeper block raw header *) +(* @param pubkeys: Poly chain consensus nodes public key list. *) +(* @param sigList: Poly chain consensus nodes signature list. *) +transition ChangeBookKeeper(rawHeader: ByStr, pubkeys: List Pubkey, sigList: List Signature) + IsProxy; + IsNotPaused; + header_o = deserialize_Header rawHeader zero_uint32; + curStartHeight <- curEpochStartHeight; + match header_o with + | Some + (Pair + (Header h_version h_chainid h_prevBlockHash h_txnroot h_crossStatesRoot + h_blockRoot h_timestamp h_height h_consensusData h_consensusPayload + h_nextBookkeeper) + nextpos) + => + heightOk = builtin lt curStartHeight h_height; + nextBookKeeperOk = let b = builtin eq h_nextBookkeeper nullAddress in negb b; + both_ok = andb heightOk nextBookKeeperOk; + match both_ok with + | True => + curKeepers <- conKeepersPublicKeyList; + n = lengther_address curKeepers; + m = compute_m n; + signed = verifySig rawHeader sigList curKeepers m; + match signed with + | True => + verifyPubkeysAndUpdate pubkeys h_nextBookkeeper h_height; + e = { _eventname : "ChangeBookKeeper"; height : h_height; header : rawHeader }; + event e + | False => + e = SignatureVerificationFailed; + ThrowError e + end + | False => + e = HeaderLowerOrBookKeeperEmpty; + ThrowError e + end + | None => + e = ErrorDeserializeHeader; + ThrowError e + end +end + +(* @dev: ZRC2 token cross chain to other blockchain. this function *) +(* push tx event to blockchain *) +(* @param toChainId: Target chain id *) +(* @param toContract: Target smart contract address in target block chain. *) +(* @param method: Method to call target smart contract *) +(* @param txData: Transaction data for target chain, include to_address, amount. *) +transition CrossChain(toChainId: Uint64, toContract: ByStr, method: ByStr, txData: ByStr, originContractAddr: ByStr20) + IsProxy; + IsNotPaused; + txHashIndex <- zilToPolyTxHashIndex; + paramTxHash = let b = builtin to_bystr32 txHashIndex in builtin to_bystr b; + crossChainId = + let this_bs = builtin to_bystr _this_address in + let s = builtin concat this_bs paramTxHash in + let h = builtin sha256hash s in + builtin to_bystr h; + fromContract = builtin to_bystr originContractAddr; + txp = TxParam paramTxHash crossChainId fromContract toChainId toContract method txData; + (* Serialize the TxParam object *) + empty_bystr = let b = 0x in builtin to_bystr b; + rawParam = append_TxParam empty_bystr txp; + rawParamHash = builtin keccak256hash rawParam; + updateZilTxHash txHashIndex rawParamHash; + (* todo: original caller *) + e = { _eventname : "CrossChainEvent"; + sender : _origin; + txId : paramTxHash; + proxyOrAssetContract : _sender; + toChainId : toChainId; + toContract : toContract; + rawdata : rawParam }; + event e +end + +(* @dev: Verify Poly chain header and proof, execute the cross chain tx *) +(* from Poly chain to Zilliqa. *) +(* @param proof: Poly chain tx merkle proof. *) +(* @param rawHeader: The header containing crossStateRoot to verify the above tx merkle proof. *) +(* @param headerProof: The header merkle proof used to verify rawHeader *) +(* @param curRawHeader: Any header in current epoch consensus of Poly chain *) +(* @param headerSig: The coverted signature veriable for solidity derived from Poly chain *) +(* consensus nodes signature used to verify the validity of curRawHeader *) +transition VerifyHeaderAndExecuteTx(proof: Proof, rawHeader: ByStr, headerProof: Proof, curRawHeader: ByStr, headerSig: List Signature) + IsProxy; + IsNotPaused; + header_o = deserialize_Header rawHeader zero_uint32; + curKeepers <- conKeepersPublicKeyList; + curStartHeight <- curEpochStartHeight; + n = lengther_address curKeepers; + m = compute_m n; + match header_o with + | Some + (Pair + (Header h_version h_chainid h_prevBlockHash h_txnroot h_crossStatesRoot + h_blockRoot h_timestamp h_height h_consensusData h_consensusPayload + h_nextBookkeeper) + nextpos) + => + is_lt = builtin lt h_height curStartHeight; + match is_lt with + | True => + signed = verifySig curRawHeader headerSig curKeepers m; + match signed with + | True => + curHeader_o = deserialize_Header curRawHeader zero_uint32; + match curHeader_o with + | Some (Pair + (Header h_version h_chainid h_prevBlockHash h_txnroot h_crossStatesRoot + h_blockRoot h_timestamp h_height h_consensusData h_consensusPayload + h_nextBookkeeper) + nextpos) + => + proof_o = merkle_prove headerProof h_blockRoot; + match proof_o with + | Some proveValue => + proveValue32_o = builtin to_bystr32 proveValue; + match proveValue32_o with + | Some proveValue32 => + headerHash = get_header_hash rawHeader; + proof_ok = builtin eq headerHash proveValue32; + match proof_ok with + | True => (* Do nothing *) + | False => + e = InvalidMerkleProof; + ThrowError e + end + | None => + e = IncorrectMerkleProof; + ThrowError e + end + | None => + end + | None => + e = ErrorDeserializeHeader; + ThrowError e + end + | False => + e = SignatureVerificationFailed; + ThrowError e + end + | False => + signed = verifySig rawHeader headerSig curKeepers m; + match signed with + | True => (* Do nothing *) + | False => + e = SignatureVerificationFailed; + ThrowError e + end + end; + toMerkleValueBs_o = merkle_prove proof h_crossStatesRoot; + match toMerkleValueBs_o with + | Some toMerkleValueBs => + toMerkleValue_o = deserialize_ToMerkleValue toMerkleValueBs zero_uint32; + match toMerkleValue_o with + | Some (Pair (ToMerkleValue txhash fromChainId txparam) _) => + checkAndMarkFromChainTxn fromChainId txhash; + executeCrossChainTxn txparam fromChainId txhash + | None => + e = MerkleProofDeserializeFailed; + ThrowError e + end + | None => + e = InvalidMerkleProof; + ThrowError e + end + | None => + e = ErrorDeserializeHeader; + ThrowError e + end +end \ No newline at end of file diff --git a/chains/zil/contracts/ZilCrossChainManagerProxy.scilla b/chains/zil/contracts/ZilCrossChainManagerProxy.scilla new file mode 100644 index 0000000..7f288d0 --- /dev/null +++ b/chains/zil/contracts/ZilCrossChainManagerProxy.scilla @@ -0,0 +1,145 @@ +scilla_version 0 + +import Polynetwork + +library ZilCrossChainManagerProxy + + +let zero = Uint128 0 + +let one_msg = + fun (m: Message) => + let e = Nil {Message} in + Cons {Message} m e + +contract ZilCrossChainManagerProxy( + init_crosschain_manager : ByStr20, + init_admin: ByStr20 +) + +(* Mutable fields *) +field crosschain_manager: ByStr20 = init_crosschain_manager +field admin: ByStr20 = init_admin +field stagingadmin: Option ByStr20 = None {ByStr20} + +(***************************************************) +(* Transition *) +(***************************************************) + +(***************************************************) +(* Proxy Transition *) +(***************************************************) +transition UpgradeTo(new_crosschain_manager: ByStr20) + currentAdmin <- admin; + isAdmin = builtin eq currentAdmin _sender; + match isAdmin with + | True => + crosschain_manager := new_crosschain_manager; + e = {_eventname: "Upgraded"; new_crosschain_manager: new_crosschain_manager}; + event e + | False => + e = {_eventname: "upgradeTo FailedNotAdmin"; new_crosschain_manager: new_crosschain_manager}; + event e + end +end + +transition ChangeProxyAdmin(newAdmin: ByStr20) + currentAdmin <- admin; + isAdmin = builtin eq currentAdmin _sender; + match isAdmin with + | True => + new_staging_admin = Some {ByStr20} newAdmin; + stagingadmin := new_staging_admin; + e = {_eventname: "ChangeProxyAdmin"; oldAdmin: currentAdmin; newAdmin: newAdmin}; + event e + | False => + e = {_eventname: "ChangeProxyAdmin FailedNotAdmin"; newAdmin: newAdmin}; + event e + end +end + +transition ClaimProxyAdmin() + staging_admin_o <- stagingadmin; + match staging_admin_o with + | Some staging_admin => + is_stagingadmin = builtin eq staging_admin _sender; + match is_stagingadmin with + | True => + admin := _sender; + tmp_staging_admin = None {ByStr20}; + stagingadmin := tmp_staging_admin; + e = {_eventname: "ClaimProxyAdmin"; newAdmin: _sender}; + event e + | False => + e = {_eventname: "ClaimProxyAdmin FailedNotStagingadmin"; newAdmin: _sender}; + event e + end + | None => + e = {_eventname: "ClaimProxyAdmin FailedNoStagingadmin"}; + event e + end +end + +(***************************************************) +(* House keeping transition *) +(***************************************************) + +transition Pause() + current_impl <- crosschain_manager; + msg = {_tag: "Pause"; _recipient: current_impl; _amount: zero; initiator: _sender}; + msgs = one_msg msg; + send msgs +end + +transition UnPause() + current_impl <- crosschain_manager; + msg = {_tag: "UnPause"; _recipient: current_impl; _amount: zero; initiator: _sender}; + msgs = one_msg msg; + send msgs +end + +transition UpdateAdmin(newAdmin: ByStr20) + current_impl <- crosschain_manager; + msg = {_tag: "UpdateAdmin"; _recipient: current_impl; _amount: zero; initiator: _sender; newAdmin: newAdmin}; + msgs = one_msg msg; + send msgs +end + +transition ClaimAdmin() + current_impl <- crosschain_manager; + msg = {_tag: "ClaimAdmin"; _recipient: current_impl; _amount: zero; initiator: _sender}; + msgs = one_msg msg; + send msgs +end + +(***************************************************) +(* Cross chain transition *) +(***************************************************) + +transition InitGenesisBlock(rawHeader: ByStr, pubkeys: List Pubkey) + current_impl <- crosschain_manager; + msg = {_tag: "InitGenesisBlock"; _recipient: current_impl; _amount: zero; rawHeader: rawHeader; pubkeys: pubkeys}; + msgs = one_msg msg; + send msgs +end + +transition ChangeBookKeeper(rawHeader: ByStr, pubkeys: List Pubkey, sigList: List Signature) + current_impl <- crosschain_manager; + msg = {_tag: "ChangeBookKeeper"; _recipient: current_impl; _amount: zero; rawHeader: rawHeader; pubkeys: pubkeys; sigList: sigList}; + msgs = one_msg msg; + send msgs +end + +transition CrossChain(toChainId: Uint64, toContract: ByStr, method: ByStr, txData: ByStr) + current_impl <- crosschain_manager; + msg = {_tag: "CrossChain"; _recipient: current_impl; _amount: zero; toChainId: toChainId; toContract: toContract; method: method; txData: txData; originContractAddr: _sender}; + msgs = one_msg msg; + send msgs +end + +transition VerifyHeaderAndExecuteTx(proof: Proof, rawHeader: ByStr, headerProof: Proof, curRawHeader: ByStr, headerSig: List Signature) + current_impl <- crosschain_manager; + msg = {_tag: "VerifyHeaderAndExecuteTx"; _recipient: current_impl; _amount: zero; proof: proof; rawHeader: rawHeader; headerProof: headerProof; curRawHeader: curRawHeader; headerSig: headerSig}; + msgs = one_msg msg; + send msgs +end \ No newline at end of file diff --git a/chains/zil/deployer.go b/chains/zil/deployer.go new file mode 100644 index 0000000..f796326 --- /dev/null +++ b/chains/zil/deployer.go @@ -0,0 +1,163 @@ +package zilliqa + +import ( + "errors" + "fmt" + "github.com/Zilliqa/gozilliqa-sdk/account" + contract2 "github.com/Zilliqa/gozilliqa-sdk/contract" + "github.com/Zilliqa/gozilliqa-sdk/core" + "github.com/Zilliqa/gozilliqa-sdk/keytools" + "github.com/Zilliqa/gozilliqa-sdk/provider" + "github.com/Zilliqa/gozilliqa-sdk/util" + "io/ioutil" + "strconv" +) + +const msgVersion = 1 + +type Deployer struct { + PrivateKey string + Host string + ProxyPath string + ImplPath string + LockProxyPath string +} + +func NewDeployer(key, host string) Deployer { + return Deployer{ + PrivateKey: key, + Host: host, + ProxyPath: "chains/zil/contracts/ZilCrossChainManagerProxy.scilla", + ImplPath: "chains/zil/contracts/ZilCrossChainManager.scilla", + LockProxyPath: "chains/zil/contracts/LockProxy.scilla", + } +} + +func (d *Deployer) Deploy(wallet *account.Wallet, client *provider.Provider, sideChainId string, zilliqaChainId int) (string, string, string, error) { + pubKey := keytools.GetPublicKeyFromPrivateKey(util.DecodeHex(d.PrivateKey), true) + address := keytools.GetAddressFromPublic(pubKey) + + // deploy proxy + code, _ := ioutil.ReadFile(d.ProxyPath) + init := []core.ContractValue{ + { + "_scilla_version", + "Uint32", + "0", + }, + { + "init_crosschain_manager", + "ByStr20", + "0x0000000000000000000000000000000000000000", + }, + { + "init_admin", + "ByStr20", + "0x" + address, + }, + } + + fmt.Println("1. deploy cross chain manager proxy contract") + proxy, err1 := d.deploy(code, init, wallet, client, pubKey, address, zilliqaChainId) + if err1 != nil { + return "", "", "", err1 + } + + // deploy cross chain manager + code, _ = ioutil.ReadFile(d.ImplPath) + init = []core.ContractValue{ + { + "_scilla_version", + "Uint32", + "0", + }, + { + "this_chain_id", + "Uint64", + sideChainId, + }, + { + "init_proxy_address", + "ByStr20", + "0x" + proxy, + }, + { + "init_admin", + "ByStr20", + "0x" + address, + }, + } + + fmt.Println("2. deploy cross chain manager contract") + impl, err := d.deploy(code, init, wallet, client, pubKey, address, zilliqaChainId) + if err != nil { + return "", "", "", err + } + + // deploy lock proxy + code, _ = ioutil.ReadFile(d.LockProxyPath) + init = []core.ContractValue{ + { + "_scilla_version", + "Uint32", + "0", + }, + { + "init_admin", + "ByStr20", + "0x" + address, + }, + { + "init_manager_proxy", + "ByStr20", + "0x" + proxy, + }, + { + "init_manager", + "ByStr20", + "0x" + impl, + }, + } + + fmt.Println("3. deploy lock proxy contract") + lockProxy, err2 := d.deploy(code, init, wallet, client, pubKey, address, zilliqaChainId) + if err2 != nil { + return "", "", "", err2 + } + + return proxy, impl, lockProxy, nil +} + +func (d *Deployer) deploy(contractCode []byte, init []core.ContractValue, wallet *account.Wallet, client *provider.Provider, senderPubKey []byte, sendAddress string, zilliqaChainId int) (string, error) { + + gasPrice, err := client.GetMinimumGasPrice() + if err != nil { + return "", err + } + contract := contract2.Contract{ + Code: string(contractCode), + Init: init, + Signer: wallet, + Provider: client, + } + balAndNonce, _ := client.GetBalance(sendAddress) + deployParams := contract2.DeployParams{ + Version: strconv.FormatInt(int64(util.Pack(zilliqaChainId, msgVersion)), 10), + Nonce: strconv.FormatInt(balAndNonce.Nonce+1, 10), + GasPrice: gasPrice, + GasLimit: "40000", + SenderPubKey: util.EncodeHex(senderPubKey), + } + + tx, err1 := contract.Deploy(deployParams) + if err1 != nil { + return "", err1 + } + + tx.Confirm(tx.ID, 1000, 10, client) + if tx.Status == core.Confirmed { + return tx.ContractAddress, nil + } else { + return "", errors.New("deploy failed") + } +} diff --git a/cmd/zil_deployer/run.go b/cmd/zil_deployer/run.go new file mode 100644 index 0000000..f6977be --- /dev/null +++ b/cmd/zil_deployer/run.go @@ -0,0 +1,116 @@ +package main + +import ( + "flag" + "fmt" + "github.com/Zilliqa/gozilliqa-sdk/account" + "github.com/Zilliqa/gozilliqa-sdk/crosschain/polynetwork" + "github.com/Zilliqa/gozilliqa-sdk/provider" + zilliqa "github.com/polynetwork/poly-io-test/chains/zil" + "github.com/polynetwork/poly-io-test/config" + "log" + "strconv" +) + +var ( + fnZil string + zilConfFile string +) + +func init() { + flag.StringVar(&fnZil, "func", "deploy", "choose function to run: deploy or setup") + flag.StringVar(&zilConfFile, "conf", "./config.json", "config file path") + flag.Parse() +} + +func main() { + err := config.DefConfig.Init(zilConfFile) + if err != nil { + panic(err) + } + + switch fnZil { + case "deploy": + DeployZILSmartContract() + case "setup": + SetupZILSmartContract() + } +} + +func DeployZILSmartContract() { + deployer := zilliqa.NewDeployer(config.DefConfig.ZilPrivateKey, config.DefConfig.ZilURL) + wallet := account.NewWallet() + wallet.AddByPrivateKey(deployer.PrivateKey) + client := provider.NewProvider(deployer.Host) + zilliqaChainId, err := client.GetNetworkId() + if err != nil { + panic(err) + } + chainId, err := strconv.ParseInt(zilliqaChainId, 10, 64) + if err != nil { + panic(err) + } + + zilSideChainId := strconv.FormatUint(config.DefConfig.ZilChainId, 10) + + proxy, impl, lockProxy, err := deployer.Deploy(wallet, client, zilSideChainId, int(chainId)) + + log.Printf("corss chain manager proxy address: %s\n", proxy) + log.Printf("cross chain manager address: %s\n", impl) + log.Printf("lock proxy address: %s\n", lockProxy) + if err != nil { + log.Fatalln(err.Error()) + } + + p := &polynetwork.Proxy{ + ProxyAddr: proxy, + ImplAddr: impl, + Wallet: wallet, + Client: client, + ChainId: int(chainId), + MsgVersion: 1, + } + + fmt.Println("4. upgrade cross chain manager proxy contract") + _, err1 := p.UpgradeTo() + if err1 != nil { + log.Fatalln(err1.Error()) + } + + fmt.Println("5. unpause cross chain manager contract") + _, err2 := p.Unpause() + if err2 != nil { + log.Fatalln(err2.Error()) + } +} + +func SetupZILSmartContract() { + wallet := account.NewWallet() + wallet.AddByPrivateKey(config.DefConfig.ZilPrivateKey) + client := provider.NewProvider(config.DefConfig.ZilURL) + zilliqaChainId, err := client.GetNetworkId() + if err != nil { + panic(err) + } + chainId, err := strconv.ParseInt(zilliqaChainId, 10, 64) + if err != nil { + panic(err) + } + + l := &polynetwork.LockProxy{ + Addr: config.DefConfig.ZilLockProxy, + Wallet: wallet, + Client: client, + ChainId: int(chainId), + MsgVersion: 1, + } + + sideChainId := strconv.FormatUint(config.DefConfig.ZilChainId, 10) + + _, err = l.BindProxyHash(sideChainId, config.DefConfig.EthLockProxy) + if err != nil { + panic(err) + } + + // _,err = l.BindAssetHash() +} diff --git a/config/config.go b/config/config.go index c353092..cf70db5 100644 --- a/config/config.go +++ b/config/config.go @@ -132,6 +132,10 @@ type TestConfig struct { // zil contracts ZilEccdProxy string ZilEccdImpl string +<<<<<<< HEAD +======= + ZilLockProxy string +>>>>>>> feat(zil) contract deploy // eth contracts: auto set after deploy EthBnb string From 02b38d55192c803ecb7e06e3ec18bf2bd7034bda Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Tue, 16 Mar 2021 19:52:57 +0800 Subject: [PATCH 32/96] fix: rename --- cmd/zil_deployer/run.go | 4 ++-- config/config.go | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cmd/zil_deployer/run.go b/cmd/zil_deployer/run.go index f6977be..f68a1ac 100644 --- a/cmd/zil_deployer/run.go +++ b/cmd/zil_deployer/run.go @@ -51,7 +51,7 @@ func DeployZILSmartContract() { panic(err) } - zilSideChainId := strconv.FormatUint(config.DefConfig.ZilChainId, 10) + zilSideChainId := strconv.FormatUint(config.DefConfig.ZilChainID, 10) proxy, impl, lockProxy, err := deployer.Deploy(wallet, client, zilSideChainId, int(chainId)) @@ -105,7 +105,7 @@ func SetupZILSmartContract() { MsgVersion: 1, } - sideChainId := strconv.FormatUint(config.DefConfig.ZilChainId, 10) + sideChainId := strconv.FormatUint(config.DefConfig.ZilChainID, 10) _, err = l.BindProxyHash(sideChainId, config.DefConfig.EthLockProxy) if err != nil { diff --git a/config/config.go b/config/config.go index cf70db5..2cf7e66 100644 --- a/config/config.go +++ b/config/config.go @@ -132,10 +132,7 @@ type TestConfig struct { // zil contracts ZilEccdProxy string ZilEccdImpl string -<<<<<<< HEAD -======= ZilLockProxy string ->>>>>>> feat(zil) contract deploy // eth contracts: auto set after deploy EthBnb string From aee1f337ff5c505ea08f3cddcdf5b7ec17db5933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Tue, 23 Mar 2021 15:29:26 +0800 Subject: [PATCH 33/96] add ok --- chains/eth/eth_invoker.go | 4 + chains/eth/eth_tools.go | 2 +- cmd/ok_deployer/run.go | 418 ++++++++++++++++++++++++++++++++++++++ config/config.go | 19 ++ testcase/testcase.go | 1 + 5 files changed, 443 insertions(+), 1 deletion(-) create mode 100644 cmd/ok_deployer/run.go diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index a02d058..1655b64 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -75,6 +75,8 @@ func (ethInvoker *EInvoker) url() string { return ethInvoker.TConfiguration.MSCURL case ethInvoker.TConfiguration.EthChainID: return ethInvoker.TConfiguration.EthURL + case ethInvoker.TConfiguration.OkChainID: + return ethInvoker.TConfiguration.OKURL default: panic(fmt.Sprintf("unknown chain id:%d", ethInvoker.ChainID)) } @@ -88,6 +90,8 @@ func (ethInvoker *EInvoker) privateKey() string { return ethInvoker.TConfiguration.MSCPrivateKey case ethInvoker.TConfiguration.EthChainID: return ethInvoker.TConfiguration.ETHPrivateKey + case ethInvoker.TConfiguration.OkChainID: + return ethInvoker.TConfiguration.OKPrivateKey default: panic(fmt.Sprintf("unknown chain id:%d", ethInvoker.ChainID)) } diff --git a/chains/eth/eth_tools.go b/chains/eth/eth_tools.go index a3da411..02f7de4 100644 --- a/chains/eth/eth_tools.go +++ b/chains/eth/eth_tools.go @@ -329,7 +329,7 @@ func (self *ETHTools) WaitTransactionConfirm(hash common.Hash) { time.Sleep(time.Millisecond * 100) _, ispending, err := self.ethclient.TransactionByHash(context.Background(), hash) if err != nil { - log.Errorf("failed to call TransactionByHash: %v", err) + log.Errorf("failed to call TransactionByHash: %v hash:%s", err, hash.String()) continue } if ispending == true { diff --git a/cmd/ok_deployer/run.go b/cmd/ok_deployer/run.go new file mode 100644 index 0000000..b243b57 --- /dev/null +++ b/cmd/ok_deployer/run.go @@ -0,0 +1,418 @@ +/* +* Copyright (C) 2020 The poly network Authors +* This file is part of The poly network library. +* +* The poly network is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* The poly network is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* You should have received a copy of the GNU Lesser General Public License +* along with The poly network . If not, see . + */ +package main + +import ( + "encoding/hex" + "flag" + "fmt" + + common2 "github.com/ethereum/go-ethereum/common" + "github.com/joeqian10/neo-gogogo/helper" + "github.com/ontio/ontology/common" + "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/config" +) + +var ( + fnEth string + ethConfFile string + eccmRedeploy int +) + +func init() { + flag.StringVar(&fnEth, "func", "deploy", "choose function to run: deploy or setup") + flag.StringVar(ðConfFile, "conf", "./config.json", "config file path") + flag.IntVar(&eccmRedeploy, "redeploy_eccm", 1, "redeploy eccd, eccm and eccmp or not") + flag.Parse() +} + +func main() { + err := config.DefConfig.Init(ethConfFile) + if err != nil { + panic(err) + } + + switch fnEth { + case "deploy": + DeployETHSmartContract() + case "setup": + SetUpEthContracts() + } +} + +func DeployETHSmartContract() { + invoker := eth.NewEInvoker(config.DefConfig.OkChainID) + var ( + eccdAddr common2.Address + eccmAddr common2.Address + eccmpAddr common2.Address + err error + ) + if eccmRedeploy == 1 { + eccdAddr, _, err = invoker.DeployEthChainDataContract() + if err != nil { + panic(err) + } + + eccmAddr, _, err = invoker.DeployECCMContract(eccdAddr.Hex()) + if err != nil { + panic(err) + } + eccmpAddr, _, err = invoker.DeployECCMPContract(eccmAddr.Hex()) + if err != nil { + panic(err) + } + _, err = invoker.TransferOwnershipForECCD(eccdAddr.Hex(), eccmAddr.Hex()) + if err != nil { + panic(err) + } + _, err = invoker.TransferOwnershipForECCM(eccmAddr.Hex(), eccmpAddr.Hex()) + if err != nil { + panic(err) + } + } else { + eccdAddr = common2.HexToAddress(config.DefConfig.BscEccd) + eccmAddr = common2.HexToAddress(config.DefConfig.BscEccm) + eccmpAddr = common2.HexToAddress(config.DefConfig.BscEccmp) + } + + lockProxyAddr, _, err := invoker.DeployLockProxyContract(eccmpAddr) + if err != nil { + panic(err) + } + + lockproxyAddrHex := lockProxyAddr.Hex() + erc20Addr, erc20, err := invoker.DeployERC20() + if err != nil { + panic(err) + } + + total, err := erc20.TotalSupply(nil) + if err != nil { + panic(fmt.Errorf("failed to get total supply for erc20: %v", err)) + } + auth, _ := invoker.MakeSmartContractAuth() + tx, err := erc20.Approve(auth, lockProxyAddr, total) + if err != nil { + panic(fmt.Errorf("failed to approve erc20 to lockproxy: %v", err)) + } + invoker.ETHUtil.WaitTransactionConfirm(tx.Hash()) + + oep4Addr, _, err := invoker.DeployOEP4(lockproxyAddrHex) + if err != nil { + panic(err) + } + ongxAddr, _, err := invoker.DeployONGXContract(lockproxyAddrHex) + if err != nil { + panic(err) + } + ontxAddr, _, err := invoker.DeployONTXContract(lockproxyAddrHex) + if err != nil { + panic(err) + } + + fmt.Println("=============================ETH info=============================") + fmt.Println("bsc erc20:", erc20Addr.Hex()) + fmt.Println("bsc ope4:", oep4Addr.Hex()) + fmt.Println("bsc eccd address:", eccdAddr.Hex()) + fmt.Println("bsc eccm address:", eccmAddr.Hex()) + fmt.Println("bsc eccmp address:", eccmpAddr.Hex()) + fmt.Println("bsc lock proxy address: ", lockProxyAddr.Hex()) + fmt.Println("bsc ongx address: ", ongxAddr.Hex()) + fmt.Println("bsc ontx proxy address: ", ontxAddr.Hex()) + fmt.Println("==================================================================") + + config.DefConfig.OkErc20 = erc20Addr.Hex() + config.DefConfig.OkOep4 = oep4Addr.Hex() + config.DefConfig.OkEccd = eccdAddr.Hex() + config.DefConfig.OkEccm = eccmAddr.Hex() + config.DefConfig.OkEccmp = eccmpAddr.Hex() + config.DefConfig.OkLockProxy = lockProxyAddr.Hex() + config.DefConfig.OkOngx = ongxAddr.Hex() + config.DefConfig.OkOntx = ontxAddr.Hex() + + if err := config.DefConfig.Save(ethConfFile); err != nil { + panic(fmt.Errorf("failed to save config, you better save it youself: %v", err)) + } +} + +func SetupBep20(ethInvoker *eth.EInvoker) { + if config.DefConfig.OntBep20 != "" { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.OkLockProxy, config.DefConfig.OkErc20, + config.DefConfig.OntBep20, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding bep20 of ontology on ok: ( txhash: %s )\n", hash.String()) + } + + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.OkLockProxy, config.DefConfig.OkErc20, + config.CM_BEP20, config.DefConfig.CMCrossChainId, 0) + if err != nil { + panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding bep20 of cosmos on ok: ( txhash: %s )\n", hash.String()) +} + +func SetupWBTC(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.OkLockProxy, config.DefConfig.OkWBTC, + config.DefConfig.OntWBTC, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupWBTC, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding WBTC of ontology on ok: ( txhash: %s )\n", hash.String()) +} + +func SetupDAI(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.OkLockProxy, config.DefConfig.OkDai, + config.DefConfig.OntDai, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupDAI, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding DAI of ontology on ok: ( txhash: %s )\n", hash.String()) +} + +func SetupUSDT(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.OkLockProxy, config.DefConfig.OkUSDT, + config.DefConfig.OntUSDT, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupUSDT, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding USDT of ontology on ok: ( txhash: %s )\n", hash.String()) +} + +func SetupUSDC(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, config.DefConfig.BscUSDC, + config.DefConfig.OntUSDC, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupUSDC, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding USDC of ontology on bsc: ( txhash: %s )\n", hash.String()) +} + +func SetupOntAsset(invoker *eth.EInvoker) { + if config.DefConfig.OkLockProxy == "" { + panic(fmt.Errorf("OkLockProxy is blank")) + } + if config.DefConfig.OkOntx == "" { + panic(fmt.Errorf("OkOntx is blank")) + } + if config.DefConfig.OkOngx == "" { + panic(fmt.Errorf("OkOngx is blank")) + } + if config.DefConfig.OkOep4 == "" { + panic(fmt.Errorf("OkOep4 is blank")) + } + if config.DefConfig.OntOep4 == "" { + panic(fmt.Errorf("OntOep4 is blank")) + } + + txs, err := invoker.BindOntAsset(config.DefConfig.OkLockProxy, config.DefConfig.OkOntx, config.DefConfig.OkOngx, + config.DefConfig.OkOep4, config.DefConfig.OntOep4) + if err != nil { + panic(err) + } + hash1, hash2, hash3 := txs[0].Hash(), txs[1].Hash(), txs[2].Hash() + fmt.Printf("ont/ong/oep4 binding tx on ontology: %s/%s/%s\n", hash1.String(), hash2.String(), hash3.String()) + + hash4, hash5, hash6 := txs[3].Hash(), txs[4].Hash(), txs[5].Hash() + fmt.Printf("ont/ong/oep4 binding tx on cosmos: %s/%s/%s\n", hash4.String(), hash5.String(), hash6.String()) +} + +func SetupBnb(ethInvoker *eth.EInvoker) { + ethNativeAddr := "0x0000000000000000000000000000000000000000" + if config.DefConfig.OntBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, ethNativeAddr, config.DefConfig.OntBnb, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnbx of ontology on bsc: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.EthBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, ethNativeAddr, config.DefConfig.EthBnb, config.DefConfig.EthChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnb of bsc on ethereum: ( txhash: %s )\n", hash.String()) + } + if config.DefConfig.NeoBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, ethNativeAddr, config.DefConfig.NeoBnb, config.DefConfig.NeoChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2Neo, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnb of bsc on neo: ( txhash: %s )\n", hash.String()) + } + + tx, err := ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, ethNativeAddr, config.CM_BNBX, config.DefConfig.CMCrossChainId, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2COSMOS, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnbx of cosmos on bsc: ( txhash: %s )\n", hash.String()) + + tx, err = ethInvoker.BindAssetHash(config.DefConfig.BscLockProxy, ethNativeAddr, ethNativeAddr, config.DefConfig.BscChainID, 0) + if err != nil { + panic(fmt.Errorf("BindAssetHash, failed to bind asset hash: %v", err)) + } + hash = tx.Hash() + fmt.Printf("binding bnb of bsc on bsc: ( txhash: %s )\n", hash.String()) +} + +func SetOtherLockProxy(invoker *eth.EInvoker) { + _, contract, err := invoker.MakeLockProxy(config.DefConfig.OkLockProxy) + if err != nil { + panic(fmt.Errorf("failed to MakeLockProxy: %v", err)) + } + if config.DefConfig.OntLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other, err := common.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + panic(fmt.Errorf("failed to AddressFromHexString: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.OntChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %")) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding ont proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.CMLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + raw, err := hex.DecodeString(config.DefConfig.CMLockProxy) + if err != nil { + panic(fmt.Errorf("failed to decode: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.CMCrossChainId, raw) + if err != nil { + panic(fmt.Errorf("failed to bind COSMOS proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding cosmos proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.OkLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other := common2.HexToAddress(config.DefConfig.OkLockProxy) + tx, err := contract.BindProxyHash(auth, config.DefConfig.OkChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding ok proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.BscLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other := common2.HexToAddress(config.DefConfig.BscLockProxy) + tx, err := contract.BindProxyHash(auth, config.DefConfig.BscChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding bsc proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.EthLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other := common2.HexToAddress(config.DefConfig.EthLockProxy) + tx, err := contract.BindProxyHash(auth, config.DefConfig.EthChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding eth proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.NeoLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) + if err != nil { + panic(fmt.Errorf("UInt160FromString error: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.NeoChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding neo proxy: ( txhash: %s )\n", hash.String()) + } +} + +func SetUpEthContracts() { + invoker := eth.NewEInvoker(config.DefConfig.BscChainID) + SetupBnb(invoker) + if config.DefConfig.OkErc20 != "" { + SetupBep20(invoker) + } + if config.DefConfig.OntLockProxy != "" { + SetupOntAsset(invoker) + } + if config.DefConfig.OkWBTC != "" { + SetupWBTC(invoker) + } + if config.DefConfig.OkDai != "" { + SetupDAI(invoker) + } + if config.DefConfig.OkUSDT != "" { + SetupUSDT(invoker) + } + + //SetupUSDC(invoker) + SetOtherLockProxy(invoker) +} diff --git a/config/config.go b/config/config.go index c6c4127..1ebb59e 100644 --- a/config/config.go +++ b/config/config.go @@ -45,6 +45,7 @@ type TestConfig struct { NeoChainID uint64 BscChainID uint64 MscChainID uint64 + OkChainID uint64 BtcRestAddr string BtcRestUser string @@ -71,6 +72,9 @@ type TestConfig struct { MSCURL string MSCPrivateKey string + // ok urls + OKURL string + OKPrivateKey string // bsc urls BSCURL string BSCPrivateKey string @@ -128,6 +132,21 @@ type TestConfig struct { MscUSDC string MscNeo string MscRenBTC string + // ok contracts: auto set after deploy + OkEccd string + OkEccm string + OkEccmp string + OkLockProxy string + OkErc20 string + OkOep4 string + OkOngx string + OkOntx string + OkWBTC string + OkUSDT string + OkDai string + OkUSDC string + OkNeo string + OkRenBTC string // bsc contracts: auto set after deploy BscEccd string BscEccm string diff --git a/testcase/testcase.go b/testcase/testcase.go index 06ea06f..dba3786 100644 --- a/testcase/testcase.go +++ b/testcase/testcase.go @@ -1270,6 +1270,7 @@ func MscMxToMsc(ctx *testframework.TestFrameworkContext, status *testframework.C return false } log.Infof("MscMxToMsc, send %d mx to Msc, waiting for confirmation...", amt) + WaitUntilClean(status) log.Infof("MscMxToMsc, mx all received ( batch: %d )", i) From 4957a20f66a042fab73dc85133521898f1ad7362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Wed, 24 Mar 2021 11:31:16 +0800 Subject: [PATCH 34/96] add ok support --- chains/eth/eth_invoker.go | 3 +++ chains/eth/eth_tools.go | 5 +++++ cmd/ok_deployer/run.go | 16 ++++++++-------- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index 1655b64..71fadb0 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -130,6 +130,7 @@ func (ethInvoker *EInvoker) DeployEthChainDataContract() (ethComm.Address, *eccd if err != nil { return ethComm.Address{}, nil, fmt.Errorf("DeployEthChainDataContract, err: %v", err) } + ethInvoker.ETHUtil.WaitTransactionConfirm(tx.Hash()) return contractAddress, contract, nil } @@ -219,6 +220,8 @@ func (ethInvoker *EInvoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetH toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.MscChainID { toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.OkChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.NeoChainID { other, err := helper.UInt160FromString(toAssetHash) if err != nil { diff --git a/chains/eth/eth_tools.go b/chains/eth/eth_tools.go index 02f7de4..0ed7086 100644 --- a/chains/eth/eth_tools.go +++ b/chains/eth/eth_tools.go @@ -325,8 +325,13 @@ func (self *ETHTools) WaitTransactionsConfirm(hashs []common.Hash) { } func (self *ETHTools) WaitTransactionConfirm(hash common.Hash) { + start := time.Now() for { time.Sleep(time.Millisecond * 100) + if time.Now().After(start.Add(time.Second * 10)) { + log.Errorf("WaitTransactionConfirm max wait time exceeded, quit") + return + } _, ispending, err := self.ethclient.TransactionByHash(context.Background(), hash) if err != nil { log.Errorf("failed to call TransactionByHash: %v hash:%s", err, hash.String()) diff --git a/cmd/ok_deployer/run.go b/cmd/ok_deployer/run.go index b243b57..cd9f5c5 100644 --- a/cmd/ok_deployer/run.go +++ b/cmd/ok_deployer/run.go @@ -127,14 +127,14 @@ func DeployETHSmartContract() { } fmt.Println("=============================ETH info=============================") - fmt.Println("bsc erc20:", erc20Addr.Hex()) - fmt.Println("bsc ope4:", oep4Addr.Hex()) - fmt.Println("bsc eccd address:", eccdAddr.Hex()) - fmt.Println("bsc eccm address:", eccmAddr.Hex()) - fmt.Println("bsc eccmp address:", eccmpAddr.Hex()) - fmt.Println("bsc lock proxy address: ", lockProxyAddr.Hex()) - fmt.Println("bsc ongx address: ", ongxAddr.Hex()) - fmt.Println("bsc ontx proxy address: ", ontxAddr.Hex()) + fmt.Println("ok erc20:", erc20Addr.Hex()) + fmt.Println("ok ope4:", oep4Addr.Hex()) + fmt.Println("ok eccd address:", eccdAddr.Hex()) + fmt.Println("ok eccm address:", eccmAddr.Hex()) + fmt.Println("ok eccmp address:", eccmpAddr.Hex()) + fmt.Println("ok lock proxy address: ", lockProxyAddr.Hex()) + fmt.Println("ok ongx address: ", ongxAddr.Hex()) + fmt.Println("ok ontx proxy address: ", ontxAddr.Hex()) fmt.Println("==================================================================") config.DefConfig.OkErc20 = erc20Addr.Hex() From b037c282a2492e2461fa07bed7a8fb8317c6f589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Thu, 25 Mar 2021 10:35:42 +0800 Subject: [PATCH 35/96] mod cosmos --- chains/cosmos/cosmos_invoker.go | 17 ++++--- cmd/tools/run.go | 84 ++++++++++++++++++--------------- 2 files changed, 57 insertions(+), 44 deletions(-) diff --git a/chains/cosmos/cosmos_invoker.go b/chains/cosmos/cosmos_invoker.go index 99877a2..3d42274 100644 --- a/chains/cosmos/cosmos_invoker.go +++ b/chains/cosmos/cosmos_invoker.go @@ -19,6 +19,11 @@ package cosmos import ( "encoding/hex" "fmt" + "io/ioutil" + "strings" + "sync" + "time" + "github.com/btcsuite/btcutil" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/mintkey" @@ -28,7 +33,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/bank" "github.com/cosmos/cosmos-sdk/x/staking" "github.com/ethereum/go-ethereum/common" - "github.com/ontio/ontology-go-sdk" + ontology_go_sdk "github.com/ontio/ontology-go-sdk" common2 "github.com/ontio/ontology/common" "github.com/polynetwork/cosmos-poly-module/btcx" "github.com/polynetwork/cosmos-poly-module/headersync" @@ -39,11 +44,7 @@ import ( "github.com/tendermint/tendermint/libs/bytes" "github.com/tendermint/tendermint/privval" "github.com/tendermint/tendermint/rpc/client/http" - "github.com/tendermint/tendermint/rpc/core/types" - "io/ioutil" - "strings" - "sync" - "time" + coretypes "github.com/tendermint/tendermint/rpc/core/types" ) type CosmosInvoker struct { @@ -78,6 +79,10 @@ func NewCosmosInvoker() (*CosmosInvoker, error) { return nil, err } invoker.CMCdc = NewCodec() + // okexchain doesn't use cosmos account + if conf.CMChainId == "okexchain" { + return invoker, nil + } invoker.Acc, err = NewCosmosAcc(conf.CMWalletPath, conf.CMWalletPwd, invoker.RpcCli, invoker.CMCdc) if err != nil { diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 25758a9..a8b7a46 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -36,6 +36,8 @@ import ( "github.com/joeqian10/neo-gogogo/block" "github.com/joeqian10/neo-gogogo/helper/io" "github.com/joeqian10/neo-gogogo/rpc" + + // oksdk "github.com/okex/okexchain-go-sdk" "github.com/ontio/ontology-crypto/keypair" ontology_go_sdk "github.com/ontio/ontology-go-sdk" common2 "github.com/ontio/ontology/common" @@ -823,51 +825,57 @@ func SyncNeoGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou } func SyncCosmosGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { - invoker, err := cosmos2.NewCosmosInvoker() - if err != nil { - panic(err) - } - - res, err := invoker.RpcCli.Commit(&config.DefConfig.CMEpoch) - if err != nil { - panic(err) - } - vals, err := getValidators(invoker.RpcCli, config.DefConfig.CMEpoch) - if err != nil { - panic(err) - } - ch := &cosmos.CosmosHeader{ - Header: *res.Header, - Commit: res.Commit, - Valsets: vals, - } - raw, err := invoker.CMCdc.MarshalBinaryBare(ch) - if err != nil { - panic(err) - } - txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.CMCrossChainId, raw, accArr) - if err != nil { - if strings.Contains(err.Error(), "had been initialized") { - log.Info("cosmos already synced") + if config.DefConfig.CMChainId != "okexchain" { + invoker, err := cosmos2.NewCosmosInvoker() + if err != nil { + panic(err) + } + res, err := invoker.RpcCli.Commit(&config.DefConfig.CMEpoch) + if err != nil { + panic(err) + } + vals, err := getValidators(invoker.RpcCli, config.DefConfig.CMEpoch) + if err != nil { + panic(err) + } + ch := &cosmos.CosmosHeader{ + Header: *res.Header, + Commit: res.Commit, + Valsets: vals, + } + raw, err := invoker.CMCdc.MarshalBinaryBare(ch) + if err != nil { + panic(err) + } + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.CMCrossChainId, raw, accArr) + if err != nil { + if strings.Contains(err.Error(), "had been initialized") { + log.Info("cosmos already synced") + } else { + panic(err) + } } else { + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to sync cosmos genesis header: ( txhash: %s )", txhash.ToHexString()) + } + + header, err := poly.GetHeaderByHeight(config.DefConfig.RCEpoch) + if err != nil { panic(err) } - } else { - testcase.WaitPolyTx(txhash, poly) - log.Infof("successful to sync cosmos genesis header: ( txhash: %s )", txhash.ToHexString()) - } - header, err := poly.GetHeaderByHeight(config.DefConfig.RCEpoch) - if err != nil { - panic(err) - } + tx, err := invoker.SyncPolyGenesisHdr(invoker.Acc.Acc, header.ToArray()) + if err != nil { + panic(err) + } - tx, err := invoker.SyncPolyGenesisHdr(invoker.Acc.Acc, header.ToArray()) - if err != nil { - panic(err) + log.Infof("successful to sync poly genesis header to cosmos: ( txhash: %s )", tx.Hash.String()) + } else { + // config, _ := oksdk.NewClientConfig(config.DefConfig.CMRpcUrl, "okexchain", oksdk.BroadcastBlock, "0.01okt", 20000, 0, "") + // oksdk.NewClient(config) + log.Infof("to sync to okex") } - log.Infof("successful to sync poly genesis header to cosmos: ( txhash: %s )", tx.Hash.String()) } func getValidators(rpc *http.HTTP, h int64) ([]*types2.Validator, error) { From 3b3792140923b6e8a2f033a5c0a10d70e6df6356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Thu, 25 Mar 2021 10:59:21 +0800 Subject: [PATCH 36/96] add o3 deployer --- chains/eth/eth_invoker.go | 6 + cmd/o3_deployer/run.go | 403 ++++++++++++++++++++++++++++++++++++++ config/config.go | 19 ++ 3 files changed, 428 insertions(+) create mode 100644 cmd/o3_deployer/run.go diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index 71fadb0..bbe4ee6 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -77,6 +77,8 @@ func (ethInvoker *EInvoker) url() string { return ethInvoker.TConfiguration.EthURL case ethInvoker.TConfiguration.OkChainID: return ethInvoker.TConfiguration.OKURL + case ethInvoker.TConfiguration.O3ChainID: + return ethInvoker.TConfiguration.O3URL default: panic(fmt.Sprintf("unknown chain id:%d", ethInvoker.ChainID)) } @@ -92,6 +94,8 @@ func (ethInvoker *EInvoker) privateKey() string { return ethInvoker.TConfiguration.ETHPrivateKey case ethInvoker.TConfiguration.OkChainID: return ethInvoker.TConfiguration.OKPrivateKey + case ethInvoker.TConfiguration.O3ChainID: + return ethInvoker.TConfiguration.O3PrivateKey default: panic(fmt.Sprintf("unknown chain id:%d", ethInvoker.ChainID)) } @@ -222,6 +226,8 @@ func (ethInvoker *EInvoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetH toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.OkChainID { toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.O3ChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.NeoChainID { other, err := helper.UInt160FromString(toAssetHash) if err != nil { diff --git a/cmd/o3_deployer/run.go b/cmd/o3_deployer/run.go new file mode 100644 index 0000000..0f7cf91 --- /dev/null +++ b/cmd/o3_deployer/run.go @@ -0,0 +1,403 @@ +/* +* Copyright (C) 2020 The poly network Authors +* This file is part of The poly network library. +* +* The poly network is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* The poly network is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* You should have received a copy of the GNU Lesser General Public License +* along with The poly network . If not, see . + */ +package main + +import ( + "encoding/hex" + "flag" + "fmt" + + common2 "github.com/ethereum/go-ethereum/common" + "github.com/joeqian10/neo-gogogo/helper" + "github.com/ontio/ontology/common" + "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/config" +) + +var ( + fnEth string + ethConfFile string + eccmRedeploy int +) + +func init() { + flag.StringVar(&fnEth, "func", "deploy", "choose function to run: deploy or setup") + flag.StringVar(ðConfFile, "conf", "./config.json", "config file path") + flag.IntVar(&eccmRedeploy, "redeploy_eccm", 1, "redeploy eccd, eccm and eccmp or not") + flag.Parse() +} + +func main() { + err := config.DefConfig.Init(ethConfFile) + if err != nil { + panic(err) + } + + switch fnEth { + case "deploy": + DeployETHSmartContract() + case "setup": + SetUpEthContracts() + } +} + +func DeployETHSmartContract() { + invoker := eth.NewEInvoker(config.DefConfig.O3ChainID) + var ( + eccdAddr common2.Address + eccmAddr common2.Address + eccmpAddr common2.Address + err error + ) + if eccmRedeploy == 1 { + eccdAddr, _, err = invoker.DeployEthChainDataContract() + if err != nil { + panic(err) + } + + eccmAddr, _, err = invoker.DeployECCMContract(eccdAddr.Hex()) + if err != nil { + panic(err) + } + eccmpAddr, _, err = invoker.DeployECCMPContract(eccmAddr.Hex()) + if err != nil { + panic(err) + } + _, err = invoker.TransferOwnershipForECCD(eccdAddr.Hex(), eccmAddr.Hex()) + if err != nil { + panic(err) + } + _, err = invoker.TransferOwnershipForECCM(eccmAddr.Hex(), eccmpAddr.Hex()) + if err != nil { + panic(err) + } + } else { + eccdAddr = common2.HexToAddress(config.DefConfig.O3Eccd) + eccmAddr = common2.HexToAddress(config.DefConfig.O3Eccm) + eccmpAddr = common2.HexToAddress(config.DefConfig.O3Eccmp) + } + + lockProxyAddr, _, err := invoker.DeployLockProxyContract(eccmpAddr) + if err != nil { + panic(err) + } + + lockproxyAddrHex := lockProxyAddr.Hex() + erc20Addr, erc20, err := invoker.DeployERC20() + if err != nil { + panic(err) + } + + total, err := erc20.TotalSupply(nil) + if err != nil { + panic(fmt.Errorf("failed to get total supply for erc20: %v", err)) + } + auth, _ := invoker.MakeSmartContractAuth() + tx, err := erc20.Approve(auth, lockProxyAddr, total) + if err != nil { + panic(fmt.Errorf("failed to approve erc20 to lockproxy: %v", err)) + } + invoker.ETHUtil.WaitTransactionConfirm(tx.Hash()) + + oep4Addr, _, err := invoker.DeployOEP4(lockproxyAddrHex) + if err != nil { + panic(err) + } + ongxAddr, _, err := invoker.DeployONGXContract(lockproxyAddrHex) + if err != nil { + panic(err) + } + ontxAddr, _, err := invoker.DeployONTXContract(lockproxyAddrHex) + if err != nil { + panic(err) + } + + fmt.Println("=============================ETH info=============================") + fmt.Println("o3 erc20:", erc20Addr.Hex()) + fmt.Println("o3 ope4:", oep4Addr.Hex()) + fmt.Println("o3 eccd address:", eccdAddr.Hex()) + fmt.Println("o3 eccm address:", eccmAddr.Hex()) + fmt.Println("o3 eccmp address:", eccmpAddr.Hex()) + fmt.Println("o3 lock proxy address: ", lockProxyAddr.Hex()) + fmt.Println("o3 ongx address: ", ongxAddr.Hex()) + fmt.Println("o3 ontx proxy address: ", ontxAddr.Hex()) + fmt.Println("==================================================================") + + config.DefConfig.O3Erc20 = erc20Addr.Hex() + config.DefConfig.O3Oep4 = oep4Addr.Hex() + config.DefConfig.O3Eccd = eccdAddr.Hex() + config.DefConfig.O3Eccm = eccmAddr.Hex() + config.DefConfig.O3Eccmp = eccmpAddr.Hex() + config.DefConfig.O3LockProxy = lockProxyAddr.Hex() + config.DefConfig.O3Ongx = ongxAddr.Hex() + config.DefConfig.O3Ontx = ontxAddr.Hex() + + if err := config.DefConfig.Save(ethConfFile); err != nil { + panic(fmt.Errorf("failed to save config, you better save it youself: %v", err)) + } +} + +func SetupBep20(ethInvoker *eth.EInvoker) { + if config.DefConfig.OntBep20 != "" { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, config.DefConfig.O3Erc20, + config.DefConfig.OntBep20, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding bep20 of ontology on o3: ( txhash: %s )\n", hash.String()) + } + + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, config.DefConfig.O3Erc20, + config.CM_BEP20, config.DefConfig.CMCrossChainId, 0) + if err != nil { + panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding bep20 of cosmos on o3: ( txhash: %s )\n", hash.String()) +} + +func SetupWBTC(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, config.DefConfig.O3WBTC, + config.DefConfig.OntWBTC, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupWBTC, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding WBTC of ontology on o3: ( txhash: %s )\n", hash.String()) +} + +func SetupDAI(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, config.DefConfig.O3Dai, + config.DefConfig.OntDai, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupDAI, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding DAI of ontology on o3: ( txhash: %s )\n", hash.String()) +} + +func SetupUSDT(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, config.DefConfig.O3USDT, + config.DefConfig.OntUSDT, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupUSDT, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding USDT of ontology on o3: ( txhash: %s )\n", hash.String()) +} + +func SetupUSDC(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, config.DefConfig.O3USDC, + config.DefConfig.OntUSDC, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupUSDC, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding USDC of ontology on o3: ( txhash: %s )\n", hash.String()) +} + +func SetupOntAsset(invoker *eth.EInvoker) { + if config.DefConfig.O3LockProxy == "" { + panic(fmt.Errorf("BscLockProxy is blank")) + } + if config.DefConfig.O3Ontx == "" { + panic(fmt.Errorf("BscOntx is blank")) + } + if config.DefConfig.O3Ongx == "" { + panic(fmt.Errorf("BscOngx is blank")) + } + if config.DefConfig.O3Oep4 == "" { + panic(fmt.Errorf("BscOep4 is blank")) + } + if config.DefConfig.OntOep4 == "" { + panic(fmt.Errorf("OntOep4 is blank")) + } + + txs, err := invoker.BindOntAsset(config.DefConfig.O3LockProxy, config.DefConfig.O3Ontx, config.DefConfig.O3Ongx, + config.DefConfig.O3Oep4, config.DefConfig.OntOep4) + if err != nil { + panic(err) + } + hash1, hash2, hash3 := txs[0].Hash(), txs[1].Hash(), txs[2].Hash() + fmt.Printf("ont/ong/oep4 binding tx on ontology: %s/%s/%s\n", hash1.String(), hash2.String(), hash3.String()) + + hash4, hash5, hash6 := txs[3].Hash(), txs[4].Hash(), txs[5].Hash() + fmt.Printf("ont/ong/oep4 binding tx on cosmos: %s/%s/%s\n", hash4.String(), hash5.String(), hash6.String()) +} + +func SetupBnb(ethInvoker *eth.EInvoker) { + ethNativeAddr := "0x0000000000000000000000000000000000000000" + if config.DefConfig.OntBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, ethNativeAddr, config.DefConfig.OntBnb, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnbx of ontology on o3: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.EthBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, ethNativeAddr, config.DefConfig.EthBnb, config.DefConfig.EthChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnb of o3 on ethereum: ( txhash: %s )\n", hash.String()) + } + if config.DefConfig.NeoBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, ethNativeAddr, config.DefConfig.NeoBnb, config.DefConfig.NeoChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2Neo, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnb of o3 on neo: ( txhash: %s )\n", hash.String()) + } + + tx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, ethNativeAddr, config.CM_BNBX, config.DefConfig.CMCrossChainId, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2COSMOS, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnbx of cosmos on o3: ( txhash: %s )\n", hash.String()) + + tx, err = ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, ethNativeAddr, ethNativeAddr, config.DefConfig.BscChainID, 0) + if err != nil { + panic(fmt.Errorf("BindAssetHash, failed to bind asset hash: %v", err)) + } + hash = tx.Hash() + fmt.Printf("binding bnb of o3 on bsc: ( txhash: %s )\n", hash.String()) +} + +func SetOtherLockProxy(invoker *eth.EInvoker) { + _, contract, err := invoker.MakeLockProxy(config.DefConfig.O3LockProxy) + if err != nil { + panic(fmt.Errorf("failed to MakeLockProxy: %v", err)) + } + if config.DefConfig.OntLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other, err := common.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + panic(fmt.Errorf("failed to AddressFromHexString: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.OntChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %")) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding ont proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.CMLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + raw, err := hex.DecodeString(config.DefConfig.CMLockProxy) + if err != nil { + panic(fmt.Errorf("failed to decode: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.CMCrossChainId, raw) + if err != nil { + panic(fmt.Errorf("failed to bind COSMOS proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding cosmos proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.BscLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other := common2.HexToAddress(config.DefConfig.BscLockProxy) + tx, err := contract.BindProxyHash(auth, config.DefConfig.BscChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding bsc proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.EthLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other := common2.HexToAddress(config.DefConfig.EthLockProxy) + tx, err := contract.BindProxyHash(auth, config.DefConfig.EthChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding eth proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.NeoLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) + if err != nil { + panic(fmt.Errorf("UInt160FromString error: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.NeoChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding neo proxy: ( txhash: %s )\n", hash.String()) + } +} + +func SetUpEthContracts() { + invoker := eth.NewEInvoker(config.DefConfig.O3ChainID) + SetupBnb(invoker) + if config.DefConfig.Bep20 != "" { + SetupBep20(invoker) + } + if config.DefConfig.OntLockProxy != "" { + SetupOntAsset(invoker) + } + if config.DefConfig.BscWBTC != "" { + SetupWBTC(invoker) + } + if config.DefConfig.BscDai != "" { + SetupDAI(invoker) + } + if config.DefConfig.BscUSDT != "" { + SetupUSDT(invoker) + } + + //SetupUSDC(invoker) + SetOtherLockProxy(invoker) +} diff --git a/config/config.go b/config/config.go index 1ebb59e..fefb5a1 100644 --- a/config/config.go +++ b/config/config.go @@ -44,6 +44,7 @@ type TestConfig struct { OntChainID uint64 NeoChainID uint64 BscChainID uint64 + O3ChainID uint64 MscChainID uint64 OkChainID uint64 @@ -78,6 +79,9 @@ type TestConfig struct { // bsc urls BSCURL string BSCPrivateKey string + // o3 urls + O3URL string + O3PrivateKey string // ontology OntJsonRpcAddress string @@ -162,6 +166,21 @@ type TestConfig struct { BscUSDC string BscNeo string BscRenBTC string + // o3 contracts: auto set after deploy + O3Eccd string + O3Eccm string + O3Eccmp string + O3LockProxy string + O3Erc20 string + O3Oep4 string + O3Ongx string + O3Ontx string + O3WBTC string + O3USDT string + O3Dai string + O3USDC string + O3Neo string + O3RenBTC string // eth contracts: auto set after deploy EthBnb string From a9f4e9d6e37c529bf82e7e889e3c022d102aa832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Thu, 25 Mar 2021 11:22:39 +0800 Subject: [PATCH 37/96] mod for o3 --- cmd/o3_deployer/run.go | 8 +-- cmd/tools/run.go | 142 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 146 insertions(+), 4 deletions(-) diff --git a/cmd/o3_deployer/run.go b/cmd/o3_deployer/run.go index 0f7cf91..ce51aad 100644 --- a/cmd/o3_deployer/run.go +++ b/cmd/o3_deployer/run.go @@ -382,19 +382,19 @@ func SetOtherLockProxy(invoker *eth.EInvoker) { func SetUpEthContracts() { invoker := eth.NewEInvoker(config.DefConfig.O3ChainID) SetupBnb(invoker) - if config.DefConfig.Bep20 != "" { + if config.DefConfig.O3Erc20 != "" { SetupBep20(invoker) } if config.DefConfig.OntLockProxy != "" { SetupOntAsset(invoker) } - if config.DefConfig.BscWBTC != "" { + if config.DefConfig.O3WBTC != "" { SetupWBTC(invoker) } - if config.DefConfig.BscDai != "" { + if config.DefConfig.O3Dai != "" { SetupDAI(invoker) } - if config.DefConfig.BscUSDT != "" { + if config.DefConfig.O3USDT != "" { SetupUSDT(invoker) } diff --git a/cmd/tools/run.go b/cmd/tools/run.go index a8b7a46..f96652d 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -166,6 +166,10 @@ func main() { if RegisterBSC(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BscChainID, poly, accArr) } + case config.DefConfig.O3ChainID: + if RegisterO3(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.O3ChainID, poly, accArr) + } case config.DefConfig.MscChainID: if registerMSC(poly, acc) { ApproveRegisterSideChain(config.DefConfig.MscChainID, poly, accArr) @@ -189,6 +193,9 @@ func main() { if RegisterBSC(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BscChainID, poly, accArr) } + if RegisterO3(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.O3ChainID, poly, accArr) + } if registerMSC(poly, acc) { ApproveRegisterSideChain(config.DefConfig.MscChainID, poly, accArr) } @@ -219,6 +226,8 @@ func main() { SyncCosmosGenesisHeader(poly, accArr) case config.DefConfig.BscChainID: SyncBSCGenesisHeader(poly, accArr) + case config.DefConfig.O3ChainID: + SyncO3GenesisHeader(poly, accArr) case config.DefConfig.MscChainID: SyncMSCGenesisHeader(poly, accArr) case 0: @@ -653,6 +662,99 @@ func SyncMSCGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou log.Infof("successful to sync poly genesis header to MSC: ( txhash: %s )", tx.Hash().String()) } +func SyncO3GenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { + tool := eth.NewEthTools(config.DefConfig.O3URL) + height, err := tool.GetNodeHeight() + if err != nil { + panic(err) + } + + epochHeight := height - height%200 + pEpochHeight := epochHeight - 200 + + hdr, err := tool.GetBlockHeader(epochHeight) + if err != nil { + panic(err) + } + phdr, err := tool.GetBlockHeader(pEpochHeight) + if err != nil { + panic(err) + } + pvalidators, err := bsc.ParseValidators(phdr.Extra[32 : len(phdr.Extra)-65]) + if err != nil { + panic(err) + } + + if len(hdr.Extra) <= 65+32 { + panic(fmt.Sprintf("invalid epoch header at height:%d", epochHeight)) + } + if len(phdr.Extra) <= 65+32 { + panic(fmt.Sprintf("invalid epoch header at height:%d", pEpochHeight)) + } + + genesisHeader := bsc.GenesisHeader{Header: *hdr, PrevValidators: []bsc.HeightAndValidators{ + {Height: big.NewInt(int64(pEpochHeight)), Validators: pvalidators}, + }} + raw, err := json.Marshal(genesisHeader) + if err != nil { + panic(err) + } + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.O3ChainID, raw, accArr) + if err != nil { + if strings.Contains(err.Error(), "had been initialized") { + log.Info("o3 already synced") + } else { + panic(fmt.Errorf("SyncO3GenesisHeader failed: %v", err)) + } + } else { + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to sync o3 genesis header: (height: %d, blk_hash: %s, txhash: %s )", epochHeight, + hdr.Hash().String(), txhash.ToHexString()) + } + + eccmContract, err := eccm_abi.NewEthCrossChainManager(common3.HexToAddress(config.DefConfig.O3Eccm), tool.GetEthClient()) + if err != nil { + panic(err) + } + signer, err := eth.NewEthSigner(config.DefConfig.O3PrivateKey) + if err != nil { + panic(err) + } + nonce := eth.NewNonceManager(tool.GetEthClient()).GetAddressNonce(signer.Address) + gasPrice, err := tool.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + panic(fmt.Errorf("SyncO3GenesisHeader, get suggest gas price failed error: %s", err.Error())) + } + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + auth := testcase.MakeEthAuth(signer, nonce, gasPrice.Uint64(), uint64(8000000)) + + 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)...) + } + + tx, err := eccmContract.InitGenesisBlock(auth, gB.Header.ToArray(), publickeys) + tool.WaitTransactionConfirm(tx.Hash()) + log.Infof("successful to sync poly genesis header to O3: ( txhash: %s )", tx.Hash().String()) +} + func SyncBSCGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { tool := eth.NewEthTools(config.DefConfig.BSCURL) height, err := tool.GetNodeHeight() @@ -1094,6 +1196,46 @@ func registerMSC(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { return true } +func RegisterO3(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + tool := eth.NewEthTools(config.DefConfig.O3URL) + chainID, err := tool.GetChainID() + if err != nil { + panic(err) + } + + blkToWait := uint64(15) + extra := bsc.ExtraInfo{ + ChainID: chainID, + } + + extraBytes, _ := json.Marshal(extra) + + eccd, err := hex.DecodeString(strings.Replace(config.DefConfig.O3Eccd, "0x", "", 1)) + if err != nil { + panic(fmt.Errorf("RegisterBSC, failed to decode eccd '%s' : %v", config.DefConfig.O3Eccd, err)) + } + + fmt.Println("config.DefConfig.O3ChainID", config.DefConfig.O3ChainID, "extraBytes", string(extraBytes), "O3Eccd", config.DefConfig.O3Eccd) + txhash, err := poly.Native.Scm.RegisterSideChainExt(acc.Address, config.DefConfig.O3ChainID, 6, "bsc", + blkToWait, eccd, extraBytes, acc) + if err != nil { + if strings.Contains(err.Error(), "already registered") { + log.Infof("bsc chain %d already registered", config.DefConfig.O3ChainID) + return false + } + if strings.Contains(err.Error(), "already requested") { + log.Infof("bsc chain %d already requested", config.DefConfig.O3ChainID) + return true + } + panic(fmt.Errorf("RegisterBSC failed: %v", err)) + } + + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to register o3 chain: ( txhash: %s )", txhash.ToHexString()) + + return true +} + func RegisterBSC(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { tool := eth.NewEthTools(config.DefConfig.BSCURL) chainID, err := tool.GetChainID() From 5922ea6ca2d7532517b89d504d93b39b8fa01f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Thu, 25 Mar 2021 13:35:28 +0800 Subject: [PATCH 38/96] o3too3 --- cmd/cctest/main.go | 18 ++++++++-- testcase/init.go | 1 + testcase/method.go | 54 ++++++++++++++++++++++++++++++ testcase/testcase.go | 18 ++++++++++ testframework/check.go | 4 +++ testframework/framework.go | 11 +++++- testframework/framework_context.go | 4 ++- 7 files changed, 105 insertions(+), 5 deletions(-) diff --git a/cmd/cctest/main.go b/cmd/cctest/main.go index eb22910..9f3065f 100644 --- a/cmd/cctest/main.go +++ b/cmd/cctest/main.go @@ -65,6 +65,8 @@ func main() { ethInvoker *eth.EInvoker bscInvoker *eth.EInvoker mscInvoker *eth.EInvoker + o3Invoker *eth.EInvoker + cmInvoker *cosmos.CosmosInvoker ) if config.DefConfig.EthChainID > 0 { ethInvoker = eth.NewEInvoker(config.DefConfig.EthChainID) @@ -78,6 +80,10 @@ func main() { mscInvoker = eth.NewEInvoker(config.DefConfig.MscChainID) } + if config.DefConfig.O3ChainID > 0 { + o3Invoker = eth.NewEInvoker(config.DefConfig.O3ChainID) + } + //btcInvoker, err := btc.NewBtcInvoker(config.DefConfig.RchainJsonRpcAddress, config.DefConfig.RCWallet, // config.DefConfig.RCWalletPwd, config.DefConfig.BtcRestAddr, config.DefConfig.BtcRestUser, // config.DefConfig.BtcRestPwd, config.DefConfig.BtcSignerPrivateKey) @@ -89,10 +95,13 @@ func main() { if err != nil { log.Warnf("failed to new a ont invoker, do not test cases about ONT: %v", err) } - cmInvoker, err := cosmos.NewCosmosInvoker() - if err != nil { - log.Warnf("failed to new a cosmos invoker, do not test cases about COSMOS: %v", err) + if config.DefConfig.CMCrossChainId > 0 { + cmInvoker, err = cosmos.NewCosmosInvoker() + if err != nil { + log.Warnf("failed to new a cosmos invoker, do not test cases about COSMOS: %v", err) + } } + neoInvoker, err := neo.NewNeoInvoker() if err != nil { log.Warnf("failed to new a neo invoker, do not test cases about NEO: %v", err) @@ -112,6 +121,9 @@ func main() { if mscInvoker != nil { testframework.TFramework.SetMSCInvoker(mscInvoker) } + if o3Invoker != nil { + testframework.TFramework.SetO3Invoker(o3Invoker) + } //testframework.TFramework.SetBtcInvoker(btcInvoker) testframework.TFramework.SetOntInvoker(ontInvoker) testframework.TFramework.SetCosmosInvoker(cmInvoker) diff --git a/testcase/init.go b/testcase/init.go index 65cb386..5d20b96 100644 --- a/testcase/init.go +++ b/testcase/init.go @@ -84,6 +84,7 @@ func init() { testframework.TFramework.RegTestCase("USDCCircle", USDCCircle) testframework.TFramework.RegTestCase("BnbToBsc", BnbToBsc) testframework.TFramework.RegTestCase("MscMxToMsc", MscMxToMsc) + testframework.TFramework.RegTestCase("O3ToO3", O3ToO3) testframework.TFramework.RegTestCase("EthToBsc", EthToBsc) testframework.TFramework.RegTestCase("EthEthToBscAndBack", EthEthToBscAndBack) testframework.TFramework.RegTestCase("BnbToEthAndBack", BnbToEthAndBack) diff --git a/testcase/method.go b/testcase/method.go index 6d91995..cbcbbdf 100644 --- a/testcase/method.go +++ b/testcase/method.go @@ -2307,6 +2307,60 @@ func SendEthCrossNeo(ctx *testframework.TestFrameworkContext, status *testframew return nil } +func SendO3CrossO3(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + gasPrice, err := ctx.O3Invoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendO3CrossO3, get suggest gas price failed error: %s", err.Error()) + } + + //gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendO3CrossO3, abi.JSON error:" + err.Error()) + } + rawFrom := ctx.O3Invoker.EthTestSigner.Address.Bytes() + assetaddress := ethcommon.HexToAddress("0000000000000000000000000000000000000000") + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.O3ChainID), rawFrom[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendO3CrossO3, contractabi.Pack error:" + err.Error()) + } + + contractAddr := ethcommon.HexToAddress(config.DefConfig.O3LockProxy) + callMsg := ethereum.CallMsg{ + From: ctx.O3Invoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(amount)), Data: txData, + } + gasLimit, err := ctx.O3Invoker.ETHUtil.GetEthClient().EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendO3CrossO3, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.O3Invoker.NM.GetAddressNonce(ctx.O3Invoker.EthTestSigner.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendO3CrossO3, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.O3Invoker.EthTestSigner.PrivateKey) + if err != nil { + return fmt.Errorf("SendO3CrossO3, types.SignTx error: %s", err.Error()) + } + + err = ctx.O3Invoker.ETHUtil.GetEthClient().SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendO3CrossO3, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"O3CrossO3", time.Now()}) + WaitTransactionConfirm(ctx.O3Invoker.ETHUtil.GetEthClient(), signedtx.Hash()) + return nil +} + func SendMxCrossMsc(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { gasPrice, err := ctx.MscInvoker.ETHUtil.GetEthClient().SuggestGasPrice(context.Background()) if err != nil { diff --git a/testcase/testcase.go b/testcase/testcase.go index dba3786..c0e7973 100644 --- a/testcase/testcase.go +++ b/testcase/testcase.go @@ -1262,6 +1262,24 @@ func EthEthToBscAndBack(ctx *testframework.TestFrameworkContext, status *testfra return true } +func O3ToO3(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { + amt := GetRandAmount(config.DefConfig.EthValLimit, 1) + if err := SendO3CrossO3(ctx, status, amt); err != nil { + log.Errorf("SendO3CrossO3 error: %v", err) + return false + } + log.Infof("O3ToO3, send %d O3 to O3, waiting for confirmation...", amt) + + WaitUntilClean(status) + + log.Infof("O3ToO3, mx all received ( batch: %d )", i) + } + + status.SetItSuccess(1) + return true +} + func MscMxToMsc(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { for i := uint64(0); i < config.DefConfig.BatchTxNum; i++ { amt := GetRandAmount(config.DefConfig.EthValLimit, 1) diff --git a/testframework/check.go b/testframework/check.go index ec8354a..5bef573 100644 --- a/testframework/check.go +++ b/testframework/check.go @@ -109,6 +109,8 @@ func getInvoker(ctx *TestFrameworkContext, chainID uint64) *eth.EInvoker { return ctx.BscInvoker case config.DefConfig.MscChainID: return ctx.MscInvoker + case config.DefConfig.O3ChainID: + return ctx.O3Invoker default: panic(fmt.Sprintf("unknown chain id:%d", chainID)) } @@ -122,6 +124,8 @@ func getEccm(chainID uint64) string { return config.DefConfig.BscEccm case config.DefConfig.MscChainID: return config.DefConfig.MscEccm + case config.DefConfig.O3ChainID: + return config.DefConfig.O3Eccm default: panic(fmt.Sprintf("unknown chain id:%d", chainID)) } diff --git a/testframework/framework.go b/testframework/framework.go index 6fc4f0d..c480f9e 100644 --- a/testframework/framework.go +++ b/testframework/framework.go @@ -58,6 +58,7 @@ type TestFramework struct { ethInvoker *eth.EInvoker bscInvoker *eth.EInvoker mscInvoker *eth.EInvoker + o3Invoker *eth.EInvoker btcInvoker *btc.BtcInvoker ontInvoker *ont.OntInvoker cosmosInvoker *cosmos.CosmosInvoker @@ -117,7 +118,7 @@ func (this *TestFramework) runTestList(testCaseList []TestCase, loopNumber int) this.onTestStart() defer this.onTestFinish(testCaseList) - ctx := NewTestFrameworkContext(this, testCaseList, this.rcSdk, this.ethInvoker, this.bscInvoker, this.mscInvoker, this.btcInvoker, + ctx := NewTestFrameworkContext(this, testCaseList, this.rcSdk, this.ethInvoker, this.bscInvoker, this.mscInvoker, this.o3Invoker, this.btcInvoker, this.ontInvoker, this.cosmosInvoker, this.neoInvoker) if this.ontInvoker != nil { go MonitorOnt(ctx) @@ -129,6 +130,9 @@ func (this *TestFramework) runTestList(testCaseList []TestCase, loopNumber int) if this.bscInvoker != nil { go MonitorEthLikeChain(ctx, config.DefConfig.BscChainID) } + if this.o3Invoker != nil { + go MonitorEthLikeChain(ctx, config.DefConfig.O3ChainID) + } if this.mscInvoker != nil { go MonitorEthLikeChain(ctx, config.DefConfig.MscChainID) } @@ -184,6 +188,11 @@ func (this *TestFramework) SetBSCInvoker(invoker *eth.EInvoker) { this.bscInvoker = invoker } +//SetO3Invoker instance to test framework +func (this *TestFramework) SetO3Invoker(invoker *eth.EInvoker) { + this.o3Invoker = invoker +} + //SetMSCInvoker instance to test framework func (this *TestFramework) SetMSCInvoker(invoker *eth.EInvoker) { this.mscInvoker = invoker diff --git a/testframework/framework_context.go b/testframework/framework_context.go index a6ce6ff..cf28a26 100644 --- a/testframework/framework_context.go +++ b/testframework/framework_context.go @@ -39,6 +39,7 @@ type TestFrameworkContext struct { EthInvoker *eth.EInvoker BscInvoker *eth.EInvoker MscInvoker *eth.EInvoker + O3Invoker *eth.EInvoker BtcInvoker *btc.BtcInvoker OntInvoker *ont.OntInvoker CMInvoker *cosmos.CosmosInvoker @@ -46,7 +47,7 @@ type TestFrameworkContext struct { } //NewTestFrameworkContext return a TestFrameworkContext instance -func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_go_sdk.PolySdk, eInvkr *eth.EInvoker, bscInvkr *eth.EInvoker, mscInvkr *eth.EInvoker, +func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_go_sdk.PolySdk, eInvkr, bscInvkr, mscInvkr, o3Invkr *eth.EInvoker, btcInvkr *btc.BtcInvoker, ontInvkr *ont.OntInvoker, cmInvoker *cosmos.CosmosInvoker, neoInvoker *neo.NeoInvoker) *TestFrameworkContext { ctx := &TestFrameworkContext{ Framework: fw, @@ -55,6 +56,7 @@ func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_ EthInvoker: eInvkr, BscInvoker: bscInvkr, MscInvoker: mscInvkr, + O3Invoker: o3Invkr, BtcInvoker: btcInvkr, OntInvoker: ontInvkr, CMInvoker: cmInvoker, From e0be86b7f635657cca7a3d065e8916d4abe69696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Thu, 25 Mar 2021 14:59:03 +0800 Subject: [PATCH 39/96] mod --- cmd/o3_deployer/run.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/o3_deployer/run.go b/cmd/o3_deployer/run.go index ce51aad..67efed8 100644 --- a/cmd/o3_deployer/run.go +++ b/cmd/o3_deployer/run.go @@ -219,19 +219,19 @@ func SetupUSDC(ethInvoker *eth.EInvoker) { func SetupOntAsset(invoker *eth.EInvoker) { if config.DefConfig.O3LockProxy == "" { - panic(fmt.Errorf("BscLockProxy is blank")) + panic(fmt.Errorf("O3LockProxy is blank")) } if config.DefConfig.O3Ontx == "" { - panic(fmt.Errorf("BscOntx is blank")) + panic(fmt.Errorf("O3Ontx is blank")) } if config.DefConfig.O3Ongx == "" { - panic(fmt.Errorf("BscOngx is blank")) + panic(fmt.Errorf("O3Ongx is blank")) } if config.DefConfig.O3Oep4 == "" { - panic(fmt.Errorf("BscOep4 is blank")) + panic(fmt.Errorf("O3Oep4 is blank")) } if config.DefConfig.OntOep4 == "" { - panic(fmt.Errorf("OntOep4 is blank")) + return } txs, err := invoker.BindOntAsset(config.DefConfig.O3LockProxy, config.DefConfig.O3Ontx, config.DefConfig.O3Ongx, From fd094b8b29c8eac9b21cf4029982003266ad584e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Thu, 25 Mar 2021 19:13:12 +0800 Subject: [PATCH 40/96] use clique for o3 --- cmd/tools/run.go | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index f96652d..d7f6de6 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -591,7 +591,7 @@ func SyncMSCGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou panic(err) } - epochHeight := height - height%30000 + epochHeight := height - height%200 hdr, err := tool.GetBlockHeader(epochHeight) if err != nil { @@ -670,32 +670,17 @@ func SyncO3GenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accoun } epochHeight := height - height%200 - pEpochHeight := epochHeight - 200 hdr, err := tool.GetBlockHeader(epochHeight) if err != nil { panic(err) } - phdr, err := tool.GetBlockHeader(pEpochHeight) - if err != nil { - panic(err) - } - pvalidators, err := bsc.ParseValidators(phdr.Extra[32 : len(phdr.Extra)-65]) - if err != nil { - panic(err) - } if len(hdr.Extra) <= 65+32 { panic(fmt.Sprintf("invalid epoch header at height:%d", epochHeight)) } - if len(phdr.Extra) <= 65+32 { - panic(fmt.Sprintf("invalid epoch header at height:%d", pEpochHeight)) - } - genesisHeader := bsc.GenesisHeader{Header: *hdr, PrevValidators: []bsc.HeightAndValidators{ - {Height: big.NewInt(int64(pEpochHeight)), Validators: pvalidators}, - }} - raw, err := json.Marshal(genesisHeader) + raw, err := json.Marshal(hdr) if err != nil { panic(err) } @@ -708,7 +693,7 @@ func SyncO3GenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accoun } } else { testcase.WaitPolyTx(txhash, poly) - log.Infof("successful to sync o3 genesis header: (height: %d, blk_hash: %s, txhash: %s )", epochHeight, + log.Infof("successful to sync o3 genesis header to poly: (height: %d, blk_hash: %s, txhash: %s )", epochHeight, hdr.Hash().String(), txhash.ToHexString()) } @@ -1204,30 +1189,32 @@ func RegisterO3(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { } blkToWait := uint64(15) - extra := bsc.ExtraInfo{ + extra := msc.ExtraInfo{ ChainID: chainID, + Period: 3, + Epoch: 200, } extraBytes, _ := json.Marshal(extra) eccd, err := hex.DecodeString(strings.Replace(config.DefConfig.O3Eccd, "0x", "", 1)) if err != nil { - panic(fmt.Errorf("RegisterBSC, failed to decode eccd '%s' : %v", config.DefConfig.O3Eccd, err)) + panic(fmt.Errorf("RegisterO3, failed to decode eccd '%s' : %v", config.DefConfig.O3Eccd, err)) } fmt.Println("config.DefConfig.O3ChainID", config.DefConfig.O3ChainID, "extraBytes", string(extraBytes), "O3Eccd", config.DefConfig.O3Eccd) - txhash, err := poly.Native.Scm.RegisterSideChainExt(acc.Address, config.DefConfig.O3ChainID, 6, "bsc", + txhash, err := poly.Native.Scm.RegisterSideChainExt(acc.Address, config.DefConfig.O3ChainID, 10, "o3", blkToWait, eccd, extraBytes, acc) if err != nil { if strings.Contains(err.Error(), "already registered") { - log.Infof("bsc chain %d already registered", config.DefConfig.O3ChainID) + log.Infof("o3 chain %d already registered", config.DefConfig.O3ChainID) return false } if strings.Contains(err.Error(), "already requested") { - log.Infof("bsc chain %d already requested", config.DefConfig.O3ChainID) + log.Infof("o3 chain %d already requested", config.DefConfig.O3ChainID) return true } - panic(fmt.Errorf("RegisterBSC failed: %v", err)) + panic(fmt.Errorf("RegisterO3 failed: %v", err)) } testcase.WaitPolyTx(txhash, poly) From bbb16b3026a9dc105624a7dabf557c1c513e1e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Fri, 26 Mar 2021 17:18:16 +0800 Subject: [PATCH 41/96] sync genesis for okex --- cmd/tools/run.go | 96 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 68 insertions(+), 28 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index d7f6de6..bc62651 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -912,57 +912,97 @@ func SyncNeoGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou } func SyncCosmosGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { + + invoker, err := cosmos2.NewCosmosInvoker() + if err != nil { + panic(err) + } + res, err := invoker.RpcCli.Commit(&config.DefConfig.CMEpoch) + if err != nil { + panic(err) + } + vals, err := getValidators(invoker.RpcCli, config.DefConfig.CMEpoch) + if err != nil { + panic(err) + } + ch := &cosmos.CosmosHeader{ + Header: *res.Header, + Commit: res.Commit, + Valsets: vals, + } + raw, err := invoker.CMCdc.MarshalBinaryBare(ch) + if err != nil { + panic(err) + } + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.CMCrossChainId, raw, accArr) + if err != nil { + if strings.Contains(err.Error(), "had been initialized") { + log.Info("cosmos already synced") + } else { + panic(err) + } + } else { + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to sync cosmos genesis header: ( txhash: %s )", txhash.ToHexString()) + } + if config.DefConfig.CMChainId != "okexchain" { - invoker, err := cosmos2.NewCosmosInvoker() + header, err := poly.GetHeaderByHeight(config.DefConfig.RCEpoch) if err != nil { panic(err) } - res, err := invoker.RpcCli.Commit(&config.DefConfig.CMEpoch) + + tx, err := invoker.SyncPolyGenesisHdr(invoker.Acc.Acc, header.ToArray()) if err != nil { panic(err) } - vals, err := getValidators(invoker.RpcCli, config.DefConfig.CMEpoch) + + log.Infof("successful to sync poly genesis header to cosmos: ( txhash: %s )", tx.Hash.String()) + } else { + tool := eth.NewEthTools(config.DefConfig.OKURL) + eccmContract, err := eccm_abi.NewEthCrossChainManager(common3.HexToAddress(config.DefConfig.OkEccm), tool.GetEthClient()) if err != nil { panic(err) } - ch := &cosmos.CosmosHeader{ - Header: *res.Header, - Commit: res.Commit, - Valsets: vals, - } - raw, err := invoker.CMCdc.MarshalBinaryBare(ch) + signer, err := eth.NewEthSigner(config.DefConfig.OKPrivateKey) if err != nil { panic(err) } - txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.CMCrossChainId, raw, accArr) + nonce := eth.NewNonceManager(tool.GetEthClient()).GetAddressNonce(signer.Address) + gasPrice, err := tool.GetEthClient().SuggestGasPrice(context.Background()) if err != nil { - if strings.Contains(err.Error(), "had been initialized") { - log.Info("cosmos already synced") - } else { - panic(err) - } - } else { - testcase.WaitPolyTx(txhash, poly) - log.Infof("successful to sync cosmos genesis header: ( txhash: %s )", txhash.ToHexString()) + panic(fmt.Errorf("SyncCosmosGenesisHeader, get suggest gas price failed error: %s", err.Error())) } + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + auth := testcase.MakeEthAuth(signer, nonce, gasPrice.Uint64(), uint64(8000000)) - header, err := poly.GetHeaderByHeight(config.DefConfig.RCEpoch) + 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)) + } - tx, err := invoker.SyncPolyGenesisHdr(invoker.Acc.Acc, header.ToArray()) - if err != nil { - panic(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) - log.Infof("successful to sync poly genesis header to cosmos: ( txhash: %s )", tx.Hash.String()) - } else { - // config, _ := oksdk.NewClientConfig(config.DefConfig.CMRpcUrl, "okexchain", oksdk.BroadcastBlock, "0.01okt", 20000, 0, "") - // oksdk.NewClient(config) - log.Infof("to sync to okex") - } + publickeys := make([]byte, 0) + for _, key := range bookkeepers { + publickeys = append(publickeys, ont.GetOntNoCompressKey(key)...) + } + tx, err := eccmContract.InitGenesisBlock(auth, gB.Header.ToArray(), publickeys) + tool.WaitTransactionConfirm(tx.Hash()) + + log.Infof("successful to sync poly genesis header to cosmos: ( txhash: %s )", tx.Hash().String()) + } } func getValidators(rpc *http.HTTP, h int64) ([]*types2.Validator, error) { From 5de694af597677259a187fe3e94ec6b03fa45d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Sat, 27 Mar 2021 15:11:35 +0800 Subject: [PATCH 42/96] add heco deployer --- chains/eth/eth_invoker.go | 6 + cmd/heco_deployer/run.go | 403 ++++++++++++++++++++++++++++++++++++++ cmd/tools/run.go | 146 ++++++++++++++ config/config.go | 35 +++- 4 files changed, 582 insertions(+), 8 deletions(-) create mode 100644 cmd/heco_deployer/run.go diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index bbe4ee6..e8ad16d 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -77,6 +77,8 @@ func (ethInvoker *EInvoker) url() string { return ethInvoker.TConfiguration.EthURL case ethInvoker.TConfiguration.OkChainID: return ethInvoker.TConfiguration.OKURL + case ethInvoker.TConfiguration.HecoChainID: + return ethInvoker.TConfiguration.HecoURL case ethInvoker.TConfiguration.O3ChainID: return ethInvoker.TConfiguration.O3URL default: @@ -94,6 +96,8 @@ func (ethInvoker *EInvoker) privateKey() string { return ethInvoker.TConfiguration.ETHPrivateKey case ethInvoker.TConfiguration.OkChainID: return ethInvoker.TConfiguration.OKPrivateKey + case ethInvoker.TConfiguration.HecoChainID: + return ethInvoker.TConfiguration.HecoPrivateKey case ethInvoker.TConfiguration.O3ChainID: return ethInvoker.TConfiguration.O3PrivateKey default: @@ -226,6 +230,8 @@ func (ethInvoker *EInvoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetH toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.OkChainID { toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.HecoChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.O3ChainID { toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.NeoChainID { diff --git a/cmd/heco_deployer/run.go b/cmd/heco_deployer/run.go new file mode 100644 index 0000000..9168593 --- /dev/null +++ b/cmd/heco_deployer/run.go @@ -0,0 +1,403 @@ +/* +* Copyright (C) 2020 The poly network Authors +* This file is part of The poly network library. +* +* The poly network is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* The poly network is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* You should have received a copy of the GNU Lesser General Public License +* along with The poly network . If not, see . + */ +package main + +import ( + "encoding/hex" + "flag" + "fmt" + + common2 "github.com/ethereum/go-ethereum/common" + "github.com/joeqian10/neo-gogogo/helper" + "github.com/ontio/ontology/common" + "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/config" +) + +var ( + fnEth string + ethConfFile string + eccmRedeploy int +) + +func init() { + flag.StringVar(&fnEth, "func", "deploy", "choose function to run: deploy or setup") + flag.StringVar(ðConfFile, "conf", "./config.json", "config file path") + flag.IntVar(&eccmRedeploy, "redeploy_eccm", 1, "redeploy eccd, eccm and eccmp or not") + flag.Parse() +} + +func main() { + err := config.DefConfig.Init(ethConfFile) + if err != nil { + panic(err) + } + + switch fnEth { + case "deploy": + DeployETHSmartContract() + case "setup": + SetUpEthContracts() + } +} + +func DeployETHSmartContract() { + invoker := eth.NewEInvoker(config.DefConfig.HecoChainID) + var ( + eccdAddr common2.Address + eccmAddr common2.Address + eccmpAddr common2.Address + err error + ) + if eccmRedeploy == 1 { + eccdAddr, _, err = invoker.DeployEthChainDataContract() + if err != nil { + panic(err) + } + + eccmAddr, _, err = invoker.DeployECCMContract(eccdAddr.Hex()) + if err != nil { + panic(err) + } + eccmpAddr, _, err = invoker.DeployECCMPContract(eccmAddr.Hex()) + if err != nil { + panic(err) + } + _, err = invoker.TransferOwnershipForECCD(eccdAddr.Hex(), eccmAddr.Hex()) + if err != nil { + panic(err) + } + _, err = invoker.TransferOwnershipForECCM(eccmAddr.Hex(), eccmpAddr.Hex()) + if err != nil { + panic(err) + } + } else { + eccdAddr = common2.HexToAddress(config.DefConfig.HecoEccd) + eccmAddr = common2.HexToAddress(config.DefConfig.HecoEccm) + eccmpAddr = common2.HexToAddress(config.DefConfig.HecoEccmp) + } + + lockProxyAddr, _, err := invoker.DeployLockProxyContract(eccmpAddr) + if err != nil { + panic(err) + } + + lockproxyAddrHex := lockProxyAddr.Hex() + erc20Addr, erc20, err := invoker.DeployERC20() + if err != nil { + panic(err) + } + + total, err := erc20.TotalSupply(nil) + if err != nil { + panic(fmt.Errorf("failed to get total supply for erc20: %v", err)) + } + auth, _ := invoker.MakeSmartContractAuth() + tx, err := erc20.Approve(auth, lockProxyAddr, total) + if err != nil { + panic(fmt.Errorf("failed to approve erc20 to lockproxy: %v", err)) + } + invoker.ETHUtil.WaitTransactionConfirm(tx.Hash()) + + oep4Addr, _, err := invoker.DeployOEP4(lockproxyAddrHex) + if err != nil { + panic(err) + } + ongxAddr, _, err := invoker.DeployONGXContract(lockproxyAddrHex) + if err != nil { + panic(err) + } + ontxAddr, _, err := invoker.DeployONTXContract(lockproxyAddrHex) + if err != nil { + panic(err) + } + + fmt.Println("=============================ETH info=============================") + fmt.Println("heco erc20:", erc20Addr.Hex()) + fmt.Println("heco ope4:", oep4Addr.Hex()) + fmt.Println("heco eccd address:", eccdAddr.Hex()) + fmt.Println("heco eccm address:", eccmAddr.Hex()) + fmt.Println("heco eccmp address:", eccmpAddr.Hex()) + fmt.Println("heco lock proxy address: ", lockProxyAddr.Hex()) + fmt.Println("heco ongx address: ", ongxAddr.Hex()) + fmt.Println("heco ontx proxy address: ", ontxAddr.Hex()) + fmt.Println("==================================================================") + + config.DefConfig.HecoErc20 = erc20Addr.Hex() + config.DefConfig.HecoOep4 = oep4Addr.Hex() + config.DefConfig.HecoEccd = eccdAddr.Hex() + config.DefConfig.HecoEccm = eccmAddr.Hex() + config.DefConfig.HecoEccmp = eccmpAddr.Hex() + config.DefConfig.HecoLockProxy = lockProxyAddr.Hex() + config.DefConfig.HecoOngx = ongxAddr.Hex() + config.DefConfig.HecoOntx = ontxAddr.Hex() + + if err := config.DefConfig.Save(ethConfFile); err != nil { + panic(fmt.Errorf("failed to save config, you better save it youself: %v", err)) + } +} + +func SetupBep20(ethInvoker *eth.EInvoker) { + if config.DefConfig.OntBep20 != "" { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.HecoLockProxy, config.DefConfig.HecoErc20, + config.DefConfig.OntBep20, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding bep20 of ontology on heco: ( txhash: %s )\n", hash.String()) + } + + // bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.HecoLockProxy, config.DefConfig.HecoErc20, + // config.CM_BEP20, config.DefConfig.CMCrossChainId, 0) + // if err != nil { + // panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + // } + // ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + // hash := bindTx.Hash() + // fmt.Printf("binding bep20 of cosmos on heco: ( txhash: %s )\n", hash.String()) +} + +func SetupWBTC(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.HecoLockProxy, config.DefConfig.HecoWBTC, + config.DefConfig.OntWBTC, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupWBTC, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding WBTC of ontology on heco: ( txhash: %s )\n", hash.String()) +} + +func SetupDAI(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.HecoLockProxy, config.DefConfig.HecoDai, + config.DefConfig.OntDai, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupDAI, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding DAI of ontology on heco: ( txhash: %s )\n", hash.String()) +} + +func SetupUSDT(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.HecoLockProxy, config.DefConfig.HecoUSDT, + config.DefConfig.OntUSDT, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupUSDT, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding USDT of ontology on heco: ( txhash: %s )\n", hash.String()) +} + +func SetupUSDC(ethInvoker *eth.EInvoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.HecoLockProxy, config.DefConfig.HecoUSDC, + config.DefConfig.OntUSDC, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupUSDC, failed to BindAssetHash: %v", err)) + } + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding USDC of ontology on heco: ( txhash: %s )\n", hash.String()) +} + +func SetupOntAsset(invoker *eth.EInvoker) { + if config.DefConfig.HecoLockProxy == "" { + panic(fmt.Errorf("BscLockProxy is blank")) + } + if config.DefConfig.HecoOntx == "" { + panic(fmt.Errorf("BscOntx is blank")) + } + if config.DefConfig.HecoOngx == "" { + panic(fmt.Errorf("BscOngx is blank")) + } + if config.DefConfig.HecoOep4 == "" { + panic(fmt.Errorf("BscOep4 is blank")) + } + if config.DefConfig.OntOep4 == "" { + // panic(fmt.Errorf("OntOep4 is blank")) + } + + // txs, err := invoker.BindOntAsset(config.DefConfig.HecoLockProxy, config.DefConfig.HecoOntx, config.DefConfig.HecoOngx, + // config.DefConfig.HecoOep4, config.DefConfig.OntOep4) + // if err != nil { + // panic(err) + // } + // hash1, hash2, hash3 := txs[0].Hash(), txs[1].Hash(), txs[2].Hash() + // fmt.Printf("ont/ong/oep4 binding tx on ontology: %s/%s/%s\n", hash1.String(), hash2.String(), hash3.String()) + + // hash4, hash5, hash6 := txs[3].Hash(), txs[4].Hash(), txs[5].Hash() + // fmt.Printf("ont/ong/oep4 binding tx on cosmos: %s/%s/%s\n", hash4.String(), hash5.String(), hash6.String()) +} + +func SetupBnb(ethInvoker *eth.EInvoker) { + ethNativeAddr := "0x0000000000000000000000000000000000000000" + if config.DefConfig.OntBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.HecoLockProxy, ethNativeAddr, config.DefConfig.OntBnb, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnbx of ontology on heco: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.EthBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.HecoLockProxy, ethNativeAddr, config.DefConfig.EthBnb, config.DefConfig.EthChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnb of heco on ethereum: ( txhash: %s )\n", hash.String()) + } + if config.DefConfig.NeoBnb != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.HecoLockProxy, ethNativeAddr, config.DefConfig.NeoBnb, config.DefConfig.NeoChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2Neo, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnb of heco on neo: ( txhash: %s )\n", hash.String()) + } + + // tx, err := ethInvoker.BindAssetHash(config.DefConfig.HecoLockProxy, ethNativeAddr, config.CM_BNBX, config.DefConfig.CMCrossChainId, 0) + // if err != nil { + // panic(fmt.Errorf("SetupBnb2COSMOS, failed to bind asset hash: %v", err)) + // } + // hash := tx.Hash() + // fmt.Printf("binding bnbx of cosmos on heco: ( txhash: %s )\n", hash.String()) + + tx, err := ethInvoker.BindAssetHash(config.DefConfig.HecoLockProxy, ethNativeAddr, ethNativeAddr, config.DefConfig.HecoChainID, 0) + if err != nil { + panic(fmt.Errorf("BindAssetHash, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnb of heco on heco: ( txhash: %s )\n", hash.String()) +} + +func SetOtherLockProxy(invoker *eth.EInvoker) { + _, contract, err := invoker.MakeLockProxy(config.DefConfig.HecoLockProxy) + if err != nil { + panic(fmt.Errorf("failed to MakeLockProxy: %v", err)) + } + if config.DefConfig.OntLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other, err := common.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + panic(fmt.Errorf("failed to AddressFromHexString: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.OntChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %")) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding ont proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.CMLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + raw, err := hex.DecodeString(config.DefConfig.CMLockProxy) + if err != nil { + panic(fmt.Errorf("failed to decode: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.CMCrossChainId, raw) + if err != nil { + panic(fmt.Errorf("failed to bind COSMOS proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding cosmos proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.HecoLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other := common2.HexToAddress(config.DefConfig.HecoLockProxy) + tx, err := contract.BindProxyHash(auth, config.DefConfig.HecoChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding heco proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.EthLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other := common2.HexToAddress(config.DefConfig.EthLockProxy) + tx, err := contract.BindProxyHash(auth, config.DefConfig.EthChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding eth proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.NeoLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) + if err != nil { + panic(fmt.Errorf("UInt160FromString error: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.NeoChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.ETHUtil.WaitTransactionConfirm(hash) + fmt.Printf("binding neo proxy: ( txhash: %s )\n", hash.String()) + } +} + +func SetUpEthContracts() { + invoker := eth.NewEInvoker(config.DefConfig.HecoChainID) + SetupBnb(invoker) + if config.DefConfig.Bep20 != "" { + SetupBep20(invoker) + } + if config.DefConfig.OntLockProxy != "" { + SetupOntAsset(invoker) + } + if config.DefConfig.HecoWBTC != "" { + SetupWBTC(invoker) + } + if config.DefConfig.HecoDai != "" { + SetupDAI(invoker) + } + if config.DefConfig.HecoUSDT != "" { + SetupUSDT(invoker) + } + + //SetupUSDC(invoker) + SetOtherLockProxy(invoker) +} diff --git a/cmd/tools/run.go b/cmd/tools/run.go index bc62651..b345d92 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -63,6 +63,7 @@ import ( "github.com/polynetwork/poly/native/service/governance/side_chain_manager" "github.com/polynetwork/poly/native/service/header_sync/bsc" "github.com/polynetwork/poly/native/service/header_sync/cosmos" + "github.com/polynetwork/poly/native/service/header_sync/heco" "github.com/polynetwork/poly/native/service/header_sync/msc" "github.com/polynetwork/poly/native/service/utils" "github.com/tendermint/tendermint/rpc/client/http" @@ -166,6 +167,10 @@ func main() { if RegisterBSC(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BscChainID, poly, accArr) } + case config.DefConfig.HecoChainID: + if RegisterHeco(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.HecoChainID, poly, accArr) + } case config.DefConfig.O3ChainID: if RegisterO3(poly, acc) { ApproveRegisterSideChain(config.DefConfig.O3ChainID, poly, accArr) @@ -193,6 +198,9 @@ func main() { if RegisterBSC(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BscChainID, poly, accArr) } + if RegisterHeco(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.HecoChainID, poly, accArr) + } if RegisterO3(poly, acc) { ApproveRegisterSideChain(config.DefConfig.O3ChainID, poly, accArr) } @@ -226,6 +234,8 @@ func main() { SyncCosmosGenesisHeader(poly, accArr) case config.DefConfig.BscChainID: SyncBSCGenesisHeader(poly, accArr) + case config.DefConfig.HecoChainID: + SyncHecoGenesisHeader(poly, accArr) case config.DefConfig.O3ChainID: SyncO3GenesisHeader(poly, accArr) case config.DefConfig.MscChainID: @@ -237,6 +247,7 @@ func main() { SyncCosmosGenesisHeader(poly, accArr) SyncNeoGenesisHeader(poly, accArr) SyncBSCGenesisHeader(poly, accArr) + SyncHecoGenesisHeader(poly, accArr) SyncMSCGenesisHeader(poly, accArr) } @@ -740,6 +751,99 @@ func SyncO3GenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accoun log.Infof("successful to sync poly genesis header to O3: ( txhash: %s )", tx.Hash().String()) } +func SyncHecoGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { + tool := eth.NewEthTools(config.DefConfig.HecoURL) + height, err := tool.GetNodeHeight() + if err != nil { + panic(err) + } + + epochHeight := height - height%200 + pEpochHeight := epochHeight - 200 + + hdr, err := tool.GetBlockHeader(epochHeight) + if err != nil { + panic(err) + } + phdr, err := tool.GetBlockHeader(pEpochHeight) + if err != nil { + panic(err) + } + pvalidators, err := heco.ParseValidators(phdr.Extra[32 : len(phdr.Extra)-65]) + if err != nil { + panic(err) + } + + if len(hdr.Extra) <= 65+32 { + panic(fmt.Sprintf("invalid epoch header at height:%d", epochHeight)) + } + if len(phdr.Extra) <= 65+32 { + panic(fmt.Sprintf("invalid epoch header at height:%d", pEpochHeight)) + } + + genesisHeader := bsc.GenesisHeader{Header: *hdr, PrevValidators: []bsc.HeightAndValidators{ + {Height: big.NewInt(int64(pEpochHeight)), Validators: pvalidators}, + }} + raw, err := json.Marshal(genesisHeader) + if err != nil { + panic(err) + } + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.HecoChainID, raw, accArr) + if err != nil { + if strings.Contains(err.Error(), "had been initialized") { + log.Info("heco genesis header already synced") + } else { + panic(fmt.Errorf("SyncHecoGenesisHeader failed: %v", err)) + } + } else { + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to sync heco genesis header: (height: %d, blk_hash: %s, txhash: %s )", epochHeight, + hdr.Hash().String(), txhash.ToHexString()) + } + + eccmContract, err := eccm_abi.NewEthCrossChainManager(common3.HexToAddress(config.DefConfig.HecoEccm), tool.GetEthClient()) + if err != nil { + panic(err) + } + signer, err := eth.NewEthSigner(config.DefConfig.HecoPrivateKey) + if err != nil { + panic(err) + } + nonce := eth.NewNonceManager(tool.GetEthClient()).GetAddressNonce(signer.Address) + gasPrice, err := tool.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + panic(fmt.Errorf("SyncHecoGenesisHeader, get suggest gas price failed error: %s", err.Error())) + } + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + auth := testcase.MakeEthAuth(signer, nonce, gasPrice.Uint64(), uint64(8000000)) + + 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)...) + } + + tx, err := eccmContract.InitGenesisBlock(auth, gB.Header.ToArray(), publickeys) + tool.WaitTransactionConfirm(tx.Hash()) + log.Infof("successful to sync poly genesis header to Heco: ( txhash: %s )", tx.Hash().String()) +} + func SyncBSCGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { tool := eth.NewEthTools(config.DefConfig.BSCURL) height, err := tool.GetNodeHeight() @@ -1263,6 +1367,48 @@ func RegisterO3(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { return true } +func RegisterHeco(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + tool := eth.NewEthTools(config.DefConfig.HecoURL) + chainID, err := tool.GetChainID() + if err != nil { + panic(err) + } + + blkToWait := uint64(21) + extra := heco.ExtraInfo{ + ChainID: chainID, + Period: 3, + } + + extraBytes, _ := json.Marshal(extra) + log.Errorf("Heco Extra: %+v", extra) + log.Errorf("Heco Extra Bytes: %x", extraBytes) + eccd, err := hex.DecodeString(strings.Replace(config.DefConfig.HecoEccd, "0x", "", 1)) + if err != nil { + panic(fmt.Errorf("RegisterHeco, failed to decode eccd '%s' : %v", config.DefConfig.HecoEccd, err)) + } + + fmt.Println("config.DefConfig.HecoChainID: ", config.DefConfig.HecoChainID, "extraBytes: ", string(extraBytes), "HecoEccd: ", config.DefConfig.HecoEccd) + txhash, err := poly.Native.Scm.RegisterSideChainExt(acc.Address, config.DefConfig.HecoChainID, utils.HECO_ROUTER, "heco", + blkToWait, eccd, extraBytes, acc) + if err != nil { + if strings.Contains(err.Error(), "already registered") { + log.Infof("heco chain %d already registered", config.DefConfig.HecoChainID) + return false + } + if strings.Contains(err.Error(), "already requested") { + log.Infof("heco chain %d already requested", config.DefConfig.HecoChainID) + return true + } + panic(fmt.Errorf("RegisterHeco failed: %v", err)) + } + + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to register heco chain: ( txhash: %s )", txhash.ToHexString()) + + return true +} + func RegisterBSC(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { tool := eth.NewEthTools(config.DefConfig.BSCURL) chainID, err := tool.GetChainID() diff --git a/config/config.go b/config/config.go index fefb5a1..c788e35 100644 --- a/config/config.go +++ b/config/config.go @@ -39,14 +39,15 @@ const ( //Config object used by ontology-instance type TestConfig struct { - BtcChainID uint64 - EthChainID uint64 - OntChainID uint64 - NeoChainID uint64 - BscChainID uint64 - O3ChainID uint64 - MscChainID uint64 - OkChainID uint64 + BtcChainID uint64 + EthChainID uint64 + OntChainID uint64 + NeoChainID uint64 + BscChainID uint64 + HecoChainID uint64 + O3ChainID uint64 + MscChainID uint64 + OkChainID uint64 BtcRestAddr string BtcRestUser string @@ -79,6 +80,9 @@ type TestConfig struct { // bsc urls BSCURL string BSCPrivateKey string + // heco urls + HecoURL string + HecoPrivateKey string // o3 urls O3URL string O3PrivateKey string @@ -166,6 +170,21 @@ type TestConfig struct { BscUSDC string BscNeo string BscRenBTC string + // heco contracts: auto set after deploy + HecoEccd string + HecoEccm string + HecoEccmp string + HecoLockProxy string + HecoErc20 string + HecoOep4 string + HecoOngx string + HecoOntx string + HecoWBTC string + HecoUSDT string + HecoDai string + HecoUSDC string + HecoNeo string + HecoRenBTC string // o3 contracts: auto set after deploy O3Eccd string O3Eccm string From f2fe506e23f92c7801dd02e156cf437318a63832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Wed, 31 Mar 2021 17:30:33 +0800 Subject: [PATCH 43/96] mod o3 deployer --- cmd/o3_deployer/run.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/cmd/o3_deployer/run.go b/cmd/o3_deployer/run.go index 67efed8..ba5aa9f 100644 --- a/cmd/o3_deployer/run.go +++ b/cmd/o3_deployer/run.go @@ -163,14 +163,14 @@ func SetupBep20(ethInvoker *eth.EInvoker) { fmt.Printf("binding bep20 of ontology on o3: ( txhash: %s )\n", hash.String()) } - bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, config.DefConfig.O3Erc20, - config.CM_BEP20, config.DefConfig.CMCrossChainId, 0) - if err != nil { - panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) - } - ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) - hash := bindTx.Hash() - fmt.Printf("binding bep20 of cosmos on o3: ( txhash: %s )\n", hash.String()) + // bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, config.DefConfig.O3Erc20, + // config.CM_BEP20, config.DefConfig.CMCrossChainId, 0) + // if err != nil { + // panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + // } + // ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) + // hash := bindTx.Hash() + // fmt.Printf("binding bep20 of cosmos on o3: ( txhash: %s )\n", hash.String()) } func SetupWBTC(ethInvoker *eth.EInvoker) { @@ -274,18 +274,18 @@ func SetupBnb(ethInvoker *eth.EInvoker) { fmt.Printf("binding bnb of o3 on neo: ( txhash: %s )\n", hash.String()) } - tx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, ethNativeAddr, config.CM_BNBX, config.DefConfig.CMCrossChainId, 0) - if err != nil { - panic(fmt.Errorf("SetupBnb2COSMOS, failed to bind asset hash: %v", err)) - } - hash := tx.Hash() - fmt.Printf("binding bnbx of cosmos on o3: ( txhash: %s )\n", hash.String()) + // tx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, ethNativeAddr, config.CM_BNBX, config.DefConfig.CMCrossChainId, 0) + // if err != nil { + // panic(fmt.Errorf("SetupBnb2COSMOS, failed to bind asset hash: %v", err)) + // } + // hash := tx.Hash() + // fmt.Printf("binding bnbx of cosmos on o3: ( txhash: %s )\n", hash.String()) - tx, err = ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, ethNativeAddr, ethNativeAddr, config.DefConfig.BscChainID, 0) + tx, err := ethInvoker.BindAssetHash(config.DefConfig.O3LockProxy, ethNativeAddr, ethNativeAddr, config.DefConfig.BscChainID, 0) if err != nil { panic(fmt.Errorf("BindAssetHash, failed to bind asset hash: %v", err)) } - hash = tx.Hash() + hash := tx.Hash() fmt.Printf("binding bnb of o3 on bsc: ( txhash: %s )\n", hash.String()) } From 735ef1eb488fb87bf800a0ece0bc2774115e89a0 Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Thu, 8 Apr 2021 11:43:37 +0800 Subject: [PATCH 44/96] fix(zilliqa): get rid of hard code for syncing genesis info --- cmd/tools/run.go | 84 ++++++++++++++---------------------------------- go.mod | 2 +- go.sum | 2 ++ 3 files changed, 27 insertions(+), 61 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 253ae5f..6955e66 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -28,6 +28,7 @@ import ( "os" "strconv" "strings" + "time" "github.com/Zilliqa/gozilliqa-sdk/account" "github.com/Zilliqa/gozilliqa-sdk/core" @@ -587,79 +588,42 @@ func SyncZILGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou } zilSdk := provider.NewProvider(config.DefConfig.ZilURL) - networkId, err := zilSdk.GetNetworkId() - if err != nil { - panic(fmt.Errorf("SyncZILGenesisHeader failed: %s", err.Error())) - } - - var dsComm []core.PairOfNode - var initDsBlockNum string - var initTxBlockNum string - - // for devnet - if networkId == "111" { + initDsComm, _ := zilSdk.GetCurrentDSComm() + currentTxBlockNum, _ := strconv.ParseUint(initDsComm.CurrentTxEpoch, 10, 64) + fmt.Printf("current tx block number is %s, ds block number is %s, number of ds guard is: %d\n", initDsComm.CurrentTxEpoch, initDsComm.CurrentDSEpoch, initDsComm.NumOfDSGuard) - initDsBlockNum = "1" - initTxBlockNum = "1" - - ipAndAddr, _ := new(big.Int).SetString("3672036406", 10) - dsComm = []core.PairOfNode{ - { - PubKey: "02105342331FCD7CA95648DF8C5373C596982544F35E90849B1E619DFC59F03D48", - }, - { - PubKey: "021D439D1CCCAE17C3D6E855BC78E96438C808D16D1CBF8D7ABD391E41CEE9B1BF", - }, - { - PubKey: "021EDDE95598F5F59708D2E728E00EDB2ECF278C16BD389384320B1AF998DCC2FD", - }, - { - PubKey: "02445FE498E7FBB240BDF9185EB5E7642AF1AF36852D1E132E198A222FBAC617A0", - }, - { - PubKey: "0256EC4BC62FB56C83A3F6160E67499A9E381CF7A613EBF34B9ECDB9E64171DDF4", - }, - { - PubKey: "0264D991762D81DD6557BCB33EC8AA3F621B4CB790852F2231C864921387B76862", - }, - { - PubKey: "027A00916BDD3CF954ED13A0494BFB73FF95BF28C54004F2749F1A8E8CC1AB5B3D", - }, - { - PubKey: "0297C693FBEBAF397CBDE616F605920EF70D7F6E5EC8DD82E71AE1E812E5E0B303", - }, - { - PubKey: "02AE5ADF63E9161000713987B5EBB490B5E6B57CF5B7F9799B4AB907BA19D468F6", - }, - { - PubKey: "0374A5CA5D76BEE5A1DE132AE72184AB084D23EC7A4867CCD562C58405BBB663E2", - Peer: core.Peer{ - IpAddress: ipAndAddr, - ListenPortHost: 33133, - }, - }, + for { + latestTxBlock, _ := zilSdk.GetLatestTxBlock() + fmt.Println("wait current tx block got generated") + latestTxBlockNum, _ := strconv.ParseUint(latestTxBlock.Header.BlockNum, 10, 64) + fmt.Printf("latest tx block num is: %d, current tx block num is: %d", latestTxBlockNum, currentTxBlockNum) + if latestTxBlockNum > currentTxBlockNum { + break } + time.Sleep(time.Second * 20) } - // for testnet - if networkId == "333" { - // todo impl this + networkId, err := zilSdk.GetNetworkId() + if err != nil { + panic(fmt.Errorf("SyncZILGenesisHeader failed: %s", err.Error())) } - // for mainnet - if networkId == "1" { - // todo impl this + var dsComm []core.PairOfNode + for _, ds := range initDsComm.DSComm { + dsComm = append(dsComm, core.PairOfNode{ + PubKey: ds, + }) } - dsBlockT, err := zilSdk.GetDsBlockVerbose(initDsBlockNum) + dsBlockT, err := zilSdk.GetDsBlockVerbose(initDsComm.CurrentDSEpoch) if err != nil { - panic(fmt.Errorf("SyncZILGenesisHeader get ds block 1 failed: %s", err.Error())) + panic(fmt.Errorf("SyncZILGenesisHeader get ds block %s failed: %s", initDsComm.CurrentDSEpoch, err.Error())) } dsBlock := core.NewDsBlockFromDsBlockT(dsBlockT) - txBlockT, err := zilSdk.GetTxBlockVerbose(initTxBlockNum) + txBlockT, err := zilSdk.GetTxBlockVerbose(initDsComm.CurrentTxEpoch) if err != nil { - panic(fmt.Errorf("SyncZILGenesisHeader get tx block 1 failed: %s", err.Error())) + panic(fmt.Errorf("SyncZILGenesisHeader get tx block %s failed: %s", initDsComm.CurrentTxEpoch, err.Error())) } txBlock := core.NewTxBlockFromTxBlockT(txBlockT) diff --git a/go.mod b/go.mod index 2a570a0..f0e9442 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/polynetwork/poly-io-test go 1.14 require ( - github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210303070214-e9f060dd9677 + github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae github.com/btcsuite/btcd v0.20.1-beta github.com/btcsuite/btcutil v1.0.2 github.com/cosmos/cosmos-sdk v0.39.1 diff --git a/go.sum b/go.sum index db9dc8d..e22292d 100644 --- a/go.sum +++ b/go.sum @@ -42,6 +42,8 @@ github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210224095650-0f974c79345b h1:vE7Bhxe github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210224095650-0f974c79345b/go.mod h1:pFTR1kiObhgi/4GYERw7/WHz+P5BD7ecE49uG12tqAY= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210303070214-e9f060dd9677 h1:BczNHdGYMiLdVgENX9cNkza+b24gIHUx6iNygpxtG4c= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210303070214-e9f060dd9677/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= +github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae h1:4g7IE+z/CJRf67iFnQlBnZ3JBRmvbrlfcQ3EHJ2saC4= +github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= From 9f8b17d56ad06e43bab65c3319154bcdb21688f4 Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Thu, 8 Apr 2021 12:40:56 +0800 Subject: [PATCH 45/96] further resolve conflicts --- cmd/tools/run.go | 21 ++++++------- config/config.go | 7 +---- go.sum | 77 ++++++++---------------------------------------- 3 files changed, 25 insertions(+), 80 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index fcb735b..6e778be 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -178,6 +178,7 @@ func main() { case config.DefConfig.ZilChainID: if RegisterZIL(poly, acc) { ApproveRegisterSideChain(config.DefConfig.ZilChainID, poly, accArr) + } case config.DefConfig.HecoChainID: if RegisterHeco(poly, acc) { ApproveRegisterSideChain(config.DefConfig.HecoChainID, poly, accArr) @@ -211,17 +212,17 @@ func main() { } if RegisterZIL(poly, acc) { ApproveRegisterSideChain(config.DefConfig.ZilChainID, poly, accArr) - if RegisterHeco(poly, acc) { - ApproveRegisterSideChain(config.DefConfig.HecoChainID, poly, accArr) - } - if RegisterO3(poly, acc) { - ApproveRegisterSideChain(config.DefConfig.O3ChainID, poly, accArr) - } - if registerMSC(poly, acc) { - ApproveRegisterSideChain(config.DefConfig.MscChainID, poly, accArr) + if RegisterHeco(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.HecoChainID, poly, accArr) + } + if RegisterO3(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.O3ChainID, poly, accArr) + } + if registerMSC(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.MscChainID, poly, accArr) + } } } - case "sync_genesis_header": wArr := strings.Split(pWalletFiles, ",") pArr := strings.Split(pPwds, ",") @@ -903,7 +904,7 @@ func SyncHecoGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Acco panic(err) } - epochHeight := height - height%200 + epochHeight := height - height%200 pEpochHeight := epochHeight - 200 hdr, err := tool.GetBlockHeader(epochHeight) diff --git a/config/config.go b/config/config.go index a57150a..bdf0c49 100644 --- a/config/config.go +++ b/config/config.go @@ -39,17 +39,12 @@ const ( //Config object used by ontology-instance type TestConfig struct { - BtcChainID uint64 - EthChainID uint64 - OntChainID uint64 - NeoChainID uint64 - BscChainID uint64 - ZilChainID uint64 BtcChainID uint64 EthChainID uint64 OntChainID uint64 NeoChainID uint64 BscChainID uint64 + ZilChainID uint64 HecoChainID uint64 O3ChainID uint64 MscChainID uint64 diff --git a/go.sum b/go.sum index e9bf421..82dc89e 100644 --- a/go.sum +++ b/go.sum @@ -16,7 +16,6 @@ github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 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= @@ -30,6 +29,7 @@ github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdII github.com/OpenBazaar/jsonpb v0.0.0-20171123000858-37d32ddf4eef/go.mod h1:55mCznBcN9WQgrtgaAkv+p2LxeW/tQRdidyyE9D0I5k= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.5.3/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE= github.com/VictoriaMetrics/fastcache v1.5.7 h1:4y6y0G8PRzszQUYIQHHssv/jgPHAb5qQuuDNdCbyAgw= @@ -38,14 +38,9 @@ github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/ github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= -github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210224095650-0f974c79345b h1:vE7Bhxe291jW59cW278jpoNnfqK03FYMQ5+fKgVrVKY= -github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210224095650-0f974c79345b/go.mod h1:pFTR1kiObhgi/4GYERw7/WHz+P5BD7ecE49uG12tqAY= -github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210303070214-e9f060dd9677 h1:BczNHdGYMiLdVgENX9cNkza+b24gIHUx6iNygpxtG4c= -github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210303070214-e9f060dd9677/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= +github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210304105042-c4327211a4ba/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae h1:4g7IE+z/CJRf67iFnQlBnZ3JBRmvbrlfcQ3EHJ2saC4= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= -github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210304105042-c4327211a4ba h1:o5WzAWqRXTI8RMwkkS1DJsNg/8TQMk2Z19HaH3bmtOs= -github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210304105042-c4327211a4ba/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -120,18 +115,20 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/cosmos-sdk v0.38.4/go.mod h1:rzWOofbKfRt3wxiylmYWEFHnxxGj0coyqgWl2I9obAw= -github.com/cosmos/cosmos-sdk v0.39.0/go.mod h1:3iKiqnQ48T0UG4IDw9EM8utQSwItutLUkmGkRSWpS5U= github.com/cosmos/cosmos-sdk v0.39.1 h1:vhjf9PZh9ph8btAj9aBpHoVITgVVjNBpM3x5Gl/Vwac= github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= +github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -147,11 +144,9 @@ github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8 github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= -github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a h1:mq+R6XEM6lJX5VlLyZIrUSP8tSuJp82xTK89hvBwJbU= github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= -github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= @@ -170,8 +165,6 @@ github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHj github.com/ethereum/go-ethereum v1.9.13/go.mod h1:qwN9d1GLyDh0N7Ab8bMGd0H9knaji2jOBm2RrMGjXls= github.com/ethereum/go-ethereum v1.9.15 h1:wrWl+QrtutRUJ9LZXdUqBoGoo2b1tOCYRDrAOQhCY3A= github.com/ethereum/go-ethereum v1.9.15/go.mod h1:slT8bPPRhXsyNTwHQxrOnjuTZ1sDXRajW11EkJ84QJ0= -github.com/ethereum/go-ethereum v1.9.24 h1:6AK+ORt3EMDO+FTjzXy/AQwHMbu52J2nYHIjyQX9azQ= -github.com/ethereum/go-ethereum v1.9.24/go.mod h1:JIfVb6esrqALTExdz9hRYvrP0xBDf6wCncIu1hNwHpM= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= @@ -184,8 +177,6 @@ github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVB github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gcash/bchd v0.14.7/go.mod h1:Gk/O1ktRVW5Kao0RsnVXp3bWxeYQadqawZ1Im9HE78M= @@ -210,6 +201,7 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= @@ -251,8 +243,6 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26 h1:lMm2hD9Fy0ynom5+85/pbdkiYcBqM1JWmhpAXLmy0fw= -github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -263,12 +253,10 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= @@ -324,8 +312,6 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/holiman/uint256 v1.1.1 h1:4JywC80b+/hSfljFlEBLHrrh+CIONLDz9NuFl0af4Mw= -github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= @@ -335,6 +321,7 @@ github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7 github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/improbable-eng/grpc-web v0.9.1/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= github.com/improbable-eng/grpc-web v0.12.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= @@ -346,6 +333,7 @@ github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M github.com/jessevdk/go-flags v0.0.0-20181221193153-c0795c8afcf4/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/joeqian10/neo-gogogo v0.0.0-20200716075409-923bd4879b43/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= github.com/joeqian10/neo-gogogo v0.0.0-20200811090937-d8aab8600241 h1:kfTkgo18r3VFWrr3z8arDU05yHiX/nU1ZaDgEApinMo= @@ -361,6 +349,7 @@ github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356 h1:I/yrLt2WilKxlQKCM52clh5rGzTKpVctGT1lH4Dc8Jw= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -430,7 +419,6 @@ github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -441,13 +429,9 @@ github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b h1:UQDN12BzdWhXQL0t2QcRixHqAIG+JKNvQ20DhrIODtU= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b/go.mod h1:J0eVc7BEMmVVXbGv9PHoxjRSEwOwLr0qfzPk8Rdl5iw= github.com/ontio/ontology v1.10.0/go.mod h1:iok/imHJVQXi5/Yr88dcbrKBRHGdiota1ZC6qh6l6Rc= @@ -500,16 +484,6 @@ github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666 h1:oV github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666/go.mod h1:U8rR9X6vemlkBAJWfvzwSoalcJjX8B2aQjB0kPRhBUA= github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759 h1:M0DV6MUVXOZtdQ94i8oYuSAX+ljzEe+mMqb2Llnm/oM= github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759/go.mod h1:VMBJZ8GSZeoWBntd/rWx2Rr5roRKofO7siP1qd6A6pY= -github.com/polynetwork/poly v0.0.0-20200710095239-0596a3d7afe5/go.mod h1:UzlGEWk0eCGsuMJOZfBoZjRbmu4Yw/SudKAIFe1gPnY= -github.com/polynetwork/poly v0.0.0-20200715030435-4f1d1a0adb44/go.mod h1:UzlGEWk0eCGsuMJOZfBoZjRbmu4Yw/SudKAIFe1gPnY= -github.com/polynetwork/poly v0.0.0-20201215081835-44303924f13c h1:FI45q7Ej3ROUDtmThE13AAGGJnNCLst/FEECFvW7fSw= -github.com/polynetwork/poly v0.0.0-20201215081835-44303924f13c/go.mod h1:GLCHH85w+7Ca5P65hAd2qHgt5Azg0yuODLqAOfV1UTU= -github.com/polynetwork/poly v0.0.0-20201216061550-50185057319d h1:XAQNgWfPcBofzQEz7bAYs3ypGAHgkWF7eUzk0BkdtyY= -github.com/polynetwork/poly v0.0.0-20201216061550-50185057319d/go.mod h1:SrFSYe/3uWkouGvoSGkjDPm5sNT95dSFZkQtXRun148= -github.com/polynetwork/poly v1.11.0 h1:1xEWr9z9/TCs/XM7eXBTmF2RT061G1zTumqAVdjzR+A= -github.com/polynetwork/poly-go-sdk v0.0.0-20200722030827-6875b6018b93/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= -github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493 h1:wob4aH5NxiDFIOWlpKbmoIb88QOccDNa1+rl93czjr8= -github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= github.com/polynetwork/poly-io-test v0.0.0-20200819093740-8cf514b07750/go.mod h1:Y/xz9uHdO0HPz0p+x0bZxNuo1ufVcln3dDjmchSUgso= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -565,8 +539,6 @@ github.com/scylladb/go-set v1.0.2/go.mod h1:DkpGd78rljTxKAnTDPFqXSGxvETQnJyuSOQw github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v2.20.5-0.20200531151128-663af789c085+incompatible h1:+gAR1bMhuoQnZMTWFIvp7ukynULPsteLzG+siZKLtD8= github.com/shirou/gopsutil v2.20.5-0.20200531151128-663af789c085+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil v2.20.5+incompatible h1:tYH07UPoQt0OCQdgWWMgYHy3/a9bcxNpBIysykNIP7I= -github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= 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= @@ -621,8 +593,7 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= -github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= -github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= @@ -637,7 +608,6 @@ github.com/tendermint/iavl v0.14.0/go.mod h1:QmfViflFiXzxKLQE4tAUuWQHq+RSuQFxabl github.com/tendermint/tendermint v0.33.2/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk= github.com/tendermint/tendermint v0.33.3/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk= github.com/tendermint/tendermint v0.33.5/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tendermint v0.33.6/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= github.com/tendermint/tendermint v0.33.7 h1:b5CQD8ggDtl4u0EbXzabi0MaOw9NrcXker6ijEkAE74= github.com/tendermint/tendermint v0.33.7/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= github.com/tendermint/tm-db v0.4.1/go.mod h1:JsJ6qzYkCGiGwm5GHl/H5GLI9XLb6qZX7PRe425dHAY= @@ -663,18 +633,18 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/ybbus/jsonrpc v2.1.2+incompatible h1:V4mkE9qhbDQ92/MLMIhlhMSbz8jNXdagC3xBR5NDwaQ= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= -github.com/zhiqiangxu/poly v0.0.0-20201216075543-df86073d2575 h1:6jmxr8/1WR2HdLPugksSPwOfUnQLlqrD/b9A/r3o/Ig= -github.com/zhiqiangxu/poly v0.0.0-20201216075543-df86073d2575/go.mod h1:SrFSYe/3uWkouGvoSGkjDPm5sNT95dSFZkQtXRun148= github.com/zhiqiangxu/poly v0.0.0-20210315055227-f937bd40dbe9 h1:wm4irkgb2+bDjNb8HoNT5o1yBxyW12T7Uh+AfwkuV9U= github.com/zhiqiangxu/poly v0.0.0-20210315055227-f937bd40dbe9/go.mod h1:LSfP6ahqUcgpFOwVTXE4xx085QLurBFefeH5u2J2SQo= github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 h1:Ogrd4dHjyNDNSLY6+89OfR1flM1CGI2CSee7QoXUYdU= github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= +github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zouxyan/eth-contracts v0.0.0-20210115072359-e4cac6edc20c h1:3gzrpowqz7P1Uj7l/DqiYGBWLi+dvjzjjjxxzSIvVCI= github.com/zouxyan/eth-contracts v0.0.0-20210115072359-e4cac6edc20c/go.mod h1:7+sPWP1/qbE3V8HbByvuoIJpBZ0TWZF50xHAJIXQ1pA= github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1 h1:1qKTeMTSIEvRIjvVYzgcRp0xVp0eoiRTTiHSncb5gD8= github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1/go.mod h1:bslhAiUxakrA6z6CHmVyvkfpnxx18RJBwVyx2TluJWw= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -709,20 +679,13 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh 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/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 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= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -749,9 +712,6 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 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-20200520004742-59133d7f0dd7/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-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 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= @@ -779,11 +739,8 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -792,10 +749,6 @@ golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7w 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-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8 h1:AvbQYmiaaaza3cW3QXRyPo5kYgpFIzOAfeAAN7m3qQ4= -golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= @@ -810,7 +763,6 @@ golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -818,9 +770,7 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -875,13 +825,12 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200316214253-d7b0ff38cac9/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= From cff11b98441c0236bca123b4b286c8ca5e11d796 Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Thu, 8 Apr 2021 13:20:51 +0800 Subject: [PATCH 46/96] fix bracket localtion --- cmd/tools/run.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 6e778be..20238e7 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -212,15 +212,15 @@ func main() { } if RegisterZIL(poly, acc) { ApproveRegisterSideChain(config.DefConfig.ZilChainID, poly, accArr) - if RegisterHeco(poly, acc) { - ApproveRegisterSideChain(config.DefConfig.HecoChainID, poly, accArr) - } - if RegisterO3(poly, acc) { - ApproveRegisterSideChain(config.DefConfig.O3ChainID, poly, accArr) - } - if registerMSC(poly, acc) { - ApproveRegisterSideChain(config.DefConfig.MscChainID, poly, accArr) - } + } + if RegisterHeco(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.HecoChainID, poly, accArr) + } + if RegisterO3(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.O3ChainID, poly, accArr) + } + if registerMSC(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.MscChainID, poly, accArr) } } case "sync_genesis_header": From c337647952dedac2783cfe4b472ddb0cbc2e865a Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Thu, 8 Apr 2021 14:04:58 +0800 Subject: [PATCH 47/96] fix(zilliqa): register chain --- cmd/tools/run.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 20238e7..410b3f6 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -629,7 +629,7 @@ func SyncZILGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou fmt.Println("wait current tx block got generated") latestTxBlockNum, _ := strconv.ParseUint(latestTxBlock.Header.BlockNum, 10, 64) fmt.Printf("latest tx block num is: %d, current tx block num is: %d", latestTxBlockNum, currentTxBlockNum) - if latestTxBlockNum > currentTxBlockNum { + if latestTxBlockNum == currentTxBlockNum { break } time.Sleep(time.Second * 20) @@ -1603,18 +1603,11 @@ func RegisterZIL(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { numOfGuardList := 0 zilSdk := provider.NewProvider(config.DefConfig.ZilURL) - networkId, err := zilSdk.GetNetworkId() + dsComm, err := zilSdk.GetCurrentDSComm() if err != nil { panic(fmt.Errorf("RegisterZIL failed: %s", err.Error())) } - - if networkId == "111" { - numOfGuardList = 9 - } else if networkId == "333" { - // todo impl this - } else if networkId == "1" { - // todo impl this - } + numOfGuardList = dsComm.NumOfDSGuard fmt.Println("register zil") blkToWait := uint64(15) From 10ae34bea2aec2f53f79e70fb010eee6aeeba175 Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Thu, 8 Apr 2021 14:09:24 +0800 Subject: [PATCH 48/96] fix(zil): sync header --- cmd/tools/run.go | 2 +- config.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 410b3f6..c32448c 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -629,7 +629,7 @@ func SyncZILGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou fmt.Println("wait current tx block got generated") latestTxBlockNum, _ := strconv.ParseUint(latestTxBlock.Header.BlockNum, 10, 64) fmt.Printf("latest tx block num is: %d, current tx block num is: %d", latestTxBlockNum, currentTxBlockNum) - if latestTxBlockNum == currentTxBlockNum { + if latestTxBlockNum >= currentTxBlockNum { break } time.Sleep(time.Second * 20) diff --git a/config.json b/config.json index 2a0642a..2294f71 100644 --- a/config.json +++ b/config.json @@ -21,6 +21,7 @@ "ZilPrivateKey": "", "ZilEccdProxy": "", "ZilEccdImpl": "", + "ZilLockProxy": "", "OntJsonRpcAddress": "http://ontology:20336", "OntWallet": ".wallets/ont_dev.dat", "OntWalletPassword": "admin", From 22edb31ee4580c09d1abba995b35c73eebdce97e Mon Sep 17 00:00:00 2001 From: xiaohuo Date: Thu, 8 Apr 2021 14:27:58 +0800 Subject: [PATCH 49/96] refactor(zil): change veriable name, add some annotation --- cmd/tools/run.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index c32448c..e222ad7 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -621,15 +621,17 @@ func SyncZILGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou zilSdk := provider.NewProvider(config.DefConfig.ZilURL) initDsComm, _ := zilSdk.GetCurrentDSComm() - currentTxBlockNum, _ := strconv.ParseUint(initDsComm.CurrentTxEpoch, 10, 64) + // as its name suggest, the tx epoch is actually a future tx block + // zilliqa side has this limitation to avoid some risk that no tx block got mined yet + nextTxEpoch, _ := strconv.ParseUint(initDsComm.CurrentTxEpoch, 10, 64) fmt.Printf("current tx block number is %s, ds block number is %s, number of ds guard is: %d\n", initDsComm.CurrentTxEpoch, initDsComm.CurrentDSEpoch, initDsComm.NumOfDSGuard) for { latestTxBlock, _ := zilSdk.GetLatestTxBlock() fmt.Println("wait current tx block got generated") latestTxBlockNum, _ := strconv.ParseUint(latestTxBlock.Header.BlockNum, 10, 64) - fmt.Printf("latest tx block num is: %d, current tx block num is: %d", latestTxBlockNum, currentTxBlockNum) - if latestTxBlockNum >= currentTxBlockNum { + fmt.Printf("latest tx block num is: %d, current tx block num is: %d", latestTxBlockNum, nextTxEpoch) + if latestTxBlockNum >= nextTxEpoch { break } time.Sleep(time.Second * 20) From d58e484106a1d9f52f6f81780146886f89dd3c3e Mon Sep 17 00:00:00 2001 From: zhuoqian Date: Tue, 20 Apr 2021 14:53:38 +0800 Subject: [PATCH 50/96] add tools for neo3 --- chains/neo3/invoker.go | 38 +++++++++ cmd/tools/run.go | 170 +++++++++++++++++++++++++++++++++++++++++ config/config.go | 29 +++++-- go.mod | 10 +-- go.sum | 37 ++++----- 5 files changed, 252 insertions(+), 32 deletions(-) create mode 100644 chains/neo3/invoker.go diff --git a/chains/neo3/invoker.go b/chains/neo3/invoker.go new file mode 100644 index 0000000..9d92f5d --- /dev/null +++ b/chains/neo3/invoker.go @@ -0,0 +1,38 @@ +package neo3 + +import ( + "fmt" + "github.com/joeqian10/neo3-gogogo/helper" + "github.com/joeqian10/neo3-gogogo/rpc" + "github.com/joeqian10/neo3-gogogo/wallet" + "github.com/polynetwork/poly-io-test/config" +) + +type Neo3Invoker struct { + *wallet.WalletHelper +} + +func NewNeo3Invoker() (*Neo3Invoker, error) { + invoker := &Neo3Invoker{} + if config.DefConfig.Neo3Url == "" { + return nil, fmt.Errorf("Neo3Url is empty") + } + cli := rpc.NewClient(config.DefConfig.NeoUrl) + ps := helper.ProtocolSettings{ + Magic: config.DefConfig.Neo3Magic, + AddressVersion: config.DefConfig.Neo3AddressVersion, + } + name := "poly_io_test" + wlt, err := wallet.NewNEP6Wallet(config.DefConfig.Neo3Wallet, &ps, &name, wallet.DefaultScryptParameters) + if err != nil { + return nil, err + } + err = wlt.Unlock(config.DefConfig.Neo3Pwd) + if err != nil { + return nil, err + } + + invoker.WalletHelper = wallet.NewWalletHelperFromWallet(cli, wlt) + + return invoker, nil +} diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 7c7fb16..7be3ac2 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -24,8 +24,11 @@ import ( "encoding/json" "flag" "fmt" + "github.com/joeqian10/neo-gogogo/sc" + "github.com/polynetwork/poly-io-test/chains/neo3" "math/big" "os" + "strconv" "strings" "github.com/btcsuite/btcd/wire" @@ -36,6 +39,13 @@ import ( "github.com/joeqian10/neo-gogogo/block" "github.com/joeqian10/neo-gogogo/helper/io" "github.com/joeqian10/neo-gogogo/rpc" + block3 "github.com/joeqian10/neo3-gogogo/block" + crypto3 "github.com/joeqian10/neo3-gogogo/crypto" + helper3 "github.com/joeqian10/neo3-gogogo/helper" + io3 "github.com/joeqian10/neo3-gogogo/io" + rpc3 "github.com/joeqian10/neo3-gogogo/rpc" + sc3 "github.com/joeqian10/neo3-gogogo/sc" + tx3 "github.com/joeqian10/neo3-gogogo/tx" "github.com/ontio/ontology-crypto/keypair" ontology_go_sdk "github.com/ontio/ontology-go-sdk" common2 "github.com/ontio/ontology/common" @@ -155,6 +165,10 @@ func main() { if RegisterNeoChain(poly, acc) { ApproveRegisterSideChain(config.DefConfig.NeoChainID, poly, accArr) } + case config.DefConfig.Neo3ChainID: + if RegisterNeo3Chain(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.Neo3ChainID, poly, accArr) + } case config.DefConfig.CMCrossChainId: if RegisterCosmos(poly, acc) { ApproveRegisterSideChain(config.DefConfig.CMCrossChainId, poly, accArr) @@ -179,6 +193,9 @@ func main() { if RegisterNeoChain(poly, acc) { ApproveRegisterSideChain(config.DefConfig.NeoChainID, poly, accArr) } + if RegisterNeo3Chain(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.Neo3ChainID, poly, accArr) + } if RegisterBSC(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BscChainID, poly, accArr) } @@ -205,6 +222,7 @@ func main() { SyncOntGenesisHeader(poly, accArr) case config.DefConfig.NeoChainID: SyncNeoGenesisHeader(poly, accArr) + SyncNeo3GenesisHeader(poly, accArr) case config.DefConfig.CMCrossChainId: SyncCosmosGenesisHeader(poly, accArr) case config.DefConfig.BscChainID: @@ -215,6 +233,7 @@ func main() { SyncOntGenesisHeader(poly, accArr) SyncCosmosGenesisHeader(poly, accArr) SyncNeoGenesisHeader(poly, accArr) + SyncNeo3GenesisHeader(poly, accArr) SyncBSCGenesisHeader(poly, accArr) } @@ -236,6 +255,12 @@ func main() { ApproveUpdateChain(config.DefConfig.NeoChainID, poly, accArr) } + case "update_neo3": + accArr := getPolyAccounts(poly) + if UpdateNeo3(poly, acc) { + ApproveUpdateChain(config.DefConfig.Neo3ChainID, poly, accArr) + } + case "init_ont_acc": err := InitOntAcc() if err != nil { @@ -733,6 +758,112 @@ func SyncNeoGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou return nil } +func SyncNeo3GenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) error { + cli := rpc3.NewClient(config.DefConfig.Neo3Url) + resp := cli.GetBlockHeader(strconv.Itoa(int(config.DefConfig.Neo3Epoch))) + if resp.HasError() { + return fmt.Errorf("failed to get header: %v", resp.Error.Message) + } + header, err := block3.NewBlockHeaderFromRPC(&resp.Result) + if err != nil { + return err + } + buf := io3.NewBufBinaryWriter() + header.Serialize(buf.BinaryWriter) + if buf.Err != nil { + return buf.Err + } + + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.Neo3ChainID, buf.Bytes(), accArr) + if err != nil { + if strings.Contains(err.Error(), "had been initialized") { + log.Info("neo3 already synced") + } else { + panic(fmt.Errorf("SyncNeoGenesisHeader failed: %v", err)) + } + } else { + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to sync neo genesis header: ( txhash: %s )", txhash.ToHexString()) + } + + // start sync poly header to neo3 side chain + if config.DefConfig.Neo3Wallet == "" { + log.Infof("neo wallet empty, won't sync poly header to neo ccmc") + return nil + } + polyHeader, err := poly.GetBlockByHeight(config.DefConfig.RCEpoch) + if err != nil { + return fmt.Errorf("poly.GetHeader(%d) to be synced to neo as genesis err; %v", config.DefConfig.RCEpoch, err) + } + + cp1 := sc.ContractParameter{ + Type: sc.ByteArray, + Value: polyHeader.Header.GetMessage(), + } + // public keys + info := &vconfig.VbftBlockInfo{} + if err := json.Unmarshal(polyHeader.Header.ConsensusPayload, info); err != nil { + return 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)...) + } + cp2 := sc.ContractParameter{ + Type: sc.ByteArray, + Value: publickeys, + } + + invoker, err := neo3.NewNeo3Invoker() + if err != nil { + return fmt.Errorf("NewNeo3Invoker err: %v", err) + } + // build script + scriptHash, err := helper3.UInt160FromString(config.DefConfig.NeoCCMC) // hex string in little endian + if err != nil { + return fmt.Errorf("neo3 ccmc conversion error: %s", err) + } + + script, err := sc3.MakeScript(scriptHash, "InitGenesisBlock", []interface{}{cp1, cp2}) + if err != nil { + return fmt.Errorf("neo3 sc.MakeScript error: %s", err) + } + + balancesGas, err := invoker.GetAccountAndBalance(tx3.GasToken) + if err != nil { + return fmt.Errorf("neo3 GetAccountAndBalance error: %s", err) + } + + // make transaction + trx, err := invoker.MakeTransaction(script, nil, []tx3.ITransactionAttribute{}, balancesGas) + if err != nil { + return fmt.Errorf("neo3 MakeTransaction error: %s", err) + } + + // sign transaction + trx, err = invoker.SignTransaction(trx, config.DefConfig.Neo3Magic) + if err != nil { + return fmt.Errorf("neo3 SignTransaction error: %s", err) + } + rawTxString := crypto3.Base64Encode(trx.ToByteArray()) + + // send the raw transaction + response:= invoker.Client.SendRawTransaction(rawTxString) + if response.HasError() { + return fmt.Errorf("initGenesisBlock on neo3, SendRawTx err: %v", err) + } + log.Infof("sync poly header to neo3 as genesis, neo3TxHash: %s", trx.GetHash().String()) + + return nil +} + func SyncCosmosGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { invoker, err := cosmos2.NewCosmosInvoker() if err != nil { @@ -932,6 +1063,31 @@ func RegisterNeoChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool return true } +func RegisterNeo3Chain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + blkToWait := uint64(1) + neo3Ccmc, err := common2.AddressFromHexString(strings.TrimPrefix(config.DefConfig.Neo3CCMC, "0x")) + if err != nil { + panic(fmt.Errorf("RegisterNeoChain, failed to decode Neo3CCMC '%s': %v", config.DefConfig.Neo3CCMC, err)) + } + txHash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.NeoChainID, 11, "NEO3", + blkToWait, neo3Ccmc[:], acc) + if err != nil { + if strings.Contains(err.Error(), "already registered") { + log.Infof("neo3 chain %d already registered", config.DefConfig.Neo3ChainID) + return false + } + if strings.Contains(err.Error(), "already requested") { + log.Infof("neo3 chain %d already requested", config.DefConfig.Neo3ChainID) + return true + } + panic(fmt.Errorf("RegisterNeo3Chain failed: %v", err)) + } + testcase.WaitPolyTx(txHash, poly) + log.Infof("successful to register neo3 chain, txHash: %s", txHash.ToHexString()) + + return true +} + func RegisterCosmos(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { blkToWait := uint64(1) txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.CMCrossChainId, 5, "switcheochain", @@ -1074,6 +1230,20 @@ func UpdateNeo(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { return true } +func UpdateNeo3(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + blkToWait := uint64(1) + neo3Ccmc, err := common2.AddressFromHexString(strings.TrimPrefix(config.DefConfig.Neo3CCMC, "0x")) + if err != nil { + log.Errorf("failed to decode Neo3CCMC: %v", err) + return false + } + if err = updateSideChain(poly, acc, config.DefConfig.NeoChainID, 11, blkToWait, "NEO3", neo3Ccmc[:]); err != nil { + log.Errorf("failed to update neo3: %v", err) + return false + } + return true +} + func updateSideChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account, chainId, router, blkToWait uint64, name string, ccmc []byte) error { txhash, err := poly.Native.Scm.UpdateSideChain(acc.Address, chainId, router, name, blkToWait, ccmc, acc) diff --git a/config/config.go b/config/config.go index 904849e..187a67e 100644 --- a/config/config.go +++ b/config/config.go @@ -39,11 +39,12 @@ const ( //Config object used by ontology-instance type TestConfig struct { - BtcChainID uint64 - EthChainID uint64 - OntChainID uint64 - NeoChainID uint64 - BscChainID uint64 + BtcChainID uint64 + EthChainID uint64 + OntChainID uint64 + NeoChainID uint64 + Neo3ChainID uint64 + BscChainID uint64 BtcRestAddr string BtcRestUser string @@ -94,6 +95,14 @@ type TestConfig struct { NeoWif string NeoEpoch uint32 + // neo3 chain + Neo3Url string + Neo3Wallet string + Neo3Pwd string + Neo3Magic uint32 + Neo3AddressVersion byte + Neo3Epoch uint32 + // relayer chain RCWallet string RCWalletPwd string @@ -168,6 +177,16 @@ type TestConfig struct { NeoBnb string NeoEth string + // neo3 contracts + Neo3CCMC string + Neo3LockProxy string + Neo3Ont string + Neo3Ontd string + Neo3Bnb string + Neo3Eth string + Neo3Ht string + Neo3Hrc20 string + // cosmos CMLockProxy string diff --git a/go.mod b/go.mod index d053e58..54b1146 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,8 @@ require ( github.com/ethereum/go-ethereum v1.9.15 github.com/google/go-cmp v0.5.2 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/joeqian10/neo-gogogo v0.0.0-20200811090937-d8aab8600241 + github.com/joeqian10/neo-gogogo v1.1.0 + github.com/joeqian10/neo3-gogogo v0.2.3 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 @@ -20,17 +21,14 @@ require ( github.com/polynetwork/eth-contracts v0.0.0-20200903021827-c9212e419943 github.com/polynetwork/poly v0.0.0-20201216061550-50185057319d github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493 - github.com/stretchr/testify v1.6.1 + github.com/stretchr/testify v1.7.0 github.com/tendermint/tendermint v0.33.7 - 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 ) -replace github.com/polynetwork/eth-contracts => github.com/zouxyan/eth-contracts v0.0.0-20201215112041-6532ab4e12f4 +replace github.com/polynetwork/eth-contracts => github.com/zouxyan/eth-contracts v0.0.0-20210115072359-e4cac6edc20c replace github.com/polynetwork/poly => github.com/zhiqiangxu/poly v0.0.0-20201216075543-df86073d2575 diff --git a/go.sum b/go.sum index c4458c2..a3f98dd 100644 --- a/go.sum +++ b/go.sum @@ -190,7 +190,6 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqG github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gcash/bchd v0.14.7/go.mod h1:Gk/O1ktRVW5Kao0RsnVXp3bWxeYQadqawZ1Im9HE78M= github.com/gcash/bchd v0.15.2/go.mod h1:k9wIjgwnhbrAw+ruIPZ2tHZMzfFNdyUnORZZX7lqXGY= -github.com/gcash/bchd v0.16.4/go.mod h1:gR67ljCexTNwbKYN3wjbRHi9lYLp4rMomy1UQ3E1USA= github.com/gcash/bchd v0.16.5 h1:hkLUecfvcf2wf5vy05vp5X0OG9I5xWKnxdHU2/KI8PM= github.com/gcash/bchd v0.16.5/go.mod h1:gR67ljCexTNwbKYN3wjbRHi9lYLp4rMomy1UQ3E1USA= github.com/gcash/bchlog v0.0.0-20180913005452-b4f036f92fa6 h1:3pZvWJ8MSfWstGrb8Hfh4ZpLyZNcXypcGx2Ju4ZibVM= @@ -286,7 +285,6 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gosuri/uilive v0.0.3/go.mod h1:qkLSc0A5EXSP6B04TrN4oQoxqFI7A8XvoXSlJi8cwk8= -github.com/gosuri/uilive v0.0.4/go.mod h1:V/epo5LjjlDE5RJUcqx8dbw+zc93y5Ya3yg8tfZ74VI= github.com/gosuri/uiprogress v0.0.1/go.mod h1:C1RTYn4Sc7iEyf6j8ft5dyoZ4212h8G1ol9QQluh5+0= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -351,10 +349,11 @@ github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJS github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/joeqian10/neo-gogogo v0.0.0-20200611102831-c17de5e1f0f8/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= github.com/joeqian10/neo-gogogo v0.0.0-20200716075409-923bd4879b43/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= -github.com/joeqian10/neo-gogogo v0.0.0-20200811090937-d8aab8600241 h1:kfTkgo18r3VFWrr3z8arDU05yHiX/nU1ZaDgEApinMo= -github.com/joeqian10/neo-gogogo v0.0.0-20200811090937-d8aab8600241/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= +github.com/joeqian10/neo-gogogo v1.1.0 h1:TjqBwFQnNCtw6LK3QMog3yHa9sTZaZmqP+zqGOZ3SZ0= +github.com/joeqian10/neo-gogogo v1.1.0/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= +github.com/joeqian10/neo3-gogogo v0.2.3 h1:Ucg28066O2Q/G7jGFMWuyiAxhzWWv9+A2RDEWitbkjQ= +github.com/joeqian10/neo3-gogogo v0.2.3/go.mod h1:yvYQyEha3An0uYFhzR9asMU/O9HyeYy6RApRnLGPEtM= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -508,16 +507,6 @@ github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666 h1:oV github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666/go.mod h1:U8rR9X6vemlkBAJWfvzwSoalcJjX8B2aQjB0kPRhBUA= github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759 h1:M0DV6MUVXOZtdQ94i8oYuSAX+ljzEe+mMqb2Llnm/oM= github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759/go.mod h1:VMBJZ8GSZeoWBntd/rWx2Rr5roRKofO7siP1qd6A6pY= -github.com/polynetwork/poly v0.0.0-20200710095239-0596a3d7afe5/go.mod h1:UzlGEWk0eCGsuMJOZfBoZjRbmu4Yw/SudKAIFe1gPnY= -github.com/polynetwork/poly v0.0.0-20200715030435-4f1d1a0adb44/go.mod h1:UzlGEWk0eCGsuMJOZfBoZjRbmu4Yw/SudKAIFe1gPnY= -github.com/polynetwork/poly v0.0.0-20201215081835-44303924f13c h1:FI45q7Ej3ROUDtmThE13AAGGJnNCLst/FEECFvW7fSw= -github.com/polynetwork/poly v0.0.0-20201215081835-44303924f13c/go.mod h1:GLCHH85w+7Ca5P65hAd2qHgt5Azg0yuODLqAOfV1UTU= -github.com/polynetwork/poly v0.0.0-20201216061550-50185057319d h1:XAQNgWfPcBofzQEz7bAYs3ypGAHgkWF7eUzk0BkdtyY= -github.com/polynetwork/poly v0.0.0-20201216061550-50185057319d/go.mod h1:SrFSYe/3uWkouGvoSGkjDPm5sNT95dSFZkQtXRun148= -github.com/polynetwork/poly v1.11.0 h1:1xEWr9z9/TCs/XM7eXBTmF2RT061G1zTumqAVdjzR+A= -github.com/polynetwork/poly-go-sdk v0.0.0-20200722030827-6875b6018b93/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= -github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493 h1:wob4aH5NxiDFIOWlpKbmoIb88QOccDNa1+rl93czjr8= -github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -626,6 +615,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= @@ -675,8 +666,8 @@ github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 h1:Ogrd4dHj github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zouxyan/eth-contracts v0.0.0-20201215112041-6532ab4e12f4 h1:A+kC+RAocm9jwmwxUqzBYSbCMsz4bI7JBNT+uYzC6NY= -github.com/zouxyan/eth-contracts v0.0.0-20201215112041-6532ab4e12f4/go.mod h1:7+sPWP1/qbE3V8HbByvuoIJpBZ0TWZF50xHAJIXQ1pA= +github.com/zouxyan/eth-contracts v0.0.0-20210115072359-e4cac6edc20c h1:3gzrpowqz7P1Uj7l/DqiYGBWLi+dvjzjjjxxzSIvVCI= +github.com/zouxyan/eth-contracts v0.0.0-20210115072359-e4cac6edc20c/go.mod h1:7+sPWP1/qbE3V8HbByvuoIJpBZ0TWZF50xHAJIXQ1pA= github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1 h1:1qKTeMTSIEvRIjvVYzgcRp0xVp0eoiRTTiHSncb5gD8= github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1/go.mod h1:bslhAiUxakrA6z6CHmVyvkfpnxx18RJBwVyx2TluJWw= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -713,8 +704,8 @@ golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPh 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-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= 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= @@ -750,8 +741,8 @@ 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-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/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -786,6 +777,10 @@ golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7w 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 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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.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= From 9b1a3bda9382f7ecb19e484ecb3564084e7666ae Mon Sep 17 00:00:00 2001 From: zhuoqian Date: Tue, 20 Apr 2021 18:44:57 +0800 Subject: [PATCH 51/96] fix a typo --- cmd/tools/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 7be3ac2..e4f0959 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -826,7 +826,7 @@ func SyncNeo3GenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Acco return fmt.Errorf("NewNeo3Invoker err: %v", err) } // build script - scriptHash, err := helper3.UInt160FromString(config.DefConfig.NeoCCMC) // hex string in little endian + scriptHash, err := helper3.UInt160FromString(config.DefConfig.Neo3CCMC) // big endian if err != nil { return fmt.Errorf("neo3 ccmc conversion error: %s", err) } From 0ef3062a8c1571ffed2e067c9a642f3f9aca9eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Wed, 21 Apr 2021 11:42:10 +0800 Subject: [PATCH 52/96] rm dup field --- config/config.go | 1 - 1 file changed, 1 deletion(-) diff --git a/config/config.go b/config/config.go index 9aec36f..3085a2d 100644 --- a/config/config.go +++ b/config/config.go @@ -45,7 +45,6 @@ type TestConfig struct { NeoChainID uint64 Neo3ChainID uint64 BscChainID uint64 - BscChainID uint64 ZilChainID uint64 HecoChainID uint64 O3ChainID uint64 From 2940c84f0fe96c83fd770d53ccedbacb69f146c5 Mon Sep 17 00:00:00 2001 From: zhuoqian Date: Wed, 21 Apr 2021 12:07:52 +0800 Subject: [PATCH 53/96] update neo-gogogo version --- go.mod | 3 +++ testcase/method.go | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index d0aa52b..e770aa0 100644 --- a/go.mod +++ b/go.mod @@ -34,3 +34,6 @@ replace github.com/polynetwork/eth-contracts => github.com/zouxyan/eth-contracts replace github.com/polynetwork/poly => github.com/zhiqiangxu/poly v0.0.0-20210315055227-f937bd40dbe9 replace github.com/polynetwork/poly-go-sdk => github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 + +//replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 + diff --git a/testcase/method.go b/testcase/method.go index cbcbbdf..a96319a 100644 --- a/testcase/method.go +++ b/testcase/method.go @@ -1818,7 +1818,7 @@ func SendNeoCrossBsc(ctx *testframework.TestFrameworkContext, status *testframew if err != nil { return err } - itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero) + itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero, helper.Zero) if err != nil { return err } @@ -1882,7 +1882,7 @@ func SendNeoCrossEth(ctx *testframework.TestFrameworkContext, status *testframew if err != nil { return err } - itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero) + itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero, helper.Zero) if err != nil { return err } @@ -1942,7 +1942,7 @@ func SendNeoCrossOnt(ctx *testframework.TestFrameworkContext, status *testframew if err != nil { return err } - itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero) + itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero, helper.Zero) if err != nil { return err } @@ -2230,7 +2230,7 @@ func SendNOntCrossOnt(ctx *testframework.TestFrameworkContext, status *testframe if err != nil { return err } - itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero) + itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero, helper.Zero) if err != nil { return err } @@ -2761,7 +2761,7 @@ func SendNEthCrossEth(ctx *testframework.TestFrameworkContext, status *testframe if err != nil { return err } - itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero) + itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero, helper.Zero) if err != nil { return err } @@ -3067,7 +3067,7 @@ func SendNOntdCrossOnt(ctx *testframework.TestFrameworkContext, status *testfram if err != nil { return err } - itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero) + itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero, helper.Zero) if err != nil { return err } @@ -3129,7 +3129,7 @@ func SendNOntdCrossEth(ctx *testframework.TestFrameworkContext, status *testfram if err != nil { return err } - itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero) + itx, err := tb.MakeInvocationTransaction(script, from, nil, helper.UInt160{}, helper.Zero, helper.Zero) if err != nil { return err } From 6e47a1d0af43ab3113ef41f5d02ac0ca7dac1fa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Wed, 21 Apr 2021 13:21:01 +0800 Subject: [PATCH 54/96] fix --- cmd/tools/run.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index d9a1abb..43b154d 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -24,14 +24,15 @@ import ( "encoding/json" "flag" "fmt" - "github.com/joeqian10/neo-gogogo/sc" - "github.com/polynetwork/poly-io-test/chains/neo3" "math/big" "os" "strconv" "strings" "time" + "github.com/joeqian10/neo-gogogo/sc" + "github.com/polynetwork/poly-io-test/chains/neo3" + "github.com/Zilliqa/gozilliqa-sdk/account" "github.com/Zilliqa/gozilliqa-sdk/core" "github.com/Zilliqa/gozilliqa-sdk/crosschain/polynetwork" @@ -260,6 +261,7 @@ func main() { SyncOntGenesisHeader(poly, accArr) case config.DefConfig.NeoChainID: SyncNeoGenesisHeader(poly, accArr) + case config.DefConfig.Neo3ChainID: SyncNeo3GenesisHeader(poly, accArr) case config.DefConfig.CMCrossChainId: SyncCosmosGenesisHeader(poly, accArr) @@ -1284,7 +1286,7 @@ func SyncNeo3GenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Acco rawTxString := crypto3.Base64Encode(trx.ToByteArray()) // send the raw transaction - response:= invoker.Client.SendRawTransaction(rawTxString) + response := invoker.Client.SendRawTransaction(rawTxString) if response.HasError() { return fmt.Errorf("initGenesisBlock on neo3, SendRawTx err: %v", err) } @@ -1544,7 +1546,7 @@ func RegisterNeo3Chain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool if err != nil { panic(fmt.Errorf("RegisterNeoChain, failed to decode Neo3CCMC '%s': %v", config.DefConfig.Neo3CCMC, err)) } - txHash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.NeoChainID, 11, "NEO3", + txHash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.Neo3ChainID, 11, "NEO3", blkToWait, neo3Ccmc[:], acc) if err != nil { if strings.Contains(err.Error(), "already registered") { From fe89489b45e2715c52f4a53c3ee46d956ba89b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Wed, 21 Apr 2021 13:21:52 +0800 Subject: [PATCH 55/96] update .gitignore --- .gitignore | 3 +-- go.sum | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index dcd271d..7c74065 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,7 @@ .alliance-wallets/* .vscode report/* -config-*.json +*.json test.go fisco_sdk.toml *.yaml -config.json diff --git a/go.sum b/go.sum index f6a1e6b..976748e 100644 --- a/go.sum +++ b/go.sum @@ -717,6 +717,7 @@ 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/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= From 176f22a738b69bc9e90c0327b798a0168a03a4d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Wed, 21 Apr 2021 13:23:30 +0800 Subject: [PATCH 56/96] mod msg --- cmd/tools/run.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 43b154d..182149d 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -1210,11 +1210,11 @@ func SyncNeo3GenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Acco if strings.Contains(err.Error(), "had been initialized") { log.Info("neo3 already synced") } else { - panic(fmt.Errorf("SyncNeoGenesisHeader failed: %v", err)) + panic(fmt.Errorf("SyncNeo3GenesisHeader failed: %v", err)) } } else { testcase.WaitPolyTx(txhash, poly) - log.Infof("successful to sync neo genesis header: ( txhash: %s )", txhash.ToHexString()) + log.Infof("successful to sync neo3 genesis header: ( txhash: %s )", txhash.ToHexString()) } // start sync poly header to neo3 side chain From a3119bd3290fc5f6f11b3f88b781f2fb85aaadea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Thu, 13 May 2021 20:15:19 +0800 Subject: [PATCH 57/96] add ok --- cmd/tools/run.go | 106 +++++++++++++++++ go.mod | 31 ++++- go.sum | 293 ++++++++++++++++++++++++++++++++++++++++------- 3 files changed, 382 insertions(+), 48 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 182149d..cde37c8 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -24,6 +24,7 @@ import ( "encoding/json" "flag" "fmt" + "io/ioutil" "math/big" "os" "strconv" @@ -205,6 +206,10 @@ func main() { if registerMSC(poly, acc) { ApproveRegisterSideChain(config.DefConfig.MscChainID, poly, accArr) } + case config.DefConfig.OkChainID: + if registerOK(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.OkChainID, poly, accArr) + } case 0: if RegisterBtcChain(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BtcChainID, poly, accArr) @@ -239,6 +244,9 @@ func main() { if registerMSC(poly, acc) { ApproveRegisterSideChain(config.DefConfig.MscChainID, poly, accArr) } + if registerOK(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.OkChainID, poly, accArr) + } } case "sync_genesis_header": wArr := strings.Split(pWalletFiles, ",") @@ -275,6 +283,8 @@ func main() { SyncO3GenesisHeader(poly, accArr) case config.DefConfig.MscChainID: SyncMSCGenesisHeader(poly, accArr) + case config.DefConfig.OkChainID: + SyncOKGenesisHeader(poly, accArr) case 0: SyncBtcGenesisHeader(poly, acc) SyncEthGenesisHeader(poly, accArr) @@ -286,6 +296,7 @@ func main() { SyncZILGenesisHeader(poly, accArr) SyncHecoGenesisHeader(poly, accArr) SyncMSCGenesisHeader(poly, accArr) + SyncOKGenesisHeader(poly, accArr) } case "update_btc": @@ -847,6 +858,73 @@ func SyncMSCGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou log.Infof("successful to sync poly genesis header to MSC: ( txhash: %s )", tx.Hash().String()) } +func SyncOKGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { + tool := eth.NewEthTools(config.DefConfig.OKURL) + + rawHex, err := ioutil.ReadFile("raw.hex") + if err != nil { + panic(fmt.Sprintf("ReadFile error:%v", err)) + } + raw, err := hex.DecodeString(string(rawHex)) + if err != nil { + panic(fmt.Sprintf("DecodeString error:%v", err)) + } + + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.OkChainID, raw, accArr) + if err != nil { + if strings.Contains(err.Error(), "had been initialized") { + log.Info("msc already synced") + } else { + panic(fmt.Errorf("SyncMSCGenesisHeader failed: %v", err)) + } + } else { + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to sync msc genesis header to poly: (txhash: %s )", + txhash.ToHexString()) + } + + eccmContract, err := eccm_abi.NewEthCrossChainManager(common3.HexToAddress(config.DefConfig.OkEccm), tool.GetEthClient()) + if err != nil { + panic(err) + } + signer, err := eth.NewEthSigner(config.DefConfig.OKPrivateKey) + if err != nil { + panic(err) + } + nonce := eth.NewNonceManager(tool.GetEthClient()).GetAddressNonce(signer.Address) + gasPrice, err := tool.GetEthClient().SuggestGasPrice(context.Background()) + if err != nil { + panic(fmt.Errorf("SyncOKGenesisHeader, get suggest gas price failed error: %s", err.Error())) + } + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + auth := testcase.MakeEthAuth(signer, nonce, gasPrice.Uint64(), uint64(8000000)) + + 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)...) + } + + tx, err := eccmContract.InitGenesisBlock(auth, gB.Header.ToArray(), publickeys) + log.Infof("successful to sync poly genesis header to OK: ( txhash: %s )", tx.Hash().String()) +} + func SyncO3GenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { tool := eth.NewEthTools(config.DefConfig.O3URL) height, err := tool.GetNodeHeight() @@ -1630,6 +1708,34 @@ func registerMSC(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { return true } +func registerOK(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + + blkToWait := uint64(1) + eccd, err := hex.DecodeString(strings.Replace(config.DefConfig.OkEccd, "0x", "", 1)) + if err != nil { + panic(fmt.Errorf("registerMSC, failed to decode eccd '%s' : %v", config.DefConfig.OkEccd, err)) + } + + txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.OkChainID, 12, "ok", + blkToWait, eccd, acc) + if err != nil { + if strings.Contains(err.Error(), "already registered") { + log.Infof("ok chain %d already registered", config.DefConfig.OkChainID) + return false + } + if strings.Contains(err.Error(), "already requested") { + log.Infof("ok chain %d already requested", config.DefConfig.OkChainID) + return true + } + panic(fmt.Errorf("registerOK failed: %v", err)) + } + + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to register ok chain: ( txhash: %s )", txhash.ToHexString()) + + return true +} + func RegisterO3(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { tool := eth.NewEthTools(config.DefConfig.O3URL) chainID, err := tool.GetChainID() diff --git a/go.mod b/go.mod index e770aa0..f22da56 100644 --- a/go.mod +++ b/go.mod @@ -3,16 +3,25 @@ module github.com/polynetwork/poly-io-test go 1.14 require ( + github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae - github.com/btcsuite/btcd v0.20.1-beta + github.com/allegro/bigcache v1.2.1 // indirect + github.com/aristanetworks/goarista v0.0.0-20200331225509-2cc472e8fbd6 // indirect + 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/cespare/cp v1.1.1 // indirect + github.com/cosmos/cosmos-sdk v0.39.2 + github.com/deckarep/golang-set v1.7.1 // indirect + github.com/ethereum/go-ethereum v1.9.25 + github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect + github.com/go-ole/go-ole v1.2.4 // indirect + github.com/golang/mock v1.5.0 // indirect github.com/google/go-cmp v0.5.2 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/joeqian10/neo-gogogo v1.1.0 github.com/joeqian10/neo3-gogogo v0.2.3 github.com/kr/text v0.2.0 // indirect + github.com/mattn/go-colorable v0.1.7 // 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 @@ -22,9 +31,15 @@ require ( github.com/polynetwork/eth-contracts v0.0.0-20200903021827-c9212e419943 github.com/polynetwork/poly v0.0.0-20201216061550-50185057319d github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493 + github.com/prometheus/tsdb v0.9.1 // indirect + github.com/rjeczalik/notify v0.9.2 // indirect + github.com/shirou/gopsutil v2.20.9+incompatible // indirect + github.com/spf13/afero v1.2.2 // indirect + github.com/spf13/viper v1.7.1 // indirect + github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48 // indirect github.com/stretchr/testify v1.7.0 - github.com/tendermint/tendermint v0.33.7 - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + github.com/tendermint/tendermint v0.33.9 + google.golang.org/grpc v1.30.0 // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect ) @@ -37,3 +52,9 @@ replace github.com/polynetwork/poly-go-sdk => github.com/zhiqiangxu/poly-go-sdk //replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 +replace ( + github.com/cosmos/cosmos-sdk => github.com/okex/cosmos-sdk v0.39.2-exchain3 + github.com/ethereum/go-ethereum => github.com/zhiqiangxu/go-ethereum v0.0.0-20210513053854-b16fac27e406 + github.com/tendermint/iavl => github.com/okex/iavl v0.14.3-exchain + github.com/tendermint/tendermint => github.com/okex/tendermint v0.33.9-exchain2 +) diff --git a/go.sum b/go.sum index 976748e..d312941 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,18 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/99designs/keyring v1.1.3 h1:mEV3iyZWjkxQ7R8ia8GcG97vCX5zQQ7n4o8R2BylwQY= -github.com/99designs/keyring v1.1.3/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= +github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= @@ -15,8 +26,9 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= 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/ChainSafe/go-schnorrkel v0.0.0-20200102211924-4bcbc698314f/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 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= github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e h1:ahyvB3q25YnZWly5Gq1ekg6jcmWaGj/vG/MhF4aisoc= @@ -25,15 +37,17 @@ github.com/JohnCGriffin/overflow v0.0.0-20170615021017-4d914c927216 h1:2ZboyJ8vl github.com/JohnCGriffin/overflow v0.0.0-20170615021017-4d914c927216/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/OpenBazaar/jsonpb v0.0.0-20171123000858-37d32ddf4eef/go.mod h1:55mCznBcN9WQgrtgaAkv+p2LxeW/tQRdidyyE9D0I5k= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/sarama v1.26.1/go.mod h1:NbSGBSSndYaIhRcBtY9V0U7AyH+x71bG668AuWys/yU= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VictoriaMetrics/fastcache v1.5.3/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE= +github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= +github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.5.7 h1:4y6y0G8PRzszQUYIQHHssv/jgPHAb5qQuuDNdCbyAgw= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= +github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= @@ -48,10 +62,17 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= +github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/aristanetworks/fsnotify v1.4.2/go.mod h1:D/rtu7LpjYM8tRJphJ0hUBYpjai8SfX+aSNsWDTq/Ks= +github.com/aristanetworks/glog v0.0.0-20191112221043-67e8567f59f3/go.mod h1:KASm+qXFKs/xjSoWn30NrWBBvdTTQq+UjkhjEJHfSFA= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847 h1:rtI0fD4oG/8eVokGVPYJEW1F88p1ZNgXiEIs9thEE4A= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= +github.com/aristanetworks/goarista v0.0.0-20200331225509-2cc472e8fbd6 h1:Pcu4aKyFfpH0aXLnYJrsTjdRvXNY4SbODsb0pMTZxhA= +github.com/aristanetworks/goarista v0.0.0-20200331225509-2cc472e8fbd6/go.mod h1:QZe5Yh80Hp1b6JxQdpfSEEe8X7hTyTEZSosSrFf/oJE= +github.com/aristanetworks/splunk-hec-go v0.3.3/go.mod h1:1VHO9r17b0K7WmOlLb9nTk/2YanvOEnLMUgsFrxBROc= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= @@ -69,12 +90,15 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= 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.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= 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= @@ -85,8 +109,10 @@ github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3L github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0 h1:Tvd0BfvqX9o823q1j2UZ/epQo09eJh6dTcRp79ilIN4= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE= 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= @@ -94,14 +120,16 @@ github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= +github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.0.1-0.20190104013014-3767db7a7e18/go.mod h1:HD5P3vAIAh+Y2GAxg0PrPN1P8WkepXGpjbUPDHJqqKM= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= +github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e h1:0XBUw73chJ1VYSsfvcPvVT7auykAJce9FpRr10L6Qhw= github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:P13beTBKr5Q18lJe1rIoLUqjM+CB1zYrRg44ZqGuQSA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -110,13 +138,11 @@ github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkE github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/cosmos-sdk v0.38.4/go.mod h1:rzWOofbKfRt3wxiylmYWEFHnxxGj0coyqgWl2I9obAw= -github.com/cosmos/cosmos-sdk v0.39.1 h1:vhjf9PZh9ph8btAj9aBpHoVITgVVjNBpM3x5Gl/Vwac= -github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= @@ -138,45 +164,57 @@ 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/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ= +github.com/deckarep/golang-set v1.7.1/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= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= +github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a h1:mq+R6XEM6lJX5VlLyZIrUSP8tSuJp82xTK89hvBwJbU= -github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= +github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= +github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= +github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 h1:2vLKys4RBU4pn2T/hjXMbvwTr1Cvy5THHrQkbeY9HRk= +github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25/go.mod h1:hTr8+TLQmkUkgcuh3mcr5fjrT9c64ZzsBCdCEC6UppY= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/go-ethereum v1.9.13/go.mod h1:qwN9d1GLyDh0N7Ab8bMGd0H9knaji2jOBm2RrMGjXls= -github.com/ethereum/go-ethereum v1.9.15 h1:wrWl+QrtutRUJ9LZXdUqBoGoo2b1tOCYRDrAOQhCY3A= -github.com/ethereum/go-ethereum v1.9.15/go.mod h1:slT8bPPRhXsyNTwHQxrOnjuTZ1sDXRajW11EkJ84QJ0= +github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= +github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= +github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gcash/bchd v0.14.7/go.mod h1:Gk/O1ktRVW5Kao0RsnVXp3bWxeYQadqawZ1Im9HE78M= @@ -193,6 +231,7 @@ github.com/gcash/bchutil v0.0.0-20200506001747-c2894cd54b33/go.mod h1:wB++2ZcHUv github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= @@ -203,6 +242,8 @@ github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= +github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= @@ -224,11 +265,13 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.5.0 h1:jlYHihg//f7RRwuPfptm04yp4s7O6Kw8EZiVYIGcH0g= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= @@ -243,6 +286,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3 h1:ur2rms48b3Ep1dxh7aUV2FZEQ8jEVO2F6ILKx8ofkAg= +github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -250,15 +295,26 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= +github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.4.2 h1:0QniY0USkHQ1RGCLfKxeNHK9bkDHGRYGNDFBCS+YARg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -286,7 +342,9 @@ github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -298,24 +356,27 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/holiman/uint256 v1.1.1 h1:4JywC80b+/hSfljFlEBLHrrh+CIONLDz9NuFl0af4Mw= +github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= github.com/huin/goupnp v1.0.0 h1:wg75sLpL6DZqwHQN6E1Cfk6mtfzS45z8OV+ic+DtHRo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= @@ -329,6 +390,8 @@ github.com/itchyny/base58-go v0.1.0 h1:zF5spLDo956exUAD17o+7GamZTRkXOZlqJjRciZwd github.com/itchyny/base58-go v0.1.0/go.mod h1:SrMWPE3DFuJJp1M/RUhu4fccp/y9AlB8AL3o3duPToU= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 h1:6OvNmYgJyexcZ3pYbTI9jWx5tHo1Dee/tWbLMfPe2TA= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v0.0.0-20181221193153-c0795c8afcf4/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -346,6 +409,8 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= @@ -359,11 +424,17 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= +github.com/klauspost/compress v1.9.8/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.10.1/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/reedsolomon v1.9.3/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 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= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= @@ -377,6 +448,8 @@ github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzR github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -394,6 +467,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/minio/highwayhash v1.0.0 h1:iMSDhgUILCr0TNm8LWlSjF8N0ZIj2qbO8WHp6Q/J2BA= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -409,6 +483,8 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= +github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 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= @@ -420,7 +496,16 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +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/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/okex/cosmos-sdk v0.39.2-exchain3 h1:1dfu855mhlS1QP9pz3A2bVAZb3KyJ7ldlL/PmxPtK/A= +github.com/okex/cosmos-sdk v0.39.2-exchain3/go.mod h1:IvlniaZoJAtzILHgcmnfaJ5S125TYJWfJvGqY9zSXb4= +github.com/okex/iavl v0.14.3-exchain h1:kwRIwpFD6B8mDDqoaxeUN3Pg2GW0Vr+sA+b86renWcA= +github.com/okex/iavl v0.14.3-exchain/go.mod h1:vHLYxU/zuxBmxxr1v+5Vnd/JzcIsyK17n9P9RDubPVU= +github.com/okex/tendermint v0.33.9-exchain2 h1:aI0lKffQKDHCZGxAjcBEz8Kyifn0oF4fDjcQxQ8rGvs= +github.com/okex/tendermint v0.33.9-exchain2/go.mod h1:EoGTbJUufUueNIigY3zyO6f7GOj29OdpFhuR8sxWdSU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -431,9 +516,15 @@ github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b h1:UQDN12BzdWhXQL0t2QcRixHqAIG+JKNvQ20DhrIODtU= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b/go.mod h1:J0eVc7BEMmVVXbGv9PHoxjRSEwOwLr0qfzPk8Rdl5iw= github.com/ontio/ontology v1.10.0/go.mod h1:iok/imHJVQXi5/Yr88dcbrKBRHGdiota1ZC6qh6l6Rc= @@ -452,6 +543,8 @@ github.com/ontio/ontology-go-sdk v1.11.9-0.20200819065441-7c4b7a8330f6/go.mod h1 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/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/openconfig/gnmi v0.0.0-20190823184014-89b2bf29312c/go.mod h1:t+O9It+LKzfOAhKTT5O0ehDix+MTqbtT0T9t+7zzOvc= +github.com/openconfig/reference v0.0.0-20190727015836-8dfd928c9696/go.mod h1:ym2A+zigScwkSEb/cVQB0/ZMpU3rqiH6X7WRRsxgOGw= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -475,6 +568,7 @@ github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQm github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.4.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -493,7 +587,7 @@ github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= -github.com/prometheus/client_golang v1.5.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.5.1 h1:bdHYieyGlH+6OLEk2YQha8THib30KP0/yD0YH9m6xcA= github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -516,19 +610,28 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.0.10 h1:QJQN3jYQhkamO4mhfUWqdDH2asK7ONOI9MTWjyAxNKM= +github.com/prometheus/procfs v0.0.10/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/prometheus/tsdb v0.9.1 h1:IWaAmWkYlgG7/S4iw4IpAQt5Y35QaZM6/GsZ7GsjAuk= +github.com/prometheus/tsdb v0.9.1/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= +github.com/rakyll/statik v0.1.6 h1:uICcfUXpgqtw2VopbIncslhAmE5hwc4g20TEyEENBNs= github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= +github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= +github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= @@ -539,28 +642,33 @@ github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/scylladb/go-set v1.0.2/go.mod h1:DkpGd78rljTxKAnTDPFqXSGxvETQnJyuSOQwsHycqfs= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shirou/gopsutil v2.20.5-0.20200531151128-663af789c085+incompatible h1:+gAR1bMhuoQnZMTWFIvp7ukynULPsteLzG+siZKLtD8= -github.com/shirou/gopsutil v2.20.5-0.20200531151128-663af789c085+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v2.20.9+incompatible h1:msXs2frUV+O/JLva9EDLpuJ84PrFsdCTCQex8PUdtkQ= +github.com/shirou/gopsutil v2.20.9+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= 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.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= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= 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.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= 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/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -569,11 +677,15 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.6.3 h1:pDDu1OyEDTKzpJwdq4TiuLyMsUgRa/BT5cn5O62NoHs= github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= +github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= +github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48 h1:ju5UTwk5Odtm4trrY+4Ca4RMj5OyXbmVeDAVad2T0Jw= +github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 h1:gIlAHnH1vJb5vwEjIp5kBj/eu99p/bl0Ay2goiPe5xE= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 h1:njlZPzLwU639dk2kqnCPPv+wNjq7Xb6EfUxe/oX0/NM= @@ -597,8 +709,12 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= +github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= +github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= +github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161/go.mod h1:wM7WEvslTq+iOEAMDLSzhVuOt5BRZ05WirO+b09GHQU= +github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b/go.mod h1:5XA7W9S6mni3h5uvOC75dA3m9CCCaS83lltmc0ukdi4= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= @@ -606,18 +722,11 @@ github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= github.com/tendermint/go-amino v0.15.1 h1:D2uk35eT4iTsvJd9jWIetzthE5C0/k2QmMFkCN+4JgQ= github.com/tendermint/go-amino v0.15.1/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/iavl v0.13.2/go.mod h1:vE1u0XAGXYjHykd4BLp8p/yivrw2PF1TuoljBcsQoGA= -github.com/tendermint/iavl v0.14.0 h1:Jkff+IFrXxRWtH9Jn/ga/2cxNnzMTv58xEKgCJsKUBg= -github.com/tendermint/iavl v0.14.0/go.mod h1:QmfViflFiXzxKLQE4tAUuWQHq+RSuQFxablW5oJZ6sE= -github.com/tendermint/tendermint v0.33.2/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk= -github.com/tendermint/tendermint v0.33.3/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk= -github.com/tendermint/tendermint v0.33.5/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tendermint v0.33.7 h1:b5CQD8ggDtl4u0EbXzabi0MaOw9NrcXker6ijEkAE74= -github.com/tendermint/tendermint v0.33.7/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= -github.com/tendermint/tm-db v0.4.1/go.mod h1:JsJ6qzYkCGiGwm5GHl/H5GLI9XLb6qZX7PRe425dHAY= -github.com/tendermint/tm-db v0.5.0/go.mod h1:lSq7q5WRR/njf1LnhiZ/lIJHk2S8Y1Zyq5oP/3o9C2U= github.com/tendermint/tm-db v0.5.1 h1:H9HDq8UEA7Eeg13kdYckkgwwkQLBnJGgX4PgLJRhieY= github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= +github.com/tendermint/tm-db v0.5.2 h1:QG3IxQZBubWlr7kGQcYIavyTNmZRO+r//nENxoq0g34= +github.com/tendermint/tm-db v0.5.2/go.mod h1:VrPTx04QJhQ9d8TFUTc2GpPBvBf/U9vIdBIzkjBk7Lk= +github.com/tjfoc/gmsm v1.3.0/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= @@ -633,10 +742,16 @@ github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 h1:1cngl9mPEoITZG8s8cVcUy5CeIBYhEESkOB7m6Gmkrk= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/xtaci/kcp-go v5.4.20+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE= +github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae/go.mod h1:gXtu8J62kEgmN++bm9BVICuT/e8yiLI2KFobd/TRFsE= github.com/ybbus/jsonrpc v2.1.2+incompatible h1:V4mkE9qhbDQ92/MLMIhlhMSbz8jNXdagC3xBR5NDwaQ= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= +github.com/zhiqiangxu/go-ethereum v0.0.0-20210513053854-b16fac27e406 h1:kSfFxFEv0fv2mWQ20E06svAqbsAu9P16eb2I5x1PFqM= +github.com/zhiqiangxu/go-ethereum v0.0.0-20210513053854-b16fac27e406/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= github.com/zhiqiangxu/poly v0.0.0-20210315055227-f937bd40dbe9 h1:wm4irkgb2+bDjNb8HoNT5o1yBxyW12T7Uh+AfwkuV9U= github.com/zhiqiangxu/poly v0.0.0-20210315055227-f937bd40dbe9/go.mod h1:LSfP6ahqUcgpFOwVTXE4xx085QLurBFefeH5u2J2SQo= github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 h1:Ogrd4dHjyNDNSLY6+89OfR1flM1CGI2CSee7QoXUYdU= @@ -650,9 +765,13 @@ github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1/go.mod h1:bslhAiUxakr go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg= +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -667,29 +786,49 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 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-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 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= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -704,6 +843,8 @@ golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -711,17 +852,21 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -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-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 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/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 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= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -732,38 +877,54 @@ golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200219091948-cb0a6d8edb6c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -772,37 +933,65 @@ golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200221224223-e1da425f72fd/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200218151345-dad8c97a84f5/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 h1:pSLkPbrjnPyLDYUO2VM9mDLqo2V6CFBY84lFSZAfoi4= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -823,10 +1012,15 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi 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= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610= 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/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/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -834,13 +1028,21 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= +gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= +gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= +gopkg.in/jcmturner/gokrb5.v7 v7.5.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= +gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200316214253-d7b0ff38cac9/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 h1:a6cXbcDDUkSBlpnkWV1bJ+vv3mOgQEltEJ2rPxroVu0= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/redis.v4 v4.2.4/go.mod h1:8KREHdypkCEojGKQcjMqAODMICIVwZAONWq8RowTITA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= @@ -854,11 +1056,16 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 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= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= From d91cc981a4459e5d56f15c56b6c17d6378f539fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Thu, 13 May 2021 20:28:22 +0800 Subject: [PATCH 58/96] add ok --- chains/eth/eth_invoker.go | 4 ++++ go.mod | 9 +------- go.sum | 46 +++++++++++++++++++++++++++++++++++++-- 3 files changed, 49 insertions(+), 10 deletions(-) diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index e8ad16d..4d903e0 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -81,6 +81,8 @@ func (ethInvoker *EInvoker) url() string { return ethInvoker.TConfiguration.HecoURL case ethInvoker.TConfiguration.O3ChainID: return ethInvoker.TConfiguration.O3URL + case ethInvoker.TConfiguration.OkChainID: + return ethInvoker.TConfiguration.OKURL default: panic(fmt.Sprintf("unknown chain id:%d", ethInvoker.ChainID)) } @@ -100,6 +102,8 @@ func (ethInvoker *EInvoker) privateKey() string { return ethInvoker.TConfiguration.HecoPrivateKey case ethInvoker.TConfiguration.O3ChainID: return ethInvoker.TConfiguration.O3PrivateKey + case ethInvoker.TConfiguration.OkChainID: + return ethInvoker.TConfiguration.OKPrivateKey default: panic(fmt.Sprintf("unknown chain id:%d", ethInvoker.ChainID)) } diff --git a/go.mod b/go.mod index f22da56..6626d5d 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/cespare/cp v1.1.1 // indirect github.com/cosmos/cosmos-sdk v0.39.2 github.com/deckarep/golang-set v1.7.1 // indirect - github.com/ethereum/go-ethereum v1.9.25 + github.com/ethereum/go-ethereum v1.9.15 github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect github.com/go-ole/go-ole v1.2.4 // indirect github.com/golang/mock v1.5.0 // indirect @@ -51,10 +51,3 @@ replace github.com/polynetwork/poly => github.com/zhiqiangxu/poly v0.0.0-2021031 replace github.com/polynetwork/poly-go-sdk => github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 //replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 - -replace ( - github.com/cosmos/cosmos-sdk => github.com/okex/cosmos-sdk v0.39.2-exchain3 - github.com/ethereum/go-ethereum => github.com/zhiqiangxu/go-ethereum v0.0.0-20210513053854-b16fac27e406 - github.com/tendermint/iavl => github.com/okex/iavl v0.14.3-exchain - github.com/tendermint/tendermint => github.com/okex/tendermint v0.33.9-exchain2 -) diff --git a/go.sum b/go.sum index d312941..21a7405 100644 --- a/go.sum +++ b/go.sum @@ -11,6 +11,7 @@ cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqCl cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/99designs/keyring v1.1.3/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= @@ -29,6 +30,7 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +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= github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e h1:ahyvB3q25YnZWly5Gq1ekg6jcmWaGj/vG/MhF4aisoc= @@ -37,6 +39,7 @@ github.com/JohnCGriffin/overflow v0.0.0-20170615021017-4d914c927216 h1:2ZboyJ8vl github.com/JohnCGriffin/overflow v0.0.0-20170615021017-4d914c927216/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/OpenBazaar/jsonpb v0.0.0-20171123000858-37d32ddf4eef/go.mod h1:55mCznBcN9WQgrtgaAkv+p2LxeW/tQRdidyyE9D0I5k= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/sarama v1.26.1/go.mod h1:NbSGBSSndYaIhRcBtY9V0U7AyH+x71bG668AuWys/yU= @@ -45,6 +48,7 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIO github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VictoriaMetrics/fastcache v1.5.3/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE= github.com/VictoriaMetrics/fastcache v1.5.7 h1:4y6y0G8PRzszQUYIQHHssv/jgPHAb5qQuuDNdCbyAgw= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= @@ -124,6 +128,7 @@ github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.0.1-0.20190104013014-3767db7a7e18/go.mod h1:HD5P3vAIAh+Y2GAxg0PrPN1P8WkepXGpjbUPDHJqqKM= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= @@ -143,6 +148,9 @@ github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cosmos/cosmos-sdk v0.38.4/go.mod h1:rzWOofbKfRt3wxiylmYWEFHnxxGj0coyqgWl2I9obAw= +github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= +github.com/cosmos/cosmos-sdk v0.39.2/go.mod h1:VNUluciWBFj2vkhpMcp8rYZL/kCw0FtNc7SseUjE1KM= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= @@ -172,8 +180,10 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= @@ -184,6 +194,7 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 h1:2vLKys4RBU4pn2T/hjXMbvwTr1Cvy5THHrQkbeY9HRk= @@ -193,6 +204,12 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/ethereum/go-ethereum v1.9.13/go.mod h1:qwN9d1GLyDh0N7Ab8bMGd0H9knaji2jOBm2RrMGjXls= +github.com/ethereum/go-ethereum v1.9.15 h1:wrWl+QrtutRUJ9LZXdUqBoGoo2b1tOCYRDrAOQhCY3A= +github.com/ethereum/go-ethereum v1.9.15/go.mod h1:slT8bPPRhXsyNTwHQxrOnjuTZ1sDXRajW11EkJ84QJ0= +github.com/ethereum/go-ethereum v1.9.25 h1:mMiw/zOOtCLdGLWfcekua0qPrJTe7FVIiHJ4IKNTfR0= +github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= @@ -266,12 +283,14 @@ github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.5.0 h1:jlYHihg//f7RRwuPfptm04yp4s7O6Kw8EZiVYIGcH0g= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= @@ -286,6 +305,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.2 h1:aeE13tS0IiQgFjYdoL8qN3K1N2bXXtI6Vi51/y7BpMw= +github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3 h1:ur2rms48b3Ep1dxh7aUV2FZEQ8jEVO2F6ILKx8ofkAg= github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -359,6 +380,7 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= @@ -377,6 +399,7 @@ github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25 github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= github.com/huin/goupnp v1.0.0 h1:wg75sLpL6DZqwHQN6E1Cfk6mtfzS45z8OV+ic+DtHRo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= @@ -588,6 +611,7 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.5.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.5.1 h1:bdHYieyGlH+6OLEk2YQha8THib30KP0/yD0YH9m6xcA= github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -642,6 +666,7 @@ github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/scylladb/go-set v1.0.2/go.mod h1:DkpGd78rljTxKAnTDPFqXSGxvETQnJyuSOQwsHycqfs= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shirou/gopsutil v2.20.5-0.20200531151128-663af789c085+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.20.9+incompatible h1:msXs2frUV+O/JLva9EDLpuJ84PrFsdCTCQex8PUdtkQ= github.com/shirou/gopsutil v2.20.9+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= @@ -657,6 +682,7 @@ github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPH github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= 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= @@ -665,6 +691,7 @@ github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTd 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/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= @@ -677,6 +704,7 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.6.3 h1:pDDu1OyEDTKzpJwdq4TiuLyMsUgRa/BT5cn5O62NoHs= github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= @@ -722,6 +750,16 @@ github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= github.com/tendermint/go-amino v0.15.1 h1:D2uk35eT4iTsvJd9jWIetzthE5C0/k2QmMFkCN+4JgQ= github.com/tendermint/go-amino v0.15.1/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tendermint/iavl v0.13.2/go.mod h1:vE1u0XAGXYjHykd4BLp8p/yivrw2PF1TuoljBcsQoGA= +github.com/tendermint/iavl v0.14.0/go.mod h1:QmfViflFiXzxKLQE4tAUuWQHq+RSuQFxablW5oJZ6sE= +github.com/tendermint/iavl v0.14.1/go.mod h1:QmfViflFiXzxKLQE4tAUuWQHq+RSuQFxablW5oJZ6sE= +github.com/tendermint/tendermint v0.33.2/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk= +github.com/tendermint/tendermint v0.33.3/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk= +github.com/tendermint/tendermint v0.33.5/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= +github.com/tendermint/tendermint v0.33.7/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= +github.com/tendermint/tendermint v0.33.9/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= +github.com/tendermint/tm-db v0.4.1/go.mod h1:JsJ6qzYkCGiGwm5GHl/H5GLI9XLb6qZX7PRe425dHAY= +github.com/tendermint/tm-db v0.5.0/go.mod h1:lSq7q5WRR/njf1LnhiZ/lIJHk2S8Y1Zyq5oP/3o9C2U= github.com/tendermint/tm-db v0.5.1 h1:H9HDq8UEA7Eeg13kdYckkgwwkQLBnJGgX4PgLJRhieY= github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= github.com/tendermint/tm-db v0.5.2 h1:QG3IxQZBubWlr7kGQcYIavyTNmZRO+r//nENxoq0g34= @@ -750,8 +788,6 @@ github.com/xtaci/kcp-go v5.4.20+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45 github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae/go.mod h1:gXtu8J62kEgmN++bm9BVICuT/e8yiLI2KFobd/TRFsE= github.com/ybbus/jsonrpc v2.1.2+incompatible h1:V4mkE9qhbDQ92/MLMIhlhMSbz8jNXdagC3xBR5NDwaQ= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= -github.com/zhiqiangxu/go-ethereum v0.0.0-20210513053854-b16fac27e406 h1:kSfFxFEv0fv2mWQ20E06svAqbsAu9P16eb2I5x1PFqM= -github.com/zhiqiangxu/go-ethereum v0.0.0-20210513053854-b16fac27e406/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= github.com/zhiqiangxu/poly v0.0.0-20210315055227-f937bd40dbe9 h1:wm4irkgb2+bDjNb8HoNT5o1yBxyW12T7Uh+AfwkuV9U= github.com/zhiqiangxu/poly v0.0.0-20210315055227-f937bd40dbe9/go.mod h1:LSfP6ahqUcgpFOwVTXE4xx085QLurBFefeH5u2J2SQo= github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 h1:Ogrd4dHjyNDNSLY6+89OfR1flM1CGI2CSee7QoXUYdU= @@ -799,6 +835,7 @@ golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 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= @@ -857,6 +894,7 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +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-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -905,6 +943,7 @@ golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200219091948-cb0a6d8edb6c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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= @@ -912,6 +951,7 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= @@ -1035,6 +1075,8 @@ gopkg.in/jcmturner/gokrb5.v7 v7.5.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuv gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200316214253-d7b0ff38cac9/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 h1:a6cXbcDDUkSBlpnkWV1bJ+vv3mOgQEltEJ2rPxroVu0= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/redis.v4 v4.2.4/go.mod h1:8KREHdypkCEojGKQcjMqAODMICIVwZAONWq8RowTITA= From 6e018ba3c644485e2383ec4883f3788010c22bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Fri, 14 May 2021 10:22:51 +0800 Subject: [PATCH 59/96] mod --- cmd/tools/run.go | 4 ++-- go.sum | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index cde37c8..aa7796f 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -861,7 +861,7 @@ func SyncMSCGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou func SyncOKGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { tool := eth.NewEthTools(config.DefConfig.OKURL) - rawHex, err := ioutil.ReadFile("raw.hex") + rawHex, err := ioutil.ReadFile("../okex-verify/raw.hex") if err != nil { panic(fmt.Sprintf("ReadFile error:%v", err)) } @@ -879,7 +879,7 @@ func SyncOKGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accoun } } else { testcase.WaitPolyTx(txhash, poly) - log.Infof("successful to sync msc genesis header to poly: (txhash: %s )", + log.Infof("successful to sync ok genesis header to poly: (txhash: %s )", txhash.ToHexString()) } diff --git a/go.sum b/go.sum index 21a7405..f54acba 100644 --- a/go.sum +++ b/go.sum @@ -150,6 +150,7 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/cosmos-sdk v0.38.4/go.mod h1:rzWOofbKfRt3wxiylmYWEFHnxxGj0coyqgWl2I9obAw= github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= +github.com/cosmos/cosmos-sdk v0.39.2 h1:nLfCJMkUuFt7ansi/YvCxwwxLFrgHCA3cYP4sJKYQdk= github.com/cosmos/cosmos-sdk v0.39.2/go.mod h1:VNUluciWBFj2vkhpMcp8rYZL/kCw0FtNc7SseUjE1KM= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= @@ -752,11 +753,13 @@ github.com/tendermint/go-amino v0.15.1 h1:D2uk35eT4iTsvJd9jWIetzthE5C0/k2QmMFkCN github.com/tendermint/go-amino v0.15.1/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tendermint/iavl v0.13.2/go.mod h1:vE1u0XAGXYjHykd4BLp8p/yivrw2PF1TuoljBcsQoGA= github.com/tendermint/iavl v0.14.0/go.mod h1:QmfViflFiXzxKLQE4tAUuWQHq+RSuQFxablW5oJZ6sE= +github.com/tendermint/iavl v0.14.1 h1:jz7YOvGiPwmcqqVMcSMjxCu4WXtQYGhKdKrWTTJ5EKs= github.com/tendermint/iavl v0.14.1/go.mod h1:QmfViflFiXzxKLQE4tAUuWQHq+RSuQFxablW5oJZ6sE= github.com/tendermint/tendermint v0.33.2/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk= github.com/tendermint/tendermint v0.33.3/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk= github.com/tendermint/tendermint v0.33.5/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= github.com/tendermint/tendermint v0.33.7/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= +github.com/tendermint/tendermint v0.33.9 h1:rRKIfu5qAXX5f9bwX1oUXSZz/ALFJjDuivhkbGUQxiU= github.com/tendermint/tendermint v0.33.9/go.mod h1:0yUs9eIuuDq07nQql9BmI30FtYGcEC60Tu5JzB5IezM= github.com/tendermint/tm-db v0.4.1/go.mod h1:JsJ6qzYkCGiGwm5GHl/H5GLI9XLb6qZX7PRe425dHAY= github.com/tendermint/tm-db v0.5.0/go.mod h1:lSq7q5WRR/njf1LnhiZ/lIJHk2S8Y1Zyq5oP/3o9C2U= From 5b5af3d604b7deaf9a4b1f8b45be5df84862ce84 Mon Sep 17 00:00:00 2001 From: zhuoqian Date: Fri, 14 May 2021 11:18:08 +0800 Subject: [PATCH 60/96] update neo3 ccmc format --- cmd/tools/run.go | 187 ++++++++++++++++++++++++----------------------- config/config.go | 1 - go.mod | 5 +- go.sum | 45 ++++++++++-- 4 files changed, 134 insertions(+), 104 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index d9a1abb..4844085 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -24,8 +24,6 @@ import ( "encoding/json" "flag" "fmt" - "github.com/joeqian10/neo-gogogo/sc" - "github.com/polynetwork/poly-io-test/chains/neo3" "math/big" "os" "strconv" @@ -48,13 +46,9 @@ import ( "github.com/joeqian10/neo-gogogo/rpc" block3 "github.com/joeqian10/neo3-gogogo/block" - crypto3 "github.com/joeqian10/neo3-gogogo/crypto" helper3 "github.com/joeqian10/neo3-gogogo/helper" io3 "github.com/joeqian10/neo3-gogogo/io" rpc3 "github.com/joeqian10/neo3-gogogo/rpc" - sc3 "github.com/joeqian10/neo3-gogogo/sc" - tx3 "github.com/joeqian10/neo3-gogogo/tx" - "github.com/ontio/ontology-crypto/keypair" ontology_go_sdk "github.com/ontio/ontology-go-sdk" common2 "github.com/ontio/ontology/common" @@ -1202,94 +1196,102 @@ func SyncNeo3GenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Acco if buf.Err != nil { return buf.Err } + //// concatenate state validator to genesis header bytes + //sv, err := crypto3.AddressToScriptHash(config.DefConfig.Neo3StateValidator, helper3.DefaultAddressVersion) + //if err != nil { + // return err + //} + //extra := append([]byte{0x14}, sv.ToByteArray()...) + //bs := buf.Bytes() + //bs = append(bs, extra...) txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.Neo3ChainID, buf.Bytes(), accArr) if err != nil { if strings.Contains(err.Error(), "had been initialized") { log.Info("neo3 already synced") } else { - panic(fmt.Errorf("SyncNeoGenesisHeader failed: %v", err)) + panic(fmt.Errorf("SyncNeo3GenesisHeader failed: %v", err)) } } else { testcase.WaitPolyTx(txhash, poly) - log.Infof("successful to sync neo genesis header: ( txhash: %s )", txhash.ToHexString()) - } - - // start sync poly header to neo3 side chain - if config.DefConfig.Neo3Wallet == "" { - log.Infof("neo wallet empty, won't sync poly header to neo ccmc") - return nil - } - polyHeader, err := poly.GetBlockByHeight(config.DefConfig.RCEpoch) - if err != nil { - return fmt.Errorf("poly.GetHeader(%d) to be synced to neo as genesis err; %v", config.DefConfig.RCEpoch, err) - } - - cp1 := sc.ContractParameter{ - Type: sc.ByteArray, - Value: polyHeader.Header.GetMessage(), - } - // public keys - info := &vconfig.VbftBlockInfo{} - if err := json.Unmarshal(polyHeader.Header.ConsensusPayload, info); err != nil { - return 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)...) - } - cp2 := sc.ContractParameter{ - Type: sc.ByteArray, - Value: publickeys, - } - - invoker, err := neo3.NewNeo3Invoker() - if err != nil { - return fmt.Errorf("NewNeo3Invoker err: %v", err) - } - // build script - scriptHash, err := helper3.UInt160FromString(config.DefConfig.Neo3CCMC) // big endian - if err != nil { - return fmt.Errorf("neo3 ccmc conversion error: %s", err) - } - - script, err := sc3.MakeScript(scriptHash, "InitGenesisBlock", []interface{}{cp1, cp2}) - if err != nil { - return fmt.Errorf("neo3 sc.MakeScript error: %s", err) - } - - balancesGas, err := invoker.GetAccountAndBalance(tx3.GasToken) - if err != nil { - return fmt.Errorf("neo3 GetAccountAndBalance error: %s", err) - } - - // make transaction - trx, err := invoker.MakeTransaction(script, nil, []tx3.ITransactionAttribute{}, balancesGas) - if err != nil { - return fmt.Errorf("neo3 MakeTransaction error: %s", err) - } - - // sign transaction - trx, err = invoker.SignTransaction(trx, config.DefConfig.Neo3Magic) - if err != nil { - return fmt.Errorf("neo3 SignTransaction error: %s", err) - } - rawTxString := crypto3.Base64Encode(trx.ToByteArray()) - - // send the raw transaction - response:= invoker.Client.SendRawTransaction(rawTxString) - if response.HasError() { - return fmt.Errorf("initGenesisBlock on neo3, SendRawTx err: %v", err) - } - log.Infof("sync poly header to neo3 as genesis, neo3TxHash: %s", trx.GetHash().String()) - + log.Infof("successful to sync neo3 genesis header: ( txhash: %s )", txhash.ToHexString()) + } + + //// start sync poly header to neo3 side chain + //if config.DefConfig.Neo3Wallet == "" { + // log.Infof("neo3 wallet empty, won't sync poly header to neo3 ccmc") + // return nil + //} + //polyHeader, err := poly.GetBlockByHeight(config.DefConfig.RCEpoch) + //if err != nil { + // return fmt.Errorf("poly.GetHeader(%d) to be synced to neo3 as genesis err: %v", config.DefConfig.RCEpoch, err) + //} + // + //cp1 := sc.ContractParameter{ + // Type: sc.ByteArray, + // Value: polyHeader.Header.GetMessage(), + //} + //// public keys + //info := &vconfig.VbftBlockInfo{} + //if err := json.Unmarshal(polyHeader.Header.ConsensusPayload, info); err != nil { + // return 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)...) + //} + //cp2 := sc.ContractParameter{ + // Type: sc.ByteArray, + // Value: publickeys, + //} + // + //invoker, err := neo3.NewNeo3Invoker() + //if err != nil { + // return fmt.Errorf("NewNeo3Invoker err: %v", err) + //} + //// build script + //scriptHash, err := helper3.UInt160FromString(config.DefConfig.Neo3CCMC) // big endian + //if err != nil { + // return fmt.Errorf("neo3 ccmc conversion error: %s", err) + //} + // + //script, err := sc3.MakeScript(scriptHash, "InitGenesisBlock", []interface{}{cp1, cp2}) + //if err != nil { + // return fmt.Errorf("neo3 sc.MakeScript error: %s", err) + //} + // + //balancesGas, err := invoker.GetAccountAndBalance(tx3.GasToken) + //if err != nil { + // return fmt.Errorf("neo3 GetAccountAndBalance error: %s", err) + //} + // + //// make transaction + //trx, err := invoker.MakeTransaction(script, nil, []tx3.ITransactionAttribute{}, balancesGas) + //if err != nil { + // return fmt.Errorf("neo3 MakeTransaction error: %s", err) + //} + // + //// sign transaction + //trx, err = invoker.SignTransaction(trx, config.DefConfig.Neo3Magic) + //if err != nil { + // return fmt.Errorf("neo3 SignTransaction error: %s", err) + //} + //rawTxString := crypto3.Base64Encode(trx.ToByteArray()) + // + //// send the raw transaction + //response := invoker.Client.SendRawTransaction(rawTxString) + //if response.HasError() { + // return fmt.Errorf("initGenesisBlock on neo3, SendRawTx err: %v", err) + //} + //log.Infof("sync poly header to neo3 as genesis, neo3TxHash: %s", trx.GetHash().String()) + // return nil } @@ -1436,7 +1438,6 @@ func ApproveRegisterSideChain(id uint64, poly *poly_go_sdk.PolySdk, accArr []*po txhash common.Uint256 err error ) - for i, a := range accArr { txhash, err = poly.Native.Scm.ApproveRegisterSideChain(id, a) if err != nil { @@ -1540,9 +1541,9 @@ func RegisterNeoChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool func RegisterNeo3Chain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { blkToWait := uint64(1) - neo3Ccmc, err := common2.AddressFromHexString(strings.TrimPrefix(config.DefConfig.Neo3CCMC, "0x")) - if err != nil { - panic(fmt.Errorf("RegisterNeoChain, failed to decode Neo3CCMC '%s': %v", config.DefConfig.Neo3CCMC, err)) + neo3Ccmc := helper3.HexToBytes(config.DefConfig.Neo3CCMC) + if len(neo3Ccmc) != 4 { + panic(fmt.Errorf("incorrect Neo3CCMC length")) } txHash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.NeoChainID, 11, "NEO3", blkToWait, neo3Ccmc[:], acc) @@ -1879,12 +1880,12 @@ func UpdateNeo(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { func UpdateNeo3(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { blkToWait := uint64(1) - neo3Ccmc, err := common2.AddressFromHexString(strings.TrimPrefix(config.DefConfig.Neo3CCMC, "0x")) - if err != nil { - log.Errorf("failed to decode Neo3CCMC: %v", err) + neo3Ccmc := helper3.HexToBytes(config.DefConfig.Neo3CCMC) + if len(neo3Ccmc) != 4 { //uint32 + log.Errorf("incorrect Neo3CCMC length") return false } - if err = updateSideChain(poly, acc, config.DefConfig.NeoChainID, 11, blkToWait, "NEO3", neo3Ccmc[:]); err != nil { + if err := updateSideChain(poly, acc, config.DefConfig.NeoChainID, 11, blkToWait, "NEO3", neo3Ccmc[:]); err != nil { log.Errorf("failed to update neo3: %v", err) return false } diff --git a/config/config.go b/config/config.go index 9aec36f..3085a2d 100644 --- a/config/config.go +++ b/config/config.go @@ -45,7 +45,6 @@ type TestConfig struct { NeoChainID uint64 Neo3ChainID uint64 BscChainID uint64 - BscChainID uint64 ZilChainID uint64 HecoChainID uint64 O3ChainID uint64 diff --git a/go.mod b/go.mod index e770aa0..6a10161 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/google/go-cmp v0.5.2 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/joeqian10/neo-gogogo v1.1.0 - github.com/joeqian10/neo3-gogogo v0.2.3 + github.com/joeqian10/neo3-gogogo v0.3.2 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 @@ -35,5 +35,4 @@ replace github.com/polynetwork/poly => github.com/zhiqiangxu/poly v0.0.0-2021031 replace github.com/polynetwork/poly-go-sdk => github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 -//replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 - +replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 diff --git a/go.sum b/go.sum index f6a1e6b..c188999 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,7 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= 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/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= @@ -34,6 +35,7 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.5.3/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE= github.com/VictoriaMetrics/fastcache v1.5.7 h1:4y6y0G8PRzszQUYIQHHssv/jgPHAb5qQuuDNdCbyAgw= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= +github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= @@ -47,6 +49,7 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -85,14 +88,17 @@ github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3L github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0 h1:Tvd0BfvqX9o823q1j2UZ/epQo09eJh6dTcRp79ilIN4= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE= 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/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -102,6 +108,7 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= +github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e h1:0XBUw73chJ1VYSsfvcPvVT7auykAJce9FpRr10L6Qhw= github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:P13beTBKr5Q18lJe1rIoLUqjM+CB1zYrRg44ZqGuQSA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -165,13 +172,18 @@ github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHj github.com/ethereum/go-ethereum v1.9.13/go.mod h1:qwN9d1GLyDh0N7Ab8bMGd0H9knaji2jOBm2RrMGjXls= github.com/ethereum/go-ethereum v1.9.15 h1:wrWl+QrtutRUJ9LZXdUqBoGoo2b1tOCYRDrAOQhCY3A= github.com/ethereum/go-ethereum v1.9.15/go.mod h1:slT8bPPRhXsyNTwHQxrOnjuTZ1sDXRajW11EkJ84QJ0= +github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= +github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= +github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc h1:jtW8jbpkO4YirRSyepBOH8E+2HEw6/hKkBvFPwhUN8c= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= @@ -224,6 +236,7 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129 h1:tT8iWCYw4uOem71yYA3htfH+LNopJvcqZQshm56G5L4= github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= @@ -250,13 +263,16 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= @@ -313,6 +329,7 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= @@ -346,6 +363,7 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= @@ -364,6 +382,7 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 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= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= @@ -376,6 +395,7 @@ github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.0 h1:v2XXALHHh6zHfYTJ+cSkwtyffnaOyR1MXaA91mTrb8o= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= @@ -394,6 +414,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/minio/highwayhash v1.0.0 h1:iMSDhgUILCr0TNm8LWlSjF8N0ZIj2qbO8WHp6Q/J2BA= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -420,6 +441,7 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +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/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= @@ -430,18 +452,16 @@ github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c h1:1RHs3t github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b h1:UQDN12BzdWhXQL0t2QcRixHqAIG+JKNvQ20DhrIODtU= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b/go.mod h1:J0eVc7BEMmVVXbGv9PHoxjRSEwOwLr0qfzPk8Rdl5iw= -github.com/ontio/ontology v1.10.0/go.mod h1:iok/imHJVQXi5/Yr88dcbrKBRHGdiota1ZC6qh6l6Rc= +github.com/ontio/ontology v1.11.0 h1:0T/hxFDHQqRcs1+yEdgaym5YIvGx5yebOsHYdKVWgHI= github.com/ontio/ontology v1.11.0/go.mod h1:Qw74bfTBlIQka+jQX4nXuWvyOYGGt368/V7XFxaf4tY= -github.com/ontio/ontology v1.11.1-0.20200812075204-26cf1fa5dd47/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= -github.com/ontio/ontology v1.11.1-0.20200817111815-fb3d61fdc12e/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= -github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c h1:Q2PShm6Hu83e7p7UKE7SgMIxW6WRNyymgI738KMKlKE= -github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= github.com/ontio/ontology-crypto v1.0.9 h1:6fxBsz3W4CcdJk4/9QO7j0Qq7NdlP2ixPrViu8XpzzM= github.com/ontio/ontology-crypto v1.0.9/go.mod h1:h/jeqqb9Ma/Leszxqh6zY3eTF2yks44hyRKikMni+YQ= github.com/ontio/ontology-eventbus v0.9.1 h1:nt3AXWx3gOyqtLiU4EwI92Yc4ik/pWHu9xRK15uHSOs= @@ -529,6 +549,7 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= @@ -545,7 +566,9 @@ 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.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= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -716,7 +739,7 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 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/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= @@ -763,6 +786,7 @@ golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -782,6 +806,7 @@ golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapK golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -826,9 +851,11 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks 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/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/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= @@ -836,10 +863,12 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200316214253-d7b0ff38cac9/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc h1:17cdygvFw3DEyNMh81Bk687W74d5pcC5qEKQICv9N6g= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= @@ -853,11 +882,13 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 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= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= From 580d0e5bccc664acd19e70d72ea4a4fd06950e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Fri, 14 May 2021 11:46:38 +0800 Subject: [PATCH 61/96] fix --- cmd/tools/run.go | 7 ++----- go.sum | 8 ++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 64968ab..7e13e83 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -24,7 +24,7 @@ import ( "encoding/json" "flag" "fmt" - + "io/ioutil" "math/big" @@ -33,9 +33,6 @@ import ( "strings" "time" - "github.com/joeqian10/neo-gogogo/sc" - "github.com/polynetwork/poly-io-test/chains/neo3" - "github.com/Zilliqa/gozilliqa-sdk/account" "github.com/Zilliqa/gozilliqa-sdk/core" "github.com/Zilliqa/gozilliqa-sdk/crosschain/polynetwork" @@ -1997,7 +1994,7 @@ func UpdateNeo3(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { log.Errorf("incorrect Neo3CCMC length") return false } - if err := updateSideChain(poly, acc, config.DefConfig.NeoChainID, 11, blkToWait, "NEO3", neo3Ccmc[:]); err != nil { + if err := updateSideChain(poly, acc, config.DefConfig.Neo3ChainID, 11, blkToWait, "NEO3", neo3Ccmc[:]); err != nil { log.Errorf("failed to update neo3: %v", err) return false } diff --git a/go.sum b/go.sum index c62e027..96aa6cb 100644 --- a/go.sum +++ b/go.sum @@ -286,6 +286,7 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129 h1:tT8iWCYw4uOem71yYA3htfH+LNopJvcqZQshm56G5L4= github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -432,6 +433,8 @@ github.com/joeqian10/neo-gogogo v1.1.0 h1:TjqBwFQnNCtw6LK3QMog3yHa9sTZaZmqP+zqGO github.com/joeqian10/neo-gogogo v1.1.0/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= github.com/joeqian10/neo3-gogogo v0.2.3 h1:Ucg28066O2Q/G7jGFMWuyiAxhzWWv9+A2RDEWitbkjQ= github.com/joeqian10/neo3-gogogo v0.2.3/go.mod h1:yvYQyEha3An0uYFhzR9asMU/O9HyeYy6RApRnLGPEtM= +github.com/joeqian10/neo3-gogogo v0.3.2 h1:xlx1XxlCJnz2bI3Q1Z7dTfNDZpOqwvH1njqlOFY3cro= +github.com/joeqian10/neo3-gogogo v0.3.2/go.mod h1:yvYQyEha3An0uYFhzR9asMU/O9HyeYy6RApRnLGPEtM= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -559,8 +562,13 @@ github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b h1:UQDN12BzdWhXQL0t2QcRixHqAIG+JKNvQ20DhrIODtU= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b/go.mod h1:J0eVc7BEMmVVXbGv9PHoxjRSEwOwLr0qfzPk8Rdl5iw= +github.com/ontio/ontology v1.10.0/go.mod h1:iok/imHJVQXi5/Yr88dcbrKBRHGdiota1ZC6qh6l6Rc= github.com/ontio/ontology v1.11.0 h1:0T/hxFDHQqRcs1+yEdgaym5YIvGx5yebOsHYdKVWgHI= github.com/ontio/ontology v1.11.0/go.mod h1:Qw74bfTBlIQka+jQX4nXuWvyOYGGt368/V7XFxaf4tY= +github.com/ontio/ontology v1.11.1-0.20200812075204-26cf1fa5dd47/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= +github.com/ontio/ontology v1.11.1-0.20200817111815-fb3d61fdc12e/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= +github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c h1:Q2PShm6Hu83e7p7UKE7SgMIxW6WRNyymgI738KMKlKE= +github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= github.com/ontio/ontology-crypto v1.0.9 h1:6fxBsz3W4CcdJk4/9QO7j0Qq7NdlP2ixPrViu8XpzzM= github.com/ontio/ontology-crypto v1.0.9/go.mod h1:h/jeqqb9Ma/Leszxqh6zY3eTF2yks44hyRKikMni+YQ= github.com/ontio/ontology-eventbus v0.9.1 h1:nt3AXWx3gOyqtLiU4EwI92Yc4ik/pWHu9xRK15uHSOs= From d9203a96972595375f016f6811068c8a94d41cb8 Mon Sep 17 00:00:00 2001 From: zhuoqian Date: Fri, 14 May 2021 18:14:34 +0800 Subject: [PATCH 62/96] add neo3 state validator related commands --- cmd/tools/run.go | 114 ++++++++++++++++++++++++++++++++++++++++++++++- go.mod | 9 ++-- go.sum | 82 +++------------------------------- 3 files changed, 124 insertions(+), 81 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 7e13e83..f105c15 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -24,7 +24,8 @@ import ( "encoding/json" "flag" "fmt" - + "github.com/polynetwork/poly/core/states" + "github.com/polynetwork/poly/native/service/governance/neo3_state_manager" "io/ioutil" "math/big" @@ -101,6 +102,7 @@ var ( rootca string chainId uint64 fabricRelayerTy uint64 + neo3StateValidators string ) func init() { @@ -124,6 +126,8 @@ func init() { flag.Uint64Var(&chainId, "chainid", 0, "default 0 means all chains") flag.Uint64Var(&fabricRelayerTy, "fab_relayer_type", 1, "the relayer of fabric type: how many orgs need to sign CA for relayer") + flag.StringVar(&neo3StateValidators, "neo3statevalidators", "", "neo3 state root validator public keys in compressed format") + flag.Parse() } @@ -376,6 +380,18 @@ func main() { acc.Address, _ = common.AddressFromBase58(newWallet) } ApproveRelayer(poly, RegisterRelayer(poly, acc, signer), accArr) + case "register_state_validator": + accArr := getPolyAccounts(poly) + signer := acc + svs := strings.Split(neo3StateValidators, ",") + ApproveRegisterStateValidator(poly, RegisterStateValidator(poly, svs, signer), accArr) + case "remove_state_validator": + accArr := getPolyAccounts(poly) + signer := acc + svs := strings.Split(neo3StateValidators, ",") + ApproveRemoveStateValidator(poly, RemoveStateValidator(poly, svs, signer), accArr) + case "get_state_validator": + GetStateValidator(poly) case "reg_poly_node": acc, err = btc.GetAccountByPassword(poly, newWallet, []byte(newPwd)) if err != nil { @@ -2266,6 +2282,102 @@ func GetRelayer(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) { log.Infof("get relayer success: %s", addr.ToBase58()) } +func RegisterStateValidator(poly *poly_go_sdk.PolySdk, neo3PubKeys []string, signer *poly_go_sdk.Account) uint64 { + txhash, err := poly.Native.Sm.RegisterStateValidator(neo3PubKeys, signer) + if err != nil { + panic(err) + } + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to register neo3 state validators, txHash is %s", txhash.ToHexString()) + event, err := poly.GetSmartContractEvent(txhash.ToHexString()) + if err != nil { + panic(err) + } + var id uint64 + for _, e := range event.Notify { + states := e.States.([]interface{}) + if states[0].(string) == "putStateValidatorApply" { + id = uint64(states[1].(float64)) + } + } + return id +} + +func ApproveRegisterStateValidator(poly *poly_go_sdk.PolySdk, id uint64, accArr []*poly_go_sdk.Account) { + var ( + txhash common.Uint256 + err error + ) + for i, v := range accArr { + txhash, err = poly.Native.Sm.ApproveRegisterStateValidator(id, v) + if err != nil { + panic(fmt.Errorf("no%d - failed to approve %d: %v", i, id, err)) + } + log.Infof("No%d: successful to approve register state validators id %d: ( acc: %s, txHash: %s )", + i, id, v.Address.ToHexString(), txhash.ToHexString()) + testcase.WaitPolyTx(txhash, poly) + } +} + +func RemoveStateValidator(poly *poly_go_sdk.PolySdk, neo3PubKeys []string, signer *poly_go_sdk.Account) uint64 { + txhash, err := poly.Native.Sm.RemoveStateValidator(neo3PubKeys, signer) + if err != nil { + panic(err) + } + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to remove neo3 state validators, txHash is %s", txhash.ToHexString()) + event, err := poly.GetSmartContractEvent(txhash.ToHexString()) + if err != nil { + panic(err) + } + var id uint64 + for _, e := range event.Notify { + states := e.States.([]interface{}) + if states[0].(string) == "putStateValidatorRemove" { + id = uint64(states[1].(float64)) + } + } + return id +} + +func ApproveRemoveStateValidator(poly *poly_go_sdk.PolySdk, id uint64, accArr []*poly_go_sdk.Account) { + var ( + txhash common.Uint256 + err error + ) + for i, v := range accArr { + txhash, err = poly.Native.Sm.ApproveRemoveStateValidator(id, v) + if err != nil { + panic(fmt.Errorf("no%d - failed to approve %d: %v", i, id, err)) + } + log.Infof("No%d: successful to approve remove state validators id %d: ( acc: %s, txHash: %s )", + i, id, v.Address.ToHexString(), txhash.ToHexString()) + } + testcase.WaitPolyTx(txhash, poly) +} + +func GetStateValidator(poly *poly_go_sdk.PolySdk) { + raw, err := poly.GetStorage(utils.Neo3StateManagerContractAddress.ToHexString(), append([]byte(neo3_state_manager.STATE_VALIDATOR))) + if err != nil { + panic(err) + } + if len(raw) == 0 { + log.Infof("no state validators found") + return + } + svBytes, err := states.GetValueFromRawStorageItem(raw) + if err != nil { + panic(err) + } + svs, err := neo3_state_manager.DeserializeStringArray(svBytes) + if err != nil { + panic(err) + } + for _, v := range svs { + log.Infof("neo3 state validator pubKey: %s", v) + } +} + func QuitSideChain(poly *poly_go_sdk.PolySdk, id uint64, acc *poly_go_sdk.Account) { txhash, err := poly.Native.Scm.QuitSideChain(id, acc) if err != nil { diff --git a/go.mod b/go.mod index 493f225..2eab7b6 100644 --- a/go.mod +++ b/go.mod @@ -39,15 +39,16 @@ require ( github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48 // indirect github.com/stretchr/testify v1.7.0 github.com/tendermint/tendermint v0.33.9 - google.golang.org/grpc v1.30.0 // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect ) replace github.com/polynetwork/eth-contracts => github.com/zouxyan/eth-contracts v0.0.0-20210115072359-e4cac6edc20c -replace github.com/polynetwork/poly => github.com/zhiqiangxu/poly v0.0.0-20210315055227-f937bd40dbe9 +replace github.com/polynetwork/poly => github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd -replace github.com/polynetwork/poly-go-sdk => github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 +//replace github.com/polynetwork/poly-go-sdk => github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 -//replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 +replace github.com/polynetwork/poly-go-sdk => github.com/joeqian10/poly-go-sdk v0.0.0-20210514100309-bcf795207785 + +replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 diff --git a/go.sum b/go.sum index 96aa6cb..5aeb0e2 100644 --- a/go.sum +++ b/go.sum @@ -56,7 +56,7 @@ github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/ github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= -github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210304105042-c4327211a4ba/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= +github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210329093354-1b8e0a7a2e25/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae h1:4g7IE+z/CJRf67iFnQlBnZ3JBRmvbrlfcQ3EHJ2saC4= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= @@ -184,12 +184,10 @@ github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8 github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= -github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= -github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= @@ -200,8 +198,6 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 h1:2vLKys4RBU4pn2T/hjXMbvwTr1Cvy5THHrQkbeY9HRk= -github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25/go.mod h1:hTr8+TLQmkUkgcuh3mcr5fjrT9c64ZzsBCdCEC6UppY= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -211,8 +207,6 @@ github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHj github.com/ethereum/go-ethereum v1.9.13/go.mod h1:qwN9d1GLyDh0N7Ab8bMGd0H9knaji2jOBm2RrMGjXls= github.com/ethereum/go-ethereum v1.9.15 h1:wrWl+QrtutRUJ9LZXdUqBoGoo2b1tOCYRDrAOQhCY3A= github.com/ethereum/go-ethereum v1.9.15/go.mod h1:slT8bPPRhXsyNTwHQxrOnjuTZ1sDXRajW11EkJ84QJ0= -github.com/ethereum/go-ethereum v1.9.25 h1:mMiw/zOOtCLdGLWfcekua0qPrJTe7FVIiHJ4IKNTfR0= -github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= @@ -233,8 +227,6 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= @@ -312,8 +304,6 @@ github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.2 h1:aeE13tS0IiQgFjYdoL8qN3K1N2bXXtI6Vi51/y7BpMw= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3 h1:ur2rms48b3Ep1dxh7aUV2FZEQ8jEVO2F6ILKx8ofkAg= -github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -327,8 +317,6 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -392,16 +380,12 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/holiman/uint256 v1.1.1 h1:4JywC80b+/hSfljFlEBLHrrh+CIONLDz9NuFl0af4Mw= -github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -421,20 +405,20 @@ github.com/itchyny/base58-go v0.1.0/go.mod h1:SrMWPE3DFuJJp1M/RUhu4fccp/y9AlB8AL github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 h1:6OvNmYgJyexcZ3pYbTI9jWx5tHo1Dee/tWbLMfPe2TA= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= -github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v0.0.0-20181221193153-c0795c8afcf4/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/joeqian10/neo-gogogo v0.0.0-20200716075409-923bd4879b43/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= github.com/joeqian10/neo-gogogo v1.1.0 h1:TjqBwFQnNCtw6LK3QMog3yHa9sTZaZmqP+zqGOZ3SZ0= github.com/joeqian10/neo-gogogo v1.1.0/go.mod h1:1fVDp4U1ROZQBRIooecbGNHHJpfs3bG9528sqlZ096g= -github.com/joeqian10/neo3-gogogo v0.2.3 h1:Ucg28066O2Q/G7jGFMWuyiAxhzWWv9+A2RDEWitbkjQ= -github.com/joeqian10/neo3-gogogo v0.2.3/go.mod h1:yvYQyEha3An0uYFhzR9asMU/O9HyeYy6RApRnLGPEtM= github.com/joeqian10/neo3-gogogo v0.3.2 h1:xlx1XxlCJnz2bI3Q1Z7dTfNDZpOqwvH1njqlOFY3cro= github.com/joeqian10/neo3-gogogo v0.3.2/go.mod h1:yvYQyEha3An0uYFhzR9asMU/O9HyeYy6RApRnLGPEtM= +github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd h1:F+zXxTbFpS1b9kXPErS7S89zKJIvvUIxxdbSdc8xT+c= +github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd/go.mod h1:oe6B9zngqA74VgWvsgZt4kdDoeyakUIeBqOEzHS4pTM= +github.com/joeqian10/poly-go-sdk v0.0.0-20210514100309-bcf795207785 h1:HLfFYhq7YLWEzMn7FKbO4LmKSP/nCHlPYLaNIqoBpTQ= +github.com/joeqian10/poly-go-sdk v0.0.0-20210514100309-bcf795207785/go.mod h1:xplioW9d5l+IrchNFaMgz1QmzL5KeZmW3qzQDb2iQdA= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -531,14 +515,6 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= 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/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/okex/cosmos-sdk v0.39.2-exchain3 h1:1dfu855mhlS1QP9pz3A2bVAZb3KyJ7ldlL/PmxPtK/A= -github.com/okex/cosmos-sdk v0.39.2-exchain3/go.mod h1:IvlniaZoJAtzILHgcmnfaJ5S125TYJWfJvGqY9zSXb4= -github.com/okex/iavl v0.14.3-exchain h1:kwRIwpFD6B8mDDqoaxeUN3Pg2GW0Vr+sA+b86renWcA= -github.com/okex/iavl v0.14.3-exchain/go.mod h1:vHLYxU/zuxBmxxr1v+5Vnd/JzcIsyK17n9P9RDubPVU= -github.com/okex/tendermint v0.33.9-exchain2 h1:aI0lKffQKDHCZGxAjcBEz8Kyifn0oF4fDjcQxQ8rGvs= -github.com/okex/tendermint v0.33.9-exchain2/go.mod h1:EoGTbJUufUueNIigY3zyO6f7GOj29OdpFhuR8sxWdSU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -550,25 +526,14 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b h1:UQDN12BzdWhXQL0t2QcRixHqAIG+JKNvQ20DhrIODtU= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b/go.mod h1:J0eVc7BEMmVVXbGv9PHoxjRSEwOwLr0qfzPk8Rdl5iw= -github.com/ontio/ontology v1.10.0/go.mod h1:iok/imHJVQXi5/Yr88dcbrKBRHGdiota1ZC6qh6l6Rc= github.com/ontio/ontology v1.11.0 h1:0T/hxFDHQqRcs1+yEdgaym5YIvGx5yebOsHYdKVWgHI= github.com/ontio/ontology v1.11.0/go.mod h1:Qw74bfTBlIQka+jQX4nXuWvyOYGGt368/V7XFxaf4tY= -github.com/ontio/ontology v1.11.1-0.20200812075204-26cf1fa5dd47/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= -github.com/ontio/ontology v1.11.1-0.20200817111815-fb3d61fdc12e/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= -github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c h1:Q2PShm6Hu83e7p7UKE7SgMIxW6WRNyymgI738KMKlKE= -github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= github.com/ontio/ontology-crypto v1.0.9 h1:6fxBsz3W4CcdJk4/9QO7j0Qq7NdlP2ixPrViu8XpzzM= github.com/ontio/ontology-crypto v1.0.9/go.mod h1:h/jeqqb9Ma/Leszxqh6zY3eTF2yks44hyRKikMni+YQ= github.com/ontio/ontology-eventbus v0.9.1 h1:nt3AXWx3gOyqtLiU4EwI92Yc4ik/pWHu9xRK15uHSOs= @@ -680,7 +645,6 @@ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdh github.com/scylladb/go-set v1.0.2/go.mod h1:DkpGd78rljTxKAnTDPFqXSGxvETQnJyuSOQwsHycqfs= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v2.20.5-0.20200531151128-663af789c085+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.20.9+incompatible h1:msXs2frUV+O/JLva9EDLpuJ84PrFsdCTCQex8PUdtkQ= github.com/shirou/gopsutil v2.20.9+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= @@ -707,8 +671,6 @@ github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3 github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= -github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -720,7 +682,6 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.6.3 h1:pDDu1OyEDTKzpJwdq4TiuLyMsUgRa/BT5cn5O62NoHs= github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg= @@ -750,8 +711,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= -github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= -github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161/go.mod h1:wM7WEvslTq+iOEAMDLSzhVuOt5BRZ05WirO+b09GHQU= @@ -777,8 +736,6 @@ github.com/tendermint/tm-db v0.4.1/go.mod h1:JsJ6qzYkCGiGwm5GHl/H5GLI9XLb6qZX7PR github.com/tendermint/tm-db v0.5.0/go.mod h1:lSq7q5WRR/njf1LnhiZ/lIJHk2S8Y1Zyq5oP/3o9C2U= github.com/tendermint/tm-db v0.5.1 h1:H9HDq8UEA7Eeg13kdYckkgwwkQLBnJGgX4PgLJRhieY= github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= -github.com/tendermint/tm-db v0.5.2 h1:QG3IxQZBubWlr7kGQcYIavyTNmZRO+r//nENxoq0g34= -github.com/tendermint/tm-db v0.5.2/go.mod h1:VrPTx04QJhQ9d8TFUTc2GpPBvBf/U9vIdBIzkjBk7Lk= github.com/tjfoc/gmsm v1.3.0/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -803,10 +760,6 @@ github.com/xtaci/kcp-go v5.4.20+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45 github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae/go.mod h1:gXtu8J62kEgmN++bm9BVICuT/e8yiLI2KFobd/TRFsE= github.com/ybbus/jsonrpc v2.1.2+incompatible h1:V4mkE9qhbDQ92/MLMIhlhMSbz8jNXdagC3xBR5NDwaQ= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= -github.com/zhiqiangxu/poly v0.0.0-20210315055227-f937bd40dbe9 h1:wm4irkgb2+bDjNb8HoNT5o1yBxyW12T7Uh+AfwkuV9U= -github.com/zhiqiangxu/poly v0.0.0-20210315055227-f937bd40dbe9/go.mod h1:LSfP6ahqUcgpFOwVTXE4xx085QLurBFefeH5u2J2SQo= -github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 h1:Ogrd4dHjyNDNSLY6+89OfR1flM1CGI2CSee7QoXUYdU= -github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651/go.mod h1:a1wMo/VFoUAKX2yVjipvFug6Yu5BPhf/2tP5xywqfIc= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zouxyan/eth-contracts v0.0.0-20210115072359-e4cac6edc20c h1:3gzrpowqz7P1Uj7l/DqiYGBWLi+dvjzjjjxxzSIvVCI= @@ -816,8 +769,6 @@ github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1/go.mod h1:bslhAiUxakr go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg= -go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -840,7 +791,6 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -854,14 +804,11 @@ golang.org/x/crypto v0.0.0-20200406173513-056763e48d71/go.mod h1:LzIPMQfyMNhhGPh 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-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= @@ -875,11 +822,9 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -911,9 +856,6 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 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-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 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= @@ -947,24 +889,17 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200219091948-cb0a6d8edb6c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= @@ -1005,13 +940,11 @@ golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200221224223-e1da425f72fd/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/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= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1094,11 +1027,8 @@ gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHN gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200316214253-d7b0ff38cac9/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc h1:17cdygvFw3DEyNMh81Bk687W74d5pcC5qEKQICv9N6g= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 h1:a6cXbcDDUkSBlpnkWV1bJ+vv3mOgQEltEJ2rPxroVu0= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/redis.v4 v4.2.4/go.mod h1:8KREHdypkCEojGKQcjMqAODMICIVwZAONWq8RowTITA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= From 02d0f95cd83f9c900810e39afd900df926343351 Mon Sep 17 00:00:00 2001 From: zhuoqian Date: Mon, 17 May 2021 11:36:44 +0800 Subject: [PATCH 63/96] update dependency --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2eab7b6..2237482 100644 --- a/go.mod +++ b/go.mod @@ -49,6 +49,6 @@ replace github.com/polynetwork/poly => github.com/joeqian10/poly v0.0.0-20210513 //replace github.com/polynetwork/poly-go-sdk => github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 -replace github.com/polynetwork/poly-go-sdk => github.com/joeqian10/poly-go-sdk v0.0.0-20210514100309-bcf795207785 +replace github.com/polynetwork/poly-go-sdk => github.com/joeqian10/poly-go-sdk v0.0.0-20210517032637-3bc9e7c4f5c9 replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 diff --git a/go.sum b/go.sum index 5aeb0e2..da67d1f 100644 --- a/go.sum +++ b/go.sum @@ -417,8 +417,8 @@ github.com/joeqian10/neo3-gogogo v0.3.2 h1:xlx1XxlCJnz2bI3Q1Z7dTfNDZpOqwvH1njqlO github.com/joeqian10/neo3-gogogo v0.3.2/go.mod h1:yvYQyEha3An0uYFhzR9asMU/O9HyeYy6RApRnLGPEtM= github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd h1:F+zXxTbFpS1b9kXPErS7S89zKJIvvUIxxdbSdc8xT+c= github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd/go.mod h1:oe6B9zngqA74VgWvsgZt4kdDoeyakUIeBqOEzHS4pTM= -github.com/joeqian10/poly-go-sdk v0.0.0-20210514100309-bcf795207785 h1:HLfFYhq7YLWEzMn7FKbO4LmKSP/nCHlPYLaNIqoBpTQ= -github.com/joeqian10/poly-go-sdk v0.0.0-20210514100309-bcf795207785/go.mod h1:xplioW9d5l+IrchNFaMgz1QmzL5KeZmW3qzQDb2iQdA= +github.com/joeqian10/poly-go-sdk v0.0.0-20210517032637-3bc9e7c4f5c9 h1:nfk3tLOMj6Mdaa3u93pF8lqUUEopbVTWl3V5HGAZbPQ= +github.com/joeqian10/poly-go-sdk v0.0.0-20210517032637-3bc9e7c4f5c9/go.mod h1:xplioW9d5l+IrchNFaMgz1QmzL5KeZmW3qzQDb2iQdA= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= From 73dce0e25f9b25c0d85a6c5564ef5e02600c5e25 Mon Sep 17 00:00:00 2001 From: zhuoqian Date: Mon, 17 May 2021 15:30:05 +0800 Subject: [PATCH 64/96] use new poly-go-sdk --- go.mod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 2237482..d80181f 100644 --- a/go.mod +++ b/go.mod @@ -49,6 +49,6 @@ replace github.com/polynetwork/poly => github.com/joeqian10/poly v0.0.0-20210513 //replace github.com/polynetwork/poly-go-sdk => github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 -replace github.com/polynetwork/poly-go-sdk => github.com/joeqian10/poly-go-sdk v0.0.0-20210517032637-3bc9e7c4f5c9 +replace github.com/polynetwork/poly-go-sdk => github.com/joeqian10/poly-go-sdk v0.0.0-20210517072349-71002ebfdf13 -replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 +//replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 From fd6e4f6a3cee868de4cb1d3e3a19e533ce7165c4 Mon Sep 17 00:00:00 2001 From: zhuoqian Date: Mon, 17 May 2021 15:33:29 +0800 Subject: [PATCH 65/96] update flag name to neo3_state_validators --- cmd/tools/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index f105c15..e7385b4 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -126,7 +126,7 @@ func init() { flag.Uint64Var(&chainId, "chainid", 0, "default 0 means all chains") flag.Uint64Var(&fabricRelayerTy, "fab_relayer_type", 1, "the relayer of fabric type: how many orgs need to sign CA for relayer") - flag.StringVar(&neo3StateValidators, "neo3statevalidators", "", "neo3 state root validator public keys in compressed format") + flag.StringVar(&neo3StateValidators, "neo3_state_validators", "", "neo3 state root validator public keys in compressed format") flag.Parse() } From 69613c1f1cfd746cdaaee6173a7cb00f5e85d6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Mon, 17 May 2021 17:28:33 +0800 Subject: [PATCH 66/96] rm useless --- cmd/ok_deployer/run.go | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/cmd/ok_deployer/run.go b/cmd/ok_deployer/run.go index cd9f5c5..29bf5cd 100644 --- a/cmd/ok_deployer/run.go +++ b/cmd/ok_deployer/run.go @@ -96,55 +96,17 @@ func DeployETHSmartContract() { panic(err) } - lockproxyAddrHex := lockProxyAddr.Hex() - erc20Addr, erc20, err := invoker.DeployERC20() - if err != nil { - panic(err) - } - - total, err := erc20.TotalSupply(nil) - if err != nil { - panic(fmt.Errorf("failed to get total supply for erc20: %v", err)) - } - auth, _ := invoker.MakeSmartContractAuth() - tx, err := erc20.Approve(auth, lockProxyAddr, total) - if err != nil { - panic(fmt.Errorf("failed to approve erc20 to lockproxy: %v", err)) - } - invoker.ETHUtil.WaitTransactionConfirm(tx.Hash()) - - oep4Addr, _, err := invoker.DeployOEP4(lockproxyAddrHex) - if err != nil { - panic(err) - } - ongxAddr, _, err := invoker.DeployONGXContract(lockproxyAddrHex) - if err != nil { - panic(err) - } - ontxAddr, _, err := invoker.DeployONTXContract(lockproxyAddrHex) - if err != nil { - panic(err) - } - fmt.Println("=============================ETH info=============================") - fmt.Println("ok erc20:", erc20Addr.Hex()) - fmt.Println("ok ope4:", oep4Addr.Hex()) fmt.Println("ok eccd address:", eccdAddr.Hex()) fmt.Println("ok eccm address:", eccmAddr.Hex()) fmt.Println("ok eccmp address:", eccmpAddr.Hex()) fmt.Println("ok lock proxy address: ", lockProxyAddr.Hex()) - fmt.Println("ok ongx address: ", ongxAddr.Hex()) - fmt.Println("ok ontx proxy address: ", ontxAddr.Hex()) fmt.Println("==================================================================") - config.DefConfig.OkErc20 = erc20Addr.Hex() - config.DefConfig.OkOep4 = oep4Addr.Hex() config.DefConfig.OkEccd = eccdAddr.Hex() config.DefConfig.OkEccm = eccmAddr.Hex() config.DefConfig.OkEccmp = eccmpAddr.Hex() config.DefConfig.OkLockProxy = lockProxyAddr.Hex() - config.DefConfig.OkOngx = ongxAddr.Hex() - config.DefConfig.OkOntx = ontxAddr.Hex() if err := config.DefConfig.Save(ethConfFile); err != nil { panic(fmt.Errorf("failed to save config, you better save it youself: %v", err)) From 145661930fab6336cc2c0205dbc15ef6ed7977d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Mon, 17 May 2021 19:54:48 +0800 Subject: [PATCH 67/96] fix --- cmd/tools/run.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index e7385b4..1df1a07 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -933,6 +933,10 @@ func SyncOKGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accoun } tx, err := eccmContract.InitGenesisBlock(auth, gB.Header.ToArray(), publickeys) + if err != nil { + log.Infof("fail to sync poly genesis header to OK: %v signer:%s", err, signer.Address.Hex()) + return + } log.Infof("successful to sync poly genesis header to OK: ( txhash: %s )", tx.Hash().String()) } From 02a0595dbc564b72c001aafe4de25c280734e6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Mon, 17 May 2021 20:55:52 +0800 Subject: [PATCH 68/96] add update_ok --- cmd/tools/run.go | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 1df1a07..ae38cf3 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -24,9 +24,10 @@ import ( "encoding/json" "flag" "fmt" + "io/ioutil" + "github.com/polynetwork/poly/core/states" "github.com/polynetwork/poly/native/service/governance/neo3_state_manager" - "io/ioutil" "math/big" "os" @@ -322,6 +323,9 @@ func main() { ApproveUpdateChain(config.DefConfig.Neo3ChainID, poly, accArr) } + case "update_ok": + UpdateOK(poly, acc) + case "init_ont_acc": err := InitOntAcc() if err != nil { @@ -2021,6 +2025,20 @@ func UpdateNeo3(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { return true } +func UpdateOK(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + blkToWait := uint64(1) + eccd, err := hex.DecodeString(strings.Replace(config.DefConfig.OkEccd, "0x", "", 1)) + if err != nil { + panic(fmt.Errorf("UpdateOK, failed to decode eccd '%s' : %v", config.DefConfig.OkEccd, err)) + } + + if err := updateSideChain(poly, acc, config.DefConfig.OkChainID, 12, blkToWait, "okex", eccd); err != nil { + log.Errorf("failed to update ok: %v", err) + return false + } + return true +} + func updateSideChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account, chainId, router, blkToWait uint64, name string, ccmc []byte) error { txhash, err := poly.Native.Scm.UpdateSideChain(acc.Address, chainId, router, name, blkToWait, ccmc, acc) From 1fafb3f2621299dcbc43979e66c83b44cc796293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Mon, 17 May 2021 21:31:08 +0800 Subject: [PATCH 69/96] mod tidy --- go.mod | 2 +- go.sum | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d80181f..1f0ec3a 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,7 @@ require ( github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666 github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759 github.com/polynetwork/eth-contracts v0.0.0-20200903021827-c9212e419943 - github.com/polynetwork/poly v0.0.0-20201216061550-50185057319d + github.com/polynetwork/poly v0.0.0-20210112063446-24e3d053e9d6 github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493 github.com/prometheus/tsdb v0.9.1 // indirect github.com/rjeczalik/notify v0.9.2 // indirect diff --git a/go.sum b/go.sum index da67d1f..e2d7e84 100644 --- a/go.sum +++ b/go.sum @@ -417,8 +417,8 @@ github.com/joeqian10/neo3-gogogo v0.3.2 h1:xlx1XxlCJnz2bI3Q1Z7dTfNDZpOqwvH1njqlO github.com/joeqian10/neo3-gogogo v0.3.2/go.mod h1:yvYQyEha3An0uYFhzR9asMU/O9HyeYy6RApRnLGPEtM= github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd h1:F+zXxTbFpS1b9kXPErS7S89zKJIvvUIxxdbSdc8xT+c= github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd/go.mod h1:oe6B9zngqA74VgWvsgZt4kdDoeyakUIeBqOEzHS4pTM= -github.com/joeqian10/poly-go-sdk v0.0.0-20210517032637-3bc9e7c4f5c9 h1:nfk3tLOMj6Mdaa3u93pF8lqUUEopbVTWl3V5HGAZbPQ= -github.com/joeqian10/poly-go-sdk v0.0.0-20210517032637-3bc9e7c4f5c9/go.mod h1:xplioW9d5l+IrchNFaMgz1QmzL5KeZmW3qzQDb2iQdA= +github.com/joeqian10/poly-go-sdk v0.0.0-20210517072349-71002ebfdf13 h1:gSEFDPtjAodPsyDO8dLe7LR1q56xnlONqYHBCV5UnkM= +github.com/joeqian10/poly-go-sdk v0.0.0-20210517072349-71002ebfdf13/go.mod h1:CBZe/O7+KWy/IWNOmJPuNxaBTtrSzsMJXuBafxPzYUc= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -532,8 +532,13 @@ github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b h1:UQDN12BzdWhXQL0t2QcRixHqAIG+JKNvQ20DhrIODtU= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b/go.mod h1:J0eVc7BEMmVVXbGv9PHoxjRSEwOwLr0qfzPk8Rdl5iw= +github.com/ontio/ontology v1.10.0/go.mod h1:iok/imHJVQXi5/Yr88dcbrKBRHGdiota1ZC6qh6l6Rc= github.com/ontio/ontology v1.11.0 h1:0T/hxFDHQqRcs1+yEdgaym5YIvGx5yebOsHYdKVWgHI= github.com/ontio/ontology v1.11.0/go.mod h1:Qw74bfTBlIQka+jQX4nXuWvyOYGGt368/V7XFxaf4tY= +github.com/ontio/ontology v1.11.1-0.20200812075204-26cf1fa5dd47/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= +github.com/ontio/ontology v1.11.1-0.20200817111815-fb3d61fdc12e/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= +github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c h1:Q2PShm6Hu83e7p7UKE7SgMIxW6WRNyymgI738KMKlKE= +github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= github.com/ontio/ontology-crypto v1.0.9 h1:6fxBsz3W4CcdJk4/9QO7j0Qq7NdlP2ixPrViu8XpzzM= github.com/ontio/ontology-crypto v1.0.9/go.mod h1:h/jeqqb9Ma/Leszxqh6zY3eTF2yks44hyRKikMni+YQ= github.com/ontio/ontology-eventbus v0.9.1 h1:nt3AXWx3gOyqtLiU4EwI92Yc4ik/pWHu9xRK15uHSOs= @@ -804,6 +809,7 @@ golang.org/x/crypto v0.0.0-20200406173513-056763e48d71/go.mod h1:LzIPMQfyMNhhGPh 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/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1029,6 +1035,7 @@ gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc h1:17cdygvFw3 gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/redis.v4 v4.2.4/go.mod h1:8KREHdypkCEojGKQcjMqAODMICIVwZAONWq8RowTITA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= From 7da3ffe51edcb2d8621d779dcb78ef8ed342a29f Mon Sep 17 00:00:00 2001 From: zhuoqian Date: Tue, 18 May 2021 17:11:52 +0800 Subject: [PATCH 70/96] add extra info (Neo3Magic) when registering or updating neo3 chain --- cmd/tools/run.go | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index e7385b4..52e936e 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -1642,8 +1642,10 @@ func RegisterNeo3Chain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool if len(neo3Ccmc) != 4 { panic(fmt.Errorf("incorrect Neo3CCMC length")) } - txHash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.Neo3ChainID, 11, "NEO3", - blkToWait, neo3Ccmc[:], acc) + //txHash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.Neo3ChainID, 11, "NEO3", + // blkToWait, neo3Ccmc[:], acc) + txHash, err := poly.Native.Scm.RegisterSideChainExt(acc.Address, config.DefConfig.Neo3ChainID, 11, "NEO3", + blkToWait, neo3Ccmc[:], helper3.UInt32ToBytes(config.DefConfig.Neo3Magic), acc) if err != nil { if strings.Contains(err.Error(), "already registered") { log.Infof("neo3 chain %d already registered", config.DefConfig.Neo3ChainID) @@ -2010,7 +2012,7 @@ func UpdateNeo3(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { log.Errorf("incorrect Neo3CCMC length") return false } - if err := updateSideChain(poly, acc, config.DefConfig.Neo3ChainID, 11, blkToWait, "NEO3", neo3Ccmc[:]); err != nil { + if err := updateSideChainExt(poly, acc, config.DefConfig.Neo3ChainID, 11, blkToWait, "NEO3", helper3.UInt32ToBytes(config.DefConfig.Neo3Magic), neo3Ccmc[:]); err != nil { log.Errorf("failed to update neo3: %v", err) return false } @@ -2029,6 +2031,18 @@ func updateSideChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account, chainI return nil } +func updateSideChainExt(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account, chainId, router, blkToWait uint64, name string, + ccmc []byte, extra []byte) error { + txhash, err := poly.Native.Scm.UpdateSideChainExt(acc.Address, chainId, router, name, blkToWait, ccmc, extra, acc) + if err != nil { + return err + } + + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to update %s: ( txhash: %s )", name, txhash.ToHexString()) + return nil +} + func ApproveUpdateChain(id uint64, poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { var ( txhash common.Uint256 From 57a401c5b5bb59cf7b9fb96417592092579e0e38 Mon Sep 17 00:00:00 2001 From: zhuoqian Date: Tue, 18 May 2021 17:37:00 +0800 Subject: [PATCH 71/96] fix param order --- cmd/tools/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 52e936e..262dc35 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -2012,7 +2012,7 @@ func UpdateNeo3(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { log.Errorf("incorrect Neo3CCMC length") return false } - if err := updateSideChainExt(poly, acc, config.DefConfig.Neo3ChainID, 11, blkToWait, "NEO3", helper3.UInt32ToBytes(config.DefConfig.Neo3Magic), neo3Ccmc[:]); err != nil { + if err := updateSideChainExt(poly, acc, config.DefConfig.Neo3ChainID, 11, blkToWait, "NEO3", neo3Ccmc[:], helper3.UInt32ToBytes(config.DefConfig.Neo3Magic)); err != nil { log.Errorf("failed to update neo3: %v", err) return false } From 3e850fa05fa5a38b5c75e4d3177ba43bafc9469d Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Thu, 20 May 2021 10:23:53 +0700 Subject: [PATCH 72/96] add test kai chain --- chains/kai/client/kai.go | 565 ++++++++++++++++++++++++++++++++++++ chains/kai/client/signer.go | 59 ++++ chains/kai/invoker.go | 387 ++++++++++++++++++++++++ chains/kai/invoker_test.go | 1 + chains/kai/nonce_manager.go | 89 ++++++ chains/kai/signer.go | 58 ++++ cmd/kai_deployer/run.go | 387 ++++++++++++++++++++++++ cmd/tools/run.go | 64 +++- config/config.go | 21 ++ go.mod | 7 +- go.sum | 85 ++++++ 11 files changed, 1720 insertions(+), 3 deletions(-) create mode 100644 chains/kai/client/kai.go create mode 100644 chains/kai/client/signer.go create mode 100644 chains/kai/invoker.go create mode 100644 chains/kai/invoker_test.go create mode 100644 chains/kai/nonce_manager.go create mode 100644 chains/kai/signer.go create mode 100644 cmd/kai_deployer/run.go diff --git a/chains/kai/client/kai.go b/chains/kai/client/kai.go new file mode 100644 index 0000000..4db7686 --- /dev/null +++ b/chains/kai/client/kai.go @@ -0,0 +1,565 @@ +package client + +// Copyright 2016 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +// Package ethclient provides a client for the Ethereum RPC API. + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "math/big" + "time" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rlp" + "github.com/ethereum/go-ethereum/rpc" + "github.com/polynetwork/poly-io-test/log" + + ktypes "github.com/kardiachain/go-kardia/types" +) + +// Client defines typed wrappers for the Ethereum RPC API. +type Client struct { + c *rpc.Client +} + +// Dial connects a client to the given URL. +func Dial(rawurl string) (*Client, error) { + return DialContext(context.Background(), rawurl) +} + +func DialContext(ctx context.Context, rawurl string) (*Client, error) { + c, err := rpc.DialContext(ctx, rawurl) + if err != nil { + return nil, err + } + return NewClient(c), nil +} + +// NewClient creates a client that uses the given RPC client. +func NewClient(c *rpc.Client) *Client { + return &Client{c} +} + +func (ec *Client) Close() { + ec.c.Close() +} + +// Blockchain Access + +// ChainId retrieves the current chain ID for transaction replay protection. +func (ec *Client) ChainID(ctx context.Context) (*big.Int, error) { + var result hexutil.Big + err := ec.c.CallContext(ctx, &result, "kai_chainId") + if err != nil { + return nil, err + } + return (*big.Int)(&result), err +} + +// BlockByHash returns the given full block. +// +// Note that loading full blocks requires two requests. Use HeaderByHash +// if you don't need all transactions or uncle headers. +func (ec *Client) BlockByHash(ctx context.Context, hash common.Hash) (*ktypes.Block, error) { + return ec.getBlock(ctx, "kai_getBlockByHash", hash, true) +} + +// BlockByNumber returns a block from the current canonical chain. If number is nil, the +// latest known block is returned. +// +// Note that loading full blocks requires two requests. Use HeaderByNumber +// if you don't need all transactions or uncle headers. +func (ec *Client) BlockByNumber(ctx context.Context, number *big.Int) (*ktypes.Block, error) { + return ec.getBlock(ctx, "kai_getBlockByNumber", toBlockNumArg(number), true) +} + +type rpcBlock struct { + Hash common.Hash `json:"hash"` + Transactions []rpcTransaction `json:"transactions"` + UncleHashes []common.Hash `json:"uncles"` +} + +func (ec *Client) getBlock(ctx context.Context, method string, args ...interface{}) (*ktypes.Block, error) { + var raw ktypes.Block + err := ec.c.CallContext(ctx, &raw, method, args...) + if err != nil { + return nil, err + } + return &raw, nil +} + +// HeaderByHash returns the block header with the given hash. +func (ec *Client) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error) { + var head *types.Header + err := ec.c.CallContext(ctx, &head, "kai_getBlockByHash", hash, false) + if err == nil && head == nil { + err = ethereum.NotFound + } + return head, err +} + +// HeaderByNumber returns a block header from the current canonical chain. If number is +// nil, the latest known header is returned. +func (ec *Client) HeaderByNumber(ctx context.Context, number *big.Int) (*ktypes.Header, error) { + var head *ktypes.Header + err := ec.c.CallContext(ctx, &head, "kai_getBlockByNumber", toBlockNumArg(number)) + if err == nil && head == nil { + err = ethereum.NotFound + } + return head, err +} + +func (ec *Client) GetValidators(ctx context.Context, number *big.Int) (*ktypes.ValidatorSet, error) { + var valSet *ktypes.ValidatorSet + err := ec.c.CallContext(ctx, &valSet, "kai_getValidatorSet", toBlockNumArg(number)) + if err == nil && valSet == nil { + err = ethereum.NotFound + } + return valSet, err +} + +func (ec *Client) GetCommit(ctx context.Context, number *big.Int) (*ktypes.Commit, error) { + var commit *ktypes.Commit + err := ec.c.CallContext(ctx, &commit, "kai_getCommit", toBlockNumArg(number)) + if err == nil && commit == nil { + err = ethereum.NotFound + } + return commit, err +} + +type rpcTransaction struct { + tx *types.Transaction + txExtraInfo +} + +type txExtraInfo struct { + BlockNumber *string `json:"blockNumber,omitempty"` + BlockHash *common.Hash `json:"blockHash,omitempty"` + From *common.Address `json:"from,omitempty"` +} + +func (tx *rpcTransaction) UnmarshalJSON(msg []byte) error { + if err := json.Unmarshal(msg, &tx.tx); err != nil { + return err + } + return json.Unmarshal(msg, &tx.txExtraInfo) +} + +// TransactionByHash returns the transaction with the given hash. +func (ec *Client) TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error) { + var json *rpcTransaction + err = ec.c.CallContext(ctx, &json, "kai_getTransactionByHash", hash) + if err != nil { + return nil, false, err + } else if json == nil { + return nil, false, ethereum.NotFound + } else if _, r, _ := json.tx.RawSignatureValues(); r == nil { + return nil, false, fmt.Errorf("server returned transaction without signature") + } + if json.From != nil && json.BlockHash != nil { + setSenderFromServer(json.tx, *json.From, *json.BlockHash) + } + return json.tx, json.BlockNumber == nil, nil +} + +// TransactionSender returns the sender address of the given transaction. The transaction +// must be known to the remote node and included in the blockchain at the given block and +// index. The sender is the one derived by the protocol at the time of inclusion. +// +// There is a fast-path for transactions retrieved by TransactionByHash and +// TransactionInBlock. Getting their sender address can be done without an RPC interaction. +func (ec *Client) TransactionSender(ctx context.Context, tx *types.Transaction, block common.Hash, index uint) (common.Address, error) { + // Try to load the address from the cache. + sender, err := types.Sender(&senderFromServer{blockhash: block}, tx) + if err == nil { + return sender, nil + } + var meta struct { + Hash common.Hash + From common.Address + } + if err = ec.c.CallContext(ctx, &meta, "kai_getTransactionByBlockHashAndIndex", block, hexutil.Uint64(index)); err != nil { + return common.Address{}, err + } + if meta.Hash == (common.Hash{}) || meta.Hash != tx.Hash() { + return common.Address{}, errors.New("wrong inclusion block/index") + } + return meta.From, nil +} + +// TransactionCount returns the total number of transactions in the given block. +func (ec *Client) TransactionCount(ctx context.Context, blockHash common.Hash) (uint, error) { + var num hexutil.Uint + err := ec.c.CallContext(ctx, &num, "kai_getBlockTransactionCountByHash", blockHash) + return uint(num), err +} + +// TransactionCount returns the total number of transactions in the given block. +func (ec *Client) BlockNumber(ctx context.Context) (uint, error) { + var num hexutil.Uint + err := ec.c.CallContext(ctx, &num, "kai_blockNumber") + return uint(num), err +} + +// TransactionInBlock returns a single transaction at index in the given block. +func (ec *Client) TransactionInBlock(ctx context.Context, blockHash common.Hash, index uint) (*types.Transaction, error) { + var json *rpcTransaction + err := ec.c.CallContext(ctx, &json, "kai_getTransactionByBlockHashAndIndex", blockHash, hexutil.Uint64(index)) + if err != nil { + return nil, err + } + if json == nil { + return nil, ethereum.NotFound + } else if _, r, _ := json.tx.RawSignatureValues(); r == nil { + return nil, fmt.Errorf("server returned transaction without signature") + } + if json.From != nil && json.BlockHash != nil { + setSenderFromServer(json.tx, *json.From, *json.BlockHash) + } + return json.tx, err +} + +// TransactionReceipt returns the receipt of a transaction by transaction hash. +// Note that the receipt is not available for pending transactions. +func (ec *Client) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) { + var r *types.Receipt + err := ec.c.CallContext(ctx, &r, "kai_getTransactionReceipt", txHash) + if err == nil { + if r == nil { + return nil, ethereum.NotFound + } + } + return r, err +} + +func toBlockNumArg(number *big.Int) string { + if number == nil { + return "latest" + } + pending := big.NewInt(-1) + if number.Cmp(pending) == 0 { + return "pending" + } + return number.String() +} + +type rpcProgress struct { + StartingBlock hexutil.Uint64 + CurrentBlock hexutil.Uint64 + HighestBlock hexutil.Uint64 + PulledStates hexutil.Uint64 + KnownStates hexutil.Uint64 +} + +// SyncProgress retrieves the current progress of the sync algorithm. If there's +// no sync currently running, it returns nil. +func (ec *Client) SyncProgress(ctx context.Context) (*ethereum.SyncProgress, error) { + var raw json.RawMessage + if err := ec.c.CallContext(ctx, &raw, "kai_syncing"); err != nil { + return nil, err + } + // Handle the possible response types + var syncing bool + if err := json.Unmarshal(raw, &syncing); err == nil { + return nil, nil // Not syncing (always false) + } + var progress *rpcProgress + if err := json.Unmarshal(raw, &progress); err != nil { + return nil, err + } + return ðereum.SyncProgress{ + StartingBlock: uint64(progress.StartingBlock), + CurrentBlock: uint64(progress.CurrentBlock), + HighestBlock: uint64(progress.HighestBlock), + PulledStates: uint64(progress.PulledStates), + KnownStates: uint64(progress.KnownStates), + }, nil +} + +// SubscribeNewHead subscribes to notifications about the current blockchain head +// on the given channel. +func (ec *Client) SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error) { + return ec.c.EthSubscribe(ctx, ch, "newHeads") +} + +// State Access + +// NetworkID returns the network ID (also known as the chain ID) for this chain. +func (ec *Client) NetworkID(ctx context.Context) (*big.Int, error) { + version := new(big.Int) + var ver string + if err := ec.c.CallContext(ctx, &ver, "net_version"); err != nil { + return nil, err + } + if _, ok := version.SetString(ver, 10); !ok { + return nil, fmt.Errorf("invalid net_version result %q", ver) + } + return version, nil +} + +// BalanceAt returns the wei balance of the given account. +// The block number can be nil, in which case the balance is taken from the latest known block. +func (ec *Client) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error) { + var result hexutil.Big + err := ec.c.CallContext(ctx, &result, "kai_getBalance", account, toBlockNumArg(blockNumber)) + return (*big.Int)(&result), err +} + +// StorageAt returns the value of key in the contract storage of the given account. +// The block number can be nil, in which case the value is taken from the latest known block. +func (ec *Client) StorageAt(ctx context.Context, account common.Address, key common.Hash, blockNumber *big.Int) ([]byte, error) { + var result hexutil.Bytes + err := ec.c.CallContext(ctx, &result, "kai_getStorageAt", account, key, toBlockNumArg(blockNumber)) + return result, err +} + +// CodeAt returns the contract code of the given account. +// The block number can be nil, in which case the code is taken from the latest known block. +func (ec *Client) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error) { + var result hexutil.Bytes + err := ec.c.CallContext(ctx, &result, "kai_getCode", account, toBlockNumArg(blockNumber)) + return result, err +} + +// NonceAt returns the account nonce of the given account. +// The block number can be nil, in which case the nonce is taken from the latest known block. +func (ec *Client) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error) { + var result hexutil.Uint64 + err := ec.c.CallContext(ctx, &result, "kai_getTransactionCount", account, toBlockNumArg(blockNumber)) + return uint64(result), err +} + +// Filters + +// FilterLogs executes a filter query. +func (ec *Client) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error) { + var result []types.Log + arg, err := toFilterArg(q) + if err != nil { + return nil, err + } + err = ec.c.CallContext(ctx, &result, "kai_getLogs", arg) + return result, err +} + +// SubscribeFilterLogs subscribes to the results of a streaming filter query. +func (ec *Client) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) { + arg, err := toFilterArg(q) + if err != nil { + return nil, err + } + return ec.c.EthSubscribe(ctx, ch, "logs", arg) +} + +func toFilterArg(q ethereum.FilterQuery) (interface{}, error) { + arg := map[string]interface{}{ + "address": q.Addresses, + "topics": q.Topics, + } + if q.BlockHash != nil { + arg["blockHash"] = *q.BlockHash + if q.FromBlock != nil || q.ToBlock != nil { + return nil, fmt.Errorf("cannot specify both BlockHash and FromBlock/ToBlock") + } + } else { + if q.FromBlock == nil { + arg["fromBlock"] = "0x0" + } else { + arg["fromBlock"] = toBlockNumArg(q.FromBlock) + } + arg["toBlock"] = toBlockNumArg(q.ToBlock) + } + return arg, nil +} + +type KaiHeader struct { + Header *ktypes.Header + Commit *ktypes.Commit + ValidatorSet *ktypes.ValidatorSet +} + +func (ec *Client) FullHeaderByNumber(ctx context.Context, number *big.Int) (*KaiHeader, error) { + header, err := ec.HeaderByNumber(ctx, number) + if err != nil { + return nil, err + } + validators, err := ec.GetValidators(ctx, number) + if err != nil { + return nil, err + } + + commit, err := ec.GetCommit(ctx, number.Sub(number, big.NewInt(1))) + if err != nil { + return nil, err + } + return &KaiHeader{ + Header: header, + ValidatorSet: validators, + Commit: commit, + }, nil +} + +// Pending State + +// PendingBalanceAt returns the wei balance of the given account in the pending state. +func (ec *Client) PendingBalanceAt(ctx context.Context, account common.Address) (*big.Int, error) { + var result hexutil.Big + err := ec.c.CallContext(ctx, &result, "kai_getBalance", account, "pending") + return (*big.Int)(&result), err +} + +// PendingStorageAt returns the value of key in the contract storage of the given account in the pending state. +func (ec *Client) PendingStorageAt(ctx context.Context, account common.Address, key common.Hash) ([]byte, error) { + var result hexutil.Bytes + err := ec.c.CallContext(ctx, &result, "kai_getStorageAt", account, key, "pending") + return result, err +} + +// PendingCodeAt returns the contract code of the given account in the pending state. +func (ec *Client) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error) { + var result hexutil.Bytes + err := ec.c.CallContext(ctx, &result, "kai_getCode", account, "pending") + return result, err +} + +// PendingNonceAt returns the account nonce of the given account in the pending state. +// This is the nonce that should be used for the next transaction. +func (ec *Client) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) { + var result hexutil.Uint64 + err := ec.c.CallContext(ctx, &result, "kai_getTransactionCount", account, "pending") + return uint64(result), err +} + +// PendingTransactionCount returns the total number of transactions in the pending state. +func (ec *Client) PendingTransactionCount(ctx context.Context) (uint, error) { + var num hexutil.Uint + err := ec.c.CallContext(ctx, &num, "kai_getBlockTransactionCountByNumber", "pending") + return uint(num), err +} + +// TODO: SubscribePendingTransactions (needs server side) + +// Contract Calling + +// CallContract executes a message call transaction, which is directly executed in the VM +// of the node, but never mined into the blockchain. +// +// blockNumber selects the block height at which the call runs. It can be nil, in which +// case the code is taken from the latest known block. Note that state from very old +// blocks might not be available. +func (ec *Client) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) { + var hex hexutil.Bytes + err := ec.c.CallContext(ctx, &hex, "kai_call", toCallArg(msg), toBlockNumArg(blockNumber)) + if err != nil { + return nil, err + } + return hex, nil +} + +// PendingCallContract executes a message call transaction using the EVM. +// The state seen by the contract call is the pending state. +func (ec *Client) PendingCallContract(ctx context.Context, msg ethereum.CallMsg) ([]byte, error) { + var hex hexutil.Bytes + err := ec.c.CallContext(ctx, &hex, "kai_call", toCallArg(msg), "pending") + if err != nil { + return nil, err + } + return hex, nil +} + +// SuggestGasPrice retrieves the currently suggested gas price to allow a timely +// execution of a transaction. +func (ec *Client) SuggestGasPrice(ctx context.Context) (*big.Int, error) { + var hex hexutil.Big + if err := ec.c.CallContext(ctx, &hex, "kai_gasPrice"); err != nil { + return nil, err + } + return (*big.Int)(&hex), nil +} + +// EstimateGas tries to estimate the gas needed to execute a specific transaction based on +// the current pending state of the backend blockchain. There is no guarantee that this is +// the true gas limit requirement as other transactions may be added or removed by miners, +// but it should provide a basis for setting a reasonable default. +func (ec *Client) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error) { + var hex hexutil.Uint64 + err := ec.c.CallContext(ctx, &hex, "kai_estimateGas", toCallArg(msg)) + if err != nil { + return 0, err + } + return uint64(hex), nil +} + +// SendTransaction injects a signed transaction into the pending pool for execution. +// +// If the transaction was a contract creation use the TransactionReceipt method to get the +// contract address after the transaction has been mined. +func (ec *Client) SendTransaction(ctx context.Context, tx *types.Transaction) error { + data, err := rlp.EncodeToBytes(tx) + if err != nil { + return err + } + return ec.c.CallContext(ctx, nil, "kai_sendRawTransaction", hexutil.Encode(data)) +} + +func toCallArg(msg ethereum.CallMsg) interface{} { + arg := map[string]interface{}{ + "from": msg.From, + "to": msg.To, + } + if len(msg.Data) > 0 { + arg["data"] = hexutil.Bytes(msg.Data) + } + if msg.Value != nil { + arg["value"] = (*hexutil.Big)(msg.Value) + } + if msg.Gas != 0 { + arg["gas"] = hexutil.Uint64(msg.Gas) + } + if msg.GasPrice != nil { + arg["gasPrice"] = (*hexutil.Big)(msg.GasPrice) + } + return arg +} + +func (ec *Client) WaitTransactionConfirm(hash common.Hash) { + start := time.Now() + for { + time.Sleep(time.Millisecond * 100) + if time.Now().After(start.Add(time.Second * 10)) { + log.Errorf("WaitTransactionConfirm max wait time exceeded, quit") + return + } + _, ispending, err := ec.TransactionByHash(context.Background(), hash) + if err != nil { + log.Errorf("failed to call TransactionByHash: %v hash:%s", err, hash.String()) + continue + } + if ispending == true { + continue + } else { + break + } + } + +} diff --git a/chains/kai/client/signer.go b/chains/kai/client/signer.go new file mode 100644 index 0000000..fdf6288 --- /dev/null +++ b/chains/kai/client/signer.go @@ -0,0 +1,59 @@ +// Copyright 2017 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package client + +import ( + "errors" + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" +) + +// senderFromServer is a types.Signer that remembers the sender address returned by the RPC +// server. It is stored in the transaction's sender address cache to avoid an additional +// request in TransactionSender. +type senderFromServer struct { + addr common.Address + blockhash common.Hash +} + +var errNotCached = errors.New("sender not cached") + +func setSenderFromServer(tx *types.Transaction, addr common.Address, block common.Hash) { + // Use types.Sender for side-effect to store our signer into the cache. + types.Sender(&senderFromServer{addr, block}, tx) +} + +func (s *senderFromServer) Equal(other types.Signer) bool { + os, ok := other.(*senderFromServer) + return ok && os.blockhash == s.blockhash +} + +func (s *senderFromServer) Sender(tx *types.Transaction) (common.Address, error) { + if s.blockhash == (common.Hash{}) { + return common.Address{}, errNotCached + } + return s.addr, nil +} + +func (s *senderFromServer) Hash(tx *types.Transaction) common.Hash { + panic("can't sign with senderFromServer") +} +func (s *senderFromServer) SignatureValues(tx *types.Transaction, sig []byte) (R, S, V *big.Int, err error) { + panic("can't sign with senderFromServer") +} diff --git a/chains/kai/invoker.go b/chains/kai/invoker.go new file mode 100644 index 0000000..af0ba53 --- /dev/null +++ b/chains/kai/invoker.go @@ -0,0 +1,387 @@ +package kai + +import ( + "context" + "crypto/ecdsa" + "encoding/hex" + "fmt" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + ethComm "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/joeqian10/neo-gogogo/helper" + ontcommon "github.com/ontio/ontology/common" + "github.com/polynetwork/eth-contracts/go_abi/btcx_abi" + "github.com/polynetwork/eth-contracts/go_abi/eccd_abi" + "github.com/polynetwork/eth-contracts/go_abi/eccm_abi" + "github.com/polynetwork/eth-contracts/go_abi/eccmp_abi" + "github.com/polynetwork/eth-contracts/go_abi/erc20_abi" + "github.com/polynetwork/eth-contracts/go_abi/lock_proxy_abi" + "github.com/polynetwork/eth-contracts/go_abi/oep4_abi" + "github.com/polynetwork/eth-contracts/go_abi/ongx_abi" + "github.com/polynetwork/eth-contracts/go_abi/ontx_abi" + "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/chains/kai/client" + "github.com/polynetwork/poly-io-test/config" + "github.com/polynetwork/poly-io-test/log" +) + +var ( + DefaultGasLimit = 5000000 +) + +type Invoker struct { + eth.EInvoker + PrivateKey *ecdsa.PrivateKey + ChainID uint64 + TConfiguration *config.TestConfig + client *client.Client + NM *NonceManager + signer *signer +} + +func NewInvoker(chainID uint64) *Invoker { + var err error + instance := &Invoker{} + instance.ChainID = chainID + instance.TConfiguration = config.DefConfig + client, err := client.Dial(config.DefConfig.KaiUrl) + if err != nil { + panic(err) + } + instance.client = client + instance.NM = NewNonceManager(client) + instance.signer, err = NewSigner(config.DefConfig.KaiUrl) + if err != nil { + panic(err) + } + instance.PrivateKey = instance.signer.PrivateKey + return instance +} + +func (ethInvoker *Invoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetHash string, + toChainId uint64, initAmt int64) (*types.Transaction, error) { + auth, contract, err := ethInvoker.MakeLockProxy(lockProxyAddr) + if err != nil { + return nil, err + } + var toAddr []byte + if uint64(toChainId) == config.DefConfig.OntChainID { + addr, err := ontcommon.AddressFromHexString(toAssetHash) + if err != nil { + return nil, err + } + toAddr = addr[:] + } else if uint64(toChainId) == config.DefConfig.CMCrossChainId { + toAddr = []byte(toAssetHash) + } else if uint64(toChainId) == config.DefConfig.EthChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.BscChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.MscChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.OkChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.HecoChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.O3ChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.NeoChainID { + other, err := helper.UInt160FromString(toAssetHash) + if err != nil { + return nil, err + } + toAddr = other[:] + } else { + panic(fmt.Sprintf("unkown toChainId:%d", toChainId)) + } + tx, err := contract.BindAssetHash(auth, ethComm.HexToAddress(fromAssetHash), + uint64(toChainId), toAddr[:]) + if err != nil { + return nil, err + } + ethInvoker.ETHUtil.WaitTransactionConfirm(tx.Hash()) + return tx, nil +} + +func (i *Invoker) MakeSmartContractAuth() (*bind.TransactOpts, error) { + publicKey := i.PrivateKey.Public() + publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) + if !ok { + return nil, fmt.Errorf("MakeSmartContractAuth, cannot assert type: publicKey is not of type *ecdsa.PublicKey") + } + fromAddress := crypto.PubkeyToAddress(*publicKeyECDSA) + nonce, err := i.client.PendingNonceAt(context.Background(), fromAddress) + if err != nil { + return nil, fmt.Errorf("MakeSmartContractAuth, %v", err) + } + gasPrice, err := i.client.SuggestGasPrice(context.Background()) + if err != nil { + return nil, fmt.Errorf("MakeSmartContractAuth, %v", err) + } + auth := bind.NewKeyedTransactor(i.PrivateKey) + auth.Nonce = big.NewInt(int64(nonce)) + auth.Value = big.NewInt(int64(0)) // in wei + auth.GasLimit = uint64(DefaultGasLimit) // in units + auth.GasPrice = gasPrice.Mul(gasPrice, big.NewInt(1)) + return auth, nil +} + +func (i *Invoker) DeployEthChainDataContract() (ethComm.Address, *eccd_abi.EthCrossChainData, error) { + auth, err := i.MakeSmartContractAuth() + if err != nil { + return ethComm.Address{}, nil, fmt.Errorf("DeployEthChainDataContract, err: %v", err) + } + contractAddress, tx, contract, err := eccd_abi.DeployEthCrossChainData(auth, + i.client) + if err != nil { + return ethComm.Address{}, nil, fmt.Errorf("DeployEthChainDataContract, err: %v", err) + } + + i.client.WaitTransactionConfirm(tx.Hash()) + return contractAddress, contract, nil +} + +func (i *Invoker) DeployECCMContract(eccdAddress string) (ethComm.Address, *eccm_abi.EthCrossChainManager, error) { + auth, err := i.MakeSmartContractAuth() + if err != nil { + return ethComm.Address{}, nil, fmt.Errorf("DeployECCMContract, err: %v", err) + } + address := ethComm.HexToAddress(eccdAddress) + contractAddress, tx, contract, err := eccm_abi.DeployEthCrossChainManager(auth, + i.client, address, i.ChainID) + if err != nil { + return ethComm.Address{}, nil, fmt.Errorf("DeployECCMContract, err: %v", err) + } + i.client.WaitTransactionConfirm(tx.Hash()) + return contractAddress, contract, nil +} + +func (i *Invoker) DeployECCMPContract(eccmAddress string) (ethComm.Address, *eccmp_abi.EthCrossChainManagerProxy, error) { + auth, _ := i.MakeSmartContractAuth() + address := ethComm.HexToAddress(eccmAddress) + contractAddress, tx, contract, err := eccmp_abi.DeployEthCrossChainManagerProxy(auth, + i.client, address) + if err != nil { + return ethComm.Address{}, nil, fmt.Errorf("DeployECCMPContract, err: %v", err) + } + i.client.WaitTransactionConfirm(tx.Hash()) + return contractAddress, contract, nil +} + +func (i *Invoker) DeployERC20() (ethComm.Address, *erc20_abi.ERC20Template, error) { + auth, _ := i.MakeSmartContractAuth() + contractAddress, tx, contract, err := erc20_abi.DeployERC20Template(auth, + i.client) + if err != nil { + log.Fatal(err) + } + i.client.WaitTransactionConfirm(tx.Hash()) + return contractAddress, contract, nil +} + +func (i *Invoker) DeployOEP4(lockProxy string) (ethComm.Address, *oep4_abi.OEP4Template, error) { + auth, _ := i.MakeSmartContractAuth() + lockProxyAddr := ethComm.HexToAddress(lockProxy) + contractAddress, tx, contract, err := oep4_abi.DeployOEP4Template(auth, + i.client, lockProxyAddr) + if err != nil { + log.Fatal(err) + } + i.client.WaitTransactionConfirm(tx.Hash()) + + auth, _ = i.MakeSmartContractAuth() + tx, err = contract.DeletageToProxy(auth, lockProxyAddr, big.NewInt(1e13)) + if err != nil { + return ethComm.Address{}, nil, fmt.Errorf("failed to DeletageToProxy: %v", err) + } + i.client.WaitTransactionConfirm(tx.Hash()) + return contractAddress, contract, nil +} + +func (i *Invoker) MakeLockProxy(lockProxyAddr string) (*bind.TransactOpts, *lock_proxy_abi.LockProxy, error) { + auth, _ := i.MakeSmartContractAuth() + contract, err := lock_proxy_abi.NewLockProxy(ethComm.HexToAddress(lockProxyAddr), + i.client) + if err != nil { + return nil, nil, err + } + return auth, contract, nil +} + +func (i *Invoker) DeployLockProxyContract(eccmp ethComm.Address) (ethComm.Address, *lock_proxy_abi.LockProxy, error) { + auth, _ := i.MakeSmartContractAuth() + contractAddress, tx, contract, err := lock_proxy_abi.DeployLockProxy(auth, + i.client) + if err != nil { + return ethComm.Address{}, nil, fmt.Errorf("DeployLockProxyContract: %v", err) + + } + i.client.WaitTransactionConfirm(tx.Hash()) + + auth, _ = i.MakeSmartContractAuth() + tx, err = contract.SetManagerProxy(auth, eccmp) + if err != nil { + return ethComm.Address{}, nil, fmt.Errorf("SetManagerProxy: %v", err) + } + i.client.WaitTransactionConfirm(tx.Hash()) + return contractAddress, contract, nil +} + +func (i *Invoker) DeployBTCXContract(redeemscript string) (ethComm.Address, *btcx_abi.BTCX, error) { + auth, _ := i.MakeSmartContractAuth() + redeemscriptBytes, err := hex.DecodeString(redeemscript) + if err != nil { + return ethComm.Address{}, nil, fmt.Errorf("DeployBTCXContract: %v", err) + } + contractAddress, tx, contract, err := btcx_abi.DeployBTCX(auth, + i.client, redeemscriptBytes) + if err != nil { + log.Fatal(err) + } + //fmt.Println("New Deployed BTCX Contract Address is", contractAddress) + //fmt.Println("New Deployed BTCX Contract TX is", tx.Hash().Hex()) + i.client.WaitTransactionConfirm(tx.Hash()) + return contractAddress, contract, nil +} + +func (ethInvoker *Invoker) DeployONTXContract(lockProxyAddr string) (ethComm.Address, *ontx_abi.ONTX, error) { + auth, _ := ethInvoker.MakeSmartContractAuth() + contractAddress, tx, contract, err := ontx_abi.DeployONTX(auth, + ethInvoker.client, ethComm.HexToAddress(lockProxyAddr)) + if err != nil { + return ethComm.Address{}, nil, fmt.Errorf("DeployONTXContract, failed to deploy: %v", err) + } + //fmt.Println("New Deployed ONTX Contract Address is", contractAddress) + //fmt.Println("New Deployed ONTX Contract TX is", tx.Hash().Hex()) + ethInvoker.client.WaitTransactionConfirm(tx.Hash()) + return contractAddress, contract, nil +} + +func (i *Invoker) DeployONGXContract(lockProxyAddr string) (ethComm.Address, *ongx_abi.ONGX, error) { + auth, _ := i.MakeSmartContractAuth() + contractAddress, tx, contract, err := ongx_abi.DeployONGX(auth, + i.client, ethComm.HexToAddress(lockProxyAddr)) + if err != nil { + return ethComm.Address{}, nil, fmt.Errorf("DeployONGXContract, failed to deploy: %v", err) + } + //fmt.Println("New Deployed ONTX Contract Address is", contractAddress) + //fmt.Println("New Deployed ONTX Contract TX is", tx.Hash().Hex()) + i.client.WaitTransactionConfirm(tx.Hash()) + return contractAddress, contract, nil +} + +func (i *Invoker) SetManagerProxyForLockProxy(lockProxyAddrHex, eccmpAddressHex string) (*types.Transaction, error) { + lockProxyAddr := ethComm.HexToAddress(lockProxyAddrHex) + lockProxyContract, err := lock_proxy_abi.NewLockProxy(lockProxyAddr, i.client) + if err != nil { + return nil, fmt.Errorf("SetManagerProxyForLockProxy: %v", err) + } + auth, _ := i.MakeSmartContractAuth() + tx, err := lockProxyContract.SetManagerProxy(auth, ethComm.HexToAddress(eccmpAddressHex)) + if err != nil { + return nil, fmt.Errorf("SetManagerProxyForLockProxy: %v", err) + } + i.client.WaitTransactionConfirm(tx.Hash()) + return tx, nil +} + +func (i *Invoker) TransferOwnershipForECCD(eccdAddrHex, ownershipAddressHex string) (*types.Transaction, error) { + ownershipAddress := ethComm.HexToAddress(ownershipAddressHex) + eccdAddr := ethComm.HexToAddress(eccdAddrHex) + eccdContract, err := eccd_abi.NewEthCrossChainData(eccdAddr, i.client) + if err != nil { + return nil, fmt.Errorf("TransferOwnershipForECCD, err: %v", err) + } + auth, _ := i.MakeSmartContractAuth() + tx, err := eccdContract.TransferOwnership(auth, ownershipAddress) + i.client.WaitTransactionConfirm(tx.Hash()) + return tx, nil +} + +func (i *Invoker) TransferOwnershipForECCM(eccmAddrHex, ownershipAddressHex string) (*types.Transaction, error) { + ownershipAddress := ethComm.HexToAddress(ownershipAddressHex) + eccmAddr := ethComm.HexToAddress(eccmAddrHex) + eccmContract, err := eccm_abi.NewEthCrossChainManager(eccmAddr, i.client) + if err != nil { + return nil, fmt.Errorf("TransferOwnershipForECCM err: %v", err) + } + auth, _ := i.MakeSmartContractAuth() + tx, err := eccmContract.TransferOwnership(auth, ownershipAddress) + if err != nil { + log.Fatal(err) + } + i.client.WaitTransactionConfirm(tx.Hash()) + return tx, nil +} + +func (i *Invoker) Client() *client.Client { + return i.client +} + +func (i *Invoker) GetAccInfo() (string, error) { + h, err := i.client.BlockNumber(context.Background()) + if err != nil { + return "", err + } + val, err := i.client.BalanceAt(context.Background(), i.signer.Address, big.NewInt(int64(h))) + if err != nil { + return "", err + } + ethInfo := fmt.Sprintf("eth: %d", val.Uint64()) + + ontx, err := ontx_abi.NewONTX(ethComm.HexToAddress(i.TConfiguration.EthOntx), i.client) + if err != nil { + return "", err + } + val, err = ontx.BalanceOf(nil, i.signer.Address) + if err != nil { + return "", err + } + ontInfo := fmt.Sprintf("ontx: %d", val.Uint64()) + + ongx, err := ongx_abi.NewONGX(ethComm.HexToAddress(i.TConfiguration.EthOngx), i.client) + if err != nil { + return "", err + } + val, err = ongx.BalanceOf(nil, i.signer.Address) + if err != nil { + return "", err + } + ongInfo := fmt.Sprintf("ongx: %d", val.Uint64()) + + oep4x, err := oep4_abi.NewOEP4Template(ethComm.HexToAddress(i.TConfiguration.EthOep4), i.client) + if err != nil { + return "", err + } + val, err = oep4x.BalanceOf(nil, i.signer.Address) + if err != nil { + return "", err + } + oep4Info := fmt.Sprintf("oep4x: %d", val.Uint64()) + + erc20, err := erc20_abi.NewERC20(ethComm.HexToAddress(i.TConfiguration.EthErc20), i.client) + if err != nil { + return "", err + } + val, err = erc20.BalanceOf(nil, i.signer.Address) + if err != nil { + return "", err + } + erc20Info := fmt.Sprintf("erc20: %d", val.Uint64()) + + btcx, err := btcx_abi.NewBTCX(ethComm.HexToAddress(i.TConfiguration.BtceContractAddress), i.client) + if err != nil { + return "", err + } + val, err = btcx.BalanceOf(nil, i.signer.Address) + if err != nil { + return "", err + } + btcxInfo := fmt.Sprintf("btcx: %d", val.Uint64()) + + return fmt.Sprintf("ETHEREUM: acc: %s, asset: [ %s, %s, %s, %s, %s, %s ]", + i.signer.Address.String(), ethInfo, ontInfo, ongInfo, oep4Info, erc20Info, btcxInfo), nil +} diff --git a/chains/kai/invoker_test.go b/chains/kai/invoker_test.go new file mode 100644 index 0000000..0fc6c7a --- /dev/null +++ b/chains/kai/invoker_test.go @@ -0,0 +1 @@ +package kai diff --git a/chains/kai/nonce_manager.go b/chains/kai/nonce_manager.go new file mode 100644 index 0000000..be1b551 --- /dev/null +++ b/chains/kai/nonce_manager.go @@ -0,0 +1,89 @@ +/* +* Copyright (C) 2020 The poly network Authors +* This file is part of The poly network library. +* +* The poly network is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* The poly network is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* You should have received a copy of the GNU Lesser General Public License +* along with The poly network . If not, see . + */ +package kai + +import ( + "context" + "sync" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/polynetwork/poly-io-test/chains/kai/client" + "github.com/polynetwork/poly-io-test/log" +) + +const ClearNonceInterval = 10 * time.Minute + +type NonceManager struct { + addressNonce map[common.Address]uint64 + ethClient *client.Client + lock sync.RWMutex +} + +func NewNonceManager(ethClient *client.Client) *NonceManager { + nonceManager := &NonceManager{ + addressNonce: make(map[common.Address]uint64), + ethClient: ethClient, + } + go nonceManager.clearNonce() + return nonceManager +} + +// return account nonce, and than nonce++ +func (this *NonceManager) GetAddressNonce(address common.Address) uint64 { + this.lock.Lock() + defer this.lock.Unlock() + + // return a new point + nonce, ok := this.addressNonce[address] + if !ok { + // get nonce from eth network + uintNonce, err := this.ethClient.PendingNonceAt(context.Background(), address) + if err != nil { + log.Infof("GetAddressNonce: cannot get account %s nonce, err: %s, set it to nil!", + address, err) + } + this.addressNonce[address] = uintNonce + nonce = uintNonce + } + // increase record + this.addressNonce[address]++ + return nonce +} + +func (this *NonceManager) DecreaseAddressNonce(address common.Address) { + this.lock.Lock() + defer this.lock.Unlock() + + nonce, ok := this.addressNonce[address] + if ok && nonce > 0 { + this.addressNonce[address]-- + } +} + +// clear nonce per +func (this *NonceManager) clearNonce() { + for { + <-time.After(ClearNonceInterval) + this.lock.Lock() + for addr := range this.addressNonce { + delete(this.addressNonce, addr) + } + this.lock.Unlock() + //log.Infof("clearNonce: clear all cache nonce") + } +} diff --git a/chains/kai/signer.go b/chains/kai/signer.go new file mode 100644 index 0000000..245d72b --- /dev/null +++ b/chains/kai/signer.go @@ -0,0 +1,58 @@ +package kai + +import ( + "bytes" + "crypto/ecdsa" + "encoding/hex" + "fmt" + + ethComm "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/rlp" + "github.com/kardiachain/go-kardia/types" + "github.com/ontio/ontology/common" +) + +type signer struct { + PrivateKey *ecdsa.PrivateKey + Address ethComm.Address +} + +func NewSigner(privateKey string) (*signer, error) { + priKey, err := crypto.HexToECDSA(privateKey) + if err != nil { + return nil, fmt.Errorf("ApproveERC20, cannot decode private key") + } + address := crypto.PubkeyToAddress(priKey.PublicKey) + return &signer{ + PrivateKey: priKey, + Address: address, + }, nil +} + +func DeserializeTx(rawTx string) (*types.Transaction, error) { + txData := ethComm.FromHex(rawTx) + tx := &types.Transaction{} + err := rlp.DecodeBytes(txData, tx) + if err != nil { + return nil, fmt.Errorf("deserializeTx: err: %s", err) + } + return tx, nil +} + +func SerializeTx(tx *types.Transaction) (string, error) { + bf := new(bytes.Buffer) + err := rlp.Encode(bf, tx) + if err != nil { + return "", fmt.Errorf("signTx: encode signed tx err: %s", err) + } + signedRawTx := hexutil.Encode(bf.Bytes()) + return signedRawTx, nil +} + +func ReverseOntAddress(ontAddress string) string { + addr, _ := common.AddressFromBase58(ontAddress) + //fmt.Printf("Address Form Base58 is %s\n", "0x"+hex.EncodeToString(addr[:])) + return hex.EncodeToString(addr[:]) +} diff --git a/cmd/kai_deployer/run.go b/cmd/kai_deployer/run.go new file mode 100644 index 0000000..f44930d --- /dev/null +++ b/cmd/kai_deployer/run.go @@ -0,0 +1,387 @@ +package main + +import ( + "encoding/hex" + "flag" + "fmt" + + common2 "github.com/ethereum/go-ethereum/common" + "github.com/joeqian10/neo-gogogo/helper" + "github.com/ontio/ontology/common" + "github.com/polynetwork/poly-io-test/chains/kai" + "github.com/polynetwork/poly-io-test/config" +) + +var ( + fnKai string + kaiConfFile string + eccmRedeploy int +) + +func init() { + flag.StringVar(&fnKai, "func", "deploy", "choose function to run: deploy or setup") + flag.StringVar(&kaiConfFile, "conf", "./config.json", "config file path") + flag.IntVar(&eccmRedeploy, "redeploy_eccm", 1, "redeploy eccd, eccm and eccmp or not") + flag.Parse() +} + +func main() { + err := config.DefConfig.Init(kaiConfFile) + if err != nil { + panic(err) + } + + switch fnKai { + case "deploy": + DeploySmartContract() + case "setup": + SetUpContracts() + } +} + +func DeploySmartContract() { + invoker := kai.NewInvoker(config.DefConfig.KaiChainID) + var ( + eccdAddr common2.Address + eccmAddr common2.Address + eccmpAddr common2.Address + err error + ) + if eccmRedeploy == 1 { + eccdAddr, _, err = invoker.DeployEthChainDataContract() + if err != nil { + panic(err) + } + + eccmAddr, _, err = invoker.DeployECCMContract(eccdAddr.Hex()) + if err != nil { + panic(err) + } + eccmpAddr, _, err = invoker.DeployECCMPContract(eccmAddr.Hex()) + if err != nil { + panic(err) + } + _, err = invoker.TransferOwnershipForECCD(eccdAddr.Hex(), eccmAddr.Hex()) + if err != nil { + panic(err) + } + _, err = invoker.TransferOwnershipForECCM(eccmAddr.Hex(), eccmpAddr.Hex()) + if err != nil { + panic(err) + } + } else { + eccdAddr = common2.HexToAddress(config.DefConfig.KaiEccd) + eccmAddr = common2.HexToAddress(config.DefConfig.KaiEccm) + eccmpAddr = common2.HexToAddress(config.DefConfig.KaiEccmp) + } + + lockProxyAddr, _, err := invoker.DeployLockProxyContract(eccmpAddr) + if err != nil { + panic(err) + } + + lockproxyAddrHex := lockProxyAddr.Hex() + erc20Addr, erc20, err := invoker.DeployERC20() + if err != nil { + panic(err) + } + + total, err := erc20.TotalSupply(nil) + if err != nil { + panic(fmt.Errorf("failed to get total supply for erc20: %v", err)) + } + auth, _ := invoker.MakeSmartContractAuth() + tx, err := erc20.Approve(auth, lockProxyAddr, total) + if err != nil { + panic(fmt.Errorf("failed to approve erc20 to lockproxy: %v", err)) + } + invoker.ETHUtil.WaitTransactionConfirm(tx.Hash()) + + oep4Addr, _, err := invoker.DeployOEP4(lockproxyAddrHex) + if err != nil { + panic(err) + } + ongxAddr, _, err := invoker.DeployONGXContract(lockproxyAddrHex) + if err != nil { + panic(err) + } + ontxAddr, _, err := invoker.DeployONTXContract(lockproxyAddrHex) + if err != nil { + panic(err) + } + + fmt.Println("=============================ETH info=============================") + fmt.Println("kai krc20:", erc20Addr.Hex()) + fmt.Println("kai ope4:", oep4Addr.Hex()) + fmt.Println("kai eccd address:", eccdAddr.Hex()) + fmt.Println("kai eccm address:", eccmAddr.Hex()) + fmt.Println("kai eccmp address:", eccmpAddr.Hex()) + fmt.Println("kai lock proxy address: ", lockProxyAddr.Hex()) + fmt.Println("kai ongx address: ", ongxAddr.Hex()) + fmt.Println("kai ontx proxy address: ", ontxAddr.Hex()) + fmt.Println("==================================================================") + + config.DefConfig.Krc20 = erc20Addr.Hex() + config.DefConfig.KaiOep4 = oep4Addr.Hex() + config.DefConfig.KaiEccd = eccdAddr.Hex() + config.DefConfig.KaiEccm = eccmAddr.Hex() + config.DefConfig.KaiEccmp = eccmpAddr.Hex() + config.DefConfig.KaiLockProxy = lockProxyAddr.Hex() + config.DefConfig.KaiOngx = ongxAddr.Hex() + config.DefConfig.KaiOntx = ontxAddr.Hex() + + if err := config.DefConfig.Save(kaiConfFile); err != nil { + panic(fmt.Errorf("failed to save config, you better save it youself: %v", err)) + } +} + +func SetupBep20(invoker *kai.Invoker) { + if config.DefConfig.OntBep20 != "" { + bindTx, err := invoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.Bep20, + config.DefConfig.OntBep20, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + } + invoker.Client().WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding bep20 of ontology on kai: ( txhash: %s )\n", hash.String()) + } + + bindTx, err := invoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.Bep20, + config.CM_BEP20, config.DefConfig.CMCrossChainId, 0) + if err != nil { + panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + } + invoker.Client().WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding bep20 of cosmos on kai: ( txhash: %s )\n", hash.String()) +} + +func SetupWBTC(kaiInvoker *kai.Invoker) { + bindTx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiWBTC, + config.DefConfig.OntWBTC, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupWBTC, failed to BindAssetHash: %v", err)) + } + kaiInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding WBTC of ontology on kai: ( txhash: %s )\n", hash.String()) +} + +func SetupDAI(kaiInvoker *kai.Invoker) { + bindTx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiDai, + config.DefConfig.OntDai, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupDAI, failed to BindAssetHash: %v", err)) + } + kaiInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding DAI of ontology on kai: ( txhash: %s )\n", hash.String()) +} + +func SetupUSDT(kaiInvoker *kai.Invoker) { + bindTx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiUSDT, + config.DefConfig.OntUSDT, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupUSDT, failed to BindAssetHash: %v", err)) + } + kaiInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding USDT of ontology on kai: ( txhash: %s )\n", hash.String()) +} + +func SetupUSDC(kaiInvoker *kai.Invoker) { + bindTx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiUSDC, + config.DefConfig.OntUSDC, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupUSDC, failed to BindAssetHash: %v", err)) + } + kaiInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + hash := bindTx.Hash() + fmt.Printf("binding USDC of ontology on kai: ( txhash: %s )\n", hash.String()) +} + +func SetupOntAsset(invoker *kai.Invoker) { + if config.DefConfig.KaiLockProxy == "" { + panic(fmt.Errorf("KaiLockProxy is blank")) + } + if config.DefConfig.KaiOntx == "" { + panic(fmt.Errorf("KaicOntx is blank")) + } + if config.DefConfig.KaiOngx == "" { + panic(fmt.Errorf("KaiOngx is blank")) + } + if config.DefConfig.KaiOep4 == "" { + panic(fmt.Errorf("KaiOep4 is blank")) + } + if config.DefConfig.OntOep4 == "" { + panic(fmt.Errorf("KaiOep4 is blank")) + } + + txs, err := invoker.BindOntAsset(config.DefConfig.KaiLockProxy, config.DefConfig.KaiOntx, config.DefConfig.KaiOngx, + config.DefConfig.KaiOep4, config.DefConfig.OntOep4) + if err != nil { + panic(err) + } + hash1, hash2, hash3 := txs[0].Hash(), txs[1].Hash(), txs[2].Hash() + fmt.Printf("ont/ong/oep4 binding tx on ontology: %s/%s/%s\n", hash1.String(), hash2.String(), hash3.String()) + + hash4, hash5, hash6 := txs[3].Hash(), txs[4].Hash(), txs[5].Hash() + fmt.Printf("ont/ong/oep4 binding tx on cosmos: %s/%s/%s\n", hash4.String(), hash5.String(), hash6.String()) +} + +func SetupBnb(kaiInvoker *kai.Invoker) { + kaiNativeAddr := "0x0000000000000000000000000000000000000000" + if config.DefConfig.OntBnb != "" { + tx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, config.DefConfig.OntBnb, config.DefConfig.OntChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnbx of ontology on kai: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.EthBnb != "" { + tx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, config.DefConfig.EthBnb, config.DefConfig.EthChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnb of kai on ethereum: ( txhash: %s )\n", hash.String()) + } + if config.DefConfig.NeoBnb != "" { + tx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, config.DefConfig.NeoBnb, config.DefConfig.NeoChainID, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2Neo, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnb of kai on neo: ( txhash: %s )\n", hash.String()) + } + + tx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, config.CM_BNBX, config.DefConfig.CMCrossChainId, 0) + if err != nil { + panic(fmt.Errorf("SetupBnb2COSMOS, failed to bind asset hash: %v", err)) + } + hash := tx.Hash() + fmt.Printf("binding bnbx of cosmos on kai: ( txhash: %s )\n", hash.String()) + + tx, err = kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, kaiNativeAddr, config.DefConfig.KaiChainID, 0) + if err != nil { + panic(fmt.Errorf("BindAssetHash, failed to bind asset hash: %v", err)) + } + hash = tx.Hash() + fmt.Printf("binding bnb of kai on kai: ( txhash: %s )\n", hash.String()) +} + +func SetOtherLockProxy(invoker *kai.Invoker) { + _, contract, err := invoker.MakeLockProxy(config.DefConfig.KaiLockProxy) + if err != nil { + panic(fmt.Errorf("failed to MakeLockProxy: %v", err)) + } + if config.DefConfig.OntLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other, err := common.AddressFromHexString(config.DefConfig.OntLockProxy) + if err != nil { + panic(fmt.Errorf("failed to AddressFromHexString: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.OntChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %s", err)) + } + hash := tx.Hash() + invoker.Client().WaitTransactionConfirm(hash) + fmt.Printf("binding ont proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.CMLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + raw, err := hex.DecodeString(config.DefConfig.CMLockProxy) + if err != nil { + panic(fmt.Errorf("failed to decode: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.CMCrossChainId, raw) + if err != nil { + panic(fmt.Errorf("failed to bind COSMOS proxy: %v", err)) + } + hash := tx.Hash() + invoker.Client().WaitTransactionConfirm(hash) + fmt.Printf("binding cosmos proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.KaiLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other := common2.HexToAddress(config.DefConfig.KaiLockProxy) + tx, err := contract.BindProxyHash(auth, config.DefConfig.KaiChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.Client().WaitTransactionConfirm(hash) + fmt.Printf("binding kai proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.EthLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other := common2.HexToAddress(config.DefConfig.EthLockProxy) + tx, err := contract.BindProxyHash(auth, config.DefConfig.EthChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.Client().WaitTransactionConfirm(hash) + fmt.Printf("binding kai proxy: ( txhash: %s )\n", hash.String()) + } + + if config.DefConfig.NeoLockProxy != "" { + auth, err := invoker.MakeSmartContractAuth() + if err != nil { + panic(fmt.Errorf("failed to get auth: %v", err)) + } + other, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) + if err != nil { + panic(fmt.Errorf("UInt160FromString error: %v", err)) + } + tx, err := contract.BindProxyHash(auth, config.DefConfig.NeoChainID, other[:]) + if err != nil { + panic(fmt.Errorf("failed to bind proxy: %v", err)) + } + hash := tx.Hash() + invoker.Client().WaitTransactionConfirm(hash) + fmt.Printf("binding neo proxy: ( txhash: %s )\n", hash.String()) + } +} + +func SetUpContracts() { + invoker := kai.NewInvoker(config.DefConfig.KaiChainID) + SetupBnb(invoker) + if config.DefConfig.Bep20 != "" { + SetupBep20(invoker) + } + if config.DefConfig.OntLockProxy != "" { + SetupOntAsset(invoker) + } + if config.DefConfig.KaiWBTC != "" { + SetupWBTC(invoker) + } + if config.DefConfig.KaiDai != "" { + SetupDAI(invoker) + } + if config.DefConfig.KaiUSDT != "" { + SetupUSDT(invoker) + } + + //SetupUSDC(invoker) + SetOtherLockProxy(invoker) +} diff --git a/cmd/tools/run.go b/cmd/tools/run.go index e7385b4..f910fe6 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -24,9 +24,10 @@ import ( "encoding/json" "flag" "fmt" + "io/ioutil" + "github.com/polynetwork/poly/core/states" "github.com/polynetwork/poly/native/service/governance/neo3_state_manager" - "io/ioutil" "math/big" "os" @@ -67,6 +68,7 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" cosmos2 "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/chains/kai/client" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" @@ -209,6 +211,11 @@ func main() { if registerOK(poly, acc) { ApproveRegisterSideChain(config.DefConfig.OkChainID, poly, accArr) } + + case config.DefConfig.KaiChainID: + if RegisterKai(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.KaiChainID, poly, accArr) + } case 0: if RegisterBtcChain(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BtcChainID, poly, accArr) @@ -246,6 +253,9 @@ func main() { if registerOK(poly, acc) { ApproveRegisterSideChain(config.DefConfig.OkChainID, poly, accArr) } + if RegisterKai(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.KaiChainID, poly, accArr) + } } case "sync_genesis_header": wArr := strings.Split(pWalletFiles, ",") @@ -1392,6 +1402,35 @@ func SyncNeo3GenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Acco return nil } +func SyncKaiGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { + client, err := client.Dial(config.DefConfig.KaiUrl) + if err != nil { + panic(err) + } + + header, err := client.FullHeaderByNumber(context.Background(), big.NewInt(config.DefConfig.KaiEpoch)) + if err != nil { + panic(err) + } + + headerBytes, err := json.Marshal(header) + if err != nil { + panic(err) + } + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.KaiChainID, headerBytes, accArr) + if err != nil { + if strings.Contains(err.Error(), "had been initialized") { + log.Info("kai already synced") + } else { + panic(err) + } + } else { + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to sync kai genesis header: ( txhash: %s )", txhash.ToHexString()) + } + +} + func SyncCosmosGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { invoker, err := cosmos2.NewCosmosInvoker() @@ -1945,6 +1984,29 @@ func RegisterOntChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool return true } +func RegisterKai(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + blkToWait := uint64(1) + txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.KaiChainID, 11, "kai", + blkToWait, []byte{}, acc) + if err != nil { + if strings.Contains(err.Error(), "already registered") { + log.Infof("Kardia chain %d already registered", config.DefConfig.KaiChainID) + return false + } + if strings.Contains(err.Error(), "already requested") { + log.Infof("Kardia chain %d already requested", config.DefConfig.KaiChainID) + return true + } + panic(fmt.Errorf("RegisterKai failed: %v", err)) + } + + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to register kardia chain: ( txhash: %s )", txhash.ToHexString()) + + return true + +} + func UpdateBtc(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { blkToWait := uint64(1) var tyNet utils.BtcNetType diff --git a/config/config.go b/config/config.go index 3085a2d..5492484 100644 --- a/config/config.go +++ b/config/config.go @@ -50,6 +50,7 @@ type TestConfig struct { O3ChainID uint64 MscChainID uint64 OkChainID uint64 + KaiChainID uint64 BtcRestAddr string BtcRestUser string @@ -125,6 +126,11 @@ type TestConfig struct { Neo3AddressVersion byte Neo3Epoch uint32 + // Kai Chain + KaiUrl string + KaiPrivateKey string + KaiEpoch int64 + // relayer chain RCWallet string RCWalletPwd string @@ -199,6 +205,21 @@ type TestConfig struct { HecoUSDC string HecoNeo string HecoRenBTC string + // kai contracts: auto set after deploy + KaiEccd string + KaiEccm string + KaiEccmp string + KaiLockProxy string + Krc20 string + KaiOep4 string + KaiOngx string + KaiOntx string + KaiWBTC string + KaiUSDT string + KaiDai string + KaiUSDC string + KaiNeo string + KaiRenBTC string // o3 contracts: auto set after deploy O3Eccd string O3Eccm string diff --git a/go.mod b/go.mod index d80181f..5a6a73f 100644 --- a/go.mod +++ b/go.mod @@ -20,6 +20,7 @@ require ( github.com/gorilla/mux v1.8.0 // indirect github.com/joeqian10/neo-gogogo v1.1.0 github.com/joeqian10/neo3-gogogo v0.3.2 + github.com/kardiachain/go-kardia v1.1.1-0.20210518073513-843096e91762 github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.7 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect @@ -29,9 +30,8 @@ require ( github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666 github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759 github.com/polynetwork/eth-contracts v0.0.0-20200903021827-c9212e419943 - github.com/polynetwork/poly v0.0.0-20201216061550-50185057319d + github.com/polynetwork/poly v0.0.0-20210112063446-24e3d053e9d6 github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493 - github.com/prometheus/tsdb v0.9.1 // indirect github.com/rjeczalik/notify v0.9.2 // indirect github.com/shirou/gopsutil v2.20.9+incompatible // indirect github.com/spf13/afero v1.2.2 // indirect @@ -39,12 +39,15 @@ require ( github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48 // indirect github.com/stretchr/testify v1.7.0 github.com/tendermint/tendermint v0.33.9 + github.com/tendermint/tm-db v0.5.1 // indirect + google.golang.org/grpc v1.30.0 // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect ) replace github.com/polynetwork/eth-contracts => github.com/zouxyan/eth-contracts v0.0.0-20210115072359-e4cac6edc20c +// replace github.com/polynetwork/poly => github.com/dogecoindev/poly v1.4.1-0.20210518074110-d2d669433554 // kai replace github.com/polynetwork/poly => github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd //replace github.com/polynetwork/poly-go-sdk => github.com/zhiqiangxu/poly-go-sdk v0.0.0-20201215024222-5d728b68e651 diff --git a/go.sum b/go.sum index da67d1f..2b42d17 100644 --- a/go.sum +++ b/go.sum @@ -65,16 +65,19 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/antlr/antlr4 v0.0.0-20190819145818-b43a4c3a8015/go.mod h1:T7PbCXFs94rrTttyxjbyT5+/1V8T2TYDejxUfHJjw1Y= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/aristanetworks/fsnotify v1.4.2/go.mod h1:D/rtu7LpjYM8tRJphJ0hUBYpjai8SfX+aSNsWDTq/Ks= github.com/aristanetworks/glog v0.0.0-20191112221043-67e8567f59f3/go.mod h1:KASm+qXFKs/xjSoWn30NrWBBvdTTQq+UjkhjEJHfSFA= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847 h1:rtI0fD4oG/8eVokGVPYJEW1F88p1ZNgXiEIs9thEE4A= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= +github.com/aristanetworks/goarista v0.0.0-20190712234253-ed1100a1c015/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/aristanetworks/goarista v0.0.0-20200331225509-2cc472e8fbd6 h1:Pcu4aKyFfpH0aXLnYJrsTjdRvXNY4SbODsb0pMTZxhA= github.com/aristanetworks/goarista v0.0.0-20200331225509-2cc472e8fbd6/go.mod h1:QZe5Yh80Hp1b6JxQdpfSEEe8X7hTyTEZSosSrFf/oJE= github.com/aristanetworks/splunk-hec-go v0.3.3/go.mod h1:1VHO9r17b0K7WmOlLb9nTk/2YanvOEnLMUgsFrxBROc= @@ -183,6 +186,7 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v17.12.0-ce-rc1.0.20200531234253-77e06fda0c94+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= @@ -192,6 +196,7 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/ebuchman/fail-test v0.0.0-20170303061230-95f809107225/go.mod h1:OFTBW14UVJS8P0shpX7OdPY0qpkTdA7AWGYFacMC2D8= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= @@ -227,6 +232,8 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= @@ -273,6 +280,8 @@ github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -299,6 +308,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq 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/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -307,6 +318,8 @@ github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/cel-go v0.3.2/go.mod h1:DoRSdzaJzNiP1lVuWhp/RjSnHLDQr/aNPlyqSBasBqA= +github.com/google/cel-spec v0.3.0/go.mod h1:MjQm800JAGhOZXI7vatnVpmIaFTR6L8FHcKk+piiKpI= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -386,6 +399,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -419,23 +433,31 @@ github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd h1:F+zXxTbFpS1b9kXP github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd/go.mod h1:oe6B9zngqA74VgWvsgZt4kdDoeyakUIeBqOEzHS4pTM= github.com/joeqian10/poly-go-sdk v0.0.0-20210517032637-3bc9e7c4f5c9 h1:nfk3tLOMj6Mdaa3u93pF8lqUUEopbVTWl3V5HGAZbPQ= github.com/joeqian10/poly-go-sdk v0.0.0-20210517032637-3bc9e7c4f5c9/go.mod h1:xplioW9d5l+IrchNFaMgz1QmzL5KeZmW3qzQDb2iQdA= +github.com/joeqian10/poly-go-sdk v0.0.0-20210517072349-71002ebfdf13 h1:gSEFDPtjAodPsyDO8dLe7LR1q56xnlONqYHBCV5UnkM= +github.com/joeqian10/poly-go-sdk v0.0.0-20210517072349-71002ebfdf13/go.mod h1:CBZe/O7+KWy/IWNOmJPuNxaBTtrSzsMJXuBafxPzYUc= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356 h1:I/yrLt2WilKxlQKCM52clh5rGzTKpVctGT1lH4Dc8Jw= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/kardiachain/go-kardia v1.1.1-0.20210518073513-843096e91762 h1:Jkua+KxKgB3unn8wcCfkylIn8PVcrzVGThxHcrijkbA= +github.com/kardiachain/go-kardia v1.1.1-0.20210518073513-843096e91762/go.mod h1:dIcZ5VO21q0HAjL9LiHqJ8bKMDkoE3T/4H0vy8urggs= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= @@ -445,6 +467,7 @@ github.com/klauspost/compress v1.10.1/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/reedsolomon v1.9.3/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -465,6 +488,7 @@ github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0 h1:v2XXALHHh6zHfYTJ+cSkwtyffnaOyR1MXaA91mTrb8o= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= @@ -472,6 +496,7 @@ github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HN github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -486,6 +511,7 @@ github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.0 h1:iMSDhgUILCr0TNm8LWlSjF8N0ZIj2qbO8WHp6Q/J2BA= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= +github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -515,6 +541,7 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= 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/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -526,14 +553,23 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b h1:UQDN12BzdWhXQL0t2QcRixHqAIG+JKNvQ20DhrIODtU= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b/go.mod h1:J0eVc7BEMmVVXbGv9PHoxjRSEwOwLr0qfzPk8Rdl5iw= +github.com/ontio/ontology v1.10.0/go.mod h1:iok/imHJVQXi5/Yr88dcbrKBRHGdiota1ZC6qh6l6Rc= github.com/ontio/ontology v1.11.0 h1:0T/hxFDHQqRcs1+yEdgaym5YIvGx5yebOsHYdKVWgHI= github.com/ontio/ontology v1.11.0/go.mod h1:Qw74bfTBlIQka+jQX4nXuWvyOYGGt368/V7XFxaf4tY= +github.com/ontio/ontology v1.11.1-0.20200812075204-26cf1fa5dd47/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= +github.com/ontio/ontology v1.11.1-0.20200817111815-fb3d61fdc12e/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= +github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c h1:Q2PShm6Hu83e7p7UKE7SgMIxW6WRNyymgI738KMKlKE= +github.com/ontio/ontology v1.11.1-0.20200827103103-591f7ce1009c/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= github.com/ontio/ontology-crypto v1.0.9 h1:6fxBsz3W4CcdJk4/9QO7j0Qq7NdlP2ixPrViu8XpzzM= github.com/ontio/ontology-crypto v1.0.9/go.mod h1:h/jeqqb9Ma/Leszxqh6zY3eTF2yks44hyRKikMni+YQ= github.com/ontio/ontology-eventbus v0.9.1 h1:nt3AXWx3gOyqtLiU4EwI92Yc4ik/pWHu9xRK15uHSOs= @@ -561,12 +597,15 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= 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/pebbe/zmq4 v1.0.0/go.mod h1:7N4y5R18zBiu3l0vajMUWQgZyjv464prE8RCyBcmnZM= 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/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= +github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.4.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -592,6 +631,9 @@ github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.5.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.5.1 h1:bdHYieyGlH+6OLEk2YQha8THib30KP0/yD0YH9m6xcA= github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.8.0 h1:zvJNkoCFAnYFNC24FV8nW4JdRJ3GIFcLbg65lL/JDcw= +github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -606,6 +648,9 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.14.0 h1:RHRyE8UocrbjU+6UvRzwi6HjiDfxrrBU91TtbKzkGp4= +github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -614,11 +659,16 @@ github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLk github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.10 h1:QJQN3jYQhkamO4mhfUWqdDH2asK7ONOI9MTWjyAxNKM= github.com/prometheus/procfs v0.0.10/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.9.1 h1:IWaAmWkYlgG7/S4iw4IpAQt5Y35QaZM6/GsZ7GsjAuk= github.com/prometheus/tsdb v0.9.1/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= +github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= +github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= github.com/rakyll/statik v0.1.6 h1:uICcfUXpgqtw2VopbIncslhAmE5hwc4g20TEyEENBNs= github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -640,17 +690,21 @@ github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0 github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sasha-s/go-deadlock v0.2.0 h1:lMqc+fUb7RrFS3gQLtoQsJ7/6TV/pAIFvBsqX73DK8Y= +github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/scylladb/go-set v1.0.2/go.mod h1:DkpGd78rljTxKAnTDPFqXSGxvETQnJyuSOQwsHycqfs= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v2.20.5-0.20200531151128-663af789c085+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.20.9+incompatible h1:msXs2frUV+O/JLva9EDLpuJ84PrFsdCTCQex8PUdtkQ= github.com/shirou/gopsutil v2.20.9+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= 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.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= 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= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= @@ -711,6 +765,8 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= +github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= +github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161/go.mod h1:wM7WEvslTq+iOEAMDLSzhVuOt5BRZ05WirO+b09GHQU= @@ -760,6 +816,8 @@ github.com/xtaci/kcp-go v5.4.20+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45 github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae/go.mod h1:gXtu8J62kEgmN++bm9BVICuT/e8yiLI2KFobd/TRFsE= github.com/ybbus/jsonrpc v2.1.2+incompatible h1:V4mkE9qhbDQ92/MLMIhlhMSbz8jNXdagC3xBR5NDwaQ= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zouxyan/eth-contracts v0.0.0-20210115072359-e4cac6edc20c h1:3gzrpowqz7P1Uj7l/DqiYGBWLi+dvjzjjjxxzSIvVCI= @@ -804,6 +862,8 @@ golang.org/x/crypto v0.0.0-20200406173513-056763e48d71/go.mod h1:LzIPMQfyMNhhGPh 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/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -825,6 +885,7 @@ golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCc golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -856,7 +917,11 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 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-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 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= @@ -868,6 +933,7 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -879,6 +945,7 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -889,9 +956,14 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200219091948-cb0a6d8edb6c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -900,10 +972,16 @@ golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7w 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-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= 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.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -941,10 +1019,13 @@ golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200221224223-e1da425f72fd/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/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/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -974,6 +1055,8 @@ google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 h1:pSLkPbrjnPyLDYU google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6 h1:iRN4+t0lvZX/l9gH14ARF9i58tsVa5a97k6aH95rC3Y= +google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1001,6 +1084,7 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -1029,6 +1113,7 @@ gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc h1:17cdygvFw3 gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/redis.v4 v4.2.4/go.mod h1:8KREHdypkCEojGKQcjMqAODMICIVwZAONWq8RowTITA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= From f362d6c76e98a5d7dffc9254e9b91711162c3c47 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Thu, 20 May 2021 14:52:26 +0700 Subject: [PATCH 73/96] add sync kai genesis header command --- cmd/tools/run.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index f910fe6..f768e5f 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -294,6 +294,8 @@ func main() { SyncMSCGenesisHeader(poly, accArr) case config.DefConfig.OkChainID: SyncOKGenesisHeader(poly, accArr) + case config.DefConfig.KaiChainID: + SyncKaiGenesisHeader(poly, accArr) case 0: SyncBtcGenesisHeader(poly, acc) SyncEthGenesisHeader(poly, accArr) @@ -306,6 +308,7 @@ func main() { SyncHecoGenesisHeader(poly, accArr) SyncMSCGenesisHeader(poly, accArr) SyncOKGenesisHeader(poly, accArr) + SyncKaiGenesisHeader(poly, accArr) } case "update_btc": From 63a10fec472531e61dcacd75312b17f05d8aca23 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Fri, 21 May 2021 15:32:13 +0700 Subject: [PATCH 74/96] merge --- cmd/tools/run.go | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 39a32b2..07b3485 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -68,6 +68,7 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" cosmos2 "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/chains/kai/client" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" @@ -210,6 +211,10 @@ func main() { if registerOK(poly, acc) { ApproveRegisterSideChain(config.DefConfig.OkChainID, poly, accArr) } + case config.DefConfig.KaiChainID: + if RegisterKai(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.KaiChainID, poly, accArr) + } case 0: if RegisterBtcChain(poly, acc) { ApproveRegisterSideChain(config.DefConfig.BtcChainID, poly, accArr) @@ -247,6 +252,9 @@ func main() { if registerOK(poly, acc) { ApproveRegisterSideChain(config.DefConfig.OkChainID, poly, accArr) } + if RegisterKai(poly, acc) { + ApproveRegisterSideChain(config.DefConfig.KaiChainID, poly, accArr) + } } case "sync_genesis_header": wArr := strings.Split(pWalletFiles, ",") @@ -285,6 +293,8 @@ func main() { SyncMSCGenesisHeader(poly, accArr) case config.DefConfig.OkChainID: SyncOKGenesisHeader(poly, accArr) + case config.DefConfig.KaiChainID: + SyncKaiGenesisHeader(poly, accArr) case 0: SyncBtcGenesisHeader(poly, acc) SyncEthGenesisHeader(poly, accArr) @@ -297,6 +307,7 @@ func main() { SyncHecoGenesisHeader(poly, accArr) SyncMSCGenesisHeader(poly, accArr) SyncOKGenesisHeader(poly, accArr) + SyncKaiGenesisHeader(poly, accArr) } case "update_btc": @@ -1286,6 +1297,35 @@ func SyncNeoGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou return nil } +func SyncKaiGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { + client, err := client.Dial(config.DefConfig.KaiUrl) + if err != nil { + panic(err) + } + + header, err := client.FullHeaderByNumber(context.Background(), big.NewInt(config.DefConfig.KaiEpoch)) + if err != nil { + panic(err) + } + + headerBytes, err := json.Marshal(header) + if err != nil { + panic(err) + } + txhash, err := poly.Native.Hs.SyncGenesisHeader(config.DefConfig.KaiChainID, headerBytes, accArr) + if err != nil { + if strings.Contains(err.Error(), "had been initialized") { + log.Info("kai already synced") + } else { + panic(err) + } + } else { + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to sync kai genesis header: ( txhash: %s )", txhash.ToHexString()) + } + +} + func SyncNeo3GenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) error { cli := rpc3.NewClient(config.DefConfig.Neo3Url) resp := cli.GetBlockHeader(strconv.Itoa(int(config.DefConfig.Neo3Epoch))) @@ -2318,6 +2358,29 @@ func GetRelayer(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) { log.Infof("get relayer success: %s", addr.ToBase58()) } +func RegisterKai(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + blkToWait := uint64(1) + txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.KaiChainID, 12, "kai", + blkToWait, []byte{}, acc) + if err != nil { + if strings.Contains(err.Error(), "already registered") { + log.Infof("Kardia chain %d already registered", config.DefConfig.KaiChainID) + return false + } + if strings.Contains(err.Error(), "already requested") { + log.Infof("Kardia chain %d already requested", config.DefConfig.KaiChainID) + return true + } + panic(fmt.Errorf("RegisterKai failed: %v", err)) + } + + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to register kardia chain: ( txhash: %s )", txhash.ToHexString()) + + return true + +} + func RegisterStateValidator(poly *poly_go_sdk.PolySdk, neo3PubKeys []string, signer *poly_go_sdk.Account) uint64 { txhash, err := poly.Native.Sm.RegisterStateValidator(neo3PubKeys, signer) if err != nil { From 1d18f02c7a4d076461af81acc581799a247452f9 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Fri, 21 May 2021 16:11:48 +0700 Subject: [PATCH 75/96] update kardiachain config --- config.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config.json b/config.json index 2294f71..f8eb4af 100644 --- a/config.json +++ b/config.json @@ -66,5 +66,11 @@ "OngValLimit": 10000, "EthValLimit": 100000, "Oep4ValLimit": 1000, - "Erc20ValLimit": 1000 + "Erc20ValLimit": 1000, + + "KaiUrl": "https://dev-1.kardiachain.io", + "KaiEpoch": 1, + "KaiPrivateKey": "0x8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", + "KaiChainID": "137" + } From 4964e590ba32578968f3a1f0e3347593442ab59d Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Fri, 21 May 2021 16:17:32 +0700 Subject: [PATCH 76/96] fix kai signing --- chains/kai/invoker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chains/kai/invoker.go b/chains/kai/invoker.go index af0ba53..2933d0c 100644 --- a/chains/kai/invoker.go +++ b/chains/kai/invoker.go @@ -53,7 +53,7 @@ func NewInvoker(chainID uint64) *Invoker { } instance.client = client instance.NM = NewNonceManager(client) - instance.signer, err = NewSigner(config.DefConfig.KaiUrl) + instance.signer, err = NewSigner(config.DefConfig.KaiPrivateKey) if err != nil { panic(err) } From 740543f4fc9048e92c39d8637cd71e107217ada6 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Fri, 21 May 2021 16:25:26 +0700 Subject: [PATCH 77/96] update kaichain id --- config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.json b/config.json index f8eb4af..66faeac 100644 --- a/config.json +++ b/config.json @@ -67,10 +67,10 @@ "EthValLimit": 100000, "Oep4ValLimit": 1000, "Erc20ValLimit": 1000, - + "KaiUrl": "https://dev-1.kardiachain.io", "KaiEpoch": 1, "KaiPrivateKey": "0x8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", - "KaiChainID": "137" + "KaiChainID": 138 } From 5436f81ad4fe624ea7fd93cee6a54bb834af1ffa Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Fri, 21 May 2021 16:52:11 +0700 Subject: [PATCH 78/96] update kai endpoint --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index 66faeac..4f5a68b 100644 --- a/config.json +++ b/config.json @@ -68,7 +68,7 @@ "Oep4ValLimit": 1000, "Erc20ValLimit": 1000, - "KaiUrl": "https://dev-1.kardiachain.io", + "KaiUrl": "https://dev-6.kardiachain.io", "KaiEpoch": 1, "KaiPrivateKey": "0x8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", "KaiChainID": 138 From aaa3ed6f88409509a1f0fbba0a9ab9076a7e0578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=BF=97=E5=BC=BA?= <652732310@qq.com> Date: Wed, 26 May 2021 12:02:21 +0800 Subject: [PATCH 79/96] mod for kai --- cmd/tools/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 07b3485..51805d4 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -2360,7 +2360,7 @@ func GetRelayer(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) { func RegisterKai(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { blkToWait := uint64(1) - txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.KaiChainID, 12, "kai", + txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.KaiChainID, 13, "kai", blkToWait, []byte{}, acc) if err != nil { if strings.Contains(err.Error(), "already registered") { From 03b900788a3eeaf14af93df5331f4b79daafaaed Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Wed, 26 May 2021 18:24:38 +0700 Subject: [PATCH 80/96] fix kai client --- chains/kai/client/kai.go | 59 ++++++++++++++++++++++++---------------- chains/kai/invoker.go | 4 +-- config.json | 4 +-- 3 files changed, 39 insertions(+), 28 deletions(-) diff --git a/chains/kai/client/kai.go b/chains/kai/client/kai.go index 4db7686..58ce59d 100644 --- a/chains/kai/client/kai.go +++ b/chains/kai/client/kai.go @@ -24,6 +24,7 @@ import ( "errors" "fmt" "math/big" + "strconv" "time" "github.com/ethereum/go-ethereum" @@ -34,6 +35,7 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/polynetwork/poly-io-test/log" + "github.com/kardiachain/go-kardia" ktypes "github.com/kardiachain/go-kardia/types" ) @@ -166,20 +168,15 @@ func (tx *rpcTransaction) UnmarshalJSON(msg []byte) error { } // TransactionByHash returns the transaction with the given hash. -func (ec *Client) TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error) { - var json *rpcTransaction - err = ec.c.CallContext(ctx, &json, "kai_getTransactionByHash", hash) +func (ec *Client) TransactionByHash(ctx context.Context, hash common.Hash) (tx *ktypes.Transaction, err error) { + var raw *ktypes.Transaction + err = ec.c.CallContext(ctx, &raw, "tx_getTransaction", hash) if err != nil { - return nil, false, err - } else if json == nil { - return nil, false, ethereum.NotFound - } else if _, r, _ := json.tx.RawSignatureValues(); r == nil { - return nil, false, fmt.Errorf("server returned transaction without signature") - } - if json.From != nil && json.BlockHash != nil { - setSenderFromServer(json.tx, *json.From, *json.BlockHash) + return nil, err + } else if raw == nil { + return nil, kardia.NotFound } - return json.tx, json.BlockNumber == nil, nil + return raw, nil } // TransactionSender returns the sender address of the given transaction. The transaction @@ -243,7 +240,7 @@ func (ec *Client) TransactionInBlock(ctx context.Context, blockHash common.Hash, // Note that the receipt is not available for pending transactions. func (ec *Client) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) { var r *types.Receipt - err := ec.c.CallContext(ctx, &r, "kai_getTransactionReceipt", txHash) + err := ec.c.CallContext(ctx, &r, "tx_getTransactionReceipt", txHash) if err == nil { if r == nil { return nil, ethereum.NotFound @@ -345,7 +342,7 @@ func (ec *Client) CodeAt(ctx context.Context, account common.Address, blockNumbe // The block number can be nil, in which case the nonce is taken from the latest known block. func (ec *Client) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error) { var result hexutil.Uint64 - err := ec.c.CallContext(ctx, &result, "kai_getTransactionCount", account, toBlockNumArg(blockNumber)) + err := ec.c.CallContext(ctx, &result, "account_nonceAtHeight", account, toBlockNumArg(blockNumber)) return uint64(result), err } @@ -445,9 +442,12 @@ func (ec *Client) PendingCodeAt(ctx context.Context, account common.Address) ([] // PendingNonceAt returns the account nonce of the given account in the pending state. // This is the nonce that should be used for the next transaction. func (ec *Client) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) { - var result hexutil.Uint64 - err := ec.c.CallContext(ctx, &result, "kai_getTransactionCount", account, "pending") - return uint64(result), err + var result uint64 + err := ec.c.CallContext(ctx, &result, "account_nonceAtHeight", account, "pending") + if err != nil { + return 0, err + } + return result, err } // PendingTransactionCount returns the total number of transactions in the pending state. @@ -469,7 +469,7 @@ func (ec *Client) PendingTransactionCount(ctx context.Context) (uint, error) { // blocks might not be available. func (ec *Client) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) { var hex hexutil.Bytes - err := ec.c.CallContext(ctx, &hex, "kai_call", toCallArg(msg), toBlockNumArg(blockNumber)) + err := ec.c.CallContext(ctx, &hex, "kai_kardiaCall", toCallArg(msg), toBlockNumArg(blockNumber)) if err != nil { return nil, err } @@ -490,11 +490,15 @@ func (ec *Client) PendingCallContract(ctx context.Context, msg ethereum.CallMsg) // SuggestGasPrice retrieves the currently suggested gas price to allow a timely // execution of a transaction. func (ec *Client) SuggestGasPrice(ctx context.Context) (*big.Int, error) { - var hex hexutil.Big - if err := ec.c.CallContext(ctx, &hex, "kai_gasPrice"); err != nil { + var gasPriceStr string + if err := ec.c.CallContext(ctx, &gasPriceStr, "kai_gasPrice"); err != nil { + return nil, err + } + gasPrice, err := strconv.Atoi(gasPriceStr) + if err != nil { return nil, err } - return (*big.Int)(&hex), nil + return big.NewInt(int64(gasPrice)), nil } // EstimateGas tries to estimate the gas needed to execute a specific transaction based on @@ -519,7 +523,7 @@ func (ec *Client) SendTransaction(ctx context.Context, tx *types.Transaction) er if err != nil { return err } - return ec.c.CallContext(ctx, nil, "kai_sendRawTransaction", hexutil.Encode(data)) + return ec.c.CallContext(ctx, nil, "tx_sendRawTransaction", hexutil.Encode(data)) } func toCallArg(msg ethereum.CallMsg) interface{} { @@ -543,6 +547,7 @@ func toCallArg(msg ethereum.CallMsg) interface{} { } func (ec *Client) WaitTransactionConfirm(hash common.Hash) { + ctx := context.Background() start := time.Now() for { time.Sleep(time.Millisecond * 100) @@ -550,12 +555,18 @@ func (ec *Client) WaitTransactionConfirm(hash common.Hash) { log.Errorf("WaitTransactionConfirm max wait time exceeded, quit") return } - _, ispending, err := ec.TransactionByHash(context.Background(), hash) + _, err := ec.TransactionByHash(context.Background(), hash) if err != nil { log.Errorf("failed to call TransactionByHash: %v hash:%s", err, hash.String()) continue } - if ispending == true { + + receipt, err := ec.TransactionReceipt(ctx, hash) + if err != nil { + log.Errorf("failed to call TransactionReceipt: %v hash:%s", err, hash.String()) + continue + } + if receipt == nil { continue } else { break diff --git a/chains/kai/invoker.go b/chains/kai/invoker.go index 2933d0c..fab2879 100644 --- a/chains/kai/invoker.go +++ b/chains/kai/invoker.go @@ -115,11 +115,11 @@ func (i *Invoker) MakeSmartContractAuth() (*bind.TransactOpts, error) { fromAddress := crypto.PubkeyToAddress(*publicKeyECDSA) nonce, err := i.client.PendingNonceAt(context.Background(), fromAddress) if err != nil { - return nil, fmt.Errorf("MakeSmartContractAuth, %v", err) + return nil, fmt.Errorf("MakeSmartContractAuth PendingNonceAt, %v", err) } gasPrice, err := i.client.SuggestGasPrice(context.Background()) if err != nil { - return nil, fmt.Errorf("MakeSmartContractAuth, %v", err) + return nil, fmt.Errorf("MakeSmartContractAuth SuggestGasPrice, %v", err) } auth := bind.NewKeyedTransactor(i.PrivateKey) auth.Nonce = big.NewInt(int64(nonce)) diff --git a/config.json b/config.json index 4f5a68b..1a6b441 100644 --- a/config.json +++ b/config.json @@ -39,7 +39,7 @@ "CMEpoch": 1, "RCWallet": ".wallets/wallet.dat", "RCWalletPwd": "", - "RchainJsonRpcAddress": "http://poly:20336", + "RchainJsonRpcAddress": "http://138.91.6.226:40336", "RCEpoch": 0, "ReportInterval": 60, "ReportDir": "./report", @@ -70,7 +70,7 @@ "KaiUrl": "https://dev-6.kardiachain.io", "KaiEpoch": 1, - "KaiPrivateKey": "0x8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", + "KaiPrivateKey": "8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", "KaiChainID": 138 } From 4982f6c4b200e346c3f432db7fc465355cb21797 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Thu, 27 May 2021 14:56:30 +0700 Subject: [PATCH 81/96] update kaiclient --- chains/kai/client/kai.go | 576 ------------------------------------ chains/kai/client/signer.go | 59 ---- chains/kai/invoker.go | 8 +- chains/kai/invoker_test.go | 6 + chains/kai/nonce_manager.go | 6 +- cmd/tools/run.go | 4 +- go.mod | 7 +- go.sum | 303 ++++++++++++++++--- 8 files changed, 285 insertions(+), 684 deletions(-) delete mode 100644 chains/kai/client/kai.go delete mode 100644 chains/kai/client/signer.go diff --git a/chains/kai/client/kai.go b/chains/kai/client/kai.go deleted file mode 100644 index 58ce59d..0000000 --- a/chains/kai/client/kai.go +++ /dev/null @@ -1,576 +0,0 @@ -package client - -// Copyright 2016 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -// Package ethclient provides a client for the Ethereum RPC API. - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "math/big" - "strconv" - "time" - - "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/rlp" - "github.com/ethereum/go-ethereum/rpc" - "github.com/polynetwork/poly-io-test/log" - - "github.com/kardiachain/go-kardia" - ktypes "github.com/kardiachain/go-kardia/types" -) - -// Client defines typed wrappers for the Ethereum RPC API. -type Client struct { - c *rpc.Client -} - -// Dial connects a client to the given URL. -func Dial(rawurl string) (*Client, error) { - return DialContext(context.Background(), rawurl) -} - -func DialContext(ctx context.Context, rawurl string) (*Client, error) { - c, err := rpc.DialContext(ctx, rawurl) - if err != nil { - return nil, err - } - return NewClient(c), nil -} - -// NewClient creates a client that uses the given RPC client. -func NewClient(c *rpc.Client) *Client { - return &Client{c} -} - -func (ec *Client) Close() { - ec.c.Close() -} - -// Blockchain Access - -// ChainId retrieves the current chain ID for transaction replay protection. -func (ec *Client) ChainID(ctx context.Context) (*big.Int, error) { - var result hexutil.Big - err := ec.c.CallContext(ctx, &result, "kai_chainId") - if err != nil { - return nil, err - } - return (*big.Int)(&result), err -} - -// BlockByHash returns the given full block. -// -// Note that loading full blocks requires two requests. Use HeaderByHash -// if you don't need all transactions or uncle headers. -func (ec *Client) BlockByHash(ctx context.Context, hash common.Hash) (*ktypes.Block, error) { - return ec.getBlock(ctx, "kai_getBlockByHash", hash, true) -} - -// BlockByNumber returns a block from the current canonical chain. If number is nil, the -// latest known block is returned. -// -// Note that loading full blocks requires two requests. Use HeaderByNumber -// if you don't need all transactions or uncle headers. -func (ec *Client) BlockByNumber(ctx context.Context, number *big.Int) (*ktypes.Block, error) { - return ec.getBlock(ctx, "kai_getBlockByNumber", toBlockNumArg(number), true) -} - -type rpcBlock struct { - Hash common.Hash `json:"hash"` - Transactions []rpcTransaction `json:"transactions"` - UncleHashes []common.Hash `json:"uncles"` -} - -func (ec *Client) getBlock(ctx context.Context, method string, args ...interface{}) (*ktypes.Block, error) { - var raw ktypes.Block - err := ec.c.CallContext(ctx, &raw, method, args...) - if err != nil { - return nil, err - } - return &raw, nil -} - -// HeaderByHash returns the block header with the given hash. -func (ec *Client) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error) { - var head *types.Header - err := ec.c.CallContext(ctx, &head, "kai_getBlockByHash", hash, false) - if err == nil && head == nil { - err = ethereum.NotFound - } - return head, err -} - -// HeaderByNumber returns a block header from the current canonical chain. If number is -// nil, the latest known header is returned. -func (ec *Client) HeaderByNumber(ctx context.Context, number *big.Int) (*ktypes.Header, error) { - var head *ktypes.Header - err := ec.c.CallContext(ctx, &head, "kai_getBlockByNumber", toBlockNumArg(number)) - if err == nil && head == nil { - err = ethereum.NotFound - } - return head, err -} - -func (ec *Client) GetValidators(ctx context.Context, number *big.Int) (*ktypes.ValidatorSet, error) { - var valSet *ktypes.ValidatorSet - err := ec.c.CallContext(ctx, &valSet, "kai_getValidatorSet", toBlockNumArg(number)) - if err == nil && valSet == nil { - err = ethereum.NotFound - } - return valSet, err -} - -func (ec *Client) GetCommit(ctx context.Context, number *big.Int) (*ktypes.Commit, error) { - var commit *ktypes.Commit - err := ec.c.CallContext(ctx, &commit, "kai_getCommit", toBlockNumArg(number)) - if err == nil && commit == nil { - err = ethereum.NotFound - } - return commit, err -} - -type rpcTransaction struct { - tx *types.Transaction - txExtraInfo -} - -type txExtraInfo struct { - BlockNumber *string `json:"blockNumber,omitempty"` - BlockHash *common.Hash `json:"blockHash,omitempty"` - From *common.Address `json:"from,omitempty"` -} - -func (tx *rpcTransaction) UnmarshalJSON(msg []byte) error { - if err := json.Unmarshal(msg, &tx.tx); err != nil { - return err - } - return json.Unmarshal(msg, &tx.txExtraInfo) -} - -// TransactionByHash returns the transaction with the given hash. -func (ec *Client) TransactionByHash(ctx context.Context, hash common.Hash) (tx *ktypes.Transaction, err error) { - var raw *ktypes.Transaction - err = ec.c.CallContext(ctx, &raw, "tx_getTransaction", hash) - if err != nil { - return nil, err - } else if raw == nil { - return nil, kardia.NotFound - } - return raw, nil -} - -// TransactionSender returns the sender address of the given transaction. The transaction -// must be known to the remote node and included in the blockchain at the given block and -// index. The sender is the one derived by the protocol at the time of inclusion. -// -// There is a fast-path for transactions retrieved by TransactionByHash and -// TransactionInBlock. Getting their sender address can be done without an RPC interaction. -func (ec *Client) TransactionSender(ctx context.Context, tx *types.Transaction, block common.Hash, index uint) (common.Address, error) { - // Try to load the address from the cache. - sender, err := types.Sender(&senderFromServer{blockhash: block}, tx) - if err == nil { - return sender, nil - } - var meta struct { - Hash common.Hash - From common.Address - } - if err = ec.c.CallContext(ctx, &meta, "kai_getTransactionByBlockHashAndIndex", block, hexutil.Uint64(index)); err != nil { - return common.Address{}, err - } - if meta.Hash == (common.Hash{}) || meta.Hash != tx.Hash() { - return common.Address{}, errors.New("wrong inclusion block/index") - } - return meta.From, nil -} - -// TransactionCount returns the total number of transactions in the given block. -func (ec *Client) TransactionCount(ctx context.Context, blockHash common.Hash) (uint, error) { - var num hexutil.Uint - err := ec.c.CallContext(ctx, &num, "kai_getBlockTransactionCountByHash", blockHash) - return uint(num), err -} - -// TransactionCount returns the total number of transactions in the given block. -func (ec *Client) BlockNumber(ctx context.Context) (uint, error) { - var num hexutil.Uint - err := ec.c.CallContext(ctx, &num, "kai_blockNumber") - return uint(num), err -} - -// TransactionInBlock returns a single transaction at index in the given block. -func (ec *Client) TransactionInBlock(ctx context.Context, blockHash common.Hash, index uint) (*types.Transaction, error) { - var json *rpcTransaction - err := ec.c.CallContext(ctx, &json, "kai_getTransactionByBlockHashAndIndex", blockHash, hexutil.Uint64(index)) - if err != nil { - return nil, err - } - if json == nil { - return nil, ethereum.NotFound - } else if _, r, _ := json.tx.RawSignatureValues(); r == nil { - return nil, fmt.Errorf("server returned transaction without signature") - } - if json.From != nil && json.BlockHash != nil { - setSenderFromServer(json.tx, *json.From, *json.BlockHash) - } - return json.tx, err -} - -// TransactionReceipt returns the receipt of a transaction by transaction hash. -// Note that the receipt is not available for pending transactions. -func (ec *Client) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) { - var r *types.Receipt - err := ec.c.CallContext(ctx, &r, "tx_getTransactionReceipt", txHash) - if err == nil { - if r == nil { - return nil, ethereum.NotFound - } - } - return r, err -} - -func toBlockNumArg(number *big.Int) string { - if number == nil { - return "latest" - } - pending := big.NewInt(-1) - if number.Cmp(pending) == 0 { - return "pending" - } - return number.String() -} - -type rpcProgress struct { - StartingBlock hexutil.Uint64 - CurrentBlock hexutil.Uint64 - HighestBlock hexutil.Uint64 - PulledStates hexutil.Uint64 - KnownStates hexutil.Uint64 -} - -// SyncProgress retrieves the current progress of the sync algorithm. If there's -// no sync currently running, it returns nil. -func (ec *Client) SyncProgress(ctx context.Context) (*ethereum.SyncProgress, error) { - var raw json.RawMessage - if err := ec.c.CallContext(ctx, &raw, "kai_syncing"); err != nil { - return nil, err - } - // Handle the possible response types - var syncing bool - if err := json.Unmarshal(raw, &syncing); err == nil { - return nil, nil // Not syncing (always false) - } - var progress *rpcProgress - if err := json.Unmarshal(raw, &progress); err != nil { - return nil, err - } - return ðereum.SyncProgress{ - StartingBlock: uint64(progress.StartingBlock), - CurrentBlock: uint64(progress.CurrentBlock), - HighestBlock: uint64(progress.HighestBlock), - PulledStates: uint64(progress.PulledStates), - KnownStates: uint64(progress.KnownStates), - }, nil -} - -// SubscribeNewHead subscribes to notifications about the current blockchain head -// on the given channel. -func (ec *Client) SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error) { - return ec.c.EthSubscribe(ctx, ch, "newHeads") -} - -// State Access - -// NetworkID returns the network ID (also known as the chain ID) for this chain. -func (ec *Client) NetworkID(ctx context.Context) (*big.Int, error) { - version := new(big.Int) - var ver string - if err := ec.c.CallContext(ctx, &ver, "net_version"); err != nil { - return nil, err - } - if _, ok := version.SetString(ver, 10); !ok { - return nil, fmt.Errorf("invalid net_version result %q", ver) - } - return version, nil -} - -// BalanceAt returns the wei balance of the given account. -// The block number can be nil, in which case the balance is taken from the latest known block. -func (ec *Client) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error) { - var result hexutil.Big - err := ec.c.CallContext(ctx, &result, "kai_getBalance", account, toBlockNumArg(blockNumber)) - return (*big.Int)(&result), err -} - -// StorageAt returns the value of key in the contract storage of the given account. -// The block number can be nil, in which case the value is taken from the latest known block. -func (ec *Client) StorageAt(ctx context.Context, account common.Address, key common.Hash, blockNumber *big.Int) ([]byte, error) { - var result hexutil.Bytes - err := ec.c.CallContext(ctx, &result, "kai_getStorageAt", account, key, toBlockNumArg(blockNumber)) - return result, err -} - -// CodeAt returns the contract code of the given account. -// The block number can be nil, in which case the code is taken from the latest known block. -func (ec *Client) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error) { - var result hexutil.Bytes - err := ec.c.CallContext(ctx, &result, "kai_getCode", account, toBlockNumArg(blockNumber)) - return result, err -} - -// NonceAt returns the account nonce of the given account. -// The block number can be nil, in which case the nonce is taken from the latest known block. -func (ec *Client) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error) { - var result hexutil.Uint64 - err := ec.c.CallContext(ctx, &result, "account_nonceAtHeight", account, toBlockNumArg(blockNumber)) - return uint64(result), err -} - -// Filters - -// FilterLogs executes a filter query. -func (ec *Client) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error) { - var result []types.Log - arg, err := toFilterArg(q) - if err != nil { - return nil, err - } - err = ec.c.CallContext(ctx, &result, "kai_getLogs", arg) - return result, err -} - -// SubscribeFilterLogs subscribes to the results of a streaming filter query. -func (ec *Client) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) { - arg, err := toFilterArg(q) - if err != nil { - return nil, err - } - return ec.c.EthSubscribe(ctx, ch, "logs", arg) -} - -func toFilterArg(q ethereum.FilterQuery) (interface{}, error) { - arg := map[string]interface{}{ - "address": q.Addresses, - "topics": q.Topics, - } - if q.BlockHash != nil { - arg["blockHash"] = *q.BlockHash - if q.FromBlock != nil || q.ToBlock != nil { - return nil, fmt.Errorf("cannot specify both BlockHash and FromBlock/ToBlock") - } - } else { - if q.FromBlock == nil { - arg["fromBlock"] = "0x0" - } else { - arg["fromBlock"] = toBlockNumArg(q.FromBlock) - } - arg["toBlock"] = toBlockNumArg(q.ToBlock) - } - return arg, nil -} - -type KaiHeader struct { - Header *ktypes.Header - Commit *ktypes.Commit - ValidatorSet *ktypes.ValidatorSet -} - -func (ec *Client) FullHeaderByNumber(ctx context.Context, number *big.Int) (*KaiHeader, error) { - header, err := ec.HeaderByNumber(ctx, number) - if err != nil { - return nil, err - } - validators, err := ec.GetValidators(ctx, number) - if err != nil { - return nil, err - } - - commit, err := ec.GetCommit(ctx, number.Sub(number, big.NewInt(1))) - if err != nil { - return nil, err - } - return &KaiHeader{ - Header: header, - ValidatorSet: validators, - Commit: commit, - }, nil -} - -// Pending State - -// PendingBalanceAt returns the wei balance of the given account in the pending state. -func (ec *Client) PendingBalanceAt(ctx context.Context, account common.Address) (*big.Int, error) { - var result hexutil.Big - err := ec.c.CallContext(ctx, &result, "kai_getBalance", account, "pending") - return (*big.Int)(&result), err -} - -// PendingStorageAt returns the value of key in the contract storage of the given account in the pending state. -func (ec *Client) PendingStorageAt(ctx context.Context, account common.Address, key common.Hash) ([]byte, error) { - var result hexutil.Bytes - err := ec.c.CallContext(ctx, &result, "kai_getStorageAt", account, key, "pending") - return result, err -} - -// PendingCodeAt returns the contract code of the given account in the pending state. -func (ec *Client) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error) { - var result hexutil.Bytes - err := ec.c.CallContext(ctx, &result, "kai_getCode", account, "pending") - return result, err -} - -// PendingNonceAt returns the account nonce of the given account in the pending state. -// This is the nonce that should be used for the next transaction. -func (ec *Client) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) { - var result uint64 - err := ec.c.CallContext(ctx, &result, "account_nonceAtHeight", account, "pending") - if err != nil { - return 0, err - } - return result, err -} - -// PendingTransactionCount returns the total number of transactions in the pending state. -func (ec *Client) PendingTransactionCount(ctx context.Context) (uint, error) { - var num hexutil.Uint - err := ec.c.CallContext(ctx, &num, "kai_getBlockTransactionCountByNumber", "pending") - return uint(num), err -} - -// TODO: SubscribePendingTransactions (needs server side) - -// Contract Calling - -// CallContract executes a message call transaction, which is directly executed in the VM -// of the node, but never mined into the blockchain. -// -// blockNumber selects the block height at which the call runs. It can be nil, in which -// case the code is taken from the latest known block. Note that state from very old -// blocks might not be available. -func (ec *Client) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) { - var hex hexutil.Bytes - err := ec.c.CallContext(ctx, &hex, "kai_kardiaCall", toCallArg(msg), toBlockNumArg(blockNumber)) - if err != nil { - return nil, err - } - return hex, nil -} - -// PendingCallContract executes a message call transaction using the EVM. -// The state seen by the contract call is the pending state. -func (ec *Client) PendingCallContract(ctx context.Context, msg ethereum.CallMsg) ([]byte, error) { - var hex hexutil.Bytes - err := ec.c.CallContext(ctx, &hex, "kai_call", toCallArg(msg), "pending") - if err != nil { - return nil, err - } - return hex, nil -} - -// SuggestGasPrice retrieves the currently suggested gas price to allow a timely -// execution of a transaction. -func (ec *Client) SuggestGasPrice(ctx context.Context) (*big.Int, error) { - var gasPriceStr string - if err := ec.c.CallContext(ctx, &gasPriceStr, "kai_gasPrice"); err != nil { - return nil, err - } - gasPrice, err := strconv.Atoi(gasPriceStr) - if err != nil { - return nil, err - } - return big.NewInt(int64(gasPrice)), nil -} - -// EstimateGas tries to estimate the gas needed to execute a specific transaction based on -// the current pending state of the backend blockchain. There is no guarantee that this is -// the true gas limit requirement as other transactions may be added or removed by miners, -// but it should provide a basis for setting a reasonable default. -func (ec *Client) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error) { - var hex hexutil.Uint64 - err := ec.c.CallContext(ctx, &hex, "kai_estimateGas", toCallArg(msg)) - if err != nil { - return 0, err - } - return uint64(hex), nil -} - -// SendTransaction injects a signed transaction into the pending pool for execution. -// -// If the transaction was a contract creation use the TransactionReceipt method to get the -// contract address after the transaction has been mined. -func (ec *Client) SendTransaction(ctx context.Context, tx *types.Transaction) error { - data, err := rlp.EncodeToBytes(tx) - if err != nil { - return err - } - return ec.c.CallContext(ctx, nil, "tx_sendRawTransaction", hexutil.Encode(data)) -} - -func toCallArg(msg ethereum.CallMsg) interface{} { - arg := map[string]interface{}{ - "from": msg.From, - "to": msg.To, - } - if len(msg.Data) > 0 { - arg["data"] = hexutil.Bytes(msg.Data) - } - if msg.Value != nil { - arg["value"] = (*hexutil.Big)(msg.Value) - } - if msg.Gas != 0 { - arg["gas"] = hexutil.Uint64(msg.Gas) - } - if msg.GasPrice != nil { - arg["gasPrice"] = (*hexutil.Big)(msg.GasPrice) - } - return arg -} - -func (ec *Client) WaitTransactionConfirm(hash common.Hash) { - ctx := context.Background() - start := time.Now() - for { - time.Sleep(time.Millisecond * 100) - if time.Now().After(start.Add(time.Second * 10)) { - log.Errorf("WaitTransactionConfirm max wait time exceeded, quit") - return - } - _, err := ec.TransactionByHash(context.Background(), hash) - if err != nil { - log.Errorf("failed to call TransactionByHash: %v hash:%s", err, hash.String()) - continue - } - - receipt, err := ec.TransactionReceipt(ctx, hash) - if err != nil { - log.Errorf("failed to call TransactionReceipt: %v hash:%s", err, hash.String()) - continue - } - if receipt == nil { - continue - } else { - break - } - } - -} diff --git a/chains/kai/client/signer.go b/chains/kai/client/signer.go deleted file mode 100644 index fdf6288..0000000 --- a/chains/kai/client/signer.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2017 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package client - -import ( - "errors" - "math/big" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" -) - -// senderFromServer is a types.Signer that remembers the sender address returned by the RPC -// server. It is stored in the transaction's sender address cache to avoid an additional -// request in TransactionSender. -type senderFromServer struct { - addr common.Address - blockhash common.Hash -} - -var errNotCached = errors.New("sender not cached") - -func setSenderFromServer(tx *types.Transaction, addr common.Address, block common.Hash) { - // Use types.Sender for side-effect to store our signer into the cache. - types.Sender(&senderFromServer{addr, block}, tx) -} - -func (s *senderFromServer) Equal(other types.Signer) bool { - os, ok := other.(*senderFromServer) - return ok && os.blockhash == s.blockhash -} - -func (s *senderFromServer) Sender(tx *types.Transaction) (common.Address, error) { - if s.blockhash == (common.Hash{}) { - return common.Address{}, errNotCached - } - return s.addr, nil -} - -func (s *senderFromServer) Hash(tx *types.Transaction) common.Hash { - panic("can't sign with senderFromServer") -} -func (s *senderFromServer) SignatureValues(tx *types.Transaction, sig []byte) (R, S, V *big.Int, err error) { - panic("can't sign with senderFromServer") -} diff --git a/chains/kai/invoker.go b/chains/kai/invoker.go index fab2879..2c7d587 100644 --- a/chains/kai/invoker.go +++ b/chains/kai/invoker.go @@ -22,8 +22,8 @@ import ( "github.com/polynetwork/eth-contracts/go_abi/oep4_abi" "github.com/polynetwork/eth-contracts/go_abi/ongx_abi" "github.com/polynetwork/eth-contracts/go_abi/ontx_abi" + "github.com/polynetwork/kai-relayer/kaiclient" "github.com/polynetwork/poly-io-test/chains/eth" - "github.com/polynetwork/poly-io-test/chains/kai/client" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" ) @@ -37,7 +37,7 @@ type Invoker struct { PrivateKey *ecdsa.PrivateKey ChainID uint64 TConfiguration *config.TestConfig - client *client.Client + client *kaiclient.Client NM *NonceManager signer *signer } @@ -47,7 +47,7 @@ func NewInvoker(chainID uint64) *Invoker { instance := &Invoker{} instance.ChainID = chainID instance.TConfiguration = config.DefConfig - client, err := client.Dial(config.DefConfig.KaiUrl) + client, err := kaiclient.Dial(config.DefConfig.KaiUrl) if err != nil { panic(err) } @@ -317,7 +317,7 @@ func (i *Invoker) TransferOwnershipForECCM(eccmAddrHex, ownershipAddressHex stri return tx, nil } -func (i *Invoker) Client() *client.Client { +func (i *Invoker) Client() *kaiclient.Client { return i.client } diff --git a/chains/kai/invoker_test.go b/chains/kai/invoker_test.go index 0fc6c7a..81fd4e2 100644 --- a/chains/kai/invoker_test.go +++ b/chains/kai/invoker_test.go @@ -1 +1,7 @@ package kai + +import "testing" + +func TestInvoker(t *testing.T) { + +} diff --git a/chains/kai/nonce_manager.go b/chains/kai/nonce_manager.go index be1b551..8b0461c 100644 --- a/chains/kai/nonce_manager.go +++ b/chains/kai/nonce_manager.go @@ -22,7 +22,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/polynetwork/poly-io-test/chains/kai/client" + "github.com/polynetwork/kai-relayer/kaiclient" "github.com/polynetwork/poly-io-test/log" ) @@ -30,11 +30,11 @@ const ClearNonceInterval = 10 * time.Minute type NonceManager struct { addressNonce map[common.Address]uint64 - ethClient *client.Client + ethClient *kaiclient.Client lock sync.RWMutex } -func NewNonceManager(ethClient *client.Client) *NonceManager { +func NewNonceManager(ethClient *kaiclient.Client) *NonceManager { nonceManager := &NonceManager{ addressNonce: make(map[common.Address]uint64), ethClient: ethClient, diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 07b3485..2f2cb37 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -65,10 +65,10 @@ import ( "github.com/polynetwork/eth-contracts/go_abi/eccm_abi" poly_go_sdk "github.com/polynetwork/poly-go-sdk" + "github.com/polynetwork/kai-relayer/kaiclient" "github.com/polynetwork/poly-io-test/chains/btc" cosmos2 "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" - "github.com/polynetwork/poly-io-test/chains/kai/client" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" @@ -1298,7 +1298,7 @@ func SyncNeoGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Accou } func SyncKaiGenesisHeader(poly *poly_go_sdk.PolySdk, accArr []*poly_go_sdk.Account) { - client, err := client.Dial(config.DefConfig.KaiUrl) + client, err := kaiclient.Dial(config.DefConfig.KaiUrl) if err != nil { panic(err) } diff --git a/go.mod b/go.mod index 99b8007..129c3eb 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/cespare/cp v1.1.1 // indirect github.com/cosmos/cosmos-sdk v0.39.2 github.com/deckarep/golang-set v1.7.1 // indirect - github.com/ethereum/go-ethereum v1.9.15 + github.com/ethereum/go-ethereum v1.9.18 github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect github.com/go-ole/go-ole v1.2.4 // indirect github.com/golang/mock v1.5.0 // indirect @@ -20,7 +20,7 @@ require ( github.com/gorilla/mux v1.8.0 // indirect github.com/joeqian10/neo-gogogo v1.1.0 github.com/joeqian10/neo3-gogogo v0.3.2 - github.com/kardiachain/go-kardia v1.1.1-0.20210518073513-843096e91762 + github.com/kardiachain/go-kardia v1.1.1-0.20210518091640-d13a5b7f7c4c github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.7 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect @@ -30,6 +30,7 @@ require ( github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666 github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759 github.com/polynetwork/eth-contracts v0.0.0-20200903021827-c9212e419943 + github.com/polynetwork/kai-relayer v0.0.0 github.com/polynetwork/poly v0.0.0-20210112063446-24e3d053e9d6 github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493 github.com/rjeczalik/notify v0.9.2 // indirect @@ -54,3 +55,5 @@ replace github.com/polynetwork/poly => github.com/joeqian10/poly v0.0.0-20210513 replace github.com/polynetwork/poly-go-sdk => github.com/joeqian10/poly-go-sdk v0.0.0-20210517072349-71002ebfdf13 //replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 + +replace github.com/polynetwork/kai-relayer => github.com/dogecoindev/kai-relayer v0.0.0-20210527043015-bc1790a88bc5 diff --git a/go.sum b/go.sum index 2b42d17..bb0b3fe 100644 --- a/go.sum +++ b/go.sum @@ -4,31 +4,47 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go/bigquery v1.0.1 h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0 h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0 h1:9x7Bx0A9R5/M9jibeJeZWqjeVEIxYW9fZYqB9a70/bY= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1 h1:W9tAK3E57P75u0XLLR82LZyw8VpAnhmyTOxW9qzmyj8= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0 h1:VV2nUM3wwLLGh9lSABFgZMjInyUbJeaRSE64WuAIQ+4= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/99designs/keyring v1.1.3/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= +github.com/Azure/azure-pipeline-go v0.2.2 h1:6oiIS9yaG6XCCzhgAgKFfIWyo4LLCiDhZot6ltoThhY= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +github.com/Azure/azure-storage-blob-go v0.7.0 h1:MuueVOYkufCxJw5YZzF842DY2MBsp+hLuh2apKY0mck= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0 h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= 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/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 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= @@ -37,14 +53,18 @@ github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e h1:ahyvB3q25Yn github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:kGUqhHd//musdITWjFvNTHn90WG9bMLBEPQZ17Cmlpw= github.com/JohnCGriffin/overflow v0.0.0-20170615021017-4d914c927216 h1:2ZboyJ8vl75fGesnG9NpMTD2DyQI3FzMXy4x752rGF0= github.com/JohnCGriffin/overflow v0.0.0-20170615021017-4d914c927216/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI= github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= +github.com/OpenBazaar/jsonpb v0.0.0-20171123000858-37d32ddf4eef h1:+aqKrHtCJTRp8ziyrjfHbTF5puPQZfgRt65+iM7FD2w= github.com/OpenBazaar/jsonpb v0.0.0-20171123000858-37d32ddf4eef/go.mod h1:55mCznBcN9WQgrtgaAkv+p2LxeW/tQRdidyyE9D0I5k= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/sarama v1.26.1 h1:3jnfWKD7gVwbB1KSy/lE0szA9duPuSFLViK0o/d3DgA= github.com/Shopify/sarama v1.26.1/go.mod h1:NbSGBSSndYaIhRcBtY9V0U7AyH+x71bG668AuWys/yU= +github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= @@ -59,36 +79,51 @@ github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3 github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210329093354-1b8e0a7a2e25/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae h1:4g7IE+z/CJRf67iFnQlBnZ3JBRmvbrlfcQ3EHJ2saC4= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= +github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/antlr/antlr4 v0.0.0-20190819145818-b43a4c3a8015 h1:StuiJFxQUsxSCzcby6NFZRdEhPkXD5vxN7TZ4MD6T84= github.com/antlr/antlr4 v0.0.0-20190819145818-b43a4c3a8015/go.mod h1:T7PbCXFs94rrTttyxjbyT5+/1V8T2TYDejxUfHJjw1Y= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/aristanetworks/fsnotify v1.4.2 h1:it2ydpY6k0aXB7qjb4vGhOYOL6YDC/sr8vhqwokFQwQ= github.com/aristanetworks/fsnotify v1.4.2/go.mod h1:D/rtu7LpjYM8tRJphJ0hUBYpjai8SfX+aSNsWDTq/Ks= +github.com/aristanetworks/glog v0.0.0-20191112221043-67e8567f59f3 h1:Bmjk+DjIi3tTAU0wxGaFbfjGUqlxxSXARq9A96Kgoos= github.com/aristanetworks/glog v0.0.0-20191112221043-67e8567f59f3/go.mod h1:KASm+qXFKs/xjSoWn30NrWBBvdTTQq+UjkhjEJHfSFA= -github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847 h1:rtI0fD4oG/8eVokGVPYJEW1F88p1ZNgXiEIs9thEE4A= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/aristanetworks/goarista v0.0.0-20190712234253-ed1100a1c015/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/aristanetworks/goarista v0.0.0-20200331225509-2cc472e8fbd6 h1:Pcu4aKyFfpH0aXLnYJrsTjdRvXNY4SbODsb0pMTZxhA= github.com/aristanetworks/goarista v0.0.0-20200331225509-2cc472e8fbd6/go.mod h1:QZe5Yh80Hp1b6JxQdpfSEEe8X7hTyTEZSosSrFf/oJE= +github.com/aristanetworks/splunk-hec-go v0.3.3 h1:O7zlcm4ve7JvqTyEK3vSBh1LngLezraqcxv8Ya6tQFY= github.com/aristanetworks/splunk-hec-go v0.3.3/go.mod h1:1VHO9r17b0K7WmOlLb9nTk/2YanvOEnLMUgsFrxBROc= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3 h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.27.0 h1:0xphMHGMLBrPMfxR2AmVjZKcMEESEgWF8Kru94BNByk= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0 h1:qZ+woO4SamnH/eEbjM2IDLhRNwIwND/RQyVlBLp3Jqg= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d h1:1aAija9gr0Hyv4KfQcRcwlmFIrhkDmIj2dz5bkg/s/8= github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d/go.mod h1:icNx/6QdFblhsEjZehARqbNumymUT/ydwlLojFdv7Sk= @@ -98,12 +133,15 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c h1:+0HFd5KSZ/mm3JmhmrDukiId5iR6w4+BdFtfSy4yWIc= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= 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.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= -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= @@ -122,12 +160,16 @@ github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEh github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE= github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/casbin/casbin/v2 v2.1.2 h1:bTwon/ECRx9dwBy2ewRVr5OiqjeXSGiTUY74sDPQi/g= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= @@ -136,22 +178,33 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.0.1-0.20190104013014-3767db7a7e18/go.mod h1:HD5P3vAIAh+Y2GAxg0PrPN1P8WkepXGpjbUPDHJqqKM= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec h1:EdRZT3IeKQmfCSrgo8SZ8V3MEnskuJP0wCYNpe+aiXo= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9 h1:J82+/8rub3qSy0HxEnoYD8cs+HDlHWYrqYXe2Vqxluk= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e h1:0XBUw73chJ1VYSsfvcPvVT7auykAJce9FpRr10L6Qhw= github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:P13beTBKr5Q18lJe1rIoLUqjM+CB1zYrRg44ZqGuQSA= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f h1:WBZRG4aNOuI15bLRrCgN8fCq8E5Xuty6jGbmSNEvSsU= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/cosmos-sdk v0.38.4/go.mod h1:rzWOofbKfRt3wxiylmYWEFHnxxGj0coyqgWl2I9obAw= github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= @@ -167,6 +220,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= @@ -176,42 +230,61 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ= github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/decred/dcrd/lru v1.0.0 h1:Kbsb1SFDsIlaupWPwsPp+dkxiBY1frcS07PCPgotKz8= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= 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 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dlclark/regexp2 v1.2.0 h1:8sAhBGEM0dRWogWqWyQeIJnxjWO6oIjl8FKqREDsGfk= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v17.12.0-ce-rc1.0.20200531234253-77e06fda0c94+incompatible h1:PmGHHCZ43l6h8aZIi+Xa+z1SWe4dFImd5EK3TNp1jlo= github.com/docker/docker v17.12.0-ce-rc1.0.20200531234253-77e06fda0c94+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/dogecoindev/kai-relayer v0.0.0-20210527043015-bc1790a88bc5 h1:bBW/2asn9hj3izR+zepKy+5cvhs+L0mDF97SdWUqoUM= +github.com/dogecoindev/kai-relayer v0.0.0-20210527043015-bc1790a88bc5/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87 h1:OMbqMXf9OAXzH1dDH82mQMrddBE8LIIwDtxeK4wE1/A= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/ebuchman/fail-test v0.0.0-20170303061230-95f809107225 h1:7TXT8REobzZUI9GzsRtAD29efTY/HgKRU2xYnV1zlaM= github.com/ebuchman/fail-test v0.0.0-20170303061230-95f809107225/go.mod h1:OFTBW14UVJS8P0shpX7OdPY0qpkTdA7AWGYFacMC2D8= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa h1:XKAhUk/dtp+CV0VO6mhG2V7jA9vbcGcnYF/Ay9NjZrY= github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4 h1:rEvIZUSZ3fx39WIi3JkQqQBitGwpELBIYWeBVh6wn+E= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/etcd-io/bbolt v1.3.3 h1:gSJmxrs37LgTqR/oyJBWok6k6SvXEUerFTbltIhXkBM= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/go-ethereum v1.9.13/go.mod h1:qwN9d1GLyDh0N7Ab8bMGd0H9knaji2jOBm2RrMGjXls= github.com/ethereum/go-ethereum v1.9.15 h1:wrWl+QrtutRUJ9LZXdUqBoGoo2b1tOCYRDrAOQhCY3A= github.com/ethereum/go-ethereum v1.9.15/go.mod h1:slT8bPPRhXsyNTwHQxrOnjuTZ1sDXRajW11EkJ84QJ0= +github.com/ethereum/go-ethereum v1.9.18 h1:+vzvufVD7+OfQa07IJP20Z7AGZsJaw0M6JIA/WQcqy8= +github.com/ethereum/go-ethereum v1.9.18/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= @@ -219,21 +292,25 @@ github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqL github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/set v0.2.1 h1:nn2CaJyknWE/6txyUDGwysr3G5QC6xWB/PtVjPBbeaA= github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= -github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc h1:jtW8jbpkO4YirRSyepBOH8E+2HEw6/hKkBvFPwhUN8c= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.7.2 h1:2QxQoC1TS09S7fhCPsrvqYdvP1H5M1P1ih5ABm3BTYk= github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/garyburd/redigo v1.6.0 h1:0VruCpn7yAIIu7pWVClQC8wxCJEcG3nyzpMSHKi1PQc= github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= @@ -248,9 +325,13 @@ github.com/gcash/bchutil v0.0.0-20191012211144-98e73ec336ba/go.mod h1:nUIrcbbtEQ github.com/gcash/bchutil v0.0.0-20200229194731-128fc9884722/go.mod h1:wB++2ZcHUvGLN1OgO9swBmJK1vmyshJLW9SNS+apXwc= github.com/gcash/bchutil v0.0.0-20200506001747-c2894cd54b33 h1:HNO6rKAfeYm6hE+0KXMfRomDZ8cQNlBmWirH8PSk9MY= github.com/gcash/bchutil v0.0.0-20200506001747-c2894cd54b33/go.mod h1:wB++2ZcHUvGLN1OgO9swBmJK1vmyshJLW9SNS+apXwc= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -260,35 +341,41 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= +github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-sourcemap/sourcemap v2.1.2+incompatible h1:0b/xya7BKGhXuqFESKM4oIiRo9WOt2ebz7KxfreD6ug= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/gogo/googleapis v1.1.0 h1:kFkMAZBNAn4j7K0GiZr8cRYzejq68VbheufiV3YuyFI= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129 h1:tT8iWCYw4uOem71yYA3htfH+LNopJvcqZQshm56G5L4= github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.5.0 h1:jlYHihg//f7RRwuPfptm04yp4s7O6Kw8EZiVYIGcH0g= @@ -306,19 +393,20 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU 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/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/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.2 h1:aeE13tS0IiQgFjYdoL8qN3K1N2bXXtI6Vi51/y7BpMw= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/cel-go v0.3.2 h1:72Lj/nrfpWSJkuXdeEGB/7jfdwVFtV8kPJSL2Mt9rog= github.com/google/cel-go v0.3.2/go.mod h1:DoRSdzaJzNiP1lVuWhp/RjSnHLDQr/aNPlyqSBasBqA= +github.com/google/cel-spec v0.3.0 h1:Dc+D/KBBmCJG5LJen9EBAzxkPsSnw2reo2LhMY1NLdI= github.com/google/cel-spec v0.3.0/go.mod h1:MjQm800JAGhOZXI7vatnVpmIaFTR6L8FHcKk+piiKpI= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -330,17 +418,22 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f h1:Jnx61latede7zDD3DiiP4gmNz33uK0U5HDUaF0a/HVQ= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2 h1:0QniY0USkHQ1RGCLfKxeNHK9bkDHGRYGNDFBCS+YARg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= @@ -355,13 +448,19 @@ github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qH github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gosuri/uilive v0.0.3 h1:kvo6aB3pez9Wbudij8srWo4iY6SFTTxTKOkb+uRCE8I= github.com/gosuri/uilive v0.0.3/go.mod h1:qkLSc0A5EXSP6B04TrN4oQoxqFI7A8XvoXSlJi8cwk8= +github.com/gosuri/uiprogress v0.0.1 h1:0kpv/XY/qTmFWl/SkaJykZXrBBzwwadmW8fRb7RJSxw= github.com/gosuri/uiprogress v0.0.1/go.mod h1:C1RTYn4Sc7iEyf6j8ft5dyoZ4212h8G1ol9QQluh5+0= +github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277 h1:E0whKxgp2ojts0FDgUA8dl62bmH0LxKanMoBr6MDTDM= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= @@ -371,21 +470,34 @@ github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/b github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0 h1:HXNYlRkkM/t+Y/Yhxtwcy02dlYwIaoxzvxPnS+cqy78= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0 h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -395,33 +507,47 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/holiman/uint256 v1.1.1 h1:4JywC80b+/hSfljFlEBLHrrh+CIONLDz9NuFl0af4Mw= github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c h1:aY2hhxLhjEAbfXOx2nRJxCXezC6CO2V/yN+OCr1srtk= github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0 h1:0U6+BtN6LhaYuTnIJq4Wyq5cpn6O2kWrxAtcqBmYY6w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= github.com/huin/goupnp v1.0.0 h1:wg75sLpL6DZqwHQN6E1Cfk6mtfzS45z8OV+ic+DtHRo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= +github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150 h1:vlNjIqmUZ9CMAWsbURYl3a6wZbw7q5RHVvlXTNS/Bs8= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/improbable-eng/grpc-web v0.9.1/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= +github.com/improbable-eng/grpc-web v0.12.0 h1:GlCS+lMZzIkfouf7CNqY+qqpowdKuJLSLLcKVfM1oLc= github.com/improbable-eng/grpc-web v0.12.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883 h1:FSeK4fZCo8u40n2JMnyAsd6x7+SbvoOMHvQOU/n10P4= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/itchyny/base58-go v0.1.0 h1:zF5spLDo956exUAD17o+7GamZTRkXOZlqJjRciZwd1I= github.com/itchyny/base58-go v0.1.0/go.mod h1:SrMWPE3DFuJJp1M/RUhu4fccp/y9AlB8AL3o3duPToU= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 h1:6OvNmYgJyexcZ3pYbTI9jWx5tHo1Dee/tWbLMfPe2TA= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v0.0.0-20181221193153-c0795c8afcf4/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -431,67 +557,88 @@ github.com/joeqian10/neo3-gogogo v0.3.2 h1:xlx1XxlCJnz2bI3Q1Z7dTfNDZpOqwvH1njqlO github.com/joeqian10/neo3-gogogo v0.3.2/go.mod h1:yvYQyEha3An0uYFhzR9asMU/O9HyeYy6RApRnLGPEtM= github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd h1:F+zXxTbFpS1b9kXPErS7S89zKJIvvUIxxdbSdc8xT+c= github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd/go.mod h1:oe6B9zngqA74VgWvsgZt4kdDoeyakUIeBqOEzHS4pTM= -github.com/joeqian10/poly-go-sdk v0.0.0-20210517032637-3bc9e7c4f5c9 h1:nfk3tLOMj6Mdaa3u93pF8lqUUEopbVTWl3V5HGAZbPQ= -github.com/joeqian10/poly-go-sdk v0.0.0-20210517032637-3bc9e7c4f5c9/go.mod h1:xplioW9d5l+IrchNFaMgz1QmzL5KeZmW3qzQDb2iQdA= github.com/joeqian10/poly-go-sdk v0.0.0-20210517072349-71002ebfdf13 h1:gSEFDPtjAodPsyDO8dLe7LR1q56xnlONqYHBCV5UnkM= github.com/joeqian10/poly-go-sdk v0.0.0-20210517072349-71002ebfdf13/go.mod h1:CBZe/O7+KWy/IWNOmJPuNxaBTtrSzsMJXuBafxPzYUc= +github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356 h1:I/yrLt2WilKxlQKCM52clh5rGzTKpVctGT1lH4Dc8Jw= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kardiachain/go-kardia v1.1.1-0.20210518073513-843096e91762 h1:Jkua+KxKgB3unn8wcCfkylIn8PVcrzVGThxHcrijkbA= github.com/kardiachain/go-kardia v1.1.1-0.20210518073513-843096e91762/go.mod h1:dIcZ5VO21q0HAjL9LiHqJ8bKMDkoE3T/4H0vy8urggs= +github.com/kardiachain/go-kardia v1.1.1-0.20210518091640-d13a5b7f7c4c h1:xjhQZf1wiA+ebCz/oNZ7xaZZY/mi/FNoNnMP3iSV/GQ= +github.com/kardiachain/go-kardia v1.1.1-0.20210518091640-d13a5b7f7c4c/go.mod h1:dIcZ5VO21q0HAjL9LiHqJ8bKMDkoE3T/4H0vy8urggs= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/kkdai/bstream v1.0.0 h1:Se5gHwgp2VT2uHfDrkbbgbgEvV9cimLELwrPJctSjg8= github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= github.com/klauspost/compress v1.9.8/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.10.1 h1:a/QY0o9S6wCi0XhxaMX/QmusicNUqCqFugR6WKPOSoQ= github.com/klauspost/compress v1.10.1/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/cpuid v1.2.3 h1:CCtW0xUnWGVINKvE/WWOYKdsPV6mawAtvQuSl8guwQs= github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/reedsolomon v1.9.3 h1:N/VzgeMfHmLc+KHMD1UL/tNkfXAt8FnUqlgXGIduwAY= github.com/klauspost/reedsolomon v1.9.3/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 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= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743 h1:143Bb8f8DuGWck/xpNUOckBVYfFbBTnLevfRZ1aVVqo= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1 h1:vi1F1IQ8N7hNWytK9DpJsUfQhGuNSc19z330K6vl4zk= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13 h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.0 h1:v2XXALHHh6zHfYTJ+cSkwtyffnaOyR1MXaA91mTrb8o= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d h1:oNAwILwmgWKFpuU+dXvI6dl9jG2mAWAZLX3r9s0PPiw= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -506,44 +653,63 @@ github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/ github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/minio/highwayhash v1.0.0 h1:iMSDhgUILCr0TNm8LWlSjF8N0ZIj2qbO8WHp6Q/J2BA= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= +github.com/minio/highwayhash v1.0.1 h1:dZ6IIu8Z14VlC0VpfKofAhCy74wu/Qb5gcn52yWoz/0= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 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/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= 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 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2 h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3 h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= 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/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oklog/oklog v0.3.2 h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -551,20 +717,19 @@ github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c h1:1RHs3t github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b h1:UQDN12BzdWhXQL0t2QcRixHqAIG+JKNvQ20DhrIODtU= github.com/ontio/go-bip32 v0.0.0-20190520025953-d3cea6894a2b/go.mod h1:J0eVc7BEMmVVXbGv9PHoxjRSEwOwLr0qfzPk8Rdl5iw= github.com/ontio/ontology v1.10.0/go.mod h1:iok/imHJVQXi5/Yr88dcbrKBRHGdiota1ZC6qh6l6Rc= -github.com/ontio/ontology v1.11.0 h1:0T/hxFDHQqRcs1+yEdgaym5YIvGx5yebOsHYdKVWgHI= github.com/ontio/ontology v1.11.0/go.mod h1:Qw74bfTBlIQka+jQX4nXuWvyOYGGt368/V7XFxaf4tY= github.com/ontio/ontology v1.11.1-0.20200812075204-26cf1fa5dd47/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= github.com/ontio/ontology v1.11.1-0.20200817111815-fb3d61fdc12e/go.mod h1:aoLM6pLdjBLx2CwC/AUtxdHvLZzAVqYH/xehh6/sRP4= @@ -579,28 +744,40 @@ 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/openconfig/gnmi v0.0.0-20190823184014-89b2bf29312c h1:a380JP+B7xlMbEQOlha1buKhzBPXFqgFXplyWCEIGEY= github.com/openconfig/gnmi v0.0.0-20190823184014-89b2bf29312c/go.mod h1:t+O9It+LKzfOAhKTT5O0ehDix+MTqbtT0T9t+7zzOvc= +github.com/openconfig/reference v0.0.0-20190727015836-8dfd928c9696 h1:yHCGAHg2zMaW8olLrqEt3SAHGcEx2aJPEQWMRCyravY= github.com/openconfig/reference v0.0.0-20190727015836-8dfd928c9696/go.mod h1:ym2A+zigScwkSEb/cVQB0/ZMpU3rqiH6X7WRRsxgOGw= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6 h1:lNCW6THrCKBiJBpz8kbVGjC7MgdCGKwuvBgc7LoD6sw= github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= +github.com/pact-foundation/pact-go v1.0.4 h1:OYkFijGHoZAYbOIb1LWXrwKQbMMRUv1oQ89blD2Mh2Q= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= 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/pebbe/zmq4 v1.0.0 h1:D+MSmPpqkL5PSSmnh8g51ogirUCyemThuZzLW7Nrt78= github.com/pebbe/zmq4 v1.0.0/go.mod h1:7N4y5R18zBiu3l0vajMUWQgZyjv464prE8RCyBcmnZM= 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/performancecopilot/speed v3.0.0+incompatible h1:2WnRzIquHa5QxaJKShDkLM+sc0JPuwhXzK8OYOyt3Vg= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= @@ -608,11 +785,13 @@ github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.4.1+incompatible h1:mFe7ttWaflA46Mhqh+jUfjp2qTbPYxLB2/OyBppH9dg= github.com/pierrec/lz4 v2.4.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1 h1:F++O52m40owAmADcojzM+9gyjmMOY/T4oYJkgFDH8RE= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -621,6 +800,7 @@ github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666/go.mo github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759 h1:M0DV6MUVXOZtdQ94i8oYuSAX+ljzEe+mMqb2Llnm/oM= github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759/go.mod h1:VMBJZ8GSZeoWBntd/rWx2Rr5roRKofO7siP1qd6A6pY= github.com/polynetwork/poly-io-test v0.0.0-20200819093740-8cf514b07750/go.mod h1:Y/xz9uHdO0HPz0p+x0bZxNuo1ufVcln3dDjmchSUgso= +github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -629,7 +809,6 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.5.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.5.1 h1:bdHYieyGlH+6OLEk2YQha8THib30KP0/yD0YH9m6xcA= github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.8.0 h1:zvJNkoCFAnYFNC24FV8nW4JdRJ3GIFcLbg65lL/JDcw= @@ -646,7 +825,6 @@ github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.14.0 h1:RHRyE8UocrbjU+6UvRzwi6HjiDfxrrBU91TtbKzkGp4= @@ -655,18 +833,13 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.10 h1:QJQN3jYQhkamO4mhfUWqdDH2asK7ONOI9MTWjyAxNKM= github.com/prometheus/procfs v0.0.10/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/prometheus/tsdb v0.9.1 h1:IWaAmWkYlgG7/S4iw4IpAQt5Y35QaZM6/GsZ7GsjAuk= -github.com/prometheus/tsdb v0.9.1/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= github.com/rakyll/statik v0.1.6 h1:uICcfUXpgqtw2VopbIncslhAmE5hwc4g20TEyEENBNs= @@ -675,26 +848,32 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521 h1:3hxavr+IHMsQBrYUPQM5v0CgENFktkkbg1sfpgM3h20= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da h1:p3Vo3i64TCLY7gIfzeQaUJ+kppEO5WQG3cL8iE8tGHU= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.2.0 h1:lMqc+fUb7RrFS3gQLtoQsJ7/6TV/pAIFvBsqX73DK8Y= github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/scylladb/go-set v1.0.2 h1:SkvlMCKhP0wyyct6j+0IHJkBkSZL+TDzZ4E7f7BCcRE= github.com/scylladb/go-set v1.0.2/go.mod h1:DkpGd78rljTxKAnTDPFqXSGxvETQnJyuSOQwsHycqfs= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v2.20.5-0.20200531151128-663af789c085+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= @@ -704,18 +883,22 @@ 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.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= 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= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa h1:YJfZp12Z3AFhSBeXOlv4BO55RMwPn2NoQeDsrdWnBtY= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= +github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1 h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.0.1-0.20190317074736-539464a789e9 h1:5Cp3cVwpQP4aCQ6jx6dNLP3IarbYiuStmIzYu+BjQwY= 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.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -734,11 +917,9 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/spf13/viper v1.6.3 h1:pDDu1OyEDTKzpJwdq4TiuLyMsUgRa/BT5cn5O62NoHs= github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48 h1:ju5UTwk5Odtm4trrY+4Ca4RMj5OyXbmVeDAVad2T0Jw= github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= @@ -747,7 +928,9 @@ github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8 github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 h1:njlZPzLwU639dk2kqnCPPv+wNjq7Xb6EfUxe/oX0/NM= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271 h1:WhxRHzgeVGETMlmVfqhRn8RIeeNoPr2Czh33I4Zdccw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a h1:AhmOdSHeswKHBjhsLs/7+1voOxT+LLrSk/Nxvk35fug= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -757,19 +940,19 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= +github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 h1:89CEmDvlq/F7SJEOqkIdNDGJXrQIhuIx9D2DBXjavSU= github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161/go.mod h1:wM7WEvslTq+iOEAMDLSzhVuOt5BRZ05WirO+b09GHQU= +github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b h1:fj5tQ8acgNUr6O8LEplsxDhUIe2573iLkJc+PqnzZTI= github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b/go.mod h1:5XA7W9S6mni3h5uvOC75dA3m9CCCaS83lltmc0ukdi4= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= @@ -792,31 +975,43 @@ github.com/tendermint/tm-db v0.4.1/go.mod h1:JsJ6qzYkCGiGwm5GHl/H5GLI9XLb6qZX7PR github.com/tendermint/tm-db v0.5.0/go.mod h1:lSq7q5WRR/njf1LnhiZ/lIJHk2S8Y1Zyq5oP/3o9C2U= github.com/tendermint/tm-db v0.5.1 h1:H9HDq8UEA7Eeg13kdYckkgwwkQLBnJGgX4PgLJRhieY= github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= +github.com/tjfoc/gmsm v1.3.0 h1:i7c6Za/IlgBvnGxYpfD7L3TGuaS+v6oGcgq+J9/ecEA= github.com/tjfoc/gmsm v1.3.0/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2 h1:+t3w+KwLXO6154GNJY+qUtIxLTmFjfUmpguQT1OlOT8= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.4 h1:u7tSpNPPswAFymm8IehJhy4uJMlUuU/GmqSkvJ1InXA= github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 h1:1cngl9mPEoITZG8s8cVcUy5CeIBYhEESkOB7m6Gmkrk= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/xtaci/kcp-go v5.4.20+incompatible h1:TN1uey3Raw0sTz0Fg8GkfM0uH3YwzhnZWQ1bABv5xAg= github.com/xtaci/kcp-go v5.4.20+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE= +github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae h1:J0GxkO96kL4WF+AIT3M4mfUVinOCPgf2uUWYFUzN0sM= github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae/go.mod h1:gXtu8J62kEgmN++bm9BVICuT/e8yiLI2KFobd/TRFsE= github.com/ybbus/jsonrpc v2.1.2+incompatible h1:V4mkE9qhbDQ92/MLMIhlhMSbz8jNXdagC3xBR5NDwaQ= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1 h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= @@ -827,19 +1022,25 @@ github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1/go.mod h1:bslhAiUxakr go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0 h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0 h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -870,8 +1071,10 @@ golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 h1:A1gGSx58LAGVHUUsOf7IiR0u8Xb6W51gRwfDBhkdcaw= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 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= @@ -879,13 +1082,16 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -926,6 +1132,7 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxW 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/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 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= @@ -933,6 +1140,7 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -970,7 +1178,6 @@ golang.org/x/sys v0.0.0-20200219091948-cb0a6d8edb6c/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-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1020,22 +1227,25 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200221224223-e1da425f72fd/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a h1:CB3a9Nez8M13wwlr/E2YtwoU+qYHKfC+JrDa45RXXoQ= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/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= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0 h1:Q3Ui3V3/CVinFWFiW39Iw0kMuVrRzYX0wN6OPFp0lTA= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -1051,9 +1261,7 @@ google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBr google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200218151345-dad8c97a84f5/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 h1:pSLkPbrjnPyLDYUO2VM9mDLqo2V6CFBY84lFSZAfoi4= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6 h1:iRN4+t0lvZX/l9gH14ARF9i58tsVa5a97k6aH95rC3Y= google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1081,43 +1289,58 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ 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/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= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a h1:stTHdEoWg1pQ8riaP5ROrjS6zy6wewH/Q2iwnLCQUXY= gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610= 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/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/cheggaaa/pb.v1 v1.0.25 h1:Ev7yu1/f6+d+b3pi5vPdRPc6nNtP1umSfcWiEfRqv6I= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3 h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw= gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= +gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM= gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= +gopkg.in/jcmturner/goidentity.v3 v3.0.0 h1:1duIyWiTaYvVx3YX2CYtpJbUFd7/UuPYCfgXtQ3VTbI= gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= +gopkg.in/jcmturner/gokrb5.v7 v7.5.0 h1:a9tsXlIDD9SKxotJMK3niV7rPZAJeX2aD/0yg3qlIrg= gopkg.in/jcmturner/gokrb5.v7 v7.5.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= +gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU= gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200316214253-d7b0ff38cac9/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc h1:17cdygvFw3DEyNMh81Bk687W74d5pcC5qEKQICv9N6g= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 h1:a6cXbcDDUkSBlpnkWV1bJ+vv3mOgQEltEJ2rPxroVu0= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/redis.v4 v4.2.4 h1:y3XbwQAiHwgNLUng56mgWYK39vsPqo8sT84XTEcxjr0= gopkg.in/redis.v4 v4.2.4/go.mod h1:8KREHdypkCEojGKQcjMqAODMICIVwZAONWq8RowTITA= +gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1137,9 +1360,13 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= +rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= From f1e4ce053f2d9b395aa9cdaaabe704f033b4e252 Mon Sep 17 00:00:00 2001 From: trinhdn97 Date: Thu, 27 May 2021 18:55:07 +0700 Subject: [PATCH 82/96] Fix DeploySmartContract logic in kai_invoker --- cmd/kai_deployer/run.go | 2 +- go.mod | 13 +- go.sum | 268 ++-------------------------------------- 3 files changed, 12 insertions(+), 271 deletions(-) diff --git a/cmd/kai_deployer/run.go b/cmd/kai_deployer/run.go index f44930d..47e64a8 100644 --- a/cmd/kai_deployer/run.go +++ b/cmd/kai_deployer/run.go @@ -95,7 +95,7 @@ func DeploySmartContract() { if err != nil { panic(fmt.Errorf("failed to approve erc20 to lockproxy: %v", err)) } - invoker.ETHUtil.WaitTransactionConfirm(tx.Hash()) + invoker.Client().WaitTransactionConfirm(tx.Hash()) oep4Addr, _, err := invoker.DeployOEP4(lockproxyAddrHex) if err != nil { diff --git a/go.mod b/go.mod index 129c3eb..d9d8976 100644 --- a/go.mod +++ b/go.mod @@ -5,25 +5,19 @@ go 1.14 require ( github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae - github.com/allegro/bigcache v1.2.1 // indirect github.com/aristanetworks/goarista v0.0.0-20200331225509-2cc472e8fbd6 // indirect github.com/btcsuite/btcd v0.21.0-beta github.com/btcsuite/btcutil v1.0.2 - github.com/cespare/cp v1.1.1 // indirect github.com/cosmos/cosmos-sdk v0.39.2 - github.com/deckarep/golang-set v1.7.1 // indirect github.com/ethereum/go-ethereum v1.9.18 - github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect github.com/go-ole/go-ole v1.2.4 // indirect github.com/golang/mock v1.5.0 // indirect - github.com/google/go-cmp v0.5.2 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/joeqian10/neo-gogogo v1.1.0 github.com/joeqian10/neo3-gogogo v0.3.2 github.com/kardiachain/go-kardia v1.1.1-0.20210518091640-d13a5b7f7c4c github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.7 // 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 @@ -33,16 +27,11 @@ require ( github.com/polynetwork/kai-relayer v0.0.0 github.com/polynetwork/poly v0.0.0-20210112063446-24e3d053e9d6 github.com/polynetwork/poly-go-sdk v0.0.0-20200817120957-365691ad3493 - github.com/rjeczalik/notify v0.9.2 // indirect github.com/shirou/gopsutil v2.20.9+incompatible // indirect github.com/spf13/afero v1.2.2 // indirect github.com/spf13/viper v1.7.1 // indirect - github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48 // indirect github.com/stretchr/testify v1.7.0 github.com/tendermint/tendermint v0.33.9 - github.com/tendermint/tm-db v0.5.1 // indirect - google.golang.org/grpc v1.30.0 // indirect - gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect ) @@ -56,4 +45,4 @@ replace github.com/polynetwork/poly-go-sdk => github.com/joeqian10/poly-go-sdk v //replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 -replace github.com/polynetwork/kai-relayer => github.com/dogecoindev/kai-relayer v0.0.0-20210527043015-bc1790a88bc5 +replace github.com/polynetwork/kai-relayer => github.com/dogecoindev/kai-relayer v0.0.0-20210527114906-bc3e37fbc166 diff --git a/go.sum b/go.sum index bb0b3fe..443b849 100644 --- a/go.sum +++ b/go.sum @@ -4,47 +4,31 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go/bigquery v1.0.1 h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/datastore v1.0.0 h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/firestore v1.1.0 h1:9x7Bx0A9R5/M9jibeJeZWqjeVEIxYW9fZYqB9a70/bY= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/pubsub v1.0.1 h1:W9tAK3E57P75u0XLLR82LZyw8VpAnhmyTOxW9qzmyj8= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/storage v1.0.0 h1:VV2nUM3wwLLGh9lSABFgZMjInyUbJeaRSE64WuAIQ+4= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/99designs/keyring v1.1.3/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= -github.com/Azure/azure-pipeline-go v0.2.2 h1:6oiIS9yaG6XCCzhgAgKFfIWyo4LLCiDhZot6ltoThhY= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= -github.com/Azure/azure-storage-blob-go v0.7.0 h1:MuueVOYkufCxJw5YZzF842DY2MBsp+hLuh2apKY0mck= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= -github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0 h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= 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/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 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= @@ -53,17 +37,12 @@ github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e h1:ahyvB3q25Yn github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:kGUqhHd//musdITWjFvNTHn90WG9bMLBEPQZ17Cmlpw= github.com/JohnCGriffin/overflow v0.0.0-20170615021017-4d914c927216 h1:2ZboyJ8vl75fGesnG9NpMTD2DyQI3FzMXy4x752rGF0= github.com/JohnCGriffin/overflow v0.0.0-20170615021017-4d914c927216/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI= github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= -github.com/OpenBazaar/jsonpb v0.0.0-20171123000858-37d32ddf4eef h1:+aqKrHtCJTRp8ziyrjfHbTF5puPQZfgRt65+iM7FD2w= github.com/OpenBazaar/jsonpb v0.0.0-20171123000858-37d32ddf4eef/go.mod h1:55mCznBcN9WQgrtgaAkv+p2LxeW/tQRdidyyE9D0I5k= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/sarama v1.26.1 h1:3jnfWKD7gVwbB1KSy/lE0szA9duPuSFLViK0o/d3DgA= github.com/Shopify/sarama v1.26.1/go.mod h1:NbSGBSSndYaIhRcBtY9V0U7AyH+x71bG668AuWys/yU= -github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= @@ -79,51 +58,34 @@ github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3 github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210329093354-1b8e0a7a2e25/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae h1:4g7IE+z/CJRf67iFnQlBnZ3JBRmvbrlfcQ3EHJ2saC4= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= -github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/antlr/antlr4 v0.0.0-20190819145818-b43a4c3a8015 h1:StuiJFxQUsxSCzcby6NFZRdEhPkXD5vxN7TZ4MD6T84= github.com/antlr/antlr4 v0.0.0-20190819145818-b43a4c3a8015/go.mod h1:T7PbCXFs94rrTttyxjbyT5+/1V8T2TYDejxUfHJjw1Y= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/aristanetworks/fsnotify v1.4.2 h1:it2ydpY6k0aXB7qjb4vGhOYOL6YDC/sr8vhqwokFQwQ= github.com/aristanetworks/fsnotify v1.4.2/go.mod h1:D/rtu7LpjYM8tRJphJ0hUBYpjai8SfX+aSNsWDTq/Ks= -github.com/aristanetworks/glog v0.0.0-20191112221043-67e8567f59f3 h1:Bmjk+DjIi3tTAU0wxGaFbfjGUqlxxSXARq9A96Kgoos= github.com/aristanetworks/glog v0.0.0-20191112221043-67e8567f59f3/go.mod h1:KASm+qXFKs/xjSoWn30NrWBBvdTTQq+UjkhjEJHfSFA= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/aristanetworks/goarista v0.0.0-20190712234253-ed1100a1c015/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/aristanetworks/goarista v0.0.0-20200331225509-2cc472e8fbd6 h1:Pcu4aKyFfpH0aXLnYJrsTjdRvXNY4SbODsb0pMTZxhA= github.com/aristanetworks/goarista v0.0.0-20200331225509-2cc472e8fbd6/go.mod h1:QZe5Yh80Hp1b6JxQdpfSEEe8X7hTyTEZSosSrFf/oJE= -github.com/aristanetworks/splunk-hec-go v0.3.3 h1:O7zlcm4ve7JvqTyEK3vSBh1LngLezraqcxv8Ya6tQFY= github.com/aristanetworks/splunk-hec-go v0.3.3/go.mod h1:1VHO9r17b0K7WmOlLb9nTk/2YanvOEnLMUgsFrxBROc= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/aws/aws-lambda-go v1.13.3 h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.27.0 h1:0xphMHGMLBrPMfxR2AmVjZKcMEESEgWF8Kru94BNByk= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v0.18.0 h1:qZ+woO4SamnH/eEbjM2IDLhRNwIwND/RQyVlBLp3Jqg= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d h1:1aAija9gr0Hyv4KfQcRcwlmFIrhkDmIj2dz5bkg/s/8= github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d/go.mod h1:icNx/6QdFblhsEjZehARqbNumymUT/ydwlLojFdv7Sk= @@ -133,11 +95,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c h1:+0HFd5KSZ/mm3JmhmrDukiId5iR6w4+BdFtfSy4yWIc= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= 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= @@ -160,15 +119,10 @@ github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEh github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE= github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= -github.com/btcsuite/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/casbin/casbin/v2 v2.1.2 h1:bTwon/ECRx9dwBy2ewRVr5OiqjeXSGiTUY74sDPQi/g= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= @@ -178,33 +132,22 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.0.1-0.20190104013014-3767db7a7e18/go.mod h1:HD5P3vAIAh+Y2GAxg0PrPN1P8WkepXGpjbUPDHJqqKM= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec h1:EdRZT3IeKQmfCSrgo8SZ8V3MEnskuJP0wCYNpe+aiXo= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9 h1:J82+/8rub3qSy0HxEnoYD8cs+HDlHWYrqYXe2Vqxluk= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e h1:0XBUw73chJ1VYSsfvcPvVT7auykAJce9FpRr10L6Qhw= github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:P13beTBKr5Q18lJe1rIoLUqjM+CB1zYrRg44ZqGuQSA= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f h1:WBZRG4aNOuI15bLRrCgN8fCq8E5Xuty6jGbmSNEvSsU= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/cosmos-sdk v0.38.4/go.mod h1:rzWOofbKfRt3wxiylmYWEFHnxxGj0coyqgWl2I9obAw= github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= @@ -220,7 +163,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= @@ -233,55 +175,47 @@ github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBl github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ= github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= -github.com/decred/dcrd/lru v1.0.0 h1:Kbsb1SFDsIlaupWPwsPp+dkxiBY1frcS07PCPgotKz8= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= 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 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dlclark/regexp2 v1.2.0 h1:8sAhBGEM0dRWogWqWyQeIJnxjWO6oIjl8FKqREDsGfk= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v17.12.0-ce-rc1.0.20200531234253-77e06fda0c94+incompatible h1:PmGHHCZ43l6h8aZIi+Xa+z1SWe4dFImd5EK3TNp1jlo= github.com/docker/docker v17.12.0-ce-rc1.0.20200531234253-77e06fda0c94+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/dogecoindev/kai-relayer v0.0.0-20210527043015-bc1790a88bc5 h1:bBW/2asn9hj3izR+zepKy+5cvhs+L0mDF97SdWUqoUM= -github.com/dogecoindev/kai-relayer v0.0.0-20210527043015-bc1790a88bc5/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= -github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87 h1:OMbqMXf9OAXzH1dDH82mQMrddBE8LIIwDtxeK4wE1/A= +github.com/dogecoindev/kai-relayer v0.0.0-20210527075506-946553d99452 h1:vKEpmIBXMORs4SZ0rFslNo7/AQ7wwVpvqfFYOlDwXCI= +github.com/dogecoindev/kai-relayer v0.0.0-20210527075506-946553d99452/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dogecoindev/kai-relayer v0.0.0-20210527080237-ea39b16025ca h1:gy+elQcmOgG76z6oI24f+9JmMSh5uph+fJATSUGpqps= +github.com/dogecoindev/kai-relayer v0.0.0-20210527080237-ea39b16025ca/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dogecoindev/kai-relayer v0.0.0-20210527112412-93c0f6fe6f39 h1:jcuNObDyZGaa9F+M/F8MKsLdMN8XMBXnxOJvrNYykZ0= +github.com/dogecoindev/kai-relayer v0.0.0-20210527112412-93c0f6fe6f39/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dogecoindev/kai-relayer v0.0.0-20210527113413-5402c9eb1c91 h1:7nS0akJlt83Y+Q+6X6GhZ3UJWbQ4Lf/jhbZUXfcJ4dk= +github.com/dogecoindev/kai-relayer v0.0.0-20210527113413-5402c9eb1c91/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dogecoindev/kai-relayer v0.0.0-20210527114906-bc3e37fbc166 h1:SAN+WcvirmnNc6s9mzErbhMiDd4/QQ/XEtyPQFahuro= +github.com/dogecoindev/kai-relayer v0.0.0-20210527114906-bc3e37fbc166/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/ebuchman/fail-test v0.0.0-20170303061230-95f809107225 h1:7TXT8REobzZUI9GzsRtAD29efTY/HgKRU2xYnV1zlaM= github.com/ebuchman/fail-test v0.0.0-20170303061230-95f809107225/go.mod h1:OFTBW14UVJS8P0shpX7OdPY0qpkTdA7AWGYFacMC2D8= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa h1:XKAhUk/dtp+CV0VO6mhG2V7jA9vbcGcnYF/Ay9NjZrY= github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4 h1:rEvIZUSZ3fx39WIi3JkQqQBitGwpELBIYWeBVh6wn+E= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3 h1:gSJmxrs37LgTqR/oyJBWok6k6SvXEUerFTbltIhXkBM= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/go-ethereum v1.9.13/go.mod h1:qwN9d1GLyDh0N7Ab8bMGd0H9knaji2jOBm2RrMGjXls= -github.com/ethereum/go-ethereum v1.9.15 h1:wrWl+QrtutRUJ9LZXdUqBoGoo2b1tOCYRDrAOQhCY3A= github.com/ethereum/go-ethereum v1.9.15/go.mod h1:slT8bPPRhXsyNTwHQxrOnjuTZ1sDXRajW11EkJ84QJ0= github.com/ethereum/go-ethereum v1.9.18 h1:+vzvufVD7+OfQa07IJP20Z7AGZsJaw0M6JIA/WQcqy8= github.com/ethereum/go-ethereum v1.9.18/go.mod h1:JSSTypSMTkGZtAdAChH2wP5dZEvPGh3nUTuDpH+hNrg= @@ -292,25 +226,19 @@ github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqL github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/set v0.2.1 h1:nn2CaJyknWE/6txyUDGwysr3G5QC6xWB/PtVjPBbeaA= github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.7.2 h1:2QxQoC1TS09S7fhCPsrvqYdvP1H5M1P1ih5ABm3BTYk= github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/garyburd/redigo v1.6.0 h1:0VruCpn7yAIIu7pWVClQC8wxCJEcG3nyzpMSHKi1PQc= github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= @@ -325,13 +253,9 @@ github.com/gcash/bchutil v0.0.0-20191012211144-98e73ec336ba/go.mod h1:nUIrcbbtEQ github.com/gcash/bchutil v0.0.0-20200229194731-128fc9884722/go.mod h1:wB++2ZcHUvGLN1OgO9swBmJK1vmyshJLW9SNS+apXwc= github.com/gcash/bchutil v0.0.0-20200506001747-c2894cd54b33 h1:HNO6rKAfeYm6hE+0KXMfRomDZ8cQNlBmWirH8PSk9MY= github.com/gcash/bchutil v0.0.0-20200506001747-c2894cd54b33/go.mod h1:wB++2ZcHUvGLN1OgO9swBmJK1vmyshJLW9SNS+apXwc= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -344,23 +268,16 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= -github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-sourcemap/sourcemap v2.1.2+incompatible h1:0b/xya7BKGhXuqFESKM4oIiRo9WOt2ebz7KxfreD6ug= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= -github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/gogo/googleapis v1.1.0 h1:kFkMAZBNAn4j7K0GiZr8cRYzejq68VbheufiV3YuyFI= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -368,11 +285,9 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -404,9 +319,7 @@ github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/cel-go v0.3.2 h1:72Lj/nrfpWSJkuXdeEGB/7jfdwVFtV8kPJSL2Mt9rog= github.com/google/cel-go v0.3.2/go.mod h1:DoRSdzaJzNiP1lVuWhp/RjSnHLDQr/aNPlyqSBasBqA= -github.com/google/cel-spec v0.3.0 h1:Dc+D/KBBmCJG5LJen9EBAzxkPsSnw2reo2LhMY1NLdI= github.com/google/cel-spec v0.3.0/go.mod h1:MjQm800JAGhOZXI7vatnVpmIaFTR6L8FHcKk+piiKpI= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -418,24 +331,18 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f h1:Jnx61latede7zDD3DiiP4gmNz33uK0U5HDUaF0a/HVQ= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.4.2 h1:0QniY0USkHQ1RGCLfKxeNHK9bkDHGRYGNDFBCS+YARg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -448,19 +355,13 @@ github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qH github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gosuri/uilive v0.0.3 h1:kvo6aB3pez9Wbudij8srWo4iY6SFTTxTKOkb+uRCE8I= github.com/gosuri/uilive v0.0.3/go.mod h1:qkLSc0A5EXSP6B04TrN4oQoxqFI7A8XvoXSlJi8cwk8= -github.com/gosuri/uiprogress v0.0.1 h1:0kpv/XY/qTmFWl/SkaJykZXrBBzwwadmW8fRb7RJSxw= github.com/gosuri/uiprogress v0.0.1/go.mod h1:C1RTYn4Sc7iEyf6j8ft5dyoZ4212h8G1ol9QQluh5+0= -github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277 h1:E0whKxgp2ojts0FDgUA8dl62bmH0LxKanMoBr6MDTDM= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= @@ -470,34 +371,21 @@ github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/b github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0 h1:HXNYlRkkM/t+Y/Yhxtwcy02dlYwIaoxzvxPnS+cqy78= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0 h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -507,47 +395,33 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/holiman/uint256 v1.1.1 h1:4JywC80b+/hSfljFlEBLHrrh+CIONLDz9NuFl0af4Mw= github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= -github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c h1:aY2hhxLhjEAbfXOx2nRJxCXezC6CO2V/yN+OCr1srtk= github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0 h1:0U6+BtN6LhaYuTnIJq4Wyq5cpn6O2kWrxAtcqBmYY6w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= github.com/huin/goupnp v1.0.0 h1:wg75sLpL6DZqwHQN6E1Cfk6mtfzS45z8OV+ic+DtHRo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= -github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150 h1:vlNjIqmUZ9CMAWsbURYl3a6wZbw7q5RHVvlXTNS/Bs8= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/improbable-eng/grpc-web v0.9.1/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= -github.com/improbable-eng/grpc-web v0.12.0 h1:GlCS+lMZzIkfouf7CNqY+qqpowdKuJLSLLcKVfM1oLc= github.com/improbable-eng/grpc-web v0.12.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883 h1:FSeK4fZCo8u40n2JMnyAsd6x7+SbvoOMHvQOU/n10P4= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/itchyny/base58-go v0.1.0 h1:zF5spLDo956exUAD17o+7GamZTRkXOZlqJjRciZwd1I= github.com/itchyny/base58-go v0.1.0/go.mod h1:SrMWPE3DFuJJp1M/RUhu4fccp/y9AlB8AL3o3duPToU= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 h1:6OvNmYgJyexcZ3pYbTI9jWx5tHo1Dee/tWbLMfPe2TA= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v0.0.0-20181221193153-c0795c8afcf4/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -559,75 +433,52 @@ github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd h1:F+zXxTbFpS1b9kXP github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd/go.mod h1:oe6B9zngqA74VgWvsgZt4kdDoeyakUIeBqOEzHS4pTM= github.com/joeqian10/poly-go-sdk v0.0.0-20210517072349-71002ebfdf13 h1:gSEFDPtjAodPsyDO8dLe7LR1q56xnlONqYHBCV5UnkM= github.com/joeqian10/poly-go-sdk v0.0.0-20210517072349-71002ebfdf13/go.mod h1:CBZe/O7+KWy/IWNOmJPuNxaBTtrSzsMJXuBafxPzYUc= -github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356 h1:I/yrLt2WilKxlQKCM52clh5rGzTKpVctGT1lH4Dc8Jw= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/kardiachain/go-kardia v1.1.1-0.20210518073513-843096e91762 h1:Jkua+KxKgB3unn8wcCfkylIn8PVcrzVGThxHcrijkbA= -github.com/kardiachain/go-kardia v1.1.1-0.20210518073513-843096e91762/go.mod h1:dIcZ5VO21q0HAjL9LiHqJ8bKMDkoE3T/4H0vy8urggs= github.com/kardiachain/go-kardia v1.1.1-0.20210518091640-d13a5b7f7c4c h1:xjhQZf1wiA+ebCz/oNZ7xaZZY/mi/FNoNnMP3iSV/GQ= github.com/kardiachain/go-kardia v1.1.1-0.20210518091640-d13a5b7f7c4c/go.mod h1:dIcZ5VO21q0HAjL9LiHqJ8bKMDkoE3T/4H0vy8urggs= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/kkdai/bstream v1.0.0 h1:Se5gHwgp2VT2uHfDrkbbgbgEvV9cimLELwrPJctSjg8= github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= github.com/klauspost/compress v1.9.8/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.10.1 h1:a/QY0o9S6wCi0XhxaMX/QmusicNUqCqFugR6WKPOSoQ= github.com/klauspost/compress v1.10.1/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/cpuid v1.2.3 h1:CCtW0xUnWGVINKvE/WWOYKdsPV6mawAtvQuSl8guwQs= github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/reedsolomon v1.9.3 h1:N/VzgeMfHmLc+KHMD1UL/tNkfXAt8FnUqlgXGIduwAY= github.com/klauspost/reedsolomon v1.9.3/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 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= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743 h1:143Bb8f8DuGWck/xpNUOckBVYfFbBTnLevfRZ1aVVqo= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1 h1:vi1F1IQ8N7hNWytK9DpJsUfQhGuNSc19z330K6vl4zk= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lyft/protoc-gen-validate v0.0.13 h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= @@ -638,7 +489,6 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d h1:oNAwILwmgWKFpuU+dXvI6dl9jG2mAWAZLX3r9s0PPiw= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -653,63 +503,45 @@ github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/ github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/minio/highwayhash v1.0.1 h1:dZ6IIu8Z14VlC0VpfKofAhCy74wu/Qb5gcn52yWoz/0= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 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/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= 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 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2 h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3 h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= 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/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/oklog v0.3.2 h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -744,40 +576,28 @@ 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/openconfig/gnmi v0.0.0-20190823184014-89b2bf29312c h1:a380JP+B7xlMbEQOlha1buKhzBPXFqgFXplyWCEIGEY= github.com/openconfig/gnmi v0.0.0-20190823184014-89b2bf29312c/go.mod h1:t+O9It+LKzfOAhKTT5O0ehDix+MTqbtT0T9t+7zzOvc= -github.com/openconfig/reference v0.0.0-20190727015836-8dfd928c9696 h1:yHCGAHg2zMaW8olLrqEt3SAHGcEx2aJPEQWMRCyravY= github.com/openconfig/reference v0.0.0-20190727015836-8dfd928c9696/go.mod h1:ym2A+zigScwkSEb/cVQB0/ZMpU3rqiH6X7WRRsxgOGw= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6 h1:lNCW6THrCKBiJBpz8kbVGjC7MgdCGKwuvBgc7LoD6sw= github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= -github.com/pact-foundation/pact-go v1.0.4 h1:OYkFijGHoZAYbOIb1LWXrwKQbMMRUv1oQ89blD2Mh2Q= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= 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/pebbe/zmq4 v1.0.0 h1:D+MSmPpqkL5PSSmnh8g51ogirUCyemThuZzLW7Nrt78= github.com/pebbe/zmq4 v1.0.0/go.mod h1:7N4y5R18zBiu3l0vajMUWQgZyjv464prE8RCyBcmnZM= 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/performancecopilot/speed v3.0.0+incompatible h1:2WnRzIquHa5QxaJKShDkLM+sc0JPuwhXzK8OYOyt3Vg= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= @@ -785,13 +605,11 @@ github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/lz4 v2.4.1+incompatible h1:mFe7ttWaflA46Mhqh+jUfjp2qTbPYxLB2/OyBppH9dg= github.com/pierrec/lz4 v2.4.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1 h1:F++O52m40owAmADcojzM+9gyjmMOY/T4oYJkgFDH8RE= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -800,7 +618,6 @@ github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666/go.mo github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759 h1:M0DV6MUVXOZtdQ94i8oYuSAX+ljzEe+mMqb2Llnm/oM= github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759/go.mod h1:VMBJZ8GSZeoWBntd/rWx2Rr5roRKofO7siP1qd6A6pY= github.com/polynetwork/poly-io-test v0.0.0-20200819093740-8cf514b07750/go.mod h1:Y/xz9uHdO0HPz0p+x0bZxNuo1ufVcln3dDjmchSUgso= -github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -842,7 +659,6 @@ github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0 github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= -github.com/rakyll/statik v0.1.6 h1:uICcfUXpgqtw2VopbIncslhAmE5hwc4g20TEyEENBNs= github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -851,29 +667,22 @@ github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqn github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521 h1:3hxavr+IHMsQBrYUPQM5v0CgENFktkkbg1sfpgM3h20= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da h1:p3Vo3i64TCLY7gIfzeQaUJ+kppEO5WQG3cL8iE8tGHU= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.2.0 h1:lMqc+fUb7RrFS3gQLtoQsJ7/6TV/pAIFvBsqX73DK8Y= github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/scylladb/go-set v1.0.2 h1:SkvlMCKhP0wyyct6j+0IHJkBkSZL+TDzZ4E7f7BCcRE= github.com/scylladb/go-set v1.0.2/go.mod h1:DkpGd78rljTxKAnTDPFqXSGxvETQnJyuSOQwsHycqfs= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v2.20.5-0.20200531151128-663af789c085+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= @@ -883,20 +692,15 @@ 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.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= 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= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa h1:YJfZp12Z3AFhSBeXOlv4BO55RMwPn2NoQeDsrdWnBtY= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= -github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1 h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.0.1-0.20190317074736-539464a789e9 h1:5Cp3cVwpQP4aCQ6jx6dNLP3IarbYiuStmIzYu+BjQwY= 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/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -928,9 +732,7 @@ github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8 github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 h1:njlZPzLwU639dk2kqnCPPv+wNjq7Xb6EfUxe/oX0/NM= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271 h1:WhxRHzgeVGETMlmVfqhRn8RIeeNoPr2Czh33I4Zdccw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a h1:AhmOdSHeswKHBjhsLs/7+1voOxT+LLrSk/Nxvk35fug= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -950,9 +752,7 @@ github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D6 github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= -github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 h1:89CEmDvlq/F7SJEOqkIdNDGJXrQIhuIx9D2DBXjavSU= github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161/go.mod h1:wM7WEvslTq+iOEAMDLSzhVuOt5BRZ05WirO+b09GHQU= -github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b h1:fj5tQ8acgNUr6O8LEplsxDhUIe2573iLkJc+PqnzZTI= github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b/go.mod h1:5XA7W9S6mni3h5uvOC75dA3m9CCCaS83lltmc0ukdi4= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= @@ -975,43 +775,31 @@ github.com/tendermint/tm-db v0.4.1/go.mod h1:JsJ6qzYkCGiGwm5GHl/H5GLI9XLb6qZX7PR github.com/tendermint/tm-db v0.5.0/go.mod h1:lSq7q5WRR/njf1LnhiZ/lIJHk2S8Y1Zyq5oP/3o9C2U= github.com/tendermint/tm-db v0.5.1 h1:H9HDq8UEA7Eeg13kdYckkgwwkQLBnJGgX4PgLJRhieY= github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= -github.com/tjfoc/gmsm v1.3.0 h1:i7c6Za/IlgBvnGxYpfD7L3TGuaS+v6oGcgq+J9/ecEA= github.com/tjfoc/gmsm v1.3.0/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2 h1:+t3w+KwLXO6154GNJY+qUtIxLTmFjfUmpguQT1OlOT8= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.4 h1:u7tSpNPPswAFymm8IehJhy4uJMlUuU/GmqSkvJ1InXA= github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 h1:1cngl9mPEoITZG8s8cVcUy5CeIBYhEESkOB7m6Gmkrk= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/xtaci/kcp-go v5.4.20+incompatible h1:TN1uey3Raw0sTz0Fg8GkfM0uH3YwzhnZWQ1bABv5xAg= github.com/xtaci/kcp-go v5.4.20+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE= -github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae h1:J0GxkO96kL4WF+AIT3M4mfUVinOCPgf2uUWYFUzN0sM= github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae/go.mod h1:gXtu8J62kEgmN++bm9BVICuT/e8yiLI2KFobd/TRFsE= github.com/ybbus/jsonrpc v2.1.2+incompatible h1:V4mkE9qhbDQ92/MLMIhlhMSbz8jNXdagC3xBR5NDwaQ= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1 h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= @@ -1022,25 +810,19 @@ github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1/go.mod h1:bslhAiUxakr go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0 h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0 h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1071,10 +853,8 @@ golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 h1:A1gGSx58LAGVHUUsOf7IiR0u8Xb6W51gRwfDBhkdcaw= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 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= @@ -1082,16 +862,13 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1132,7 +909,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxW 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/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 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= @@ -1140,7 +916,6 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1227,7 +1002,6 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200221224223-e1da425f72fd/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a h1:CB3a9Nez8M13wwlr/E2YtwoU+qYHKfC+JrDa45RXXoQ= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1239,13 +1013,11 @@ google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEt google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0 h1:Q3Ui3V3/CVinFWFiW39Iw0kMuVrRzYX0wN6OPFp0lTA= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -1294,53 +1066,37 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a h1:stTHdEoWg1pQ8riaP5ROrjS6zy6wewH/Q2iwnLCQUXY= gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610= 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/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/cheggaaa/pb.v1 v1.0.25 h1:Ev7yu1/f6+d+b3pi5vPdRPc6nNtP1umSfcWiEfRqv6I= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3 h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw= gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= -gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM= gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= -gopkg.in/jcmturner/goidentity.v3 v3.0.0 h1:1duIyWiTaYvVx3YX2CYtpJbUFd7/UuPYCfgXtQ3VTbI= gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= -gopkg.in/jcmturner/gokrb5.v7 v7.5.0 h1:a9tsXlIDD9SKxotJMK3niV7rPZAJeX2aD/0yg3qlIrg= gopkg.in/jcmturner/gokrb5.v7 v7.5.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= -gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU= gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200316214253-d7b0ff38cac9/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= -gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc h1:17cdygvFw3DEyNMh81Bk687W74d5pcC5qEKQICv9N6g= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 h1:a6cXbcDDUkSBlpnkWV1bJ+vv3mOgQEltEJ2rPxroVu0= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= -gopkg.in/redis.v4 v4.2.4 h1:y3XbwQAiHwgNLUng56mgWYK39vsPqo8sT84XTEcxjr0= gopkg.in/redis.v4 v4.2.4/go.mod h1:8KREHdypkCEojGKQcjMqAODMICIVwZAONWq8RowTITA= -gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= -gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1360,13 +1116,9 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= -rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= From 0a8853401b53e862cd77e400d5762abb19e008bd Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Mon, 31 May 2021 15:28:55 +0700 Subject: [PATCH 83/96] upgrade kai relayer version --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index d9d8976..f4619df 100644 --- a/go.mod +++ b/go.mod @@ -45,4 +45,4 @@ replace github.com/polynetwork/poly-go-sdk => github.com/joeqian10/poly-go-sdk v //replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 -replace github.com/polynetwork/kai-relayer => github.com/dogecoindev/kai-relayer v0.0.0-20210527114906-bc3e37fbc166 +replace github.com/polynetwork/kai-relayer => github.com/dogecoindev/kai-relayer v0.0.0-20210531024930-1ae441ffccb6 From 9739cc86707c55e982535bebea454f0be4d02aa7 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Mon, 31 May 2021 17:41:14 +0700 Subject: [PATCH 84/96] update kai epoch --- config.json | 2 +- go.sum | 254 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 255 insertions(+), 1 deletion(-) diff --git a/config.json b/config.json index 1a6b441..9ff78f1 100644 --- a/config.json +++ b/config.json @@ -69,7 +69,7 @@ "Erc20ValLimit": 1000, "KaiUrl": "https://dev-6.kardiachain.io", - "KaiEpoch": 1, + "KaiEpoch": 584820, "KaiPrivateKey": "8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", "KaiChainID": 138 diff --git a/go.sum b/go.sum index 443b849..ee122af 100644 --- a/go.sum +++ b/go.sum @@ -4,31 +4,47 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go/bigquery v1.0.1 h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0 h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0 h1:9x7Bx0A9R5/M9jibeJeZWqjeVEIxYW9fZYqB9a70/bY= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1 h1:W9tAK3E57P75u0XLLR82LZyw8VpAnhmyTOxW9qzmyj8= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0 h1:VV2nUM3wwLLGh9lSABFgZMjInyUbJeaRSE64WuAIQ+4= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/99designs/keyring v1.1.3/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= +github.com/Azure/azure-pipeline-go v0.2.2 h1:6oiIS9yaG6XCCzhgAgKFfIWyo4LLCiDhZot6ltoThhY= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +github.com/Azure/azure-storage-blob-go v0.7.0 h1:MuueVOYkufCxJw5YZzF842DY2MBsp+hLuh2apKY0mck= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0 h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= 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/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 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= @@ -37,12 +53,17 @@ github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e h1:ahyvB3q25Yn github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:kGUqhHd//musdITWjFvNTHn90WG9bMLBEPQZ17Cmlpw= github.com/JohnCGriffin/overflow v0.0.0-20170615021017-4d914c927216 h1:2ZboyJ8vl75fGesnG9NpMTD2DyQI3FzMXy4x752rGF0= github.com/JohnCGriffin/overflow v0.0.0-20170615021017-4d914c927216/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI= github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= +github.com/OpenBazaar/jsonpb v0.0.0-20171123000858-37d32ddf4eef h1:+aqKrHtCJTRp8ziyrjfHbTF5puPQZfgRt65+iM7FD2w= github.com/OpenBazaar/jsonpb v0.0.0-20171123000858-37d32ddf4eef/go.mod h1:55mCznBcN9WQgrtgaAkv+p2LxeW/tQRdidyyE9D0I5k= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/sarama v1.26.1 h1:3jnfWKD7gVwbB1KSy/lE0szA9duPuSFLViK0o/d3DgA= github.com/Shopify/sarama v1.26.1/go.mod h1:NbSGBSSndYaIhRcBtY9V0U7AyH+x71bG668AuWys/yU= +github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= @@ -58,34 +79,51 @@ github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3 github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210329093354-1b8e0a7a2e25/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae h1:4g7IE+z/CJRf67iFnQlBnZ3JBRmvbrlfcQ3EHJ2saC4= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20210406170702-178fd8166bae/go.mod h1:XLd05IRvH+nQt2lLvW6I2pfWBtRYE4i8Tpx45xBrlUE= +github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/antlr/antlr4 v0.0.0-20190819145818-b43a4c3a8015 h1:StuiJFxQUsxSCzcby6NFZRdEhPkXD5vxN7TZ4MD6T84= github.com/antlr/antlr4 v0.0.0-20190819145818-b43a4c3a8015/go.mod h1:T7PbCXFs94rrTttyxjbyT5+/1V8T2TYDejxUfHJjw1Y= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/aristanetworks/fsnotify v1.4.2 h1:it2ydpY6k0aXB7qjb4vGhOYOL6YDC/sr8vhqwokFQwQ= github.com/aristanetworks/fsnotify v1.4.2/go.mod h1:D/rtu7LpjYM8tRJphJ0hUBYpjai8SfX+aSNsWDTq/Ks= +github.com/aristanetworks/glog v0.0.0-20191112221043-67e8567f59f3 h1:Bmjk+DjIi3tTAU0wxGaFbfjGUqlxxSXARq9A96Kgoos= github.com/aristanetworks/glog v0.0.0-20191112221043-67e8567f59f3/go.mod h1:KASm+qXFKs/xjSoWn30NrWBBvdTTQq+UjkhjEJHfSFA= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/aristanetworks/goarista v0.0.0-20190712234253-ed1100a1c015/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/aristanetworks/goarista v0.0.0-20200331225509-2cc472e8fbd6 h1:Pcu4aKyFfpH0aXLnYJrsTjdRvXNY4SbODsb0pMTZxhA= github.com/aristanetworks/goarista v0.0.0-20200331225509-2cc472e8fbd6/go.mod h1:QZe5Yh80Hp1b6JxQdpfSEEe8X7hTyTEZSosSrFf/oJE= +github.com/aristanetworks/splunk-hec-go v0.3.3 h1:O7zlcm4ve7JvqTyEK3vSBh1LngLezraqcxv8Ya6tQFY= github.com/aristanetworks/splunk-hec-go v0.3.3/go.mod h1:1VHO9r17b0K7WmOlLb9nTk/2YanvOEnLMUgsFrxBROc= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3 h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.27.0 h1:0xphMHGMLBrPMfxR2AmVjZKcMEESEgWF8Kru94BNByk= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0 h1:qZ+woO4SamnH/eEbjM2IDLhRNwIwND/RQyVlBLp3Jqg= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d h1:1aAija9gr0Hyv4KfQcRcwlmFIrhkDmIj2dz5bkg/s/8= github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d/go.mod h1:icNx/6QdFblhsEjZehARqbNumymUT/ydwlLojFdv7Sk= @@ -95,8 +133,11 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c h1:+0HFd5KSZ/mm3JmhmrDukiId5iR6w4+BdFtfSy4yWIc= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= 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= @@ -119,10 +160,15 @@ github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEh github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE= github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/casbin/casbin/v2 v2.1.2 h1:bTwon/ECRx9dwBy2ewRVr5OiqjeXSGiTUY74sDPQi/g= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= @@ -132,22 +178,33 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.0.1-0.20190104013014-3767db7a7e18/go.mod h1:HD5P3vAIAh+Y2GAxg0PrPN1P8WkepXGpjbUPDHJqqKM= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec h1:EdRZT3IeKQmfCSrgo8SZ8V3MEnskuJP0wCYNpe+aiXo= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9 h1:J82+/8rub3qSy0HxEnoYD8cs+HDlHWYrqYXe2Vqxluk= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e h1:0XBUw73chJ1VYSsfvcPvVT7auykAJce9FpRr10L6Qhw= github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:P13beTBKr5Q18lJe1rIoLUqjM+CB1zYrRg44ZqGuQSA= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f h1:WBZRG4aNOuI15bLRrCgN8fCq8E5Xuty6jGbmSNEvSsU= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/cosmos-sdk v0.38.4/go.mod h1:rzWOofbKfRt3wxiylmYWEFHnxxGj0coyqgWl2I9obAw= github.com/cosmos/cosmos-sdk v0.39.1/go.mod h1:ry2ROl5n+f2/QXpKJo3rdWNJwll00z7KhIVcxNcl16M= @@ -163,6 +220,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= @@ -175,12 +233,18 @@ github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBl github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ= github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/decred/dcrd/lru v1.0.0 h1:Kbsb1SFDsIlaupWPwsPp+dkxiBY1frcS07PCPgotKz8= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= 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 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dlclark/regexp2 v1.2.0 h1:8sAhBGEM0dRWogWqWyQeIJnxjWO6oIjl8FKqREDsGfk= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v17.12.0-ce-rc1.0.20200531234253-77e06fda0c94+incompatible h1:PmGHHCZ43l6h8aZIi+Xa+z1SWe4dFImd5EK3TNp1jlo= github.com/docker/docker v17.12.0-ce-rc1.0.20200531234253-77e06fda0c94+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dogecoindev/kai-relayer v0.0.0-20210527075506-946553d99452 h1:vKEpmIBXMORs4SZ0rFslNo7/AQ7wwVpvqfFYOlDwXCI= github.com/dogecoindev/kai-relayer v0.0.0-20210527075506-946553d99452/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= @@ -192,28 +256,39 @@ github.com/dogecoindev/kai-relayer v0.0.0-20210527113413-5402c9eb1c91 h1:7nS0akJ github.com/dogecoindev/kai-relayer v0.0.0-20210527113413-5402c9eb1c91/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= github.com/dogecoindev/kai-relayer v0.0.0-20210527114906-bc3e37fbc166 h1:SAN+WcvirmnNc6s9mzErbhMiDd4/QQ/XEtyPQFahuro= github.com/dogecoindev/kai-relayer v0.0.0-20210527114906-bc3e37fbc166/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dogecoindev/kai-relayer v0.0.0-20210531024930-1ae441ffccb6 h1:ZmUnKamhX8MYd58diikbTzAGcvSwhazUfAvY5ALWC4g= +github.com/dogecoindev/kai-relayer v0.0.0-20210531024930-1ae441ffccb6/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87 h1:OMbqMXf9OAXzH1dDH82mQMrddBE8LIIwDtxeK4wE1/A= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/ebuchman/fail-test v0.0.0-20170303061230-95f809107225 h1:7TXT8REobzZUI9GzsRtAD29efTY/HgKRU2xYnV1zlaM= github.com/ebuchman/fail-test v0.0.0-20170303061230-95f809107225/go.mod h1:OFTBW14UVJS8P0shpX7OdPY0qpkTdA7AWGYFacMC2D8= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa h1:XKAhUk/dtp+CV0VO6mhG2V7jA9vbcGcnYF/Ay9NjZrY= github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4 h1:rEvIZUSZ3fx39WIi3JkQqQBitGwpELBIYWeBVh6wn+E= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/etcd-io/bbolt v1.3.3 h1:gSJmxrs37LgTqR/oyJBWok6k6SvXEUerFTbltIhXkBM= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/go-ethereum v1.9.13/go.mod h1:qwN9d1GLyDh0N7Ab8bMGd0H9knaji2jOBm2RrMGjXls= github.com/ethereum/go-ethereum v1.9.15/go.mod h1:slT8bPPRhXsyNTwHQxrOnjuTZ1sDXRajW11EkJ84QJ0= @@ -226,19 +301,25 @@ github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqL github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/set v0.2.1 h1:nn2CaJyknWE/6txyUDGwysr3G5QC6xWB/PtVjPBbeaA= github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.7.2 h1:2QxQoC1TS09S7fhCPsrvqYdvP1H5M1P1ih5ABm3BTYk= github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/garyburd/redigo v1.6.0 h1:0VruCpn7yAIIu7pWVClQC8wxCJEcG3nyzpMSHKi1PQc= github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= @@ -253,9 +334,13 @@ github.com/gcash/bchutil v0.0.0-20191012211144-98e73ec336ba/go.mod h1:nUIrcbbtEQ github.com/gcash/bchutil v0.0.0-20200229194731-128fc9884722/go.mod h1:wB++2ZcHUvGLN1OgO9swBmJK1vmyshJLW9SNS+apXwc= github.com/gcash/bchutil v0.0.0-20200506001747-c2894cd54b33 h1:HNO6rKAfeYm6hE+0KXMfRomDZ8cQNlBmWirH8PSk9MY= github.com/gcash/bchutil v0.0.0-20200506001747-c2894cd54b33/go.mod h1:wB++2ZcHUvGLN1OgO9swBmJK1vmyshJLW9SNS+apXwc= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -268,16 +353,23 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= +github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-sourcemap/sourcemap v2.1.2+incompatible h1:0b/xya7BKGhXuqFESKM4oIiRo9WOt2ebz7KxfreD6ug= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/gogo/googleapis v1.1.0 h1:kFkMAZBNAn4j7K0GiZr8cRYzejq68VbheufiV3YuyFI= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -285,9 +377,11 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -319,7 +413,9 @@ github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/cel-go v0.3.2 h1:72Lj/nrfpWSJkuXdeEGB/7jfdwVFtV8kPJSL2Mt9rog= github.com/google/cel-go v0.3.2/go.mod h1:DoRSdzaJzNiP1lVuWhp/RjSnHLDQr/aNPlyqSBasBqA= +github.com/google/cel-spec v0.3.0 h1:Dc+D/KBBmCJG5LJen9EBAzxkPsSnw2reo2LhMY1NLdI= github.com/google/cel-spec v0.3.0/go.mod h1:MjQm800JAGhOZXI7vatnVpmIaFTR6L8FHcKk+piiKpI= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -331,18 +427,24 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f h1:Jnx61latede7zDD3DiiP4gmNz33uK0U5HDUaF0a/HVQ= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.4.2 h1:0QniY0USkHQ1RGCLfKxeNHK9bkDHGRYGNDFBCS+YARg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -355,13 +457,19 @@ github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qH github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gosuri/uilive v0.0.3 h1:kvo6aB3pez9Wbudij8srWo4iY6SFTTxTKOkb+uRCE8I= github.com/gosuri/uilive v0.0.3/go.mod h1:qkLSc0A5EXSP6B04TrN4oQoxqFI7A8XvoXSlJi8cwk8= +github.com/gosuri/uiprogress v0.0.1 h1:0kpv/XY/qTmFWl/SkaJykZXrBBzwwadmW8fRb7RJSxw= github.com/gosuri/uiprogress v0.0.1/go.mod h1:C1RTYn4Sc7iEyf6j8ft5dyoZ4212h8G1ol9QQluh5+0= +github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277 h1:E0whKxgp2ojts0FDgUA8dl62bmH0LxKanMoBr6MDTDM= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= @@ -371,21 +479,34 @@ github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/b github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0 h1:HXNYlRkkM/t+Y/Yhxtwcy02dlYwIaoxzvxPnS+cqy78= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0 h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -395,33 +516,47 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/holiman/uint256 v1.1.1 h1:4JywC80b+/hSfljFlEBLHrrh+CIONLDz9NuFl0af4Mw= github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c h1:aY2hhxLhjEAbfXOx2nRJxCXezC6CO2V/yN+OCr1srtk= github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0 h1:0U6+BtN6LhaYuTnIJq4Wyq5cpn6O2kWrxAtcqBmYY6w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= github.com/huin/goupnp v1.0.0 h1:wg75sLpL6DZqwHQN6E1Cfk6mtfzS45z8OV+ic+DtHRo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= +github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150 h1:vlNjIqmUZ9CMAWsbURYl3a6wZbw7q5RHVvlXTNS/Bs8= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/improbable-eng/grpc-web v0.9.1/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= +github.com/improbable-eng/grpc-web v0.12.0 h1:GlCS+lMZzIkfouf7CNqY+qqpowdKuJLSLLcKVfM1oLc= github.com/improbable-eng/grpc-web v0.12.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883 h1:FSeK4fZCo8u40n2JMnyAsd6x7+SbvoOMHvQOU/n10P4= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/itchyny/base58-go v0.1.0 h1:zF5spLDo956exUAD17o+7GamZTRkXOZlqJjRciZwd1I= github.com/itchyny/base58-go v0.1.0/go.mod h1:SrMWPE3DFuJJp1M/RUhu4fccp/y9AlB8AL3o3duPToU= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 h1:6OvNmYgJyexcZ3pYbTI9jWx5tHo1Dee/tWbLMfPe2TA= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v0.0.0-20181221193153-c0795c8afcf4/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -433,19 +568,25 @@ github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd h1:F+zXxTbFpS1b9kXP github.com/joeqian10/poly v0.0.0-20210513061019-474879d3ddcd/go.mod h1:oe6B9zngqA74VgWvsgZt4kdDoeyakUIeBqOEzHS4pTM= github.com/joeqian10/poly-go-sdk v0.0.0-20210517072349-71002ebfdf13 h1:gSEFDPtjAodPsyDO8dLe7LR1q56xnlONqYHBCV5UnkM= github.com/joeqian10/poly-go-sdk v0.0.0-20210517072349-71002ebfdf13/go.mod h1:CBZe/O7+KWy/IWNOmJPuNxaBTtrSzsMJXuBafxPzYUc= +github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356 h1:I/yrLt2WilKxlQKCM52clh5rGzTKpVctGT1lH4Dc8Jw= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= @@ -455,30 +596,45 @@ github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0 github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/kkdai/bstream v1.0.0 h1:Se5gHwgp2VT2uHfDrkbbgbgEvV9cimLELwrPJctSjg8= github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= github.com/klauspost/compress v1.9.8/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.10.1 h1:a/QY0o9S6wCi0XhxaMX/QmusicNUqCqFugR6WKPOSoQ= github.com/klauspost/compress v1.10.1/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/cpuid v1.2.3 h1:CCtW0xUnWGVINKvE/WWOYKdsPV6mawAtvQuSl8guwQs= github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/reedsolomon v1.9.3 h1:N/VzgeMfHmLc+KHMD1UL/tNkfXAt8FnUqlgXGIduwAY= github.com/klauspost/reedsolomon v1.9.3/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 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= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743 h1:143Bb8f8DuGWck/xpNUOckBVYfFbBTnLevfRZ1aVVqo= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1 h1:vi1F1IQ8N7hNWytK9DpJsUfQhGuNSc19z330K6vl4zk= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13 h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= @@ -489,6 +645,7 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d h1:oNAwILwmgWKFpuU+dXvI6dl9jG2mAWAZLX3r9s0PPiw= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -503,45 +660,63 @@ github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/ github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= github.com/minio/highwayhash v1.0.1 h1:dZ6IIu8Z14VlC0VpfKofAhCy74wu/Qb5gcn52yWoz/0= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 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/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= 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 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2 h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3 h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= 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/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oklog/oklog v0.3.2 h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -576,28 +751,40 @@ 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/openconfig/gnmi v0.0.0-20190823184014-89b2bf29312c h1:a380JP+B7xlMbEQOlha1buKhzBPXFqgFXplyWCEIGEY= github.com/openconfig/gnmi v0.0.0-20190823184014-89b2bf29312c/go.mod h1:t+O9It+LKzfOAhKTT5O0ehDix+MTqbtT0T9t+7zzOvc= +github.com/openconfig/reference v0.0.0-20190727015836-8dfd928c9696 h1:yHCGAHg2zMaW8olLrqEt3SAHGcEx2aJPEQWMRCyravY= github.com/openconfig/reference v0.0.0-20190727015836-8dfd928c9696/go.mod h1:ym2A+zigScwkSEb/cVQB0/ZMpU3rqiH6X7WRRsxgOGw= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6 h1:lNCW6THrCKBiJBpz8kbVGjC7MgdCGKwuvBgc7LoD6sw= github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= +github.com/pact-foundation/pact-go v1.0.4 h1:OYkFijGHoZAYbOIb1LWXrwKQbMMRUv1oQ89blD2Mh2Q= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= 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/pebbe/zmq4 v1.0.0 h1:D+MSmPpqkL5PSSmnh8g51ogirUCyemThuZzLW7Nrt78= github.com/pebbe/zmq4 v1.0.0/go.mod h1:7N4y5R18zBiu3l0vajMUWQgZyjv464prE8RCyBcmnZM= 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/performancecopilot/speed v3.0.0+incompatible h1:2WnRzIquHa5QxaJKShDkLM+sc0JPuwhXzK8OYOyt3Vg= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= @@ -605,11 +792,13 @@ github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.4.1+incompatible h1:mFe7ttWaflA46Mhqh+jUfjp2qTbPYxLB2/OyBppH9dg= github.com/pierrec/lz4 v2.4.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1 h1:F++O52m40owAmADcojzM+9gyjmMOY/T4oYJkgFDH8RE= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -618,6 +807,7 @@ github.com/polynetwork/btc-vendor-tools v0.0.0-20200813091748-3b19a5fd7666/go.mo github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759 h1:M0DV6MUVXOZtdQ94i8oYuSAX+ljzEe+mMqb2Llnm/oM= github.com/polynetwork/cosmos-poly-module v0.0.0-20200810030259-95d586518759/go.mod h1:VMBJZ8GSZeoWBntd/rWx2Rr5roRKofO7siP1qd6A6pY= github.com/polynetwork/poly-io-test v0.0.0-20200819093740-8cf514b07750/go.mod h1:Y/xz9uHdO0HPz0p+x0bZxNuo1ufVcln3dDjmchSUgso= +github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -659,6 +849,7 @@ github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0 github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= +github.com/rakyll/statik v0.1.6 h1:uICcfUXpgqtw2VopbIncslhAmE5hwc4g20TEyEENBNs= github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -667,22 +858,29 @@ github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqn github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521 h1:3hxavr+IHMsQBrYUPQM5v0CgENFktkkbg1sfpgM3h20= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da h1:p3Vo3i64TCLY7gIfzeQaUJ+kppEO5WQG3cL8iE8tGHU= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.2.0 h1:lMqc+fUb7RrFS3gQLtoQsJ7/6TV/pAIFvBsqX73DK8Y= github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/scylladb/go-set v1.0.2 h1:SkvlMCKhP0wyyct6j+0IHJkBkSZL+TDzZ4E7f7BCcRE= github.com/scylladb/go-set v1.0.2/go.mod h1:DkpGd78rljTxKAnTDPFqXSGxvETQnJyuSOQwsHycqfs= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v2.20.5-0.20200531151128-663af789c085+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= @@ -692,15 +890,20 @@ 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.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= 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= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa h1:YJfZp12Z3AFhSBeXOlv4BO55RMwPn2NoQeDsrdWnBtY= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= +github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1 h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.0.1-0.20190317074736-539464a789e9 h1:5Cp3cVwpQP4aCQ6jx6dNLP3IarbYiuStmIzYu+BjQwY= 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/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -732,7 +935,9 @@ github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8 github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 h1:njlZPzLwU639dk2kqnCPPv+wNjq7Xb6EfUxe/oX0/NM= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271 h1:WhxRHzgeVGETMlmVfqhRn8RIeeNoPr2Czh33I4Zdccw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a h1:AhmOdSHeswKHBjhsLs/7+1voOxT+LLrSk/Nxvk35fug= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -752,7 +957,9 @@ github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D6 github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= +github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 h1:89CEmDvlq/F7SJEOqkIdNDGJXrQIhuIx9D2DBXjavSU= github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161/go.mod h1:wM7WEvslTq+iOEAMDLSzhVuOt5BRZ05WirO+b09GHQU= +github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b h1:fj5tQ8acgNUr6O8LEplsxDhUIe2573iLkJc+PqnzZTI= github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b/go.mod h1:5XA7W9S6mni3h5uvOC75dA3m9CCCaS83lltmc0ukdi4= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= @@ -775,31 +982,43 @@ github.com/tendermint/tm-db v0.4.1/go.mod h1:JsJ6qzYkCGiGwm5GHl/H5GLI9XLb6qZX7PR github.com/tendermint/tm-db v0.5.0/go.mod h1:lSq7q5WRR/njf1LnhiZ/lIJHk2S8Y1Zyq5oP/3o9C2U= github.com/tendermint/tm-db v0.5.1 h1:H9HDq8UEA7Eeg13kdYckkgwwkQLBnJGgX4PgLJRhieY= github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= +github.com/tjfoc/gmsm v1.3.0 h1:i7c6Za/IlgBvnGxYpfD7L3TGuaS+v6oGcgq+J9/ecEA= github.com/tjfoc/gmsm v1.3.0/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2 h1:+t3w+KwLXO6154GNJY+qUtIxLTmFjfUmpguQT1OlOT8= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.4 h1:u7tSpNPPswAFymm8IehJhy4uJMlUuU/GmqSkvJ1InXA= github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 h1:1cngl9mPEoITZG8s8cVcUy5CeIBYhEESkOB7m6Gmkrk= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/xtaci/kcp-go v5.4.20+incompatible h1:TN1uey3Raw0sTz0Fg8GkfM0uH3YwzhnZWQ1bABv5xAg= github.com/xtaci/kcp-go v5.4.20+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE= +github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae h1:J0GxkO96kL4WF+AIT3M4mfUVinOCPgf2uUWYFUzN0sM= github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae/go.mod h1:gXtu8J62kEgmN++bm9BVICuT/e8yiLI2KFobd/TRFsE= github.com/ybbus/jsonrpc v2.1.2+incompatible h1:V4mkE9qhbDQ92/MLMIhlhMSbz8jNXdagC3xBR5NDwaQ= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1 h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= @@ -810,19 +1029,25 @@ github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1/go.mod h1:bslhAiUxakr go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0 h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0 h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -853,8 +1078,10 @@ golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 h1:A1gGSx58LAGVHUUsOf7IiR0u8Xb6W51gRwfDBhkdcaw= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 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= @@ -862,13 +1089,16 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -909,6 +1139,7 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxW 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/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 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= @@ -916,6 +1147,7 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1002,6 +1234,7 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200221224223-e1da425f72fd/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a h1:CB3a9Nez8M13wwlr/E2YtwoU+qYHKfC+JrDa45RXXoQ= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1013,11 +1246,13 @@ google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEt google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0 h1:Q3Ui3V3/CVinFWFiW39Iw0kMuVrRzYX0wN6OPFp0lTA= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -1066,23 +1301,34 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a h1:stTHdEoWg1pQ8riaP5ROrjS6zy6wewH/Q2iwnLCQUXY= gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610= 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/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/cheggaaa/pb.v1 v1.0.25 h1:Ev7yu1/f6+d+b3pi5vPdRPc6nNtP1umSfcWiEfRqv6I= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3 h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw= gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= +gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM= gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= +gopkg.in/jcmturner/goidentity.v3 v3.0.0 h1:1duIyWiTaYvVx3YX2CYtpJbUFd7/UuPYCfgXtQ3VTbI= gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= +gopkg.in/jcmturner/gokrb5.v7 v7.5.0 h1:a9tsXlIDD9SKxotJMK3niV7rPZAJeX2aD/0yg3qlIrg= gopkg.in/jcmturner/gokrb5.v7 v7.5.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= +gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU= gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= @@ -1090,13 +1336,17 @@ gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200316214253-d7b0ff38cac9/go.mod h1:uAJ gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200603215123-a4a8cb9d2cbc/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 h1:a6cXbcDDUkSBlpnkWV1bJ+vv3mOgQEltEJ2rPxroVu0= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/redis.v4 v4.2.4 h1:y3XbwQAiHwgNLUng56mgWYK39vsPqo8sT84XTEcxjr0= gopkg.in/redis.v4 v4.2.4/go.mod h1:8KREHdypkCEojGKQcjMqAODMICIVwZAONWq8RowTITA= +gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1116,9 +1366,13 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= +rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= From 65b566af7f0d141105ce1d2250f60b8e9a38d8f6 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Wed, 2 Jun 2021 14:53:39 +0700 Subject: [PATCH 85/96] update kai testcases --- chains/eth/eth_invoker.go | 4 +- chains/kai/invoker.go | 106 +++++++++++++++-- chains/kai/signer.go | 6 +- cmd/cctest/main.go | 57 ++++++--- config.json | 178 ++++++++++++++++++++++++++--- config/config.go | 7 +- go.mod | 2 +- go.sum | 4 + testcase/init.go | 3 + testcase/kai.go | 175 ++++++++++++++++++++++++++++ testframework/check.go | 6 +- testframework/framework.go | 13 ++- testframework/framework_context.go | 5 +- testframework/kai.go | 89 +++++++++++++++ 14 files changed, 599 insertions(+), 56 deletions(-) create mode 100644 testcase/kai.go create mode 100644 testframework/kai.go diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index 4d903e0..43a7359 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -84,7 +84,7 @@ func (ethInvoker *EInvoker) url() string { case ethInvoker.TConfiguration.OkChainID: return ethInvoker.TConfiguration.OKURL default: - panic(fmt.Sprintf("unknown chain id:%d", ethInvoker.ChainID)) + panic(fmt.Sprintf("url:unknown chain id:%d", ethInvoker.ChainID)) } } @@ -105,7 +105,7 @@ func (ethInvoker *EInvoker) privateKey() string { case ethInvoker.TConfiguration.OkChainID: return ethInvoker.TConfiguration.OKPrivateKey default: - panic(fmt.Sprintf("unknown chain id:%d", ethInvoker.ChainID)) + panic(fmt.Sprintf("privateKey:unknown chain id:%d", ethInvoker.ChainID)) } } diff --git a/chains/kai/invoker.go b/chains/kai/invoker.go index 2c7d587..75be458 100644 --- a/chains/kai/invoker.go +++ b/chains/kai/invoker.go @@ -8,6 +8,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" ethComm "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" @@ -33,13 +34,12 @@ var ( ) type Invoker struct { - eth.EInvoker PrivateKey *ecdsa.PrivateKey ChainID uint64 TConfiguration *config.TestConfig client *kaiclient.Client NM *NonceManager - signer *signer + Signer *Signer } func NewInvoker(chainID uint64) *Invoker { @@ -53,11 +53,11 @@ func NewInvoker(chainID uint64) *Invoker { } instance.client = client instance.NM = NewNonceManager(client) - instance.signer, err = NewSigner(config.DefConfig.KaiPrivateKey) + instance.Signer, err = NewSigner(config.DefConfig.KaiPrivateKey) if err != nil { panic(err) } - instance.PrivateKey = instance.signer.PrivateKey + instance.PrivateKey = instance.Signer.PrivateKey return instance } @@ -102,7 +102,7 @@ func (ethInvoker *Invoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetHa if err != nil { return nil, err } - ethInvoker.ETHUtil.WaitTransactionConfirm(tx.Hash()) + ethInvoker.client.WaitTransactionConfirm(tx.Hash()) return tx, nil } @@ -326,7 +326,7 @@ func (i *Invoker) GetAccInfo() (string, error) { if err != nil { return "", err } - val, err := i.client.BalanceAt(context.Background(), i.signer.Address, big.NewInt(int64(h))) + val, err := i.client.BalanceAt(context.Background(), i.Signer.Address, big.NewInt(int64(h))) if err != nil { return "", err } @@ -336,7 +336,7 @@ func (i *Invoker) GetAccInfo() (string, error) { if err != nil { return "", err } - val, err = ontx.BalanceOf(nil, i.signer.Address) + val, err = ontx.BalanceOf(nil, i.Signer.Address) if err != nil { return "", err } @@ -346,7 +346,7 @@ func (i *Invoker) GetAccInfo() (string, error) { if err != nil { return "", err } - val, err = ongx.BalanceOf(nil, i.signer.Address) + val, err = ongx.BalanceOf(nil, i.Signer.Address) if err != nil { return "", err } @@ -356,7 +356,7 @@ func (i *Invoker) GetAccInfo() (string, error) { if err != nil { return "", err } - val, err = oep4x.BalanceOf(nil, i.signer.Address) + val, err = oep4x.BalanceOf(nil, i.Signer.Address) if err != nil { return "", err } @@ -366,7 +366,7 @@ func (i *Invoker) GetAccInfo() (string, error) { if err != nil { return "", err } - val, err = erc20.BalanceOf(nil, i.signer.Address) + val, err = erc20.BalanceOf(nil, i.Signer.Address) if err != nil { return "", err } @@ -376,12 +376,94 @@ func (i *Invoker) GetAccInfo() (string, error) { if err != nil { return "", err } - val, err = btcx.BalanceOf(nil, i.signer.Address) + val, err = btcx.BalanceOf(nil, i.Signer.Address) if err != nil { return "", err } btcxInfo := fmt.Sprintf("btcx: %d", val.Uint64()) return fmt.Sprintf("ETHEREUM: acc: %s, asset: [ %s, %s, %s, %s, %s, %s ]", - i.signer.Address.String(), ethInfo, ontInfo, ongInfo, oep4Info, erc20Info, btcxInfo), nil + i.Signer.Address.String(), ethInfo, ontInfo, ongInfo, oep4Info, erc20Info, btcxInfo), nil +} + +func (i *Invoker) GetSmartContractEventByBlock(contractAddr string, height uint64) ([]*eth.LockEvent, []*eth.UnlockEvent, error) { + eccmAddr := common.HexToAddress(contractAddr) + instance, err := eccm_abi.NewEthCrossChainManager(eccmAddr, i.client) + if err != nil { + return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error: %s", err.Error()) + } + + opt := &bind.FilterOpts{ + Start: height, + End: &height, + Context: context.Background(), + } + + ethlockevents := make([]*eth.LockEvent, 0) + { + events, err := instance.FilterCrossChainEvent(opt, nil) + if err != nil { + return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error :%s", err.Error()) + } + + if events == nil { + return nil, nil, fmt.Errorf("GetSmartContractEventByBlock - no events found on FilterCrossChainEvent") + } + + for events.Next() { + evt := events.Event + ethlockevents = append(ethlockevents, ð.LockEvent{ + Method: "lock", + TxHash: evt.Raw.TxHash.String(), + Txid: evt.TxId, + Saddress: evt.Sender.String(), + Tchain: uint32(evt.ToChainId), + Value: evt.Rawdata, + Height: height, + }) + } + } + + ethunlockevents := make([]*eth.UnlockEvent, 0) + { + events, err := instance.FilterVerifyHeaderAndExecuteTxEvent(opt) + if err != nil { + return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error :%s", err.Error()) + } + + if events == nil { + return nil, nil, fmt.Errorf("GetSmartContractEventByBlock - no events found on FilterCrossChainEvent") + } + + for events.Next() { + evt := events.Event + ethunlockevents = append(ethunlockevents, ð.UnlockEvent{ + Method: "unlock", + Txid: evt.Raw.TxHash.String(), + RTxid: hex.EncodeToString(evt.CrossChainTxHash), + FromTxId: hex.EncodeToString(evt.FromChainTxHash), + Token: hex.EncodeToString(evt.ToContract), + Height: height, + }) + } + if err != nil { + return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error :%s", err.Error()) + } + + if events == nil { + return nil, nil, fmt.Errorf("GetSmartContractEventByBlock - no events found on FilterCrossChainEvent") + } + + for events.Next() { + evt := events.Event + ethunlockevents = append(ethunlockevents, ð.UnlockEvent{ + Method: "unlock", + Txid: evt.Raw.TxHash.String(), + RTxid: hex.EncodeToString(evt.CrossChainTxHash), + Token: hex.EncodeToString(evt.ToContract), + Height: height, + }) + } + } + return ethlockevents, ethunlockevents, nil } diff --git a/chains/kai/signer.go b/chains/kai/signer.go index 245d72b..ac33360 100644 --- a/chains/kai/signer.go +++ b/chains/kai/signer.go @@ -14,18 +14,18 @@ import ( "github.com/ontio/ontology/common" ) -type signer struct { +type Signer struct { PrivateKey *ecdsa.PrivateKey Address ethComm.Address } -func NewSigner(privateKey string) (*signer, error) { +func NewSigner(privateKey string) (*Signer, error) { priKey, err := crypto.HexToECDSA(privateKey) if err != nil { return nil, fmt.Errorf("ApproveERC20, cannot decode private key") } address := crypto.PubkeyToAddress(priKey.PublicKey) - return &signer{ + return &Signer{ PrivateKey: priKey, Address: address, }, nil diff --git a/cmd/cctest/main.go b/cmd/cctest/main.go index 9f3065f..d75f8ab 100644 --- a/cmd/cctest/main.go +++ b/cmd/cctest/main.go @@ -28,6 +28,7 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" @@ -67,6 +68,9 @@ func main() { mscInvoker *eth.EInvoker o3Invoker *eth.EInvoker cmInvoker *cosmos.CosmosInvoker + kaiInvoker *kai.Invoker + ontInvoker *ont.OntInvoker + neoInvoker *neo.NeoInvoker ) if config.DefConfig.EthChainID > 0 { ethInvoker = eth.NewEInvoker(config.DefConfig.EthChainID) @@ -84,28 +88,32 @@ func main() { o3Invoker = eth.NewEInvoker(config.DefConfig.O3ChainID) } + if config.DefConfig.KaiChainID > 0 { + kaiInvoker = kai.NewInvoker(config.DefConfig.KaiChainID) + } + //btcInvoker, err := btc.NewBtcInvoker(config.DefConfig.RchainJsonRpcAddress, config.DefConfig.RCWallet, // config.DefConfig.RCWalletPwd, config.DefConfig.BtcRestAddr, config.DefConfig.BtcRestUser, // config.DefConfig.BtcRestPwd, config.DefConfig.BtcSignerPrivateKey) //if err != nil { // log.Errorf("failed to new a btc invoker, do not test cases about BTC: %v", err) //} - ontInvoker, err := ont.NewOntInvoker(config.DefConfig.OntJsonRpcAddress, config.DefConfig.OntContractsAvmPath, - config.DefConfig.OntWallet, config.DefConfig.OntWalletPassword) - if err != nil { - log.Warnf("failed to new a ont invoker, do not test cases about ONT: %v", err) - } - if config.DefConfig.CMCrossChainId > 0 { - cmInvoker, err = cosmos.NewCosmosInvoker() - if err != nil { - log.Warnf("failed to new a cosmos invoker, do not test cases about COSMOS: %v", err) - } - } + // ontInvoker, err := ont.NewOntInvoker(config.DefConfig.OntJsonRpcAddress, config.DefConfig.OntContractsAvmPath, + // config.DefConfig.OntWallet, config.DefConfig.OntWalletPassword) + // if err != nil { + // log.Warnf("failed to new a ont invoker, do not test cases about ONT: %v", err) + // } + // if config.DefConfig.CMCrossChainId > 0 { + // cmInvoker, err = cosmos.NewCosmosInvoker() + // if err != nil { + // log.Warnf("failed to new a cosmos invoker, do not test cases about COSMOS: %v", err) + // } + // } - neoInvoker, err := neo.NewNeoInvoker() - if err != nil { - log.Warnf("failed to new a neo invoker, do not test cases about NEO: %v", err) - } + // neoInvoker, err := neo.NewNeoInvoker() + // if err != nil { + // log.Warnf("failed to new a neo invoker, do not test cases about NEO: %v", err) + // } testCases := make([]string, 0) if TestCases != "" { @@ -124,11 +132,24 @@ func main() { if o3Invoker != nil { testframework.TFramework.SetO3Invoker(o3Invoker) } + + if kaiInvoker != nil { + testframework.TFramework.SeKaiInvoker(kaiInvoker) + } + //testframework.TFramework.SetBtcInvoker(btcInvoker) - testframework.TFramework.SetOntInvoker(ontInvoker) - testframework.TFramework.SetCosmosInvoker(cmInvoker) - testframework.TFramework.SetNeoInvoker(neoInvoker) + if ontInvoker != nil { + testframework.TFramework.SetOntInvoker(ontInvoker) + } + + if cmInvoker != nil { + testframework.TFramework.SetCosmosInvoker(cmInvoker) + } + + if neoInvoker != nil { + testframework.TFramework.SetNeoInvoker(neoInvoker) + } //Start run test case testframework.TFramework.Run(testCases, LoopNumber) waitToExit() diff --git a/config.json b/config.json index 9ff78f1..5c4fe4e 100644 --- a/config.json +++ b/config.json @@ -1,4 +1,16 @@ { + "BtcChainID": 0, + "EthChainID": 0, + "OntChainID": 0, + "NeoChainID": 0, + "Neo3ChainID": 0, + "BscChainID": 0, + "ZilChainID": 0, + "HecoChainID": 0, + "O3ChainID": 0, + "MscChainID": 0, + "OkChainID": 0, + "KaiChainID": 141, "BtcRestAddr": "http://btc_node", "BtcRestUser": "test", "BtcRestPwd": "test", @@ -17,18 +29,25 @@ "BtcExistingVendorPrivks": "cTqbqaR...wY6QSag,cT2HP4Q...PXH9Jk2ua,cSQmGg6...9mWzTxEY5A,cPYAx61...zPSbkkZqrzQ5b,cVV9Umt...qvwD5zg,cNK7Bw...oq1vWau8,cUZdDF9s...RePVbQTZ", "EthURL": "http://ethereum_node", "ETHPrivateKey": "AEE6358...A2608A9", + "MSCURL": "", + "MSCPrivateKey": "", + "OKURL": "", + "OKPrivateKey": "", + "BSCURL": "", + "BSCPrivateKey": "", + "HecoURL": "", + "HecoPrivateKey": "", + "O3URL": "", + "O3PrivateKey": "", "ZilURL": "https://zilliqa", "ZilPrivateKey": "", - "ZilEccdProxy": "", - "ZilEccdImpl": "", - "ZilLockProxy": "", "OntJsonRpcAddress": "http://ontology:20336", - "OntWallet": ".wallets/ont_dev.dat", - "OntWalletPassword": "admin", - "OntEpoch": 13358000, + "OntWallet": "/home/thangn/go/pkg/github.com/polynetwork/poly/wallet.dat", + "OntWalletPassword": "123456", "GasPrice": 2500, "GasLimit": 30000000, "OntContractsAvmPath": "chains/ont/avm", + "OntEpoch": 13358000, "CMWalletPath": ".wallets/cosmos_key", "CMWalletPwd": "11111111", "CMRpcUrl": "http://chain_based_on_cosmossdk:26657", @@ -37,6 +56,18 @@ "CMGas": 200000, "CMCrossChainId": 5, "CMEpoch": 1, + "NeoUrl": "", + "NeoWif": "", + "NeoEpoch": 0, + "Neo3Url": "", + "Neo3Wallet": "", + "Neo3Pwd": "", + "Neo3Magic": 0, + "Neo3AddressVersion": 0, + "Neo3Epoch": 0, + "KaiUrl": "https://dev-6.kardiachain.io", + "KaiEpoch": 584820, + "KaiPrivateKey": "8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", "RCWallet": ".wallets/wallet.dat", "RCWalletPwd": "", "RchainJsonRpcAddress": "http://138.91.6.226:40336", @@ -46,6 +77,94 @@ "BatchTxNum": 1, "BatchInterval": 1, "TxNumPerBatch": 1, + "MscEccd": "", + "MscEccm": "", + "MscEccmp": "", + "MscLockProxy": "", + "Mep20": "", + "MscOep4": "", + "MscOngx": "", + "MscOntx": "", + "MscWBTC": "", + "MscUSDT": "", + "MscDai": "", + "MscUSDC": "", + "MscNeo": "", + "MscRenBTC": "", + "OkEccd": "", + "OkEccm": "", + "OkEccmp": "", + "OkLockProxy": "", + "OkErc20": "", + "OkOep4": "", + "OkOngx": "", + "OkOntx": "", + "OkWBTC": "", + "OkUSDT": "", + "OkDai": "", + "OkUSDC": "", + "OkNeo": "", + "OkRenBTC": "", + "BscEccd": "", + "BscEccm": "", + "BscEccmp": "", + "BscLockProxy": "", + "Bep20": "", + "BscOep4": "", + "BscOngx": "", + "BscOntx": "", + "BscWBTC": "", + "BscUSDT": "", + "BscDai": "", + "BscUSDC": "", + "BscNeo": "", + "BscRenBTC": "", + "HecoEccd": "", + "HecoEccm": "", + "HecoEccmp": "", + "HecoLockProxy": "", + "HecoErc20": "", + "HecoOep4": "", + "HecoOngx": "", + "HecoOntx": "", + "HecoWBTC": "", + "HecoUSDT": "", + "HecoDai": "", + "HecoUSDC": "", + "HecoNeo": "", + "HecoRenBTC": "", + "KaiEccd": "0xf7616021e91Ad107e5149DD1E5E41148B4d25bda", + "KaiEccm": "0xfD7fa60cc69A1787Cd4255E3a9397464844aeB7B", + "KaiEccmp": "0x6B77fe5A964A9230324c6c421C1f874F479f4dc2", + "KaiLockProxy": "0x7038107B01EA22e4B51D7D29a4fE472E986625Ff", + "Krc20": "0xC1c23a67aa919454e67061A6d9962d9EBbf05fad", + "KaiOep4": "0x9BEd34f908BAde310a3436793875D1bb5ebb2095", + "KaiOngx": "0xEBcC5062f26BbBEc3b03986983B5084e9ABf9D96", + "KaiOntx": "0x22d42C1A2B39613636107d2ba8861da6a5f122D2", + "KaiWBTC": "", + "KaiUSDT": "", + "KaiDai": "", + "KaiUSDC": "", + "KaiNeo": "", + "KaiRenBTC": "", + "O3Eccd": "", + "O3Eccm": "", + "O3Eccmp": "", + "O3LockProxy": "", + "O3Erc20": "", + "O3Oep4": "", + "O3Ongx": "", + "O3Ontx": "", + "O3WBTC": "", + "O3USDT": "", + "O3Dai": "", + "O3USDC": "", + "O3Neo": "", + "O3RenBTC": "", + "ZilEccdProxy": "", + "ZilEccdImpl": "", + "ZilLockProxy": "", + "EthBnb": "", "EthErc20": "", "EthOep4": "", "Eccd": "", @@ -54,23 +173,56 @@ "EthLockProxy": "", "EthOngx": "", "EthOntx": "", + "EthOntd": "", + "EthUSDT": "", + "EthWBTC": "", + "EthDai": "", + "EthUSDC": "", + "EthNeo": "", + "EthRenBTC": "", "BtceContractAddress": "", "OntErc20": "", + "OntBep20": "", "OntOep4": "", "OntLockProxy": "", "OntEth": "", + "OntBnb": "", + "OntUSDT": "", + "OntWBTC": "", + "OntDai": "", + "OntUSDC": "", + "OntNeo": "", + "OntONTD": "", + "OntRenBTC": "", "BtcoContractAddress": "", + "NeoCCMC": "", + "NeoLockProxy": "", + "CNeo": "", + "NeoOnt": "", + "NeoOntd": "", + "NeoBnb": "", + "NeoEth": "", + "Neo3CCMC": "", + "Neo3LockProxy": "", + "Neo3Ont": "", + "Neo3Ontd": "", + "Neo3Bnb": "", + "Neo3Eth": "", + "Neo3Ht": "", + "Neo3Hrc20": "", "CMLockProxy": "", "BtcValLimit": 100000, "OntValLimit": 10, + "OntdValLimit": 0, "OngValLimit": 10000, "EthValLimit": 100000, "Oep4ValLimit": 1000, "Erc20ValLimit": 1000, - - "KaiUrl": "https://dev-6.kardiachain.io", - "KaiEpoch": 584820, - "KaiPrivateKey": "8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", - "KaiChainID": 138 - -} + "KaiValLimit": 10, + "USDTValLimit": 0, + "NeoValLimit": 0, + "WBTCValLimit": 0, + "USDCValLimit": 0, + "RenBTCValLimit": 0, + "OntdValFloor": 0 +} \ No newline at end of file diff --git a/config/config.go b/config/config.go index 5b8eae7..4ded0e3 100644 --- a/config/config.go +++ b/config/config.go @@ -51,7 +51,7 @@ type TestConfig struct { MscChainID uint64 OkChainID uint64 KaiChainID uint64 - + BtcRestAddr string BtcRestUser string BtcRestPwd string @@ -205,7 +205,7 @@ type TestConfig struct { HecoUSDC string HecoNeo string HecoRenBTC string - + // kai contracts: auto set after deploy KaiEccd string KaiEccm string @@ -221,7 +221,7 @@ type TestConfig struct { KaiUSDC string KaiNeo string KaiRenBTC string - + // o3 contracts: auto set after deploy O3Eccd string O3Eccm string @@ -313,6 +313,7 @@ type TestConfig struct { WBTCValLimit uint64 USDCValLimit uint64 RenBTCValLimit uint64 + KaiValLimit uint64 OntdValFloor uint64 } diff --git a/go.mod b/go.mod index f4619df..5e758d5 100644 --- a/go.mod +++ b/go.mod @@ -45,4 +45,4 @@ replace github.com/polynetwork/poly-go-sdk => github.com/joeqian10/poly-go-sdk v //replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 -replace github.com/polynetwork/kai-relayer => github.com/dogecoindev/kai-relayer v0.0.0-20210531024930-1ae441ffccb6 +replace github.com/polynetwork/kai-relayer => github.com/dogecoindev/kai-relayer v0.0.0-20210602042052-c1c2c1f145f3 diff --git a/go.sum b/go.sum index ee122af..bb92396 100644 --- a/go.sum +++ b/go.sum @@ -258,6 +258,10 @@ github.com/dogecoindev/kai-relayer v0.0.0-20210527114906-bc3e37fbc166 h1:SAN+Wcv github.com/dogecoindev/kai-relayer v0.0.0-20210527114906-bc3e37fbc166/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= github.com/dogecoindev/kai-relayer v0.0.0-20210531024930-1ae441ffccb6 h1:ZmUnKamhX8MYd58diikbTzAGcvSwhazUfAvY5ALWC4g= github.com/dogecoindev/kai-relayer v0.0.0-20210531024930-1ae441ffccb6/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dogecoindev/kai-relayer v0.0.0-20210602041540-c6aba2dd1cc5 h1:N1m+PXnIdezTlRMNacMCtcVrEcgK8oeSAtUsI+KtAKI= +github.com/dogecoindev/kai-relayer v0.0.0-20210602041540-c6aba2dd1cc5/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dogecoindev/kai-relayer v0.0.0-20210602042052-c1c2c1f145f3 h1:DGE+BwUN4X8045hHHMvi5VL32PKTX/3X1XOyqxIaoj8= +github.com/dogecoindev/kai-relayer v0.0.0-20210602042052-c1c2c1f145f3/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87 h1:OMbqMXf9OAXzH1dDH82mQMrddBE8LIIwDtxeK4wE1/A= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs= diff --git a/testcase/init.go b/testcase/init.go index 5d20b96..8534720 100644 --- a/testcase/init.go +++ b/testcase/init.go @@ -92,4 +92,7 @@ func init() { testframework.TFramework.RegTestCase("BnbToEthOnce", BnbToEthOnce) testframework.TFramework.RegTestCase("RenBTCCircle", RenBTCCircle) testframework.TFramework.RegTestCase("EOntdToNeoAndBack", EOntdToNeoAndBack) + + testframework.TFramework.RegTestCase("SendKaiToEthChain", SendKaiToEthChain) + testframework.TFramework.RegTestCase("SendEthToKaiChain", SendEthToKaiChain) } diff --git a/testcase/kai.go b/testcase/kai.go new file mode 100644 index 0000000..b9e4ad9 --- /dev/null +++ b/testcase/kai.go @@ -0,0 +1,175 @@ +package testcase + +import ( + "bytes" + "context" + "fmt" + "math/big" + "strings" + "time" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + ethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rlp" + "github.com/polynetwork/eth-contracts/go_abi/lock_proxy_abi" + "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/chains/kai" + "github.com/polynetwork/poly-io-test/config" + "github.com/polynetwork/poly-io-test/log" + "github.com/polynetwork/poly-io-test/testframework" +) + +func SendKaiToEthChain(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + err := SendKaiCrossEth(ctx, status, GetRandAmount(config.DefConfig.OntValLimit, 1)) + if err != nil { + log.Error("SendKaiToEthChain: %s", err) + return false + } + WaitUntilClean(status) + status.SetItSuccess(1) + return true +} + +func SendEthToKaiChain(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + err := SendEthCrossKai(ctx, status, GetRandAmount(config.DefConfig.OntValLimit, 1)) + if err != nil { + log.Error("SendEthToKaiChain: %s", err) + return false + } + WaitUntilClean(status) + status.SetItSuccess(1) + return true +} + +func SendKaiCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + kClient := ctx.KaiInvoker.Client() + // _, err := ctx.KaiInvoker.BindAssetHash( + // config.DefConfig.KaiLockProxy, + // "C1c23a67aa919454e67061A6d9962d9EBbf05fad", + // "0000000000000000000000000000000000000000", + // config.DefConfig.EthChainID, + // 1000, + // ) + // if err != nil { + // panic(err) + // } + + gasPrice, err := kClient.SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendKaiCrossEth, get suggest gas price failed error: %s", err.Error()) + } + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendKaiCrossEth, abi.JSON error:" + err.Error()) + } + + assetaddress := ethcommon.HexToAddress("C1c23a67aa919454e67061A6d9962d9EBbf05fad") + rawFrom := ctx.KaiInvoker.Signer.Address.Bytes() + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.EthChainID), rawFrom, + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendKaiCrossEth, contractabi.Pack error:" + err.Error()) + } + contractAddr := ethcommon.HexToAddress(config.DefConfig.KaiLockProxy) + callMsg := ethereum.CallMsg{ + From: ctx.KaiInvoker.Signer.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: nil, Data: txData, + } + gasLimit, err := kClient.EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendKaiCrossEth, estimate gas limit error: %s", err.Error()) + } + fmt.Println(gasLimit, "------------") + nonce := ctx.KaiInvoker.NM.GetAddressNonce(ctx.KaiInvoker.Signer.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + _ = rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendKaiCrossEth, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.KaiInvoker.Signer.PrivateKey) + if err != nil { + return fmt.Errorf("SendKaiCrossEth, types.SignTx error: %s", err.Error()) + } + + err = kClient.SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendKaiCrossEth, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"KaiToEth", time.Now()}) + kClient.WaitTransactionConfirm(signedtx.Hash()) + return nil +} + +func SendEthCrossKai(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + client := ctx.EthInvoker.ETHUtil.GetEthClient() + + gasPrice, err := client.SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendEthCrossKai, get suggest gas price failed error: %s", err.Error()) + } + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendEthCrossKai, abi.JSON error:" + err.Error()) + } + + assetaddress := ethcommon.HexToAddress("0000000000000000000000000000000000000000") + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.KaiChainID), ctx.OntInvoker.OntAcc.Address[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendEthCrossKai, contractabi.Pack error:" + err.Error()) + } + + contractAddr := ethcommon.HexToAddress(config.DefConfig.KaiLockProxy) + callMsg := ethereum.CallMsg{ + From: ctx.KaiInvoker.Signer.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(amount)), Data: txData, + } + gasLimit, err := client.EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendEthCrossKai, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.KaiInvoker.NM.GetAddressNonce(ctx.KaiInvoker.Signer.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + _ = rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendEthCrossKai, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.KaiInvoker.Signer.PrivateKey) + if err != nil { + return fmt.Errorf("SendEthCrossKai, types.SignTx error: %s", err.Error()) + } + + err = client.SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendEthCrossKai, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"EthToOnt", time.Now()}) + ctx.EthInvoker.ETHUtil.WaitTransactionConfirm(signedtx.Hash()) + return nil +} + +func MakeKaiAuth(signer *kai.Signer, nonce, gasPrice, gasLimit uint64) *bind.TransactOpts { + auth := bind.NewKeyedTransactor(signer.PrivateKey) + auth.Nonce = big.NewInt(int64(nonce)) + auth.Value = big.NewInt(int64(0)) // in wei + auth.GasLimit = gasLimit // in units + auth.GasPrice = big.NewInt(int64(gasPrice)) + + return auth +} diff --git a/testframework/check.go b/testframework/check.go index 5bef573..f3ad578 100644 --- a/testframework/check.go +++ b/testframework/check.go @@ -112,7 +112,7 @@ func getInvoker(ctx *TestFrameworkContext, chainID uint64) *eth.EInvoker { case config.DefConfig.O3ChainID: return ctx.O3Invoker default: - panic(fmt.Sprintf("unknown chain id:%d", chainID)) + panic(fmt.Sprintf("getInvoker:unknown chain id:%d", chainID)) } } @@ -126,8 +126,10 @@ func getEccm(chainID uint64) string { return config.DefConfig.MscEccm case config.DefConfig.O3ChainID: return config.DefConfig.O3Eccm + case config.DefConfig.KaiChainID: + return config.DefConfig.KaiEccm default: - panic(fmt.Sprintf("unknown chain id:%d", chainID)) + panic(fmt.Sprintf("getEccm:unknown chain id:%d", chainID)) } } diff --git a/testframework/framework.go b/testframework/framework.go index c480f9e..a81f38c 100644 --- a/testframework/framework.go +++ b/testframework/framework.go @@ -26,6 +26,7 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" @@ -63,6 +64,7 @@ type TestFramework struct { ontInvoker *ont.OntInvoker cosmosInvoker *cosmos.CosmosInvoker neoInvoker *neo.NeoInvoker + kaiInvoker *kai.Invoker } //NewTestFramework return a TestFramework instance @@ -119,7 +121,7 @@ func (this *TestFramework) runTestList(testCaseList []TestCase, loopNumber int) defer this.onTestFinish(testCaseList) ctx := NewTestFrameworkContext(this, testCaseList, this.rcSdk, this.ethInvoker, this.bscInvoker, this.mscInvoker, this.o3Invoker, this.btcInvoker, - this.ontInvoker, this.cosmosInvoker, this.neoInvoker) + this.ontInvoker, this.cosmosInvoker, this.neoInvoker, this.kaiInvoker) if this.ontInvoker != nil { go MonitorOnt(ctx) } @@ -145,6 +147,10 @@ func (this *TestFramework) runTestList(testCaseList []TestCase, loopNumber int) if this.neoInvoker != nil { go MonitorNeo(ctx) } + if this.kaiInvoker != nil { + go MonitorKai(ctx) + } + go ReportPending(ctx) wg := &sync.WaitGroup{} @@ -193,6 +199,11 @@ func (this *TestFramework) SetO3Invoker(invoker *eth.EInvoker) { this.o3Invoker = invoker } +//SetO3Invoker instance to test framework +func (this *TestFramework) SeKaiInvoker(invoker *kai.Invoker) { + this.kaiInvoker = invoker +} + //SetMSCInvoker instance to test framework func (this *TestFramework) SetMSCInvoker(invoker *eth.EInvoker) { this.mscInvoker = invoker diff --git a/testframework/framework_context.go b/testframework/framework_context.go index cf28a26..1747e2d 100644 --- a/testframework/framework_context.go +++ b/testframework/framework_context.go @@ -25,6 +25,7 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" ) @@ -44,11 +45,12 @@ type TestFrameworkContext struct { OntInvoker *ont.OntInvoker CMInvoker *cosmos.CosmosInvoker NeoInvoker *neo.NeoInvoker + KaiInvoker *kai.Invoker } //NewTestFrameworkContext return a TestFrameworkContext instance func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_go_sdk.PolySdk, eInvkr, bscInvkr, mscInvkr, o3Invkr *eth.EInvoker, - btcInvkr *btc.BtcInvoker, ontInvkr *ont.OntInvoker, cmInvoker *cosmos.CosmosInvoker, neoInvoker *neo.NeoInvoker) *TestFrameworkContext { + btcInvkr *btc.BtcInvoker, ontInvkr *ont.OntInvoker, cmInvoker *cosmos.CosmosInvoker, neoInvoker *neo.NeoInvoker, kaiInvoker *kai.Invoker) *TestFrameworkContext { ctx := &TestFrameworkContext{ Framework: fw, Cases: caseArr, @@ -61,6 +63,7 @@ func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_ OntInvoker: ontInvkr, CMInvoker: cmInvoker, NeoInvoker: neoInvoker, + KaiInvoker: kaiInvoker, } ctx.Status = NewCtxStatus(ctx) return ctx diff --git a/testframework/kai.go b/testframework/kai.go new file mode 100644 index 0000000..357976e --- /dev/null +++ b/testframework/kai.go @@ -0,0 +1,89 @@ +package testframework + +import ( + "context" + "encoding/hex" + "math/big" + "os" + "time" + + "github.com/polynetwork/poly-io-test/chains/kai" + "github.com/polynetwork/poly-io-test/log" +) + +func MonitorKai(ctx *TestFrameworkContext) { + invoker := ctx.KaiInvoker + ctx2 := context.Background() + currentHeight, err := invoker.Client().BlockNumber(ctx2) + if err != nil { + log.Errorf("MonitorEthChain - ctx.EthTools.GetNodeHeight error: %s", err) + os.Exit(1) + } + ethHeight := uint32(currentHeight) - 5 + updateTicker := time.NewTicker(time.Second * 1) + for { + select { + case <-updateTicker.C: + currentHeight, err := invoker.Client().BlockNumber(ctx2) + if err != nil { + log.Errorf("ctx.EthTools.GetNodeHeight error: %s", err) + continue + } + if uint32(currentHeight) <= ethHeight+5 { + continue + } + for uint32(currentHeight) > ethHeight+5 { + ethHeight++ + err = parseKaiChainBlock(ctx, invoker, ethHeight) // TODO: influenced by forks + if err != nil { + log.Errorf("parseKaiChainBlock error: %s", err) + ethHeight-- + break + } + } + } + } +} + +func parseKaiChainBlock(ctx *TestFrameworkContext, invoker *kai.Invoker, height uint32) error { + // contract is different + lockevents, unlockevents, err := invoker.GetSmartContractEventByBlock(getEccm(invoker.ChainID), uint64(height)) + if err != nil { + return err + } + //log.Infof("eth chain, block height: %d, unlock events num: %d, lock events num: %d", height, len(unlockevents), len(lockevents)) + for _, event := range lockevents { + // try to get all data + // + ethTxHash := event.TxHash[2:] + ok, idx := ctx.Status.IsTxPending(ethTxHash) + if !ok { + continue + } + + var ethTxIdByte []byte + indexInt := big.NewInt(0) + indexInt.SetBytes(event.Txid) + for i := len(indexInt.Bytes()); i < 32; i++ { + ethTxIdByte = append(ethTxIdByte, 0) + } + ethTxIdByte = append(ethTxIdByte, indexInt.Bytes()...) + ethTxIdStr := hex.EncodeToString(ethTxIdByte) + log.Infof("send cross chain tx on eth, tx hash: %s, tx id: %s chainID:%d", ethTxHash, ethTxIdStr, invoker.ChainID) + caseStatus := ctx.Status.GetCaseStatus(idx) + caseStatus.AddTx(ethTxIdStr, &TxInfo{ethTxHash, time.Now()}) + caseStatus.Del(ethTxHash) + } + + for _, event := range unlockevents { + // try to get all data + // + allianceTxHash := event.RTxid + rawTxHash := event.FromTxId + if ok, idx := ctx.Status.IsTxPending(rawTxHash); ok { + log.Infof("receive cross chain tx on eth, txhash: %s, alliance tx hash: %s, raw tx hash: %s chainID:%d", event.Txid, allianceTxHash, rawTxHash, invoker.ChainID) + ctx.Status.DelWithIndex(rawTxHash, idx) + } + } + return nil +} From f49fb3fed70e0ebc0f593278f7dd9d9d193ed73f Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Thu, 3 Jun 2021 18:37:23 +0700 Subject: [PATCH 86/96] UPDATE KAI TEST --- chains/eth/eth_invoker.go | 2 ++ chains/kai/invoker.go | 68 +++++++++++++++++++++++++++++++++++++++ config.json | 20 ++++++------ testcase/kai.go | 40 +++++++++-------------- 4 files changed, 95 insertions(+), 35 deletions(-) diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index 43a7359..2fc7a00 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -238,6 +238,8 @@ func (ethInvoker *EInvoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetH toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.O3ChainID { toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.KaiChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.NeoChainID { other, err := helper.UInt160FromString(toAssetHash) if err != nil { diff --git a/chains/kai/invoker.go b/chains/kai/invoker.go index 75be458..5c99e60 100644 --- a/chains/kai/invoker.go +++ b/chains/kai/invoker.go @@ -14,6 +14,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/joeqian10/neo-gogogo/helper" ontcommon "github.com/ontio/ontology/common" + utils2 "github.com/ontio/ontology/smartcontract/service/native/utils" "github.com/polynetwork/eth-contracts/go_abi/btcx_abi" "github.com/polynetwork/eth-contracts/go_abi/eccd_abi" "github.com/polynetwork/eth-contracts/go_abi/eccm_abi" @@ -88,6 +89,8 @@ func (ethInvoker *Invoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetHa toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.O3ChainID { toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.KaiChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.NeoChainID { other, err := helper.UInt160FromString(toAssetHash) if err != nil { @@ -321,6 +324,71 @@ func (i *Invoker) Client() *kaiclient.Client { return i.client } +func (i *Invoker) BindOntAsset(lockProxy, ontOnEth, ongOnEth, oep4OnEth, oep4OnOnt string) ([]*types.Transaction, error) { + auth, contract, err := i.MakeLockProxy(lockProxy) + if err != nil { + return nil, err + } + txs := make([]*types.Transaction, 0) + + tx1, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ontOnEth), + config.DefConfig.OntChainID, utils2.OntContractAddress[:]) + if err != nil { + return nil, err + } + i.Client().WaitTransactionConfirm(tx1.Hash()) + txs = append(txs, tx1) + + auth, _ = i.MakeSmartContractAuth() + tx4, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ontOnEth), + config.DefConfig.CMCrossChainId, []byte(config.CM_ONT)) + if err != nil { + return nil, err + } + i.client.WaitTransactionConfirm(tx4.Hash()) + txs = append(txs, tx4) + + auth, _ = i.MakeSmartContractAuth() + tx2, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ongOnEth), + config.DefConfig.OntChainID, utils2.OngContractAddress[:]) + if err != nil { + return nil, err + } + i.client.WaitTransactionConfirm(tx2.Hash()) + txs = append(txs, tx2) + + auth, _ = i.MakeSmartContractAuth() + tx5, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ongOnEth), + config.DefConfig.CMCrossChainId, []byte(config.CM_ONG)) + if err != nil { + return nil, err + } + i.client.WaitTransactionConfirm(tx5.Hash()) + txs = append(txs, tx5) + + oep4, err := ontcommon.AddressFromHexString(oep4OnOnt) + if err != nil { + return nil, err + } + auth, _ = i.MakeSmartContractAuth() + tx3, err := contract.BindAssetHash(auth, ethComm.HexToAddress(oep4OnEth), config.DefConfig.OntChainID, oep4[:]) + if err != nil { + return nil, err + } + i.client.WaitTransactionConfirm(tx3.Hash()) + txs = append(txs, tx3) + + auth, _ = i.MakeSmartContractAuth() + tx6, err := contract.BindAssetHash(auth, ethComm.HexToAddress(oep4OnEth), config.DefConfig.CMCrossChainId, []byte(config.CM_OEP4)) + if err != nil { + return nil, err + } + i.client.WaitTransactionConfirm(tx6.Hash()) + txs = append(txs, tx6) + + return txs, nil +} + func (i *Invoker) GetAccInfo() (string, error) { h, err := i.client.BlockNumber(context.Background()) if err != nil { diff --git a/config.json b/config.json index 5c4fe4e..2ad3c3b 100644 --- a/config.json +++ b/config.json @@ -66,8 +66,8 @@ "Neo3AddressVersion": 0, "Neo3Epoch": 0, "KaiUrl": "https://dev-6.kardiachain.io", - "KaiEpoch": 584820, "KaiPrivateKey": "8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", + "KaiEpoch": 584820, "RCWallet": ".wallets/wallet.dat", "RCWalletPwd": "", "RchainJsonRpcAddress": "http://138.91.6.226:40336", @@ -133,14 +133,14 @@ "HecoUSDC": "", "HecoNeo": "", "HecoRenBTC": "", - "KaiEccd": "0xf7616021e91Ad107e5149DD1E5E41148B4d25bda", - "KaiEccm": "0xfD7fa60cc69A1787Cd4255E3a9397464844aeB7B", - "KaiEccmp": "0x6B77fe5A964A9230324c6c421C1f874F479f4dc2", - "KaiLockProxy": "0x7038107B01EA22e4B51D7D29a4fE472E986625Ff", - "Krc20": "0xC1c23a67aa919454e67061A6d9962d9EBbf05fad", - "KaiOep4": "0x9BEd34f908BAde310a3436793875D1bb5ebb2095", - "KaiOngx": "0xEBcC5062f26BbBEc3b03986983B5084e9ABf9D96", - "KaiOntx": "0x22d42C1A2B39613636107d2ba8861da6a5f122D2", + "KaiEccd": "0x319aD69d324BE79d24e1Cc71e464E9F50F26F880", + "KaiEccm": "0x8FD7708c9e17F739BcaA13A809022F94b26b8aB8", + "KaiEccmp": "0x853249c97FC100b01C46cbeE1C9C3dcA9925CCef", + "KaiLockProxy": "0x006029DFcacaC453eC6dFc7703bdba5E3138C5A7", + "Krc20": "0x8e5dcfecbEdf15d5026633eA3c7beF5391c6ab03", + "KaiOep4": "0x185040E5E5efe4841EC7D558057de5AC65289b7C", + "KaiOngx": "0xee4b18d47d6d274D417E5dF1b2b332c7b9f2078f", + "KaiOntx": "0xaf194cc85f28Ee2294320bab221443398D346655", "KaiWBTC": "", "KaiUSDT": "", "KaiDai": "", @@ -218,11 +218,11 @@ "EthValLimit": 100000, "Oep4ValLimit": 1000, "Erc20ValLimit": 1000, - "KaiValLimit": 10, "USDTValLimit": 0, "NeoValLimit": 0, "WBTCValLimit": 0, "USDCValLimit": 0, "RenBTCValLimit": 0, + "KaiValLimit": 10, "OntdValFloor": 0 } \ No newline at end of file diff --git a/testcase/kai.go b/testcase/kai.go index b9e4ad9..09b96fc 100644 --- a/testcase/kai.go +++ b/testcase/kai.go @@ -46,66 +46,56 @@ func SendEthToKaiChain(ctx *testframework.TestFrameworkContext, status *testfram } func SendKaiCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { - kClient := ctx.KaiInvoker.Client() - // _, err := ctx.KaiInvoker.BindAssetHash( - // config.DefConfig.KaiLockProxy, - // "C1c23a67aa919454e67061A6d9962d9EBbf05fad", - // "0000000000000000000000000000000000000000", - // config.DefConfig.EthChainID, - // 1000, - // ) - // if err != nil { - // panic(err) - // } - - gasPrice, err := kClient.SuggestGasPrice(context.Background()) + kclient := ctx.KaiInvoker.Client() + gasPrice, err := kclient.SuggestGasPrice(context.Background()) if err != nil { return fmt.Errorf("SendKaiCrossEth, get suggest gas price failed error: %s", err.Error()) } - gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + //gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) if err != nil { return fmt.Errorf("SendKaiCrossEth, abi.JSON error:" + err.Error()) } - - assetaddress := ethcommon.HexToAddress("C1c23a67aa919454e67061A6d9962d9EBbf05fad") rawFrom := ctx.KaiInvoker.Signer.Address.Bytes() - txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.EthChainID), rawFrom, + assetaddress := ethcommon.HexToAddress("0000000000000000000000000000000000000000") + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.KaiChainID), rawFrom[:], big.NewInt(int64(amount))) if err != nil { return fmt.Errorf("SendKaiCrossEth, contractabi.Pack error:" + err.Error()) } + contractAddr := ethcommon.HexToAddress(config.DefConfig.KaiLockProxy) callMsg := ethereum.CallMsg{ From: ctx.KaiInvoker.Signer.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, - Value: nil, Data: txData, + Value: big.NewInt(int64(amount)), Data: txData, } - gasLimit, err := kClient.EstimateGas(context.Background(), callMsg) + gasLimit, err := kclient.EstimateGas(context.Background(), callMsg) if err != nil { return fmt.Errorf("SendKaiCrossEth, estimate gas limit error: %s", err.Error()) } - fmt.Println(gasLimit, "------------") + nonce := ctx.KaiInvoker.NM.GetAddressNonce(ctx.KaiInvoker.Signer.Address) tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) bf := new(bytes.Buffer) - _ = rlp.Encode(bf, tx) + rlp.Encode(bf, tx) rawtx := hexutil.Encode(bf.Bytes()) unsignedTx, err := eth.DeserializeTx(rawtx) if err != nil { return fmt.Errorf("SendKaiCrossEth, eth.DeserializeTx error: %s", err.Error()) } - signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.KaiInvoker.Signer.PrivateKey) + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.KaiInvoker.PrivateKey) if err != nil { return fmt.Errorf("SendKaiCrossEth, types.SignTx error: %s", err.Error()) } - err = kClient.SendTransaction(context.Background(), signedtx) + err = kclient.SendTransaction(context.Background(), signedtx) if err != nil { return fmt.Errorf("SendKaiCrossEth, send transaction error:%s", err.Error()) } status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"KaiToEth", time.Now()}) - kClient.WaitTransactionConfirm(signedtx.Hash()) + kclient.WaitTransactionConfirm(signedtx.Hash()) return nil } @@ -159,7 +149,7 @@ func SendEthCrossKai(ctx *testframework.TestFrameworkContext, status *testframew if err != nil { return fmt.Errorf("SendEthCrossKai, send transaction error:%s", err.Error()) } - status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"EthToOnt", time.Now()}) + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"EthToKai", time.Now()}) ctx.EthInvoker.ETHUtil.WaitTransactionConfirm(signedtx.Hash()) return nil } From b04f87407e362342f9fc9b3313482338103d9134 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Tue, 8 Jun 2021 14:06:45 +0700 Subject: [PATCH 87/96] FIX SendKaiToEthChain --- chains/eth/eth_invoker.go | 4 + chains/eth/eth_tools.go | 2 +- chains/kai/invoker.go | 537 ----------------------------- chains/kai/invoker_test.go | 7 - chains/kai/nonce_manager.go | 89 ----- chains/kai/signer.go | 58 ---- cmd/cctest/main.go | 5 +- cmd/kai_deployer/run.go | 208 +++++------ config.json | 40 ++- config/config.go | 4 + go.mod | 2 +- go.sum | 4 + testcase/kai.go | 18 +- testframework/framework.go | 5 +- testframework/framework_context.go | 5 +- testframework/kai.go | 12 +- 16 files changed, 141 insertions(+), 859 deletions(-) delete mode 100644 chains/kai/invoker.go delete mode 100644 chains/kai/invoker_test.go delete mode 100644 chains/kai/nonce_manager.go delete mode 100644 chains/kai/signer.go diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index 2fc7a00..a7e4329 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -83,6 +83,8 @@ func (ethInvoker *EInvoker) url() string { return ethInvoker.TConfiguration.O3URL case ethInvoker.TConfiguration.OkChainID: return ethInvoker.TConfiguration.OKURL + case ethInvoker.TConfiguration.KaiChainID: + return ethInvoker.TConfiguration.KaiUrl default: panic(fmt.Sprintf("url:unknown chain id:%d", ethInvoker.ChainID)) } @@ -104,6 +106,8 @@ func (ethInvoker *EInvoker) privateKey() string { return ethInvoker.TConfiguration.O3PrivateKey case ethInvoker.TConfiguration.OkChainID: return ethInvoker.TConfiguration.OKPrivateKey + case ethInvoker.TConfiguration.KaiChainID: + return ethInvoker.TConfiguration.KaiPrivateKey default: panic(fmt.Sprintf("privateKey:unknown chain id:%d", ethInvoker.ChainID)) } diff --git a/chains/eth/eth_tools.go b/chains/eth/eth_tools.go index 0ed7086..4d5dfb8 100644 --- a/chains/eth/eth_tools.go +++ b/chains/eth/eth_tools.go @@ -328,7 +328,7 @@ func (self *ETHTools) WaitTransactionConfirm(hash common.Hash) { start := time.Now() for { time.Sleep(time.Millisecond * 100) - if time.Now().After(start.Add(time.Second * 10)) { + if time.Now().After(start.Add(time.Second * 30)) { log.Errorf("WaitTransactionConfirm max wait time exceeded, quit") return } diff --git a/chains/kai/invoker.go b/chains/kai/invoker.go deleted file mode 100644 index 5c99e60..0000000 --- a/chains/kai/invoker.go +++ /dev/null @@ -1,537 +0,0 @@ -package kai - -import ( - "context" - "crypto/ecdsa" - "encoding/hex" - "fmt" - "math/big" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - ethComm "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/joeqian10/neo-gogogo/helper" - ontcommon "github.com/ontio/ontology/common" - utils2 "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/polynetwork/eth-contracts/go_abi/btcx_abi" - "github.com/polynetwork/eth-contracts/go_abi/eccd_abi" - "github.com/polynetwork/eth-contracts/go_abi/eccm_abi" - "github.com/polynetwork/eth-contracts/go_abi/eccmp_abi" - "github.com/polynetwork/eth-contracts/go_abi/erc20_abi" - "github.com/polynetwork/eth-contracts/go_abi/lock_proxy_abi" - "github.com/polynetwork/eth-contracts/go_abi/oep4_abi" - "github.com/polynetwork/eth-contracts/go_abi/ongx_abi" - "github.com/polynetwork/eth-contracts/go_abi/ontx_abi" - "github.com/polynetwork/kai-relayer/kaiclient" - "github.com/polynetwork/poly-io-test/chains/eth" - "github.com/polynetwork/poly-io-test/config" - "github.com/polynetwork/poly-io-test/log" -) - -var ( - DefaultGasLimit = 5000000 -) - -type Invoker struct { - PrivateKey *ecdsa.PrivateKey - ChainID uint64 - TConfiguration *config.TestConfig - client *kaiclient.Client - NM *NonceManager - Signer *Signer -} - -func NewInvoker(chainID uint64) *Invoker { - var err error - instance := &Invoker{} - instance.ChainID = chainID - instance.TConfiguration = config.DefConfig - client, err := kaiclient.Dial(config.DefConfig.KaiUrl) - if err != nil { - panic(err) - } - instance.client = client - instance.NM = NewNonceManager(client) - instance.Signer, err = NewSigner(config.DefConfig.KaiPrivateKey) - if err != nil { - panic(err) - } - instance.PrivateKey = instance.Signer.PrivateKey - return instance -} - -func (ethInvoker *Invoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetHash string, - toChainId uint64, initAmt int64) (*types.Transaction, error) { - auth, contract, err := ethInvoker.MakeLockProxy(lockProxyAddr) - if err != nil { - return nil, err - } - var toAddr []byte - if uint64(toChainId) == config.DefConfig.OntChainID { - addr, err := ontcommon.AddressFromHexString(toAssetHash) - if err != nil { - return nil, err - } - toAddr = addr[:] - } else if uint64(toChainId) == config.DefConfig.CMCrossChainId { - toAddr = []byte(toAssetHash) - } else if uint64(toChainId) == config.DefConfig.EthChainID { - toAddr = ethComm.HexToAddress(toAssetHash).Bytes() - } else if uint64(toChainId) == config.DefConfig.BscChainID { - toAddr = ethComm.HexToAddress(toAssetHash).Bytes() - } else if uint64(toChainId) == config.DefConfig.MscChainID { - toAddr = ethComm.HexToAddress(toAssetHash).Bytes() - } else if uint64(toChainId) == config.DefConfig.OkChainID { - toAddr = ethComm.HexToAddress(toAssetHash).Bytes() - } else if uint64(toChainId) == config.DefConfig.HecoChainID { - toAddr = ethComm.HexToAddress(toAssetHash).Bytes() - } else if uint64(toChainId) == config.DefConfig.O3ChainID { - toAddr = ethComm.HexToAddress(toAssetHash).Bytes() - } else if uint64(toChainId) == config.DefConfig.KaiChainID { - toAddr = ethComm.HexToAddress(toAssetHash).Bytes() - } else if uint64(toChainId) == config.DefConfig.NeoChainID { - other, err := helper.UInt160FromString(toAssetHash) - if err != nil { - return nil, err - } - toAddr = other[:] - } else { - panic(fmt.Sprintf("unkown toChainId:%d", toChainId)) - } - tx, err := contract.BindAssetHash(auth, ethComm.HexToAddress(fromAssetHash), - uint64(toChainId), toAddr[:]) - if err != nil { - return nil, err - } - ethInvoker.client.WaitTransactionConfirm(tx.Hash()) - return tx, nil -} - -func (i *Invoker) MakeSmartContractAuth() (*bind.TransactOpts, error) { - publicKey := i.PrivateKey.Public() - publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) - if !ok { - return nil, fmt.Errorf("MakeSmartContractAuth, cannot assert type: publicKey is not of type *ecdsa.PublicKey") - } - fromAddress := crypto.PubkeyToAddress(*publicKeyECDSA) - nonce, err := i.client.PendingNonceAt(context.Background(), fromAddress) - if err != nil { - return nil, fmt.Errorf("MakeSmartContractAuth PendingNonceAt, %v", err) - } - gasPrice, err := i.client.SuggestGasPrice(context.Background()) - if err != nil { - return nil, fmt.Errorf("MakeSmartContractAuth SuggestGasPrice, %v", err) - } - auth := bind.NewKeyedTransactor(i.PrivateKey) - auth.Nonce = big.NewInt(int64(nonce)) - auth.Value = big.NewInt(int64(0)) // in wei - auth.GasLimit = uint64(DefaultGasLimit) // in units - auth.GasPrice = gasPrice.Mul(gasPrice, big.NewInt(1)) - return auth, nil -} - -func (i *Invoker) DeployEthChainDataContract() (ethComm.Address, *eccd_abi.EthCrossChainData, error) { - auth, err := i.MakeSmartContractAuth() - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployEthChainDataContract, err: %v", err) - } - contractAddress, tx, contract, err := eccd_abi.DeployEthCrossChainData(auth, - i.client) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployEthChainDataContract, err: %v", err) - } - - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) DeployECCMContract(eccdAddress string) (ethComm.Address, *eccm_abi.EthCrossChainManager, error) { - auth, err := i.MakeSmartContractAuth() - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployECCMContract, err: %v", err) - } - address := ethComm.HexToAddress(eccdAddress) - contractAddress, tx, contract, err := eccm_abi.DeployEthCrossChainManager(auth, - i.client, address, i.ChainID) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployECCMContract, err: %v", err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) DeployECCMPContract(eccmAddress string) (ethComm.Address, *eccmp_abi.EthCrossChainManagerProxy, error) { - auth, _ := i.MakeSmartContractAuth() - address := ethComm.HexToAddress(eccmAddress) - contractAddress, tx, contract, err := eccmp_abi.DeployEthCrossChainManagerProxy(auth, - i.client, address) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployECCMPContract, err: %v", err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) DeployERC20() (ethComm.Address, *erc20_abi.ERC20Template, error) { - auth, _ := i.MakeSmartContractAuth() - contractAddress, tx, contract, err := erc20_abi.DeployERC20Template(auth, - i.client) - if err != nil { - log.Fatal(err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) DeployOEP4(lockProxy string) (ethComm.Address, *oep4_abi.OEP4Template, error) { - auth, _ := i.MakeSmartContractAuth() - lockProxyAddr := ethComm.HexToAddress(lockProxy) - contractAddress, tx, contract, err := oep4_abi.DeployOEP4Template(auth, - i.client, lockProxyAddr) - if err != nil { - log.Fatal(err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - - auth, _ = i.MakeSmartContractAuth() - tx, err = contract.DeletageToProxy(auth, lockProxyAddr, big.NewInt(1e13)) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("failed to DeletageToProxy: %v", err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) MakeLockProxy(lockProxyAddr string) (*bind.TransactOpts, *lock_proxy_abi.LockProxy, error) { - auth, _ := i.MakeSmartContractAuth() - contract, err := lock_proxy_abi.NewLockProxy(ethComm.HexToAddress(lockProxyAddr), - i.client) - if err != nil { - return nil, nil, err - } - return auth, contract, nil -} - -func (i *Invoker) DeployLockProxyContract(eccmp ethComm.Address) (ethComm.Address, *lock_proxy_abi.LockProxy, error) { - auth, _ := i.MakeSmartContractAuth() - contractAddress, tx, contract, err := lock_proxy_abi.DeployLockProxy(auth, - i.client) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployLockProxyContract: %v", err) - - } - i.client.WaitTransactionConfirm(tx.Hash()) - - auth, _ = i.MakeSmartContractAuth() - tx, err = contract.SetManagerProxy(auth, eccmp) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("SetManagerProxy: %v", err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) DeployBTCXContract(redeemscript string) (ethComm.Address, *btcx_abi.BTCX, error) { - auth, _ := i.MakeSmartContractAuth() - redeemscriptBytes, err := hex.DecodeString(redeemscript) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployBTCXContract: %v", err) - } - contractAddress, tx, contract, err := btcx_abi.DeployBTCX(auth, - i.client, redeemscriptBytes) - if err != nil { - log.Fatal(err) - } - //fmt.Println("New Deployed BTCX Contract Address is", contractAddress) - //fmt.Println("New Deployed BTCX Contract TX is", tx.Hash().Hex()) - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (ethInvoker *Invoker) DeployONTXContract(lockProxyAddr string) (ethComm.Address, *ontx_abi.ONTX, error) { - auth, _ := ethInvoker.MakeSmartContractAuth() - contractAddress, tx, contract, err := ontx_abi.DeployONTX(auth, - ethInvoker.client, ethComm.HexToAddress(lockProxyAddr)) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployONTXContract, failed to deploy: %v", err) - } - //fmt.Println("New Deployed ONTX Contract Address is", contractAddress) - //fmt.Println("New Deployed ONTX Contract TX is", tx.Hash().Hex()) - ethInvoker.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) DeployONGXContract(lockProxyAddr string) (ethComm.Address, *ongx_abi.ONGX, error) { - auth, _ := i.MakeSmartContractAuth() - contractAddress, tx, contract, err := ongx_abi.DeployONGX(auth, - i.client, ethComm.HexToAddress(lockProxyAddr)) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployONGXContract, failed to deploy: %v", err) - } - //fmt.Println("New Deployed ONTX Contract Address is", contractAddress) - //fmt.Println("New Deployed ONTX Contract TX is", tx.Hash().Hex()) - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) SetManagerProxyForLockProxy(lockProxyAddrHex, eccmpAddressHex string) (*types.Transaction, error) { - lockProxyAddr := ethComm.HexToAddress(lockProxyAddrHex) - lockProxyContract, err := lock_proxy_abi.NewLockProxy(lockProxyAddr, i.client) - if err != nil { - return nil, fmt.Errorf("SetManagerProxyForLockProxy: %v", err) - } - auth, _ := i.MakeSmartContractAuth() - tx, err := lockProxyContract.SetManagerProxy(auth, ethComm.HexToAddress(eccmpAddressHex)) - if err != nil { - return nil, fmt.Errorf("SetManagerProxyForLockProxy: %v", err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - return tx, nil -} - -func (i *Invoker) TransferOwnershipForECCD(eccdAddrHex, ownershipAddressHex string) (*types.Transaction, error) { - ownershipAddress := ethComm.HexToAddress(ownershipAddressHex) - eccdAddr := ethComm.HexToAddress(eccdAddrHex) - eccdContract, err := eccd_abi.NewEthCrossChainData(eccdAddr, i.client) - if err != nil { - return nil, fmt.Errorf("TransferOwnershipForECCD, err: %v", err) - } - auth, _ := i.MakeSmartContractAuth() - tx, err := eccdContract.TransferOwnership(auth, ownershipAddress) - i.client.WaitTransactionConfirm(tx.Hash()) - return tx, nil -} - -func (i *Invoker) TransferOwnershipForECCM(eccmAddrHex, ownershipAddressHex string) (*types.Transaction, error) { - ownershipAddress := ethComm.HexToAddress(ownershipAddressHex) - eccmAddr := ethComm.HexToAddress(eccmAddrHex) - eccmContract, err := eccm_abi.NewEthCrossChainManager(eccmAddr, i.client) - if err != nil { - return nil, fmt.Errorf("TransferOwnershipForECCM err: %v", err) - } - auth, _ := i.MakeSmartContractAuth() - tx, err := eccmContract.TransferOwnership(auth, ownershipAddress) - if err != nil { - log.Fatal(err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - return tx, nil -} - -func (i *Invoker) Client() *kaiclient.Client { - return i.client -} - -func (i *Invoker) BindOntAsset(lockProxy, ontOnEth, ongOnEth, oep4OnEth, oep4OnOnt string) ([]*types.Transaction, error) { - auth, contract, err := i.MakeLockProxy(lockProxy) - if err != nil { - return nil, err - } - txs := make([]*types.Transaction, 0) - - tx1, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ontOnEth), - config.DefConfig.OntChainID, utils2.OntContractAddress[:]) - if err != nil { - return nil, err - } - i.Client().WaitTransactionConfirm(tx1.Hash()) - txs = append(txs, tx1) - - auth, _ = i.MakeSmartContractAuth() - tx4, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ontOnEth), - config.DefConfig.CMCrossChainId, []byte(config.CM_ONT)) - if err != nil { - return nil, err - } - i.client.WaitTransactionConfirm(tx4.Hash()) - txs = append(txs, tx4) - - auth, _ = i.MakeSmartContractAuth() - tx2, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ongOnEth), - config.DefConfig.OntChainID, utils2.OngContractAddress[:]) - if err != nil { - return nil, err - } - i.client.WaitTransactionConfirm(tx2.Hash()) - txs = append(txs, tx2) - - auth, _ = i.MakeSmartContractAuth() - tx5, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ongOnEth), - config.DefConfig.CMCrossChainId, []byte(config.CM_ONG)) - if err != nil { - return nil, err - } - i.client.WaitTransactionConfirm(tx5.Hash()) - txs = append(txs, tx5) - - oep4, err := ontcommon.AddressFromHexString(oep4OnOnt) - if err != nil { - return nil, err - } - auth, _ = i.MakeSmartContractAuth() - tx3, err := contract.BindAssetHash(auth, ethComm.HexToAddress(oep4OnEth), config.DefConfig.OntChainID, oep4[:]) - if err != nil { - return nil, err - } - i.client.WaitTransactionConfirm(tx3.Hash()) - txs = append(txs, tx3) - - auth, _ = i.MakeSmartContractAuth() - tx6, err := contract.BindAssetHash(auth, ethComm.HexToAddress(oep4OnEth), config.DefConfig.CMCrossChainId, []byte(config.CM_OEP4)) - if err != nil { - return nil, err - } - i.client.WaitTransactionConfirm(tx6.Hash()) - txs = append(txs, tx6) - - return txs, nil -} - -func (i *Invoker) GetAccInfo() (string, error) { - h, err := i.client.BlockNumber(context.Background()) - if err != nil { - return "", err - } - val, err := i.client.BalanceAt(context.Background(), i.Signer.Address, big.NewInt(int64(h))) - if err != nil { - return "", err - } - ethInfo := fmt.Sprintf("eth: %d", val.Uint64()) - - ontx, err := ontx_abi.NewONTX(ethComm.HexToAddress(i.TConfiguration.EthOntx), i.client) - if err != nil { - return "", err - } - val, err = ontx.BalanceOf(nil, i.Signer.Address) - if err != nil { - return "", err - } - ontInfo := fmt.Sprintf("ontx: %d", val.Uint64()) - - ongx, err := ongx_abi.NewONGX(ethComm.HexToAddress(i.TConfiguration.EthOngx), i.client) - if err != nil { - return "", err - } - val, err = ongx.BalanceOf(nil, i.Signer.Address) - if err != nil { - return "", err - } - ongInfo := fmt.Sprintf("ongx: %d", val.Uint64()) - - oep4x, err := oep4_abi.NewOEP4Template(ethComm.HexToAddress(i.TConfiguration.EthOep4), i.client) - if err != nil { - return "", err - } - val, err = oep4x.BalanceOf(nil, i.Signer.Address) - if err != nil { - return "", err - } - oep4Info := fmt.Sprintf("oep4x: %d", val.Uint64()) - - erc20, err := erc20_abi.NewERC20(ethComm.HexToAddress(i.TConfiguration.EthErc20), i.client) - if err != nil { - return "", err - } - val, err = erc20.BalanceOf(nil, i.Signer.Address) - if err != nil { - return "", err - } - erc20Info := fmt.Sprintf("erc20: %d", val.Uint64()) - - btcx, err := btcx_abi.NewBTCX(ethComm.HexToAddress(i.TConfiguration.BtceContractAddress), i.client) - if err != nil { - return "", err - } - val, err = btcx.BalanceOf(nil, i.Signer.Address) - if err != nil { - return "", err - } - btcxInfo := fmt.Sprintf("btcx: %d", val.Uint64()) - - return fmt.Sprintf("ETHEREUM: acc: %s, asset: [ %s, %s, %s, %s, %s, %s ]", - i.Signer.Address.String(), ethInfo, ontInfo, ongInfo, oep4Info, erc20Info, btcxInfo), nil -} - -func (i *Invoker) GetSmartContractEventByBlock(contractAddr string, height uint64) ([]*eth.LockEvent, []*eth.UnlockEvent, error) { - eccmAddr := common.HexToAddress(contractAddr) - instance, err := eccm_abi.NewEthCrossChainManager(eccmAddr, i.client) - if err != nil { - return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error: %s", err.Error()) - } - - opt := &bind.FilterOpts{ - Start: height, - End: &height, - Context: context.Background(), - } - - ethlockevents := make([]*eth.LockEvent, 0) - { - events, err := instance.FilterCrossChainEvent(opt, nil) - if err != nil { - return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error :%s", err.Error()) - } - - if events == nil { - return nil, nil, fmt.Errorf("GetSmartContractEventByBlock - no events found on FilterCrossChainEvent") - } - - for events.Next() { - evt := events.Event - ethlockevents = append(ethlockevents, ð.LockEvent{ - Method: "lock", - TxHash: evt.Raw.TxHash.String(), - Txid: evt.TxId, - Saddress: evt.Sender.String(), - Tchain: uint32(evt.ToChainId), - Value: evt.Rawdata, - Height: height, - }) - } - } - - ethunlockevents := make([]*eth.UnlockEvent, 0) - { - events, err := instance.FilterVerifyHeaderAndExecuteTxEvent(opt) - if err != nil { - return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error :%s", err.Error()) - } - - if events == nil { - return nil, nil, fmt.Errorf("GetSmartContractEventByBlock - no events found on FilterCrossChainEvent") - } - - for events.Next() { - evt := events.Event - ethunlockevents = append(ethunlockevents, ð.UnlockEvent{ - Method: "unlock", - Txid: evt.Raw.TxHash.String(), - RTxid: hex.EncodeToString(evt.CrossChainTxHash), - FromTxId: hex.EncodeToString(evt.FromChainTxHash), - Token: hex.EncodeToString(evt.ToContract), - Height: height, - }) - } - if err != nil { - return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error :%s", err.Error()) - } - - if events == nil { - return nil, nil, fmt.Errorf("GetSmartContractEventByBlock - no events found on FilterCrossChainEvent") - } - - for events.Next() { - evt := events.Event - ethunlockevents = append(ethunlockevents, ð.UnlockEvent{ - Method: "unlock", - Txid: evt.Raw.TxHash.String(), - RTxid: hex.EncodeToString(evt.CrossChainTxHash), - Token: hex.EncodeToString(evt.ToContract), - Height: height, - }) - } - } - return ethlockevents, ethunlockevents, nil -} diff --git a/chains/kai/invoker_test.go b/chains/kai/invoker_test.go deleted file mode 100644 index 81fd4e2..0000000 --- a/chains/kai/invoker_test.go +++ /dev/null @@ -1,7 +0,0 @@ -package kai - -import "testing" - -func TestInvoker(t *testing.T) { - -} diff --git a/chains/kai/nonce_manager.go b/chains/kai/nonce_manager.go deleted file mode 100644 index 8b0461c..0000000 --- a/chains/kai/nonce_manager.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -* Copyright (C) 2020 The poly network Authors -* This file is part of The poly network library. -* -* The poly network is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* The poly network is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Lesser General Public License for more details. -* You should have received a copy of the GNU Lesser General Public License -* along with The poly network . If not, see . - */ -package kai - -import ( - "context" - "sync" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/polynetwork/kai-relayer/kaiclient" - "github.com/polynetwork/poly-io-test/log" -) - -const ClearNonceInterval = 10 * time.Minute - -type NonceManager struct { - addressNonce map[common.Address]uint64 - ethClient *kaiclient.Client - lock sync.RWMutex -} - -func NewNonceManager(ethClient *kaiclient.Client) *NonceManager { - nonceManager := &NonceManager{ - addressNonce: make(map[common.Address]uint64), - ethClient: ethClient, - } - go nonceManager.clearNonce() - return nonceManager -} - -// return account nonce, and than nonce++ -func (this *NonceManager) GetAddressNonce(address common.Address) uint64 { - this.lock.Lock() - defer this.lock.Unlock() - - // return a new point - nonce, ok := this.addressNonce[address] - if !ok { - // get nonce from eth network - uintNonce, err := this.ethClient.PendingNonceAt(context.Background(), address) - if err != nil { - log.Infof("GetAddressNonce: cannot get account %s nonce, err: %s, set it to nil!", - address, err) - } - this.addressNonce[address] = uintNonce - nonce = uintNonce - } - // increase record - this.addressNonce[address]++ - return nonce -} - -func (this *NonceManager) DecreaseAddressNonce(address common.Address) { - this.lock.Lock() - defer this.lock.Unlock() - - nonce, ok := this.addressNonce[address] - if ok && nonce > 0 { - this.addressNonce[address]-- - } -} - -// clear nonce per -func (this *NonceManager) clearNonce() { - for { - <-time.After(ClearNonceInterval) - this.lock.Lock() - for addr := range this.addressNonce { - delete(this.addressNonce, addr) - } - this.lock.Unlock() - //log.Infof("clearNonce: clear all cache nonce") - } -} diff --git a/chains/kai/signer.go b/chains/kai/signer.go deleted file mode 100644 index ac33360..0000000 --- a/chains/kai/signer.go +++ /dev/null @@ -1,58 +0,0 @@ -package kai - -import ( - "bytes" - "crypto/ecdsa" - "encoding/hex" - "fmt" - - ethComm "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" - "github.com/kardiachain/go-kardia/types" - "github.com/ontio/ontology/common" -) - -type Signer struct { - PrivateKey *ecdsa.PrivateKey - Address ethComm.Address -} - -func NewSigner(privateKey string) (*Signer, error) { - priKey, err := crypto.HexToECDSA(privateKey) - if err != nil { - return nil, fmt.Errorf("ApproveERC20, cannot decode private key") - } - address := crypto.PubkeyToAddress(priKey.PublicKey) - return &Signer{ - PrivateKey: priKey, - Address: address, - }, nil -} - -func DeserializeTx(rawTx string) (*types.Transaction, error) { - txData := ethComm.FromHex(rawTx) - tx := &types.Transaction{} - err := rlp.DecodeBytes(txData, tx) - if err != nil { - return nil, fmt.Errorf("deserializeTx: err: %s", err) - } - return tx, nil -} - -func SerializeTx(tx *types.Transaction) (string, error) { - bf := new(bytes.Buffer) - err := rlp.Encode(bf, tx) - if err != nil { - return "", fmt.Errorf("signTx: encode signed tx err: %s", err) - } - signedRawTx := hexutil.Encode(bf.Bytes()) - return signedRawTx, nil -} - -func ReverseOntAddress(ontAddress string) string { - addr, _ := common.AddressFromBase58(ontAddress) - //fmt.Printf("Address Form Base58 is %s\n", "0x"+hex.EncodeToString(addr[:])) - return hex.EncodeToString(addr[:]) -} diff --git a/cmd/cctest/main.go b/cmd/cctest/main.go index d75f8ab..0135c45 100644 --- a/cmd/cctest/main.go +++ b/cmd/cctest/main.go @@ -28,7 +28,6 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" - "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" @@ -68,7 +67,7 @@ func main() { mscInvoker *eth.EInvoker o3Invoker *eth.EInvoker cmInvoker *cosmos.CosmosInvoker - kaiInvoker *kai.Invoker + kaiInvoker *eth.EInvoker ontInvoker *ont.OntInvoker neoInvoker *neo.NeoInvoker ) @@ -89,7 +88,7 @@ func main() { } if config.DefConfig.KaiChainID > 0 { - kaiInvoker = kai.NewInvoker(config.DefConfig.KaiChainID) + kaiInvoker = eth.NewEInvoker(config.DefConfig.KaiChainID) } //btcInvoker, err := btc.NewBtcInvoker(config.DefConfig.RchainJsonRpcAddress, config.DefConfig.RCWallet, diff --git a/cmd/kai_deployer/run.go b/cmd/kai_deployer/run.go index 47e64a8..bfc009f 100644 --- a/cmd/kai_deployer/run.go +++ b/cmd/kai_deployer/run.go @@ -1,3 +1,19 @@ +/* +* Copyright (C) 2020 The poly network Authors +* This file is part of The poly network library. +* +* The poly network is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* The poly network is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* You should have received a copy of the GNU Lesser General Public License +* along with The poly network . If not, see . + */ package main import ( @@ -6,40 +22,39 @@ import ( "fmt" common2 "github.com/ethereum/go-ethereum/common" - "github.com/joeqian10/neo-gogogo/helper" "github.com/ontio/ontology/common" "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/config" ) var ( - fnKai string - kaiConfFile string + fnEth string + ethConfFile string eccmRedeploy int ) func init() { - flag.StringVar(&fnKai, "func", "deploy", "choose function to run: deploy or setup") - flag.StringVar(&kaiConfFile, "conf", "./config.json", "config file path") + flag.StringVar(&fnEth, "func", "deploy", "choose function to run: deploy or setup") + flag.StringVar(ðConfFile, "conf", "./config.json", "config file path") flag.IntVar(&eccmRedeploy, "redeploy_eccm", 1, "redeploy eccd, eccm and eccmp or not") flag.Parse() } func main() { - err := config.DefConfig.Init(kaiConfFile) + err := config.DefConfig.Init(ethConfFile) if err != nil { panic(err) } - switch fnKai { + switch fnEth { case "deploy": - DeploySmartContract() + DeployETHSmartContract() case "setup": - SetUpContracts() + SetUpEthContracts() } } -func DeploySmartContract() { +func DeployETHSmartContract() { invoker := kai.NewInvoker(config.DefConfig.KaiChainID) var ( eccdAddr common2.Address @@ -111,14 +126,14 @@ func DeploySmartContract() { } fmt.Println("=============================ETH info=============================") - fmt.Println("kai krc20:", erc20Addr.Hex()) - fmt.Println("kai ope4:", oep4Addr.Hex()) - fmt.Println("kai eccd address:", eccdAddr.Hex()) - fmt.Println("kai eccm address:", eccmAddr.Hex()) - fmt.Println("kai eccmp address:", eccmpAddr.Hex()) - fmt.Println("kai lock proxy address: ", lockProxyAddr.Hex()) - fmt.Println("kai ongx address: ", ongxAddr.Hex()) - fmt.Println("kai ontx proxy address: ", ontxAddr.Hex()) + fmt.Println("krc20:", erc20Addr.Hex()) + fmt.Println("ope4:", oep4Addr.Hex()) + fmt.Println("eccd address:", eccdAddr.Hex()) + fmt.Println("eccm address:", eccmAddr.Hex()) + fmt.Println("eccmp address:", eccmpAddr.Hex()) + fmt.Println("lock proxy address: ", lockProxyAddr.Hex()) + fmt.Println("ongx address: ", ongxAddr.Hex()) + fmt.Println("ontx proxy address: ", ontxAddr.Hex()) fmt.Println("==================================================================") config.DefConfig.Krc20 = erc20Addr.Hex() @@ -130,92 +145,92 @@ func DeploySmartContract() { config.DefConfig.KaiOngx = ongxAddr.Hex() config.DefConfig.KaiOntx = ontxAddr.Hex() - if err := config.DefConfig.Save(kaiConfFile); err != nil { + if err := config.DefConfig.Save(ethConfFile); err != nil { panic(fmt.Errorf("failed to save config, you better save it youself: %v", err)) } } -func SetupBep20(invoker *kai.Invoker) { - if config.DefConfig.OntBep20 != "" { - bindTx, err := invoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.Bep20, - config.DefConfig.OntBep20, config.DefConfig.OntChainID, 0) +func SetupERC20(ethInvoker *kai.Invoker) { + if config.DefConfig.OntKrc20 != "" { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.Krc20, + config.DefConfig.OntKrc20, config.DefConfig.OntChainID, 0) if err != nil { - panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + panic(fmt.Errorf("SetupERC20ToONT, failed to BindAssetHash: %v", err)) } - invoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() - fmt.Printf("binding bep20 of ontology on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding erc20 of ontology on ethereum: ( txhash: %s )\n", hash.String()) } - bindTx, err := invoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.Bep20, - config.CM_BEP20, config.DefConfig.CMCrossChainId, 0) + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.Krc20, + config.CM_KRC20, config.DefConfig.CMCrossChainId, 0) if err != nil { - panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + panic(fmt.Errorf("SetupERC20ToONT, failed to BindAssetHash: %v", err)) } - invoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() - fmt.Printf("binding bep20 of cosmos on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding erc20 of cosmos on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupWBTC(kaiInvoker *kai.Invoker) { - bindTx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiWBTC, +func SetupWBTC(ethInvoker *kai.Invoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiWBTC, config.DefConfig.OntWBTC, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupWBTC, failed to BindAssetHash: %v", err)) } - kaiInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() - fmt.Printf("binding WBTC of ontology on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding WBTC of ontology on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupDAI(kaiInvoker *kai.Invoker) { - bindTx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiDai, +func SetupDAI(ethInvoker *kai.Invoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiDai, config.DefConfig.OntDai, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupDAI, failed to BindAssetHash: %v", err)) } - kaiInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() - fmt.Printf("binding DAI of ontology on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding DAI of ontology on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupUSDT(kaiInvoker *kai.Invoker) { - bindTx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiUSDT, +func SetupUSDT(ethInvoker *kai.Invoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiUSDT, config.DefConfig.OntUSDT, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupUSDT, failed to BindAssetHash: %v", err)) } - kaiInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() - fmt.Printf("binding USDT of ontology on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding USDT of ontology on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupUSDC(kaiInvoker *kai.Invoker) { - bindTx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiUSDC, +func SetupUSDC(ethInvoker *kai.Invoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiUSDC, config.DefConfig.OntUSDC, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupUSDC, failed to BindAssetHash: %v", err)) } - kaiInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() - fmt.Printf("binding USDC of ontology on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding USDC of ontology on ethereum: ( txhash: %s )\n", hash.String()) } func SetupOntAsset(invoker *kai.Invoker) { if config.DefConfig.KaiLockProxy == "" { - panic(fmt.Errorf("KaiLockProxy is blank")) + panic(fmt.Errorf("EthLockProxy is blank")) } if config.DefConfig.KaiOntx == "" { - panic(fmt.Errorf("KaicOntx is blank")) + panic(fmt.Errorf("EthOntx is blank")) } if config.DefConfig.KaiOngx == "" { - panic(fmt.Errorf("KaiOngx is blank")) + panic(fmt.Errorf("EthOntx is blank")) } if config.DefConfig.KaiOep4 == "" { - panic(fmt.Errorf("KaiOep4 is blank")) + panic(fmt.Errorf("EthOep4 is blank")) } - if config.DefConfig.OntOep4 == "" { - panic(fmt.Errorf("KaiOep4 is blank")) + if config.DefConfig.KaiOep4 == "" { + panic(fmt.Errorf("OntOep4 is blank")) } txs, err := invoker.BindOntAsset(config.DefConfig.KaiLockProxy, config.DefConfig.KaiOntx, config.DefConfig.KaiOngx, @@ -230,47 +245,30 @@ func SetupOntAsset(invoker *kai.Invoker) { fmt.Printf("ont/ong/oep4 binding tx on cosmos: %s/%s/%s\n", hash4.String(), hash5.String(), hash6.String()) } -func SetupBnb(kaiInvoker *kai.Invoker) { - kaiNativeAddr := "0x0000000000000000000000000000000000000000" - if config.DefConfig.OntBnb != "" { - tx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, config.DefConfig.OntBnb, config.DefConfig.OntChainID, 0) +func SetupETH(ethInvoker *kai.Invoker) { + ethNativeAddr := "0x0000000000000000000000000000000000000000" + if config.DefConfig.OntKai != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, ethNativeAddr, config.DefConfig.OntKai, config.DefConfig.OntChainID, 0) if err != nil { - panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) + panic(fmt.Errorf("SetupETH2ONT, failed to bind asset hash: %v", err)) } hash := tx.Hash() - fmt.Printf("binding bnbx of ontology on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding ethx of ontology on ethereum: ( txhash: %s )\n", hash.String()) } - if config.DefConfig.EthBnb != "" { - tx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, config.DefConfig.EthBnb, config.DefConfig.EthChainID, 0) - if err != nil { - panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) - } - hash := tx.Hash() - fmt.Printf("binding bnb of kai on ethereum: ( txhash: %s )\n", hash.String()) - } - if config.DefConfig.NeoBnb != "" { - tx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, config.DefConfig.NeoBnb, config.DefConfig.NeoChainID, 0) - if err != nil { - panic(fmt.Errorf("SetupBnb2Neo, failed to bind asset hash: %v", err)) - } - hash := tx.Hash() - fmt.Printf("binding bnb of kai on neo: ( txhash: %s )\n", hash.String()) - } - - tx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, config.CM_BNBX, config.DefConfig.CMCrossChainId, 0) + tx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, ethNativeAddr, config.CM_KAIX, config.DefConfig.CMCrossChainId, 0) if err != nil { - panic(fmt.Errorf("SetupBnb2COSMOS, failed to bind asset hash: %v", err)) + panic(fmt.Errorf("SetupETH2ONT, failed to bind asset hash: %v", err)) } hash := tx.Hash() - fmt.Printf("binding bnbx of cosmos on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding ethx of cosmos on ethereum: ( txhash: %s )\n", hash.String()) - tx, err = kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, kaiNativeAddr, config.DefConfig.KaiChainID, 0) + tx, err = ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, ethNativeAddr, ethNativeAddr, config.DefConfig.KaiChainID, 0) if err != nil { panic(fmt.Errorf("BindAssetHash, failed to bind asset hash: %v", err)) } hash = tx.Hash() - fmt.Printf("binding bnb of kai on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding eth of ethereum on ethereum: ( txhash: %s )\n", hash.String()) } func SetOtherLockProxy(invoker *kai.Invoker) { @@ -289,7 +287,7 @@ func SetOtherLockProxy(invoker *kai.Invoker) { } tx, err := contract.BindProxyHash(auth, config.DefConfig.OntChainID, other[:]) if err != nil { - panic(fmt.Errorf("failed to bind proxy: %s", err)) + panic(fmt.Errorf("failed to bind proxy: %")) } hash := tx.Hash() invoker.Client().WaitTransactionConfirm(hash) @@ -322,52 +320,19 @@ func SetOtherLockProxy(invoker *kai.Invoker) { other := common2.HexToAddress(config.DefConfig.KaiLockProxy) tx, err := contract.BindProxyHash(auth, config.DefConfig.KaiChainID, other[:]) if err != nil { - panic(fmt.Errorf("failed to bind proxy: %v", err)) + panic(fmt.Errorf("failed to bind proxy: %")) } hash := tx.Hash() invoker.Client().WaitTransactionConfirm(hash) - fmt.Printf("binding kai proxy: ( txhash: %s )\n", hash.String()) - } - - if config.DefConfig.EthLockProxy != "" { - auth, err := invoker.MakeSmartContractAuth() - if err != nil { - panic(fmt.Errorf("failed to get auth: %v", err)) - } - other := common2.HexToAddress(config.DefConfig.EthLockProxy) - tx, err := contract.BindProxyHash(auth, config.DefConfig.EthChainID, other[:]) - if err != nil { - panic(fmt.Errorf("failed to bind proxy: %v", err)) - } - hash := tx.Hash() - invoker.Client().WaitTransactionConfirm(hash) - fmt.Printf("binding kai proxy: ( txhash: %s )\n", hash.String()) - } - - if config.DefConfig.NeoLockProxy != "" { - auth, err := invoker.MakeSmartContractAuth() - if err != nil { - panic(fmt.Errorf("failed to get auth: %v", err)) - } - other, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) - if err != nil { - panic(fmt.Errorf("UInt160FromString error: %v", err)) - } - tx, err := contract.BindProxyHash(auth, config.DefConfig.NeoChainID, other[:]) - if err != nil { - panic(fmt.Errorf("failed to bind proxy: %v", err)) - } - hash := tx.Hash() - invoker.Client().WaitTransactionConfirm(hash) - fmt.Printf("binding neo proxy: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding eth proxy: ( txhash: %s )\n", hash.String()) } } -func SetUpContracts() { +func SetUpEthContracts() { invoker := kai.NewInvoker(config.DefConfig.KaiChainID) - SetupBnb(invoker) - if config.DefConfig.Bep20 != "" { - SetupBep20(invoker) + SetupETH(invoker) + if config.DefConfig.Krc20 != "" { + SetupERC20(invoker) } if config.DefConfig.OntLockProxy != "" { SetupOntAsset(invoker) @@ -381,7 +346,6 @@ func SetUpContracts() { if config.DefConfig.KaiUSDT != "" { SetupUSDT(invoker) } - //SetupUSDC(invoker) SetOtherLockProxy(invoker) } diff --git a/config.json b/config.json index 2ad3c3b..910c504 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,6 @@ { "BtcChainID": 0, - "EthChainID": 0, + "EthChainID": 97, "OntChainID": 0, "NeoChainID": 0, "Neo3ChainID": 0, @@ -27,8 +27,8 @@ "BtcMinOutputValFromContract": 20000, "BtcSignerPrivateKey": "cRRMYv...rAcX", "BtcExistingVendorPrivks": "cTqbqaR...wY6QSag,cT2HP4Q...PXH9Jk2ua,cSQmGg6...9mWzTxEY5A,cPYAx61...zPSbkkZqrzQ5b,cVV9Umt...qvwD5zg,cNK7Bw...oq1vWau8,cUZdDF9s...RePVbQTZ", - "EthURL": "http://ethereum_node", - "ETHPrivateKey": "AEE6358...A2608A9", + "EthURL": "https://data-seed-prebsc-1-s1.binance.org:8545", + "ETHPrivateKey": "fedc1b2f43e18fb7c2e12f993cee187c8e162dd01d67a08323d9344fb49ef157", "MSCURL": "", "MSCPrivateKey": "", "OKURL": "", @@ -133,14 +133,14 @@ "HecoUSDC": "", "HecoNeo": "", "HecoRenBTC": "", - "KaiEccd": "0x319aD69d324BE79d24e1Cc71e464E9F50F26F880", - "KaiEccm": "0x8FD7708c9e17F739BcaA13A809022F94b26b8aB8", - "KaiEccmp": "0x853249c97FC100b01C46cbeE1C9C3dcA9925CCef", - "KaiLockProxy": "0x006029DFcacaC453eC6dFc7703bdba5E3138C5A7", - "Krc20": "0x8e5dcfecbEdf15d5026633eA3c7beF5391c6ab03", - "KaiOep4": "0x185040E5E5efe4841EC7D558057de5AC65289b7C", - "KaiOngx": "0xee4b18d47d6d274D417E5dF1b2b332c7b9f2078f", - "KaiOntx": "0xaf194cc85f28Ee2294320bab221443398D346655", + "KaiEccd": "0xad8673ba653c75494EF43F3431b67aD597B21314", + "KaiEccm": "0x14E8226B63C77c6fdCB3830e1bde2b6981F01AAe", + "KaiEccmp": "0xaf09C7D8FaB374C7dbF329DBC21c5EF0503A0F96", + "KaiLockProxy": "0xa60D0aba17c6925991E3c09845cc39C8382088D8", + "Krc20": "0x82f89eE78c5563422d342E4FBd0aB7A6bE56E069", + "KaiOep4": "0x83D2cD8DB5Bd9606D2A24D49B3CE6d11d5e68C30", + "KaiOngx": "0xD0D717fc4524349341BA87056977B2cB99eFAF29", + "KaiOntx": "0x7715994b29854C0FFA20aF79B5F8e2f951a21782", "KaiWBTC": "", "KaiUSDT": "", "KaiDai": "", @@ -165,14 +165,14 @@ "ZilEccdImpl": "", "ZilLockProxy": "", "EthBnb": "", - "EthErc20": "", - "EthOep4": "", - "Eccd": "", - "Eccm": "", - "Eccmp": "", - "EthLockProxy": "", - "EthOngx": "", - "EthOntx": "", + "EthErc20": "0xc1Ee06f49eF783D41e57d381a1835B5135D6B48d", + "EthOep4": "0x2b399198ecE1cdA062BE619f920717976B31C3E0", + "Eccd": "0xcBeAE3FC1B8000ae88453C12887d1C16aA111cfA", + "Eccm": "0x9Ec66E019B266A7717C0F74F02B29Fc542dA18A6", + "Eccmp": "0x36214842A7238Af0D04F49c5dde13a51f58D6224", + "EthLockProxy": "0x61DC57F9c0CEccEd31d7b79416753C1211618976", + "EthOngx": "0x83d87A85fc0c83D10D59c4F0A59756aCE8724c6f", + "EthOntx": "0x557e5567DB61a99b5bc498683a37263128ba14CF", "EthOntd": "", "EthUSDT": "", "EthWBTC": "", @@ -183,6 +183,7 @@ "BtceContractAddress": "", "OntErc20": "", "OntBep20": "", + "OntKrc20": "", "OntOep4": "", "OntLockProxy": "", "OntEth": "", @@ -195,6 +196,7 @@ "OntONTD": "", "OntRenBTC": "", "BtcoContractAddress": "", + "OntKai": "", "NeoCCMC": "", "NeoLockProxy": "", "CNeo": "", diff --git a/config/config.go b/config/config.go index 4ded0e3..95ce136 100644 --- a/config/config.go +++ b/config/config.go @@ -35,6 +35,8 @@ const ( CM_ONT = "ontx" CM_ONG = "ongx" CM_OEP4 = "oep4x" + CM_KRC20 = "krc20" + CM_KAIX = "kaix" ) //Config object used by ontology-instance @@ -265,6 +267,7 @@ type TestConfig struct { // ont contracts: auto set after deploy OntErc20 string OntBep20 string + OntKrc20 string OntOep4 string OntLockProxy string OntEth string @@ -277,6 +280,7 @@ type TestConfig struct { OntONTD string OntRenBTC string BtcoContractAddress string + OntKai string // neo NeoCCMC string diff --git a/go.mod b/go.mod index 5e758d5..f126e82 100644 --- a/go.mod +++ b/go.mod @@ -45,4 +45,4 @@ replace github.com/polynetwork/poly-go-sdk => github.com/joeqian10/poly-go-sdk v //replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 -replace github.com/polynetwork/kai-relayer => github.com/dogecoindev/kai-relayer v0.0.0-20210602042052-c1c2c1f145f3 +replace github.com/polynetwork/kai-relayer => github.com/dogecoindev/kai-relayer v0.0.0-20210608044355-c91f4a1c9c7c diff --git a/go.sum b/go.sum index bb92396..acd0abf 100644 --- a/go.sum +++ b/go.sum @@ -262,6 +262,10 @@ github.com/dogecoindev/kai-relayer v0.0.0-20210602041540-c6aba2dd1cc5 h1:N1m+PXn github.com/dogecoindev/kai-relayer v0.0.0-20210602041540-c6aba2dd1cc5/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= github.com/dogecoindev/kai-relayer v0.0.0-20210602042052-c1c2c1f145f3 h1:DGE+BwUN4X8045hHHMvi5VL32PKTX/3X1XOyqxIaoj8= github.com/dogecoindev/kai-relayer v0.0.0-20210602042052-c1c2c1f145f3/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dogecoindev/kai-relayer v0.0.0-20210608042742-840fea4203ea h1:FxXymOqH/C1C2uM2YG9of2Ov0/XbjL3ZYthit+gtnCw= +github.com/dogecoindev/kai-relayer v0.0.0-20210608042742-840fea4203ea/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dogecoindev/kai-relayer v0.0.0-20210608044355-c91f4a1c9c7c h1:IuGJxABWUxPoKSKBWR+Rwq467uc7MvSoq3msnh62Ooo= +github.com/dogecoindev/kai-relayer v0.0.0-20210608044355-c91f4a1c9c7c/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87 h1:OMbqMXf9OAXzH1dDH82mQMrddBE8LIIwDtxeK4wE1/A= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs= diff --git a/testcase/kai.go b/testcase/kai.go index 09b96fc..a5e6c3f 100644 --- a/testcase/kai.go +++ b/testcase/kai.go @@ -24,7 +24,7 @@ import ( ) func SendKaiToEthChain(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { - err := SendKaiCrossEth(ctx, status, GetRandAmount(config.DefConfig.OntValLimit, 1)) + err := SendKaiCrossEth(ctx, status, 1000000000000000000) if err != nil { log.Error("SendKaiToEthChain: %s", err) return false @@ -46,7 +46,7 @@ func SendEthToKaiChain(ctx *testframework.TestFrameworkContext, status *testfram } func SendKaiCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { - kclient := ctx.KaiInvoker.Client() + kclient := ctx.KaiInvoker.ETHUtil.GetEthClient() gasPrice, err := kclient.SuggestGasPrice(context.Background()) if err != nil { return fmt.Errorf("SendKaiCrossEth, get suggest gas price failed error: %s", err.Error()) @@ -57,7 +57,7 @@ func SendKaiCrossEth(ctx *testframework.TestFrameworkContext, status *testframew if err != nil { return fmt.Errorf("SendKaiCrossEth, abi.JSON error:" + err.Error()) } - rawFrom := ctx.KaiInvoker.Signer.Address.Bytes() + rawFrom := ctx.KaiInvoker.EthTestSigner.Address.Bytes() assetaddress := ethcommon.HexToAddress("0000000000000000000000000000000000000000") txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.KaiChainID), rawFrom[:], big.NewInt(int64(amount))) @@ -67,7 +67,7 @@ func SendKaiCrossEth(ctx *testframework.TestFrameworkContext, status *testframew contractAddr := ethcommon.HexToAddress(config.DefConfig.KaiLockProxy) callMsg := ethereum.CallMsg{ - From: ctx.KaiInvoker.Signer.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + From: ctx.KaiInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, Value: big.NewInt(int64(amount)), Data: txData, } gasLimit, err := kclient.EstimateGas(context.Background(), callMsg) @@ -75,7 +75,7 @@ func SendKaiCrossEth(ctx *testframework.TestFrameworkContext, status *testframew return fmt.Errorf("SendKaiCrossEth, estimate gas limit error: %s", err.Error()) } - nonce := ctx.KaiInvoker.NM.GetAddressNonce(ctx.KaiInvoker.Signer.Address) + nonce := ctx.KaiInvoker.NM.GetAddressNonce(ctx.KaiInvoker.EthTestSigner.Address) tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) bf := new(bytes.Buffer) rlp.Encode(bf, tx) @@ -95,7 +95,7 @@ func SendKaiCrossEth(ctx *testframework.TestFrameworkContext, status *testframew return fmt.Errorf("SendKaiCrossEth, send transaction error:%s", err.Error()) } status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"KaiToEth", time.Now()}) - kclient.WaitTransactionConfirm(signedtx.Hash()) + ctx.KaiInvoker.ETHUtil.WaitTransactionConfirm(signedtx.Hash()) return nil } @@ -122,7 +122,7 @@ func SendEthCrossKai(ctx *testframework.TestFrameworkContext, status *testframew contractAddr := ethcommon.HexToAddress(config.DefConfig.KaiLockProxy) callMsg := ethereum.CallMsg{ - From: ctx.KaiInvoker.Signer.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + From: ctx.KaiInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, Value: big.NewInt(int64(amount)), Data: txData, } gasLimit, err := client.EstimateGas(context.Background(), callMsg) @@ -130,7 +130,7 @@ func SendEthCrossKai(ctx *testframework.TestFrameworkContext, status *testframew return fmt.Errorf("SendEthCrossKai, estimate gas limit error: %s", err.Error()) } - nonce := ctx.KaiInvoker.NM.GetAddressNonce(ctx.KaiInvoker.Signer.Address) + nonce := ctx.KaiInvoker.NM.GetAddressNonce(ctx.KaiInvoker.EthTestSigner.Address) tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) bf := new(bytes.Buffer) _ = rlp.Encode(bf, tx) @@ -140,7 +140,7 @@ func SendEthCrossKai(ctx *testframework.TestFrameworkContext, status *testframew if err != nil { return fmt.Errorf("SendEthCrossKai, eth.DeserializeTx error: %s", err.Error()) } - signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.KaiInvoker.Signer.PrivateKey) + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.KaiInvoker.EthTestSigner.PrivateKey) if err != nil { return fmt.Errorf("SendEthCrossKai, types.SignTx error: %s", err.Error()) } diff --git a/testframework/framework.go b/testframework/framework.go index a81f38c..c66dfb9 100644 --- a/testframework/framework.go +++ b/testframework/framework.go @@ -26,7 +26,6 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" - "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" @@ -64,7 +63,7 @@ type TestFramework struct { ontInvoker *ont.OntInvoker cosmosInvoker *cosmos.CosmosInvoker neoInvoker *neo.NeoInvoker - kaiInvoker *kai.Invoker + kaiInvoker *eth.EInvoker } //NewTestFramework return a TestFramework instance @@ -200,7 +199,7 @@ func (this *TestFramework) SetO3Invoker(invoker *eth.EInvoker) { } //SetO3Invoker instance to test framework -func (this *TestFramework) SeKaiInvoker(invoker *kai.Invoker) { +func (this *TestFramework) SeKaiInvoker(invoker *eth.EInvoker) { this.kaiInvoker = invoker } diff --git a/testframework/framework_context.go b/testframework/framework_context.go index 1747e2d..bfa64c6 100644 --- a/testframework/framework_context.go +++ b/testframework/framework_context.go @@ -25,7 +25,6 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" - "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" ) @@ -45,12 +44,12 @@ type TestFrameworkContext struct { OntInvoker *ont.OntInvoker CMInvoker *cosmos.CosmosInvoker NeoInvoker *neo.NeoInvoker - KaiInvoker *kai.Invoker + KaiInvoker *eth.EInvoker } //NewTestFrameworkContext return a TestFrameworkContext instance func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_go_sdk.PolySdk, eInvkr, bscInvkr, mscInvkr, o3Invkr *eth.EInvoker, - btcInvkr *btc.BtcInvoker, ontInvkr *ont.OntInvoker, cmInvoker *cosmos.CosmosInvoker, neoInvoker *neo.NeoInvoker, kaiInvoker *kai.Invoker) *TestFrameworkContext { + btcInvkr *btc.BtcInvoker, ontInvkr *ont.OntInvoker, cmInvoker *cosmos.CosmosInvoker, neoInvoker *neo.NeoInvoker, kaiInvoker *eth.EInvoker) *TestFrameworkContext { ctx := &TestFrameworkContext{ Framework: fw, Cases: caseArr, diff --git a/testframework/kai.go b/testframework/kai.go index 357976e..75cf688 100644 --- a/testframework/kai.go +++ b/testframework/kai.go @@ -1,20 +1,18 @@ package testframework import ( - "context" "encoding/hex" "math/big" "os" "time" - "github.com/polynetwork/poly-io-test/chains/kai" + "github.com/polynetwork/poly-io-test/chains/eth" "github.com/polynetwork/poly-io-test/log" ) func MonitorKai(ctx *TestFrameworkContext) { invoker := ctx.KaiInvoker - ctx2 := context.Background() - currentHeight, err := invoker.Client().BlockNumber(ctx2) + currentHeight, err := invoker.ETHUtil.GetNodeHeight() if err != nil { log.Errorf("MonitorEthChain - ctx.EthTools.GetNodeHeight error: %s", err) os.Exit(1) @@ -24,7 +22,7 @@ func MonitorKai(ctx *TestFrameworkContext) { for { select { case <-updateTicker.C: - currentHeight, err := invoker.Client().BlockNumber(ctx2) + currentHeight, err := invoker.ETHUtil.GetNodeHeight() if err != nil { log.Errorf("ctx.EthTools.GetNodeHeight error: %s", err) continue @@ -45,9 +43,9 @@ func MonitorKai(ctx *TestFrameworkContext) { } } -func parseKaiChainBlock(ctx *TestFrameworkContext, invoker *kai.Invoker, height uint32) error { +func parseKaiChainBlock(ctx *TestFrameworkContext, invoker *eth.EInvoker, height uint32) error { // contract is different - lockevents, unlockevents, err := invoker.GetSmartContractEventByBlock(getEccm(invoker.ChainID), uint64(height)) + lockevents, unlockevents, err := invoker.ETHUtil.GetSmartContractEventByBlock(getEccm(invoker.ChainID), uint64(height)) if err != nil { return err } From c43d5c99596273089bd56ac8aa22bf2870d45664 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Tue, 8 Jun 2021 18:24:36 +0700 Subject: [PATCH 88/96] update --- cmd/kai_deployer/run.go | 1 - testcase/kai.go | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/kai_deployer/run.go b/cmd/kai_deployer/run.go index bfc009f..41fb9f5 100644 --- a/cmd/kai_deployer/run.go +++ b/cmd/kai_deployer/run.go @@ -23,7 +23,6 @@ import ( common2 "github.com/ethereum/go-ethereum/common" "github.com/ontio/ontology/common" - "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/config" ) diff --git a/testcase/kai.go b/testcase/kai.go index a5e6c3f..06f59b7 100644 --- a/testcase/kai.go +++ b/testcase/kai.go @@ -17,7 +17,6 @@ import ( "github.com/ethereum/go-ethereum/rlp" "github.com/polynetwork/eth-contracts/go_abi/lock_proxy_abi" "github.com/polynetwork/poly-io-test/chains/eth" - "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" "github.com/polynetwork/poly-io-test/testframework" @@ -154,7 +153,7 @@ func SendEthCrossKai(ctx *testframework.TestFrameworkContext, status *testframew return nil } -func MakeKaiAuth(signer *kai.Signer, nonce, gasPrice, gasLimit uint64) *bind.TransactOpts { +func MakeKaiAuth(signer *eth.EthSigner, nonce, gasPrice, gasLimit uint64) *bind.TransactOpts { auth := bind.NewKeyedTransactor(signer.PrivateKey) auth.Nonce = big.NewInt(int64(nonce)) auth.Value = big.NewInt(int64(0)) // in wei From 26ef7dd54445acd7d2729bbcd9905e49bf3b3d81 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Wed, 9 Jun 2021 17:38:35 +0700 Subject: [PATCH 89/96] fix register kai --- cmd/kai_deployer/run.go | 41 ++++++++++++++++++----------------- cmd/tools/run.go | 48 +++++++++++++++++++++-------------------- config.json | 8 +++---- 3 files changed, 50 insertions(+), 47 deletions(-) diff --git a/cmd/kai_deployer/run.go b/cmd/kai_deployer/run.go index 41fb9f5..07d1abd 100644 --- a/cmd/kai_deployer/run.go +++ b/cmd/kai_deployer/run.go @@ -23,6 +23,7 @@ import ( common2 "github.com/ethereum/go-ethereum/common" "github.com/ontio/ontology/common" + "github.com/polynetwork/poly-io-test/chains/eth" "github.com/polynetwork/poly-io-test/config" ) @@ -54,7 +55,7 @@ func main() { } func DeployETHSmartContract() { - invoker := kai.NewInvoker(config.DefConfig.KaiChainID) + invoker := eth.NewEInvoker(config.DefConfig.KaiChainID) var ( eccdAddr common2.Address eccmAddr common2.Address @@ -109,7 +110,7 @@ func DeployETHSmartContract() { if err != nil { panic(fmt.Errorf("failed to approve erc20 to lockproxy: %v", err)) } - invoker.Client().WaitTransactionConfirm(tx.Hash()) + invoker.ETHUtil.WaitTransactionConfirm(tx.Hash()) oep4Addr, _, err := invoker.DeployOEP4(lockproxyAddrHex) if err != nil { @@ -149,14 +150,14 @@ func DeployETHSmartContract() { } } -func SetupERC20(ethInvoker *kai.Invoker) { +func SetupERC20(ethInvoker *eth.EInvoker) { if config.DefConfig.OntKrc20 != "" { bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.Krc20, config.DefConfig.OntKrc20, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupERC20ToONT, failed to BindAssetHash: %v", err)) } - ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() fmt.Printf("binding erc20 of ontology on ethereum: ( txhash: %s )\n", hash.String()) } @@ -166,56 +167,56 @@ func SetupERC20(ethInvoker *kai.Invoker) { if err != nil { panic(fmt.Errorf("SetupERC20ToONT, failed to BindAssetHash: %v", err)) } - ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() fmt.Printf("binding erc20 of cosmos on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupWBTC(ethInvoker *kai.Invoker) { +func SetupWBTC(ethInvoker *eth.EInvoker) { bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiWBTC, config.DefConfig.OntWBTC, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupWBTC, failed to BindAssetHash: %v", err)) } - ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() fmt.Printf("binding WBTC of ontology on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupDAI(ethInvoker *kai.Invoker) { +func SetupDAI(ethInvoker *eth.EInvoker) { bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiDai, config.DefConfig.OntDai, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupDAI, failed to BindAssetHash: %v", err)) } - ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() fmt.Printf("binding DAI of ontology on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupUSDT(ethInvoker *kai.Invoker) { +func SetupUSDT(ethInvoker *eth.EInvoker) { bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiUSDT, config.DefConfig.OntUSDT, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupUSDT, failed to BindAssetHash: %v", err)) } - ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() fmt.Printf("binding USDT of ontology on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupUSDC(ethInvoker *kai.Invoker) { +func SetupUSDC(ethInvoker *eth.EInvoker) { bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiUSDC, config.DefConfig.OntUSDC, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupUSDC, failed to BindAssetHash: %v", err)) } - ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() fmt.Printf("binding USDC of ontology on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupOntAsset(invoker *kai.Invoker) { +func SetupOntAsset(invoker *eth.EInvoker) { if config.DefConfig.KaiLockProxy == "" { panic(fmt.Errorf("EthLockProxy is blank")) } @@ -244,7 +245,7 @@ func SetupOntAsset(invoker *kai.Invoker) { fmt.Printf("ont/ong/oep4 binding tx on cosmos: %s/%s/%s\n", hash4.String(), hash5.String(), hash6.String()) } -func SetupETH(ethInvoker *kai.Invoker) { +func SetupETH(ethInvoker *eth.EInvoker) { ethNativeAddr := "0x0000000000000000000000000000000000000000" if config.DefConfig.OntKai != "" { tx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, ethNativeAddr, config.DefConfig.OntKai, config.DefConfig.OntChainID, 0) @@ -270,7 +271,7 @@ func SetupETH(ethInvoker *kai.Invoker) { fmt.Printf("binding eth of ethereum on ethereum: ( txhash: %s )\n", hash.String()) } -func SetOtherLockProxy(invoker *kai.Invoker) { +func SetOtherLockProxy(invoker *eth.EInvoker) { _, contract, err := invoker.MakeLockProxy(config.DefConfig.KaiLockProxy) if err != nil { panic(fmt.Errorf("failed to MakeLockProxy: %v", err)) @@ -289,7 +290,7 @@ func SetOtherLockProxy(invoker *kai.Invoker) { panic(fmt.Errorf("failed to bind proxy: %")) } hash := tx.Hash() - invoker.Client().WaitTransactionConfirm(hash) + invoker.ETHUtil.WaitTransactionConfirm(hash) fmt.Printf("binding ont proxy: ( txhash: %s )\n", hash.String()) } @@ -307,7 +308,7 @@ func SetOtherLockProxy(invoker *kai.Invoker) { panic(fmt.Errorf("failed to bind COSMOS proxy: %v", err)) } hash := tx.Hash() - invoker.Client().WaitTransactionConfirm(hash) + invoker.ETHUtil.WaitTransactionConfirm(hash) fmt.Printf("binding cosmos proxy: ( txhash: %s )\n", hash.String()) } @@ -322,13 +323,13 @@ func SetOtherLockProxy(invoker *kai.Invoker) { panic(fmt.Errorf("failed to bind proxy: %")) } hash := tx.Hash() - invoker.Client().WaitTransactionConfirm(hash) + invoker.ETHUtil.WaitTransactionConfirm(hash) fmt.Printf("binding eth proxy: ( txhash: %s )\n", hash.String()) } } func SetUpEthContracts() { - invoker := kai.NewInvoker(config.DefConfig.KaiChainID) + invoker := eth.NewEInvoker(config.DefConfig.KaiChainID) SetupETH(invoker) if config.DefConfig.Krc20 != "" { SetupERC20(invoker) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 2f2cb37..5840354 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -1631,6 +1631,31 @@ func RegisterBtcChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool return true } +func RegisterKai(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + blkToWait := uint64(1) + eccd, err := hex.DecodeString(strings.Replace(config.DefConfig.KaiEccd, "0x", "", 1)) + if err != nil { + panic(fmt.Errorf("RegisterKai, failed to decode eccd '%s' : %v", config.DefConfig.KaiEccd, err)) + } + txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.KaiChainID, 12, "kai", + blkToWait, eccd, acc) + if err != nil { + if strings.Contains(err.Error(), "already registered") { + log.Infof("eth chain %d already registered", config.DefConfig.KaiChainID) + return false + } + if strings.Contains(err.Error(), "already requested") { + log.Infof("eth chain %d already requested", config.DefConfig.KaiChainID) + return true + } + panic(fmt.Errorf("RegisterKai failed: %v", err)) + } + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to register eth chain: ( txhash: %s )", txhash.ToHexString()) + + return true +} + func RegisterEthChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { blkToWait := uint64(1) if config.BtcNet.Name == "testnet3" { @@ -2358,29 +2383,6 @@ func GetRelayer(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) { log.Infof("get relayer success: %s", addr.ToBase58()) } -func RegisterKai(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { - blkToWait := uint64(1) - txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.KaiChainID, 12, "kai", - blkToWait, []byte{}, acc) - if err != nil { - if strings.Contains(err.Error(), "already registered") { - log.Infof("Kardia chain %d already registered", config.DefConfig.KaiChainID) - return false - } - if strings.Contains(err.Error(), "already requested") { - log.Infof("Kardia chain %d already requested", config.DefConfig.KaiChainID) - return true - } - panic(fmt.Errorf("RegisterKai failed: %v", err)) - } - - testcase.WaitPolyTx(txhash, poly) - log.Infof("successful to register kardia chain: ( txhash: %s )", txhash.ToHexString()) - - return true - -} - func RegisterStateValidator(poly *poly_go_sdk.PolySdk, neo3PubKeys []string, signer *poly_go_sdk.Account) uint64 { txhash, err := poly.Native.Sm.RegisterStateValidator(neo3PubKeys, signer) if err != nil { diff --git a/config.json b/config.json index 910c504..4cda805 100644 --- a/config.json +++ b/config.json @@ -10,7 +10,7 @@ "O3ChainID": 0, "MscChainID": 0, "OkChainID": 0, - "KaiChainID": 141, + "KaiChainID": 142, "BtcRestAddr": "http://btc_node", "BtcRestUser": "test", "BtcRestPwd": "test", @@ -67,9 +67,9 @@ "Neo3Epoch": 0, "KaiUrl": "https://dev-6.kardiachain.io", "KaiPrivateKey": "8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", - "KaiEpoch": 584820, - "RCWallet": ".wallets/wallet.dat", - "RCWalletPwd": "", + "KaiEpoch": 763428, + "RCWallet": "./wallet.dat", + "RCWalletPwd": "123456", "RchainJsonRpcAddress": "http://138.91.6.226:40336", "RCEpoch": 0, "ReportInterval": 60, From 93de4b9d4735da71259953cfd6c4f94a6b796daa Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Wed, 2 Jun 2021 14:53:39 +0700 Subject: [PATCH 90/96] update kai testcases --- chains/eth/eth_invoker.go | 4 +- chains/kai/invoker.go | 106 +++++++++++++++-- chains/kai/signer.go | 6 +- cmd/cctest/main.go | 57 ++++++--- config.json | 178 ++++++++++++++++++++++++++--- config/config.go | 7 +- go.mod | 2 +- go.sum | 4 + testcase/init.go | 3 + testcase/kai.go | 175 ++++++++++++++++++++++++++++ testframework/check.go | 6 +- testframework/framework.go | 13 ++- testframework/framework_context.go | 5 +- testframework/kai.go | 89 +++++++++++++++ 14 files changed, 599 insertions(+), 56 deletions(-) create mode 100644 testcase/kai.go create mode 100644 testframework/kai.go diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index 4d903e0..43a7359 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -84,7 +84,7 @@ func (ethInvoker *EInvoker) url() string { case ethInvoker.TConfiguration.OkChainID: return ethInvoker.TConfiguration.OKURL default: - panic(fmt.Sprintf("unknown chain id:%d", ethInvoker.ChainID)) + panic(fmt.Sprintf("url:unknown chain id:%d", ethInvoker.ChainID)) } } @@ -105,7 +105,7 @@ func (ethInvoker *EInvoker) privateKey() string { case ethInvoker.TConfiguration.OkChainID: return ethInvoker.TConfiguration.OKPrivateKey default: - panic(fmt.Sprintf("unknown chain id:%d", ethInvoker.ChainID)) + panic(fmt.Sprintf("privateKey:unknown chain id:%d", ethInvoker.ChainID)) } } diff --git a/chains/kai/invoker.go b/chains/kai/invoker.go index 2c7d587..75be458 100644 --- a/chains/kai/invoker.go +++ b/chains/kai/invoker.go @@ -8,6 +8,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" ethComm "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" @@ -33,13 +34,12 @@ var ( ) type Invoker struct { - eth.EInvoker PrivateKey *ecdsa.PrivateKey ChainID uint64 TConfiguration *config.TestConfig client *kaiclient.Client NM *NonceManager - signer *signer + Signer *Signer } func NewInvoker(chainID uint64) *Invoker { @@ -53,11 +53,11 @@ func NewInvoker(chainID uint64) *Invoker { } instance.client = client instance.NM = NewNonceManager(client) - instance.signer, err = NewSigner(config.DefConfig.KaiPrivateKey) + instance.Signer, err = NewSigner(config.DefConfig.KaiPrivateKey) if err != nil { panic(err) } - instance.PrivateKey = instance.signer.PrivateKey + instance.PrivateKey = instance.Signer.PrivateKey return instance } @@ -102,7 +102,7 @@ func (ethInvoker *Invoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetHa if err != nil { return nil, err } - ethInvoker.ETHUtil.WaitTransactionConfirm(tx.Hash()) + ethInvoker.client.WaitTransactionConfirm(tx.Hash()) return tx, nil } @@ -326,7 +326,7 @@ func (i *Invoker) GetAccInfo() (string, error) { if err != nil { return "", err } - val, err := i.client.BalanceAt(context.Background(), i.signer.Address, big.NewInt(int64(h))) + val, err := i.client.BalanceAt(context.Background(), i.Signer.Address, big.NewInt(int64(h))) if err != nil { return "", err } @@ -336,7 +336,7 @@ func (i *Invoker) GetAccInfo() (string, error) { if err != nil { return "", err } - val, err = ontx.BalanceOf(nil, i.signer.Address) + val, err = ontx.BalanceOf(nil, i.Signer.Address) if err != nil { return "", err } @@ -346,7 +346,7 @@ func (i *Invoker) GetAccInfo() (string, error) { if err != nil { return "", err } - val, err = ongx.BalanceOf(nil, i.signer.Address) + val, err = ongx.BalanceOf(nil, i.Signer.Address) if err != nil { return "", err } @@ -356,7 +356,7 @@ func (i *Invoker) GetAccInfo() (string, error) { if err != nil { return "", err } - val, err = oep4x.BalanceOf(nil, i.signer.Address) + val, err = oep4x.BalanceOf(nil, i.Signer.Address) if err != nil { return "", err } @@ -366,7 +366,7 @@ func (i *Invoker) GetAccInfo() (string, error) { if err != nil { return "", err } - val, err = erc20.BalanceOf(nil, i.signer.Address) + val, err = erc20.BalanceOf(nil, i.Signer.Address) if err != nil { return "", err } @@ -376,12 +376,94 @@ func (i *Invoker) GetAccInfo() (string, error) { if err != nil { return "", err } - val, err = btcx.BalanceOf(nil, i.signer.Address) + val, err = btcx.BalanceOf(nil, i.Signer.Address) if err != nil { return "", err } btcxInfo := fmt.Sprintf("btcx: %d", val.Uint64()) return fmt.Sprintf("ETHEREUM: acc: %s, asset: [ %s, %s, %s, %s, %s, %s ]", - i.signer.Address.String(), ethInfo, ontInfo, ongInfo, oep4Info, erc20Info, btcxInfo), nil + i.Signer.Address.String(), ethInfo, ontInfo, ongInfo, oep4Info, erc20Info, btcxInfo), nil +} + +func (i *Invoker) GetSmartContractEventByBlock(contractAddr string, height uint64) ([]*eth.LockEvent, []*eth.UnlockEvent, error) { + eccmAddr := common.HexToAddress(contractAddr) + instance, err := eccm_abi.NewEthCrossChainManager(eccmAddr, i.client) + if err != nil { + return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error: %s", err.Error()) + } + + opt := &bind.FilterOpts{ + Start: height, + End: &height, + Context: context.Background(), + } + + ethlockevents := make([]*eth.LockEvent, 0) + { + events, err := instance.FilterCrossChainEvent(opt, nil) + if err != nil { + return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error :%s", err.Error()) + } + + if events == nil { + return nil, nil, fmt.Errorf("GetSmartContractEventByBlock - no events found on FilterCrossChainEvent") + } + + for events.Next() { + evt := events.Event + ethlockevents = append(ethlockevents, ð.LockEvent{ + Method: "lock", + TxHash: evt.Raw.TxHash.String(), + Txid: evt.TxId, + Saddress: evt.Sender.String(), + Tchain: uint32(evt.ToChainId), + Value: evt.Rawdata, + Height: height, + }) + } + } + + ethunlockevents := make([]*eth.UnlockEvent, 0) + { + events, err := instance.FilterVerifyHeaderAndExecuteTxEvent(opt) + if err != nil { + return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error :%s", err.Error()) + } + + if events == nil { + return nil, nil, fmt.Errorf("GetSmartContractEventByBlock - no events found on FilterCrossChainEvent") + } + + for events.Next() { + evt := events.Event + ethunlockevents = append(ethunlockevents, ð.UnlockEvent{ + Method: "unlock", + Txid: evt.Raw.TxHash.String(), + RTxid: hex.EncodeToString(evt.CrossChainTxHash), + FromTxId: hex.EncodeToString(evt.FromChainTxHash), + Token: hex.EncodeToString(evt.ToContract), + Height: height, + }) + } + if err != nil { + return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error :%s", err.Error()) + } + + if events == nil { + return nil, nil, fmt.Errorf("GetSmartContractEventByBlock - no events found on FilterCrossChainEvent") + } + + for events.Next() { + evt := events.Event + ethunlockevents = append(ethunlockevents, ð.UnlockEvent{ + Method: "unlock", + Txid: evt.Raw.TxHash.String(), + RTxid: hex.EncodeToString(evt.CrossChainTxHash), + Token: hex.EncodeToString(evt.ToContract), + Height: height, + }) + } + } + return ethlockevents, ethunlockevents, nil } diff --git a/chains/kai/signer.go b/chains/kai/signer.go index 245d72b..ac33360 100644 --- a/chains/kai/signer.go +++ b/chains/kai/signer.go @@ -14,18 +14,18 @@ import ( "github.com/ontio/ontology/common" ) -type signer struct { +type Signer struct { PrivateKey *ecdsa.PrivateKey Address ethComm.Address } -func NewSigner(privateKey string) (*signer, error) { +func NewSigner(privateKey string) (*Signer, error) { priKey, err := crypto.HexToECDSA(privateKey) if err != nil { return nil, fmt.Errorf("ApproveERC20, cannot decode private key") } address := crypto.PubkeyToAddress(priKey.PublicKey) - return &signer{ + return &Signer{ PrivateKey: priKey, Address: address, }, nil diff --git a/cmd/cctest/main.go b/cmd/cctest/main.go index 9f3065f..d75f8ab 100644 --- a/cmd/cctest/main.go +++ b/cmd/cctest/main.go @@ -28,6 +28,7 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" @@ -67,6 +68,9 @@ func main() { mscInvoker *eth.EInvoker o3Invoker *eth.EInvoker cmInvoker *cosmos.CosmosInvoker + kaiInvoker *kai.Invoker + ontInvoker *ont.OntInvoker + neoInvoker *neo.NeoInvoker ) if config.DefConfig.EthChainID > 0 { ethInvoker = eth.NewEInvoker(config.DefConfig.EthChainID) @@ -84,28 +88,32 @@ func main() { o3Invoker = eth.NewEInvoker(config.DefConfig.O3ChainID) } + if config.DefConfig.KaiChainID > 0 { + kaiInvoker = kai.NewInvoker(config.DefConfig.KaiChainID) + } + //btcInvoker, err := btc.NewBtcInvoker(config.DefConfig.RchainJsonRpcAddress, config.DefConfig.RCWallet, // config.DefConfig.RCWalletPwd, config.DefConfig.BtcRestAddr, config.DefConfig.BtcRestUser, // config.DefConfig.BtcRestPwd, config.DefConfig.BtcSignerPrivateKey) //if err != nil { // log.Errorf("failed to new a btc invoker, do not test cases about BTC: %v", err) //} - ontInvoker, err := ont.NewOntInvoker(config.DefConfig.OntJsonRpcAddress, config.DefConfig.OntContractsAvmPath, - config.DefConfig.OntWallet, config.DefConfig.OntWalletPassword) - if err != nil { - log.Warnf("failed to new a ont invoker, do not test cases about ONT: %v", err) - } - if config.DefConfig.CMCrossChainId > 0 { - cmInvoker, err = cosmos.NewCosmosInvoker() - if err != nil { - log.Warnf("failed to new a cosmos invoker, do not test cases about COSMOS: %v", err) - } - } + // ontInvoker, err := ont.NewOntInvoker(config.DefConfig.OntJsonRpcAddress, config.DefConfig.OntContractsAvmPath, + // config.DefConfig.OntWallet, config.DefConfig.OntWalletPassword) + // if err != nil { + // log.Warnf("failed to new a ont invoker, do not test cases about ONT: %v", err) + // } + // if config.DefConfig.CMCrossChainId > 0 { + // cmInvoker, err = cosmos.NewCosmosInvoker() + // if err != nil { + // log.Warnf("failed to new a cosmos invoker, do not test cases about COSMOS: %v", err) + // } + // } - neoInvoker, err := neo.NewNeoInvoker() - if err != nil { - log.Warnf("failed to new a neo invoker, do not test cases about NEO: %v", err) - } + // neoInvoker, err := neo.NewNeoInvoker() + // if err != nil { + // log.Warnf("failed to new a neo invoker, do not test cases about NEO: %v", err) + // } testCases := make([]string, 0) if TestCases != "" { @@ -124,11 +132,24 @@ func main() { if o3Invoker != nil { testframework.TFramework.SetO3Invoker(o3Invoker) } + + if kaiInvoker != nil { + testframework.TFramework.SeKaiInvoker(kaiInvoker) + } + //testframework.TFramework.SetBtcInvoker(btcInvoker) - testframework.TFramework.SetOntInvoker(ontInvoker) - testframework.TFramework.SetCosmosInvoker(cmInvoker) - testframework.TFramework.SetNeoInvoker(neoInvoker) + if ontInvoker != nil { + testframework.TFramework.SetOntInvoker(ontInvoker) + } + + if cmInvoker != nil { + testframework.TFramework.SetCosmosInvoker(cmInvoker) + } + + if neoInvoker != nil { + testframework.TFramework.SetNeoInvoker(neoInvoker) + } //Start run test case testframework.TFramework.Run(testCases, LoopNumber) waitToExit() diff --git a/config.json b/config.json index 9ff78f1..5c4fe4e 100644 --- a/config.json +++ b/config.json @@ -1,4 +1,16 @@ { + "BtcChainID": 0, + "EthChainID": 0, + "OntChainID": 0, + "NeoChainID": 0, + "Neo3ChainID": 0, + "BscChainID": 0, + "ZilChainID": 0, + "HecoChainID": 0, + "O3ChainID": 0, + "MscChainID": 0, + "OkChainID": 0, + "KaiChainID": 141, "BtcRestAddr": "http://btc_node", "BtcRestUser": "test", "BtcRestPwd": "test", @@ -17,18 +29,25 @@ "BtcExistingVendorPrivks": "cTqbqaR...wY6QSag,cT2HP4Q...PXH9Jk2ua,cSQmGg6...9mWzTxEY5A,cPYAx61...zPSbkkZqrzQ5b,cVV9Umt...qvwD5zg,cNK7Bw...oq1vWau8,cUZdDF9s...RePVbQTZ", "EthURL": "http://ethereum_node", "ETHPrivateKey": "AEE6358...A2608A9", + "MSCURL": "", + "MSCPrivateKey": "", + "OKURL": "", + "OKPrivateKey": "", + "BSCURL": "", + "BSCPrivateKey": "", + "HecoURL": "", + "HecoPrivateKey": "", + "O3URL": "", + "O3PrivateKey": "", "ZilURL": "https://zilliqa", "ZilPrivateKey": "", - "ZilEccdProxy": "", - "ZilEccdImpl": "", - "ZilLockProxy": "", "OntJsonRpcAddress": "http://ontology:20336", - "OntWallet": ".wallets/ont_dev.dat", - "OntWalletPassword": "admin", - "OntEpoch": 13358000, + "OntWallet": "/home/thangn/go/pkg/github.com/polynetwork/poly/wallet.dat", + "OntWalletPassword": "123456", "GasPrice": 2500, "GasLimit": 30000000, "OntContractsAvmPath": "chains/ont/avm", + "OntEpoch": 13358000, "CMWalletPath": ".wallets/cosmos_key", "CMWalletPwd": "11111111", "CMRpcUrl": "http://chain_based_on_cosmossdk:26657", @@ -37,6 +56,18 @@ "CMGas": 200000, "CMCrossChainId": 5, "CMEpoch": 1, + "NeoUrl": "", + "NeoWif": "", + "NeoEpoch": 0, + "Neo3Url": "", + "Neo3Wallet": "", + "Neo3Pwd": "", + "Neo3Magic": 0, + "Neo3AddressVersion": 0, + "Neo3Epoch": 0, + "KaiUrl": "https://dev-6.kardiachain.io", + "KaiEpoch": 584820, + "KaiPrivateKey": "8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", "RCWallet": ".wallets/wallet.dat", "RCWalletPwd": "", "RchainJsonRpcAddress": "http://138.91.6.226:40336", @@ -46,6 +77,94 @@ "BatchTxNum": 1, "BatchInterval": 1, "TxNumPerBatch": 1, + "MscEccd": "", + "MscEccm": "", + "MscEccmp": "", + "MscLockProxy": "", + "Mep20": "", + "MscOep4": "", + "MscOngx": "", + "MscOntx": "", + "MscWBTC": "", + "MscUSDT": "", + "MscDai": "", + "MscUSDC": "", + "MscNeo": "", + "MscRenBTC": "", + "OkEccd": "", + "OkEccm": "", + "OkEccmp": "", + "OkLockProxy": "", + "OkErc20": "", + "OkOep4": "", + "OkOngx": "", + "OkOntx": "", + "OkWBTC": "", + "OkUSDT": "", + "OkDai": "", + "OkUSDC": "", + "OkNeo": "", + "OkRenBTC": "", + "BscEccd": "", + "BscEccm": "", + "BscEccmp": "", + "BscLockProxy": "", + "Bep20": "", + "BscOep4": "", + "BscOngx": "", + "BscOntx": "", + "BscWBTC": "", + "BscUSDT": "", + "BscDai": "", + "BscUSDC": "", + "BscNeo": "", + "BscRenBTC": "", + "HecoEccd": "", + "HecoEccm": "", + "HecoEccmp": "", + "HecoLockProxy": "", + "HecoErc20": "", + "HecoOep4": "", + "HecoOngx": "", + "HecoOntx": "", + "HecoWBTC": "", + "HecoUSDT": "", + "HecoDai": "", + "HecoUSDC": "", + "HecoNeo": "", + "HecoRenBTC": "", + "KaiEccd": "0xf7616021e91Ad107e5149DD1E5E41148B4d25bda", + "KaiEccm": "0xfD7fa60cc69A1787Cd4255E3a9397464844aeB7B", + "KaiEccmp": "0x6B77fe5A964A9230324c6c421C1f874F479f4dc2", + "KaiLockProxy": "0x7038107B01EA22e4B51D7D29a4fE472E986625Ff", + "Krc20": "0xC1c23a67aa919454e67061A6d9962d9EBbf05fad", + "KaiOep4": "0x9BEd34f908BAde310a3436793875D1bb5ebb2095", + "KaiOngx": "0xEBcC5062f26BbBEc3b03986983B5084e9ABf9D96", + "KaiOntx": "0x22d42C1A2B39613636107d2ba8861da6a5f122D2", + "KaiWBTC": "", + "KaiUSDT": "", + "KaiDai": "", + "KaiUSDC": "", + "KaiNeo": "", + "KaiRenBTC": "", + "O3Eccd": "", + "O3Eccm": "", + "O3Eccmp": "", + "O3LockProxy": "", + "O3Erc20": "", + "O3Oep4": "", + "O3Ongx": "", + "O3Ontx": "", + "O3WBTC": "", + "O3USDT": "", + "O3Dai": "", + "O3USDC": "", + "O3Neo": "", + "O3RenBTC": "", + "ZilEccdProxy": "", + "ZilEccdImpl": "", + "ZilLockProxy": "", + "EthBnb": "", "EthErc20": "", "EthOep4": "", "Eccd": "", @@ -54,23 +173,56 @@ "EthLockProxy": "", "EthOngx": "", "EthOntx": "", + "EthOntd": "", + "EthUSDT": "", + "EthWBTC": "", + "EthDai": "", + "EthUSDC": "", + "EthNeo": "", + "EthRenBTC": "", "BtceContractAddress": "", "OntErc20": "", + "OntBep20": "", "OntOep4": "", "OntLockProxy": "", "OntEth": "", + "OntBnb": "", + "OntUSDT": "", + "OntWBTC": "", + "OntDai": "", + "OntUSDC": "", + "OntNeo": "", + "OntONTD": "", + "OntRenBTC": "", "BtcoContractAddress": "", + "NeoCCMC": "", + "NeoLockProxy": "", + "CNeo": "", + "NeoOnt": "", + "NeoOntd": "", + "NeoBnb": "", + "NeoEth": "", + "Neo3CCMC": "", + "Neo3LockProxy": "", + "Neo3Ont": "", + "Neo3Ontd": "", + "Neo3Bnb": "", + "Neo3Eth": "", + "Neo3Ht": "", + "Neo3Hrc20": "", "CMLockProxy": "", "BtcValLimit": 100000, "OntValLimit": 10, + "OntdValLimit": 0, "OngValLimit": 10000, "EthValLimit": 100000, "Oep4ValLimit": 1000, "Erc20ValLimit": 1000, - - "KaiUrl": "https://dev-6.kardiachain.io", - "KaiEpoch": 584820, - "KaiPrivateKey": "8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", - "KaiChainID": 138 - -} + "KaiValLimit": 10, + "USDTValLimit": 0, + "NeoValLimit": 0, + "WBTCValLimit": 0, + "USDCValLimit": 0, + "RenBTCValLimit": 0, + "OntdValFloor": 0 +} \ No newline at end of file diff --git a/config/config.go b/config/config.go index 5b8eae7..4ded0e3 100644 --- a/config/config.go +++ b/config/config.go @@ -51,7 +51,7 @@ type TestConfig struct { MscChainID uint64 OkChainID uint64 KaiChainID uint64 - + BtcRestAddr string BtcRestUser string BtcRestPwd string @@ -205,7 +205,7 @@ type TestConfig struct { HecoUSDC string HecoNeo string HecoRenBTC string - + // kai contracts: auto set after deploy KaiEccd string KaiEccm string @@ -221,7 +221,7 @@ type TestConfig struct { KaiUSDC string KaiNeo string KaiRenBTC string - + // o3 contracts: auto set after deploy O3Eccd string O3Eccm string @@ -313,6 +313,7 @@ type TestConfig struct { WBTCValLimit uint64 USDCValLimit uint64 RenBTCValLimit uint64 + KaiValLimit uint64 OntdValFloor uint64 } diff --git a/go.mod b/go.mod index f4619df..5e758d5 100644 --- a/go.mod +++ b/go.mod @@ -45,4 +45,4 @@ replace github.com/polynetwork/poly-go-sdk => github.com/joeqian10/poly-go-sdk v //replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 -replace github.com/polynetwork/kai-relayer => github.com/dogecoindev/kai-relayer v0.0.0-20210531024930-1ae441ffccb6 +replace github.com/polynetwork/kai-relayer => github.com/dogecoindev/kai-relayer v0.0.0-20210602042052-c1c2c1f145f3 diff --git a/go.sum b/go.sum index ee122af..bb92396 100644 --- a/go.sum +++ b/go.sum @@ -258,6 +258,10 @@ github.com/dogecoindev/kai-relayer v0.0.0-20210527114906-bc3e37fbc166 h1:SAN+Wcv github.com/dogecoindev/kai-relayer v0.0.0-20210527114906-bc3e37fbc166/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= github.com/dogecoindev/kai-relayer v0.0.0-20210531024930-1ae441ffccb6 h1:ZmUnKamhX8MYd58diikbTzAGcvSwhazUfAvY5ALWC4g= github.com/dogecoindev/kai-relayer v0.0.0-20210531024930-1ae441ffccb6/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dogecoindev/kai-relayer v0.0.0-20210602041540-c6aba2dd1cc5 h1:N1m+PXnIdezTlRMNacMCtcVrEcgK8oeSAtUsI+KtAKI= +github.com/dogecoindev/kai-relayer v0.0.0-20210602041540-c6aba2dd1cc5/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dogecoindev/kai-relayer v0.0.0-20210602042052-c1c2c1f145f3 h1:DGE+BwUN4X8045hHHMvi5VL32PKTX/3X1XOyqxIaoj8= +github.com/dogecoindev/kai-relayer v0.0.0-20210602042052-c1c2c1f145f3/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87 h1:OMbqMXf9OAXzH1dDH82mQMrddBE8LIIwDtxeK4wE1/A= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs= diff --git a/testcase/init.go b/testcase/init.go index 5d20b96..8534720 100644 --- a/testcase/init.go +++ b/testcase/init.go @@ -92,4 +92,7 @@ func init() { testframework.TFramework.RegTestCase("BnbToEthOnce", BnbToEthOnce) testframework.TFramework.RegTestCase("RenBTCCircle", RenBTCCircle) testframework.TFramework.RegTestCase("EOntdToNeoAndBack", EOntdToNeoAndBack) + + testframework.TFramework.RegTestCase("SendKaiToEthChain", SendKaiToEthChain) + testframework.TFramework.RegTestCase("SendEthToKaiChain", SendEthToKaiChain) } diff --git a/testcase/kai.go b/testcase/kai.go new file mode 100644 index 0000000..b9e4ad9 --- /dev/null +++ b/testcase/kai.go @@ -0,0 +1,175 @@ +package testcase + +import ( + "bytes" + "context" + "fmt" + "math/big" + "strings" + "time" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + ethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rlp" + "github.com/polynetwork/eth-contracts/go_abi/lock_proxy_abi" + "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/chains/kai" + "github.com/polynetwork/poly-io-test/config" + "github.com/polynetwork/poly-io-test/log" + "github.com/polynetwork/poly-io-test/testframework" +) + +func SendKaiToEthChain(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + err := SendKaiCrossEth(ctx, status, GetRandAmount(config.DefConfig.OntValLimit, 1)) + if err != nil { + log.Error("SendKaiToEthChain: %s", err) + return false + } + WaitUntilClean(status) + status.SetItSuccess(1) + return true +} + +func SendEthToKaiChain(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { + err := SendEthCrossKai(ctx, status, GetRandAmount(config.DefConfig.OntValLimit, 1)) + if err != nil { + log.Error("SendEthToKaiChain: %s", err) + return false + } + WaitUntilClean(status) + status.SetItSuccess(1) + return true +} + +func SendKaiCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + kClient := ctx.KaiInvoker.Client() + // _, err := ctx.KaiInvoker.BindAssetHash( + // config.DefConfig.KaiLockProxy, + // "C1c23a67aa919454e67061A6d9962d9EBbf05fad", + // "0000000000000000000000000000000000000000", + // config.DefConfig.EthChainID, + // 1000, + // ) + // if err != nil { + // panic(err) + // } + + gasPrice, err := kClient.SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendKaiCrossEth, get suggest gas price failed error: %s", err.Error()) + } + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendKaiCrossEth, abi.JSON error:" + err.Error()) + } + + assetaddress := ethcommon.HexToAddress("C1c23a67aa919454e67061A6d9962d9EBbf05fad") + rawFrom := ctx.KaiInvoker.Signer.Address.Bytes() + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.EthChainID), rawFrom, + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendKaiCrossEth, contractabi.Pack error:" + err.Error()) + } + contractAddr := ethcommon.HexToAddress(config.DefConfig.KaiLockProxy) + callMsg := ethereum.CallMsg{ + From: ctx.KaiInvoker.Signer.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: nil, Data: txData, + } + gasLimit, err := kClient.EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendKaiCrossEth, estimate gas limit error: %s", err.Error()) + } + fmt.Println(gasLimit, "------------") + nonce := ctx.KaiInvoker.NM.GetAddressNonce(ctx.KaiInvoker.Signer.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + _ = rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendKaiCrossEth, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.KaiInvoker.Signer.PrivateKey) + if err != nil { + return fmt.Errorf("SendKaiCrossEth, types.SignTx error: %s", err.Error()) + } + + err = kClient.SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendKaiCrossEth, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"KaiToEth", time.Now()}) + kClient.WaitTransactionConfirm(signedtx.Hash()) + return nil +} + +func SendEthCrossKai(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { + client := ctx.EthInvoker.ETHUtil.GetEthClient() + + gasPrice, err := client.SuggestGasPrice(context.Background()) + if err != nil { + return fmt.Errorf("SendEthCrossKai, get suggest gas price failed error: %s", err.Error()) + } + gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) + if err != nil { + return fmt.Errorf("SendEthCrossKai, abi.JSON error:" + err.Error()) + } + + assetaddress := ethcommon.HexToAddress("0000000000000000000000000000000000000000") + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.KaiChainID), ctx.OntInvoker.OntAcc.Address[:], + big.NewInt(int64(amount))) + if err != nil { + return fmt.Errorf("SendEthCrossKai, contractabi.Pack error:" + err.Error()) + } + + contractAddr := ethcommon.HexToAddress(config.DefConfig.KaiLockProxy) + callMsg := ethereum.CallMsg{ + From: ctx.KaiInvoker.Signer.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + Value: big.NewInt(int64(amount)), Data: txData, + } + gasLimit, err := client.EstimateGas(context.Background(), callMsg) + if err != nil { + return fmt.Errorf("SendEthCrossKai, estimate gas limit error: %s", err.Error()) + } + + nonce := ctx.KaiInvoker.NM.GetAddressNonce(ctx.KaiInvoker.Signer.Address) + tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) + bf := new(bytes.Buffer) + _ = rlp.Encode(bf, tx) + + rawtx := hexutil.Encode(bf.Bytes()) + unsignedTx, err := eth.DeserializeTx(rawtx) + if err != nil { + return fmt.Errorf("SendEthCrossKai, eth.DeserializeTx error: %s", err.Error()) + } + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.KaiInvoker.Signer.PrivateKey) + if err != nil { + return fmt.Errorf("SendEthCrossKai, types.SignTx error: %s", err.Error()) + } + + err = client.SendTransaction(context.Background(), signedtx) + if err != nil { + return fmt.Errorf("SendEthCrossKai, send transaction error:%s", err.Error()) + } + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"EthToOnt", time.Now()}) + ctx.EthInvoker.ETHUtil.WaitTransactionConfirm(signedtx.Hash()) + return nil +} + +func MakeKaiAuth(signer *kai.Signer, nonce, gasPrice, gasLimit uint64) *bind.TransactOpts { + auth := bind.NewKeyedTransactor(signer.PrivateKey) + auth.Nonce = big.NewInt(int64(nonce)) + auth.Value = big.NewInt(int64(0)) // in wei + auth.GasLimit = gasLimit // in units + auth.GasPrice = big.NewInt(int64(gasPrice)) + + return auth +} diff --git a/testframework/check.go b/testframework/check.go index 5bef573..f3ad578 100644 --- a/testframework/check.go +++ b/testframework/check.go @@ -112,7 +112,7 @@ func getInvoker(ctx *TestFrameworkContext, chainID uint64) *eth.EInvoker { case config.DefConfig.O3ChainID: return ctx.O3Invoker default: - panic(fmt.Sprintf("unknown chain id:%d", chainID)) + panic(fmt.Sprintf("getInvoker:unknown chain id:%d", chainID)) } } @@ -126,8 +126,10 @@ func getEccm(chainID uint64) string { return config.DefConfig.MscEccm case config.DefConfig.O3ChainID: return config.DefConfig.O3Eccm + case config.DefConfig.KaiChainID: + return config.DefConfig.KaiEccm default: - panic(fmt.Sprintf("unknown chain id:%d", chainID)) + panic(fmt.Sprintf("getEccm:unknown chain id:%d", chainID)) } } diff --git a/testframework/framework.go b/testframework/framework.go index c480f9e..a81f38c 100644 --- a/testframework/framework.go +++ b/testframework/framework.go @@ -26,6 +26,7 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" @@ -63,6 +64,7 @@ type TestFramework struct { ontInvoker *ont.OntInvoker cosmosInvoker *cosmos.CosmosInvoker neoInvoker *neo.NeoInvoker + kaiInvoker *kai.Invoker } //NewTestFramework return a TestFramework instance @@ -119,7 +121,7 @@ func (this *TestFramework) runTestList(testCaseList []TestCase, loopNumber int) defer this.onTestFinish(testCaseList) ctx := NewTestFrameworkContext(this, testCaseList, this.rcSdk, this.ethInvoker, this.bscInvoker, this.mscInvoker, this.o3Invoker, this.btcInvoker, - this.ontInvoker, this.cosmosInvoker, this.neoInvoker) + this.ontInvoker, this.cosmosInvoker, this.neoInvoker, this.kaiInvoker) if this.ontInvoker != nil { go MonitorOnt(ctx) } @@ -145,6 +147,10 @@ func (this *TestFramework) runTestList(testCaseList []TestCase, loopNumber int) if this.neoInvoker != nil { go MonitorNeo(ctx) } + if this.kaiInvoker != nil { + go MonitorKai(ctx) + } + go ReportPending(ctx) wg := &sync.WaitGroup{} @@ -193,6 +199,11 @@ func (this *TestFramework) SetO3Invoker(invoker *eth.EInvoker) { this.o3Invoker = invoker } +//SetO3Invoker instance to test framework +func (this *TestFramework) SeKaiInvoker(invoker *kai.Invoker) { + this.kaiInvoker = invoker +} + //SetMSCInvoker instance to test framework func (this *TestFramework) SetMSCInvoker(invoker *eth.EInvoker) { this.mscInvoker = invoker diff --git a/testframework/framework_context.go b/testframework/framework_context.go index cf28a26..1747e2d 100644 --- a/testframework/framework_context.go +++ b/testframework/framework_context.go @@ -25,6 +25,7 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" + "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" ) @@ -44,11 +45,12 @@ type TestFrameworkContext struct { OntInvoker *ont.OntInvoker CMInvoker *cosmos.CosmosInvoker NeoInvoker *neo.NeoInvoker + KaiInvoker *kai.Invoker } //NewTestFrameworkContext return a TestFrameworkContext instance func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_go_sdk.PolySdk, eInvkr, bscInvkr, mscInvkr, o3Invkr *eth.EInvoker, - btcInvkr *btc.BtcInvoker, ontInvkr *ont.OntInvoker, cmInvoker *cosmos.CosmosInvoker, neoInvoker *neo.NeoInvoker) *TestFrameworkContext { + btcInvkr *btc.BtcInvoker, ontInvkr *ont.OntInvoker, cmInvoker *cosmos.CosmosInvoker, neoInvoker *neo.NeoInvoker, kaiInvoker *kai.Invoker) *TestFrameworkContext { ctx := &TestFrameworkContext{ Framework: fw, Cases: caseArr, @@ -61,6 +63,7 @@ func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_ OntInvoker: ontInvkr, CMInvoker: cmInvoker, NeoInvoker: neoInvoker, + KaiInvoker: kaiInvoker, } ctx.Status = NewCtxStatus(ctx) return ctx diff --git a/testframework/kai.go b/testframework/kai.go new file mode 100644 index 0000000..357976e --- /dev/null +++ b/testframework/kai.go @@ -0,0 +1,89 @@ +package testframework + +import ( + "context" + "encoding/hex" + "math/big" + "os" + "time" + + "github.com/polynetwork/poly-io-test/chains/kai" + "github.com/polynetwork/poly-io-test/log" +) + +func MonitorKai(ctx *TestFrameworkContext) { + invoker := ctx.KaiInvoker + ctx2 := context.Background() + currentHeight, err := invoker.Client().BlockNumber(ctx2) + if err != nil { + log.Errorf("MonitorEthChain - ctx.EthTools.GetNodeHeight error: %s", err) + os.Exit(1) + } + ethHeight := uint32(currentHeight) - 5 + updateTicker := time.NewTicker(time.Second * 1) + for { + select { + case <-updateTicker.C: + currentHeight, err := invoker.Client().BlockNumber(ctx2) + if err != nil { + log.Errorf("ctx.EthTools.GetNodeHeight error: %s", err) + continue + } + if uint32(currentHeight) <= ethHeight+5 { + continue + } + for uint32(currentHeight) > ethHeight+5 { + ethHeight++ + err = parseKaiChainBlock(ctx, invoker, ethHeight) // TODO: influenced by forks + if err != nil { + log.Errorf("parseKaiChainBlock error: %s", err) + ethHeight-- + break + } + } + } + } +} + +func parseKaiChainBlock(ctx *TestFrameworkContext, invoker *kai.Invoker, height uint32) error { + // contract is different + lockevents, unlockevents, err := invoker.GetSmartContractEventByBlock(getEccm(invoker.ChainID), uint64(height)) + if err != nil { + return err + } + //log.Infof("eth chain, block height: %d, unlock events num: %d, lock events num: %d", height, len(unlockevents), len(lockevents)) + for _, event := range lockevents { + // try to get all data + // + ethTxHash := event.TxHash[2:] + ok, idx := ctx.Status.IsTxPending(ethTxHash) + if !ok { + continue + } + + var ethTxIdByte []byte + indexInt := big.NewInt(0) + indexInt.SetBytes(event.Txid) + for i := len(indexInt.Bytes()); i < 32; i++ { + ethTxIdByte = append(ethTxIdByte, 0) + } + ethTxIdByte = append(ethTxIdByte, indexInt.Bytes()...) + ethTxIdStr := hex.EncodeToString(ethTxIdByte) + log.Infof("send cross chain tx on eth, tx hash: %s, tx id: %s chainID:%d", ethTxHash, ethTxIdStr, invoker.ChainID) + caseStatus := ctx.Status.GetCaseStatus(idx) + caseStatus.AddTx(ethTxIdStr, &TxInfo{ethTxHash, time.Now()}) + caseStatus.Del(ethTxHash) + } + + for _, event := range unlockevents { + // try to get all data + // + allianceTxHash := event.RTxid + rawTxHash := event.FromTxId + if ok, idx := ctx.Status.IsTxPending(rawTxHash); ok { + log.Infof("receive cross chain tx on eth, txhash: %s, alliance tx hash: %s, raw tx hash: %s chainID:%d", event.Txid, allianceTxHash, rawTxHash, invoker.ChainID) + ctx.Status.DelWithIndex(rawTxHash, idx) + } + } + return nil +} From 6ec4b3838e0edc01f487764c0a464c70e7c6c256 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Thu, 3 Jun 2021 18:37:23 +0700 Subject: [PATCH 91/96] UPDATE KAI TEST --- chains/eth/eth_invoker.go | 2 ++ chains/kai/invoker.go | 68 +++++++++++++++++++++++++++++++++++++++ config.json | 20 ++++++------ testcase/kai.go | 40 +++++++++-------------- 4 files changed, 95 insertions(+), 35 deletions(-) diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index 43a7359..2fc7a00 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -238,6 +238,8 @@ func (ethInvoker *EInvoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetH toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.O3ChainID { toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.KaiChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.NeoChainID { other, err := helper.UInt160FromString(toAssetHash) if err != nil { diff --git a/chains/kai/invoker.go b/chains/kai/invoker.go index 75be458..5c99e60 100644 --- a/chains/kai/invoker.go +++ b/chains/kai/invoker.go @@ -14,6 +14,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/joeqian10/neo-gogogo/helper" ontcommon "github.com/ontio/ontology/common" + utils2 "github.com/ontio/ontology/smartcontract/service/native/utils" "github.com/polynetwork/eth-contracts/go_abi/btcx_abi" "github.com/polynetwork/eth-contracts/go_abi/eccd_abi" "github.com/polynetwork/eth-contracts/go_abi/eccm_abi" @@ -88,6 +89,8 @@ func (ethInvoker *Invoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetHa toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.O3ChainID { toAddr = ethComm.HexToAddress(toAssetHash).Bytes() + } else if uint64(toChainId) == config.DefConfig.KaiChainID { + toAddr = ethComm.HexToAddress(toAssetHash).Bytes() } else if uint64(toChainId) == config.DefConfig.NeoChainID { other, err := helper.UInt160FromString(toAssetHash) if err != nil { @@ -321,6 +324,71 @@ func (i *Invoker) Client() *kaiclient.Client { return i.client } +func (i *Invoker) BindOntAsset(lockProxy, ontOnEth, ongOnEth, oep4OnEth, oep4OnOnt string) ([]*types.Transaction, error) { + auth, contract, err := i.MakeLockProxy(lockProxy) + if err != nil { + return nil, err + } + txs := make([]*types.Transaction, 0) + + tx1, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ontOnEth), + config.DefConfig.OntChainID, utils2.OntContractAddress[:]) + if err != nil { + return nil, err + } + i.Client().WaitTransactionConfirm(tx1.Hash()) + txs = append(txs, tx1) + + auth, _ = i.MakeSmartContractAuth() + tx4, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ontOnEth), + config.DefConfig.CMCrossChainId, []byte(config.CM_ONT)) + if err != nil { + return nil, err + } + i.client.WaitTransactionConfirm(tx4.Hash()) + txs = append(txs, tx4) + + auth, _ = i.MakeSmartContractAuth() + tx2, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ongOnEth), + config.DefConfig.OntChainID, utils2.OngContractAddress[:]) + if err != nil { + return nil, err + } + i.client.WaitTransactionConfirm(tx2.Hash()) + txs = append(txs, tx2) + + auth, _ = i.MakeSmartContractAuth() + tx5, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ongOnEth), + config.DefConfig.CMCrossChainId, []byte(config.CM_ONG)) + if err != nil { + return nil, err + } + i.client.WaitTransactionConfirm(tx5.Hash()) + txs = append(txs, tx5) + + oep4, err := ontcommon.AddressFromHexString(oep4OnOnt) + if err != nil { + return nil, err + } + auth, _ = i.MakeSmartContractAuth() + tx3, err := contract.BindAssetHash(auth, ethComm.HexToAddress(oep4OnEth), config.DefConfig.OntChainID, oep4[:]) + if err != nil { + return nil, err + } + i.client.WaitTransactionConfirm(tx3.Hash()) + txs = append(txs, tx3) + + auth, _ = i.MakeSmartContractAuth() + tx6, err := contract.BindAssetHash(auth, ethComm.HexToAddress(oep4OnEth), config.DefConfig.CMCrossChainId, []byte(config.CM_OEP4)) + if err != nil { + return nil, err + } + i.client.WaitTransactionConfirm(tx6.Hash()) + txs = append(txs, tx6) + + return txs, nil +} + func (i *Invoker) GetAccInfo() (string, error) { h, err := i.client.BlockNumber(context.Background()) if err != nil { diff --git a/config.json b/config.json index 5c4fe4e..2ad3c3b 100644 --- a/config.json +++ b/config.json @@ -66,8 +66,8 @@ "Neo3AddressVersion": 0, "Neo3Epoch": 0, "KaiUrl": "https://dev-6.kardiachain.io", - "KaiEpoch": 584820, "KaiPrivateKey": "8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", + "KaiEpoch": 584820, "RCWallet": ".wallets/wallet.dat", "RCWalletPwd": "", "RchainJsonRpcAddress": "http://138.91.6.226:40336", @@ -133,14 +133,14 @@ "HecoUSDC": "", "HecoNeo": "", "HecoRenBTC": "", - "KaiEccd": "0xf7616021e91Ad107e5149DD1E5E41148B4d25bda", - "KaiEccm": "0xfD7fa60cc69A1787Cd4255E3a9397464844aeB7B", - "KaiEccmp": "0x6B77fe5A964A9230324c6c421C1f874F479f4dc2", - "KaiLockProxy": "0x7038107B01EA22e4B51D7D29a4fE472E986625Ff", - "Krc20": "0xC1c23a67aa919454e67061A6d9962d9EBbf05fad", - "KaiOep4": "0x9BEd34f908BAde310a3436793875D1bb5ebb2095", - "KaiOngx": "0xEBcC5062f26BbBEc3b03986983B5084e9ABf9D96", - "KaiOntx": "0x22d42C1A2B39613636107d2ba8861da6a5f122D2", + "KaiEccd": "0x319aD69d324BE79d24e1Cc71e464E9F50F26F880", + "KaiEccm": "0x8FD7708c9e17F739BcaA13A809022F94b26b8aB8", + "KaiEccmp": "0x853249c97FC100b01C46cbeE1C9C3dcA9925CCef", + "KaiLockProxy": "0x006029DFcacaC453eC6dFc7703bdba5E3138C5A7", + "Krc20": "0x8e5dcfecbEdf15d5026633eA3c7beF5391c6ab03", + "KaiOep4": "0x185040E5E5efe4841EC7D558057de5AC65289b7C", + "KaiOngx": "0xee4b18d47d6d274D417E5dF1b2b332c7b9f2078f", + "KaiOntx": "0xaf194cc85f28Ee2294320bab221443398D346655", "KaiWBTC": "", "KaiUSDT": "", "KaiDai": "", @@ -218,11 +218,11 @@ "EthValLimit": 100000, "Oep4ValLimit": 1000, "Erc20ValLimit": 1000, - "KaiValLimit": 10, "USDTValLimit": 0, "NeoValLimit": 0, "WBTCValLimit": 0, "USDCValLimit": 0, "RenBTCValLimit": 0, + "KaiValLimit": 10, "OntdValFloor": 0 } \ No newline at end of file diff --git a/testcase/kai.go b/testcase/kai.go index b9e4ad9..09b96fc 100644 --- a/testcase/kai.go +++ b/testcase/kai.go @@ -46,66 +46,56 @@ func SendEthToKaiChain(ctx *testframework.TestFrameworkContext, status *testfram } func SendKaiCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { - kClient := ctx.KaiInvoker.Client() - // _, err := ctx.KaiInvoker.BindAssetHash( - // config.DefConfig.KaiLockProxy, - // "C1c23a67aa919454e67061A6d9962d9EBbf05fad", - // "0000000000000000000000000000000000000000", - // config.DefConfig.EthChainID, - // 1000, - // ) - // if err != nil { - // panic(err) - // } - - gasPrice, err := kClient.SuggestGasPrice(context.Background()) + kclient := ctx.KaiInvoker.Client() + gasPrice, err := kclient.SuggestGasPrice(context.Background()) if err != nil { return fmt.Errorf("SendKaiCrossEth, get suggest gas price failed error: %s", err.Error()) } - gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + //gasPrice = gasPrice.Mul(gasPrice, big.NewInt(5)) + contractabi, err := abi.JSON(strings.NewReader(lock_proxy_abi.LockProxyABI)) if err != nil { return fmt.Errorf("SendKaiCrossEth, abi.JSON error:" + err.Error()) } - - assetaddress := ethcommon.HexToAddress("C1c23a67aa919454e67061A6d9962d9EBbf05fad") rawFrom := ctx.KaiInvoker.Signer.Address.Bytes() - txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.EthChainID), rawFrom, + assetaddress := ethcommon.HexToAddress("0000000000000000000000000000000000000000") + txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.KaiChainID), rawFrom[:], big.NewInt(int64(amount))) if err != nil { return fmt.Errorf("SendKaiCrossEth, contractabi.Pack error:" + err.Error()) } + contractAddr := ethcommon.HexToAddress(config.DefConfig.KaiLockProxy) callMsg := ethereum.CallMsg{ From: ctx.KaiInvoker.Signer.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, - Value: nil, Data: txData, + Value: big.NewInt(int64(amount)), Data: txData, } - gasLimit, err := kClient.EstimateGas(context.Background(), callMsg) + gasLimit, err := kclient.EstimateGas(context.Background(), callMsg) if err != nil { return fmt.Errorf("SendKaiCrossEth, estimate gas limit error: %s", err.Error()) } - fmt.Println(gasLimit, "------------") + nonce := ctx.KaiInvoker.NM.GetAddressNonce(ctx.KaiInvoker.Signer.Address) tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) bf := new(bytes.Buffer) - _ = rlp.Encode(bf, tx) + rlp.Encode(bf, tx) rawtx := hexutil.Encode(bf.Bytes()) unsignedTx, err := eth.DeserializeTx(rawtx) if err != nil { return fmt.Errorf("SendKaiCrossEth, eth.DeserializeTx error: %s", err.Error()) } - signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.KaiInvoker.Signer.PrivateKey) + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.KaiInvoker.PrivateKey) if err != nil { return fmt.Errorf("SendKaiCrossEth, types.SignTx error: %s", err.Error()) } - err = kClient.SendTransaction(context.Background(), signedtx) + err = kclient.SendTransaction(context.Background(), signedtx) if err != nil { return fmt.Errorf("SendKaiCrossEth, send transaction error:%s", err.Error()) } status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"KaiToEth", time.Now()}) - kClient.WaitTransactionConfirm(signedtx.Hash()) + kclient.WaitTransactionConfirm(signedtx.Hash()) return nil } @@ -159,7 +149,7 @@ func SendEthCrossKai(ctx *testframework.TestFrameworkContext, status *testframew if err != nil { return fmt.Errorf("SendEthCrossKai, send transaction error:%s", err.Error()) } - status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"EthToOnt", time.Now()}) + status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"EthToKai", time.Now()}) ctx.EthInvoker.ETHUtil.WaitTransactionConfirm(signedtx.Hash()) return nil } From e6023b27468a177f857d0d6b15e0b19b4b801ab8 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Tue, 8 Jun 2021 14:06:45 +0700 Subject: [PATCH 92/96] FIX SendKaiToEthChain --- chains/eth/eth_invoker.go | 4 + chains/eth/eth_tools.go | 2 +- chains/kai/invoker.go | 537 ----------------------------- chains/kai/invoker_test.go | 7 - chains/kai/nonce_manager.go | 89 ----- chains/kai/signer.go | 58 ---- cmd/cctest/main.go | 5 +- cmd/kai_deployer/run.go | 208 +++++------ config.json | 40 ++- config/config.go | 4 + go.mod | 2 +- go.sum | 4 + testcase/kai.go | 18 +- testframework/framework.go | 5 +- testframework/framework_context.go | 5 +- testframework/kai.go | 12 +- 16 files changed, 141 insertions(+), 859 deletions(-) delete mode 100644 chains/kai/invoker.go delete mode 100644 chains/kai/invoker_test.go delete mode 100644 chains/kai/nonce_manager.go delete mode 100644 chains/kai/signer.go diff --git a/chains/eth/eth_invoker.go b/chains/eth/eth_invoker.go index 2fc7a00..a7e4329 100644 --- a/chains/eth/eth_invoker.go +++ b/chains/eth/eth_invoker.go @@ -83,6 +83,8 @@ func (ethInvoker *EInvoker) url() string { return ethInvoker.TConfiguration.O3URL case ethInvoker.TConfiguration.OkChainID: return ethInvoker.TConfiguration.OKURL + case ethInvoker.TConfiguration.KaiChainID: + return ethInvoker.TConfiguration.KaiUrl default: panic(fmt.Sprintf("url:unknown chain id:%d", ethInvoker.ChainID)) } @@ -104,6 +106,8 @@ func (ethInvoker *EInvoker) privateKey() string { return ethInvoker.TConfiguration.O3PrivateKey case ethInvoker.TConfiguration.OkChainID: return ethInvoker.TConfiguration.OKPrivateKey + case ethInvoker.TConfiguration.KaiChainID: + return ethInvoker.TConfiguration.KaiPrivateKey default: panic(fmt.Sprintf("privateKey:unknown chain id:%d", ethInvoker.ChainID)) } diff --git a/chains/eth/eth_tools.go b/chains/eth/eth_tools.go index 0ed7086..4d5dfb8 100644 --- a/chains/eth/eth_tools.go +++ b/chains/eth/eth_tools.go @@ -328,7 +328,7 @@ func (self *ETHTools) WaitTransactionConfirm(hash common.Hash) { start := time.Now() for { time.Sleep(time.Millisecond * 100) - if time.Now().After(start.Add(time.Second * 10)) { + if time.Now().After(start.Add(time.Second * 30)) { log.Errorf("WaitTransactionConfirm max wait time exceeded, quit") return } diff --git a/chains/kai/invoker.go b/chains/kai/invoker.go deleted file mode 100644 index 5c99e60..0000000 --- a/chains/kai/invoker.go +++ /dev/null @@ -1,537 +0,0 @@ -package kai - -import ( - "context" - "crypto/ecdsa" - "encoding/hex" - "fmt" - "math/big" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - ethComm "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/joeqian10/neo-gogogo/helper" - ontcommon "github.com/ontio/ontology/common" - utils2 "github.com/ontio/ontology/smartcontract/service/native/utils" - "github.com/polynetwork/eth-contracts/go_abi/btcx_abi" - "github.com/polynetwork/eth-contracts/go_abi/eccd_abi" - "github.com/polynetwork/eth-contracts/go_abi/eccm_abi" - "github.com/polynetwork/eth-contracts/go_abi/eccmp_abi" - "github.com/polynetwork/eth-contracts/go_abi/erc20_abi" - "github.com/polynetwork/eth-contracts/go_abi/lock_proxy_abi" - "github.com/polynetwork/eth-contracts/go_abi/oep4_abi" - "github.com/polynetwork/eth-contracts/go_abi/ongx_abi" - "github.com/polynetwork/eth-contracts/go_abi/ontx_abi" - "github.com/polynetwork/kai-relayer/kaiclient" - "github.com/polynetwork/poly-io-test/chains/eth" - "github.com/polynetwork/poly-io-test/config" - "github.com/polynetwork/poly-io-test/log" -) - -var ( - DefaultGasLimit = 5000000 -) - -type Invoker struct { - PrivateKey *ecdsa.PrivateKey - ChainID uint64 - TConfiguration *config.TestConfig - client *kaiclient.Client - NM *NonceManager - Signer *Signer -} - -func NewInvoker(chainID uint64) *Invoker { - var err error - instance := &Invoker{} - instance.ChainID = chainID - instance.TConfiguration = config.DefConfig - client, err := kaiclient.Dial(config.DefConfig.KaiUrl) - if err != nil { - panic(err) - } - instance.client = client - instance.NM = NewNonceManager(client) - instance.Signer, err = NewSigner(config.DefConfig.KaiPrivateKey) - if err != nil { - panic(err) - } - instance.PrivateKey = instance.Signer.PrivateKey - return instance -} - -func (ethInvoker *Invoker) BindAssetHash(lockProxyAddr, fromAssetHash, toAssetHash string, - toChainId uint64, initAmt int64) (*types.Transaction, error) { - auth, contract, err := ethInvoker.MakeLockProxy(lockProxyAddr) - if err != nil { - return nil, err - } - var toAddr []byte - if uint64(toChainId) == config.DefConfig.OntChainID { - addr, err := ontcommon.AddressFromHexString(toAssetHash) - if err != nil { - return nil, err - } - toAddr = addr[:] - } else if uint64(toChainId) == config.DefConfig.CMCrossChainId { - toAddr = []byte(toAssetHash) - } else if uint64(toChainId) == config.DefConfig.EthChainID { - toAddr = ethComm.HexToAddress(toAssetHash).Bytes() - } else if uint64(toChainId) == config.DefConfig.BscChainID { - toAddr = ethComm.HexToAddress(toAssetHash).Bytes() - } else if uint64(toChainId) == config.DefConfig.MscChainID { - toAddr = ethComm.HexToAddress(toAssetHash).Bytes() - } else if uint64(toChainId) == config.DefConfig.OkChainID { - toAddr = ethComm.HexToAddress(toAssetHash).Bytes() - } else if uint64(toChainId) == config.DefConfig.HecoChainID { - toAddr = ethComm.HexToAddress(toAssetHash).Bytes() - } else if uint64(toChainId) == config.DefConfig.O3ChainID { - toAddr = ethComm.HexToAddress(toAssetHash).Bytes() - } else if uint64(toChainId) == config.DefConfig.KaiChainID { - toAddr = ethComm.HexToAddress(toAssetHash).Bytes() - } else if uint64(toChainId) == config.DefConfig.NeoChainID { - other, err := helper.UInt160FromString(toAssetHash) - if err != nil { - return nil, err - } - toAddr = other[:] - } else { - panic(fmt.Sprintf("unkown toChainId:%d", toChainId)) - } - tx, err := contract.BindAssetHash(auth, ethComm.HexToAddress(fromAssetHash), - uint64(toChainId), toAddr[:]) - if err != nil { - return nil, err - } - ethInvoker.client.WaitTransactionConfirm(tx.Hash()) - return tx, nil -} - -func (i *Invoker) MakeSmartContractAuth() (*bind.TransactOpts, error) { - publicKey := i.PrivateKey.Public() - publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) - if !ok { - return nil, fmt.Errorf("MakeSmartContractAuth, cannot assert type: publicKey is not of type *ecdsa.PublicKey") - } - fromAddress := crypto.PubkeyToAddress(*publicKeyECDSA) - nonce, err := i.client.PendingNonceAt(context.Background(), fromAddress) - if err != nil { - return nil, fmt.Errorf("MakeSmartContractAuth PendingNonceAt, %v", err) - } - gasPrice, err := i.client.SuggestGasPrice(context.Background()) - if err != nil { - return nil, fmt.Errorf("MakeSmartContractAuth SuggestGasPrice, %v", err) - } - auth := bind.NewKeyedTransactor(i.PrivateKey) - auth.Nonce = big.NewInt(int64(nonce)) - auth.Value = big.NewInt(int64(0)) // in wei - auth.GasLimit = uint64(DefaultGasLimit) // in units - auth.GasPrice = gasPrice.Mul(gasPrice, big.NewInt(1)) - return auth, nil -} - -func (i *Invoker) DeployEthChainDataContract() (ethComm.Address, *eccd_abi.EthCrossChainData, error) { - auth, err := i.MakeSmartContractAuth() - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployEthChainDataContract, err: %v", err) - } - contractAddress, tx, contract, err := eccd_abi.DeployEthCrossChainData(auth, - i.client) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployEthChainDataContract, err: %v", err) - } - - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) DeployECCMContract(eccdAddress string) (ethComm.Address, *eccm_abi.EthCrossChainManager, error) { - auth, err := i.MakeSmartContractAuth() - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployECCMContract, err: %v", err) - } - address := ethComm.HexToAddress(eccdAddress) - contractAddress, tx, contract, err := eccm_abi.DeployEthCrossChainManager(auth, - i.client, address, i.ChainID) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployECCMContract, err: %v", err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) DeployECCMPContract(eccmAddress string) (ethComm.Address, *eccmp_abi.EthCrossChainManagerProxy, error) { - auth, _ := i.MakeSmartContractAuth() - address := ethComm.HexToAddress(eccmAddress) - contractAddress, tx, contract, err := eccmp_abi.DeployEthCrossChainManagerProxy(auth, - i.client, address) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployECCMPContract, err: %v", err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) DeployERC20() (ethComm.Address, *erc20_abi.ERC20Template, error) { - auth, _ := i.MakeSmartContractAuth() - contractAddress, tx, contract, err := erc20_abi.DeployERC20Template(auth, - i.client) - if err != nil { - log.Fatal(err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) DeployOEP4(lockProxy string) (ethComm.Address, *oep4_abi.OEP4Template, error) { - auth, _ := i.MakeSmartContractAuth() - lockProxyAddr := ethComm.HexToAddress(lockProxy) - contractAddress, tx, contract, err := oep4_abi.DeployOEP4Template(auth, - i.client, lockProxyAddr) - if err != nil { - log.Fatal(err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - - auth, _ = i.MakeSmartContractAuth() - tx, err = contract.DeletageToProxy(auth, lockProxyAddr, big.NewInt(1e13)) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("failed to DeletageToProxy: %v", err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) MakeLockProxy(lockProxyAddr string) (*bind.TransactOpts, *lock_proxy_abi.LockProxy, error) { - auth, _ := i.MakeSmartContractAuth() - contract, err := lock_proxy_abi.NewLockProxy(ethComm.HexToAddress(lockProxyAddr), - i.client) - if err != nil { - return nil, nil, err - } - return auth, contract, nil -} - -func (i *Invoker) DeployLockProxyContract(eccmp ethComm.Address) (ethComm.Address, *lock_proxy_abi.LockProxy, error) { - auth, _ := i.MakeSmartContractAuth() - contractAddress, tx, contract, err := lock_proxy_abi.DeployLockProxy(auth, - i.client) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployLockProxyContract: %v", err) - - } - i.client.WaitTransactionConfirm(tx.Hash()) - - auth, _ = i.MakeSmartContractAuth() - tx, err = contract.SetManagerProxy(auth, eccmp) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("SetManagerProxy: %v", err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) DeployBTCXContract(redeemscript string) (ethComm.Address, *btcx_abi.BTCX, error) { - auth, _ := i.MakeSmartContractAuth() - redeemscriptBytes, err := hex.DecodeString(redeemscript) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployBTCXContract: %v", err) - } - contractAddress, tx, contract, err := btcx_abi.DeployBTCX(auth, - i.client, redeemscriptBytes) - if err != nil { - log.Fatal(err) - } - //fmt.Println("New Deployed BTCX Contract Address is", contractAddress) - //fmt.Println("New Deployed BTCX Contract TX is", tx.Hash().Hex()) - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (ethInvoker *Invoker) DeployONTXContract(lockProxyAddr string) (ethComm.Address, *ontx_abi.ONTX, error) { - auth, _ := ethInvoker.MakeSmartContractAuth() - contractAddress, tx, contract, err := ontx_abi.DeployONTX(auth, - ethInvoker.client, ethComm.HexToAddress(lockProxyAddr)) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployONTXContract, failed to deploy: %v", err) - } - //fmt.Println("New Deployed ONTX Contract Address is", contractAddress) - //fmt.Println("New Deployed ONTX Contract TX is", tx.Hash().Hex()) - ethInvoker.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) DeployONGXContract(lockProxyAddr string) (ethComm.Address, *ongx_abi.ONGX, error) { - auth, _ := i.MakeSmartContractAuth() - contractAddress, tx, contract, err := ongx_abi.DeployONGX(auth, - i.client, ethComm.HexToAddress(lockProxyAddr)) - if err != nil { - return ethComm.Address{}, nil, fmt.Errorf("DeployONGXContract, failed to deploy: %v", err) - } - //fmt.Println("New Deployed ONTX Contract Address is", contractAddress) - //fmt.Println("New Deployed ONTX Contract TX is", tx.Hash().Hex()) - i.client.WaitTransactionConfirm(tx.Hash()) - return contractAddress, contract, nil -} - -func (i *Invoker) SetManagerProxyForLockProxy(lockProxyAddrHex, eccmpAddressHex string) (*types.Transaction, error) { - lockProxyAddr := ethComm.HexToAddress(lockProxyAddrHex) - lockProxyContract, err := lock_proxy_abi.NewLockProxy(lockProxyAddr, i.client) - if err != nil { - return nil, fmt.Errorf("SetManagerProxyForLockProxy: %v", err) - } - auth, _ := i.MakeSmartContractAuth() - tx, err := lockProxyContract.SetManagerProxy(auth, ethComm.HexToAddress(eccmpAddressHex)) - if err != nil { - return nil, fmt.Errorf("SetManagerProxyForLockProxy: %v", err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - return tx, nil -} - -func (i *Invoker) TransferOwnershipForECCD(eccdAddrHex, ownershipAddressHex string) (*types.Transaction, error) { - ownershipAddress := ethComm.HexToAddress(ownershipAddressHex) - eccdAddr := ethComm.HexToAddress(eccdAddrHex) - eccdContract, err := eccd_abi.NewEthCrossChainData(eccdAddr, i.client) - if err != nil { - return nil, fmt.Errorf("TransferOwnershipForECCD, err: %v", err) - } - auth, _ := i.MakeSmartContractAuth() - tx, err := eccdContract.TransferOwnership(auth, ownershipAddress) - i.client.WaitTransactionConfirm(tx.Hash()) - return tx, nil -} - -func (i *Invoker) TransferOwnershipForECCM(eccmAddrHex, ownershipAddressHex string) (*types.Transaction, error) { - ownershipAddress := ethComm.HexToAddress(ownershipAddressHex) - eccmAddr := ethComm.HexToAddress(eccmAddrHex) - eccmContract, err := eccm_abi.NewEthCrossChainManager(eccmAddr, i.client) - if err != nil { - return nil, fmt.Errorf("TransferOwnershipForECCM err: %v", err) - } - auth, _ := i.MakeSmartContractAuth() - tx, err := eccmContract.TransferOwnership(auth, ownershipAddress) - if err != nil { - log.Fatal(err) - } - i.client.WaitTransactionConfirm(tx.Hash()) - return tx, nil -} - -func (i *Invoker) Client() *kaiclient.Client { - return i.client -} - -func (i *Invoker) BindOntAsset(lockProxy, ontOnEth, ongOnEth, oep4OnEth, oep4OnOnt string) ([]*types.Transaction, error) { - auth, contract, err := i.MakeLockProxy(lockProxy) - if err != nil { - return nil, err - } - txs := make([]*types.Transaction, 0) - - tx1, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ontOnEth), - config.DefConfig.OntChainID, utils2.OntContractAddress[:]) - if err != nil { - return nil, err - } - i.Client().WaitTransactionConfirm(tx1.Hash()) - txs = append(txs, tx1) - - auth, _ = i.MakeSmartContractAuth() - tx4, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ontOnEth), - config.DefConfig.CMCrossChainId, []byte(config.CM_ONT)) - if err != nil { - return nil, err - } - i.client.WaitTransactionConfirm(tx4.Hash()) - txs = append(txs, tx4) - - auth, _ = i.MakeSmartContractAuth() - tx2, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ongOnEth), - config.DefConfig.OntChainID, utils2.OngContractAddress[:]) - if err != nil { - return nil, err - } - i.client.WaitTransactionConfirm(tx2.Hash()) - txs = append(txs, tx2) - - auth, _ = i.MakeSmartContractAuth() - tx5, err := contract.BindAssetHash(auth, ethComm.HexToAddress(ongOnEth), - config.DefConfig.CMCrossChainId, []byte(config.CM_ONG)) - if err != nil { - return nil, err - } - i.client.WaitTransactionConfirm(tx5.Hash()) - txs = append(txs, tx5) - - oep4, err := ontcommon.AddressFromHexString(oep4OnOnt) - if err != nil { - return nil, err - } - auth, _ = i.MakeSmartContractAuth() - tx3, err := contract.BindAssetHash(auth, ethComm.HexToAddress(oep4OnEth), config.DefConfig.OntChainID, oep4[:]) - if err != nil { - return nil, err - } - i.client.WaitTransactionConfirm(tx3.Hash()) - txs = append(txs, tx3) - - auth, _ = i.MakeSmartContractAuth() - tx6, err := contract.BindAssetHash(auth, ethComm.HexToAddress(oep4OnEth), config.DefConfig.CMCrossChainId, []byte(config.CM_OEP4)) - if err != nil { - return nil, err - } - i.client.WaitTransactionConfirm(tx6.Hash()) - txs = append(txs, tx6) - - return txs, nil -} - -func (i *Invoker) GetAccInfo() (string, error) { - h, err := i.client.BlockNumber(context.Background()) - if err != nil { - return "", err - } - val, err := i.client.BalanceAt(context.Background(), i.Signer.Address, big.NewInt(int64(h))) - if err != nil { - return "", err - } - ethInfo := fmt.Sprintf("eth: %d", val.Uint64()) - - ontx, err := ontx_abi.NewONTX(ethComm.HexToAddress(i.TConfiguration.EthOntx), i.client) - if err != nil { - return "", err - } - val, err = ontx.BalanceOf(nil, i.Signer.Address) - if err != nil { - return "", err - } - ontInfo := fmt.Sprintf("ontx: %d", val.Uint64()) - - ongx, err := ongx_abi.NewONGX(ethComm.HexToAddress(i.TConfiguration.EthOngx), i.client) - if err != nil { - return "", err - } - val, err = ongx.BalanceOf(nil, i.Signer.Address) - if err != nil { - return "", err - } - ongInfo := fmt.Sprintf("ongx: %d", val.Uint64()) - - oep4x, err := oep4_abi.NewOEP4Template(ethComm.HexToAddress(i.TConfiguration.EthOep4), i.client) - if err != nil { - return "", err - } - val, err = oep4x.BalanceOf(nil, i.Signer.Address) - if err != nil { - return "", err - } - oep4Info := fmt.Sprintf("oep4x: %d", val.Uint64()) - - erc20, err := erc20_abi.NewERC20(ethComm.HexToAddress(i.TConfiguration.EthErc20), i.client) - if err != nil { - return "", err - } - val, err = erc20.BalanceOf(nil, i.Signer.Address) - if err != nil { - return "", err - } - erc20Info := fmt.Sprintf("erc20: %d", val.Uint64()) - - btcx, err := btcx_abi.NewBTCX(ethComm.HexToAddress(i.TConfiguration.BtceContractAddress), i.client) - if err != nil { - return "", err - } - val, err = btcx.BalanceOf(nil, i.Signer.Address) - if err != nil { - return "", err - } - btcxInfo := fmt.Sprintf("btcx: %d", val.Uint64()) - - return fmt.Sprintf("ETHEREUM: acc: %s, asset: [ %s, %s, %s, %s, %s, %s ]", - i.Signer.Address.String(), ethInfo, ontInfo, ongInfo, oep4Info, erc20Info, btcxInfo), nil -} - -func (i *Invoker) GetSmartContractEventByBlock(contractAddr string, height uint64) ([]*eth.LockEvent, []*eth.UnlockEvent, error) { - eccmAddr := common.HexToAddress(contractAddr) - instance, err := eccm_abi.NewEthCrossChainManager(eccmAddr, i.client) - if err != nil { - return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error: %s", err.Error()) - } - - opt := &bind.FilterOpts{ - Start: height, - End: &height, - Context: context.Background(), - } - - ethlockevents := make([]*eth.LockEvent, 0) - { - events, err := instance.FilterCrossChainEvent(opt, nil) - if err != nil { - return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error :%s", err.Error()) - } - - if events == nil { - return nil, nil, fmt.Errorf("GetSmartContractEventByBlock - no events found on FilterCrossChainEvent") - } - - for events.Next() { - evt := events.Event - ethlockevents = append(ethlockevents, ð.LockEvent{ - Method: "lock", - TxHash: evt.Raw.TxHash.String(), - Txid: evt.TxId, - Saddress: evt.Sender.String(), - Tchain: uint32(evt.ToChainId), - Value: evt.Rawdata, - Height: height, - }) - } - } - - ethunlockevents := make([]*eth.UnlockEvent, 0) - { - events, err := instance.FilterVerifyHeaderAndExecuteTxEvent(opt) - if err != nil { - return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error :%s", err.Error()) - } - - if events == nil { - return nil, nil, fmt.Errorf("GetSmartContractEventByBlock - no events found on FilterCrossChainEvent") - } - - for events.Next() { - evt := events.Event - ethunlockevents = append(ethunlockevents, ð.UnlockEvent{ - Method: "unlock", - Txid: evt.Raw.TxHash.String(), - RTxid: hex.EncodeToString(evt.CrossChainTxHash), - FromTxId: hex.EncodeToString(evt.FromChainTxHash), - Token: hex.EncodeToString(evt.ToContract), - Height: height, - }) - } - if err != nil { - return nil, nil, fmt.Errorf("GetSmartContractEventByBlock, error :%s", err.Error()) - } - - if events == nil { - return nil, nil, fmt.Errorf("GetSmartContractEventByBlock - no events found on FilterCrossChainEvent") - } - - for events.Next() { - evt := events.Event - ethunlockevents = append(ethunlockevents, ð.UnlockEvent{ - Method: "unlock", - Txid: evt.Raw.TxHash.String(), - RTxid: hex.EncodeToString(evt.CrossChainTxHash), - Token: hex.EncodeToString(evt.ToContract), - Height: height, - }) - } - } - return ethlockevents, ethunlockevents, nil -} diff --git a/chains/kai/invoker_test.go b/chains/kai/invoker_test.go deleted file mode 100644 index 81fd4e2..0000000 --- a/chains/kai/invoker_test.go +++ /dev/null @@ -1,7 +0,0 @@ -package kai - -import "testing" - -func TestInvoker(t *testing.T) { - -} diff --git a/chains/kai/nonce_manager.go b/chains/kai/nonce_manager.go deleted file mode 100644 index 8b0461c..0000000 --- a/chains/kai/nonce_manager.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -* Copyright (C) 2020 The poly network Authors -* This file is part of The poly network library. -* -* The poly network is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* The poly network is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Lesser General Public License for more details. -* You should have received a copy of the GNU Lesser General Public License -* along with The poly network . If not, see . - */ -package kai - -import ( - "context" - "sync" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/polynetwork/kai-relayer/kaiclient" - "github.com/polynetwork/poly-io-test/log" -) - -const ClearNonceInterval = 10 * time.Minute - -type NonceManager struct { - addressNonce map[common.Address]uint64 - ethClient *kaiclient.Client - lock sync.RWMutex -} - -func NewNonceManager(ethClient *kaiclient.Client) *NonceManager { - nonceManager := &NonceManager{ - addressNonce: make(map[common.Address]uint64), - ethClient: ethClient, - } - go nonceManager.clearNonce() - return nonceManager -} - -// return account nonce, and than nonce++ -func (this *NonceManager) GetAddressNonce(address common.Address) uint64 { - this.lock.Lock() - defer this.lock.Unlock() - - // return a new point - nonce, ok := this.addressNonce[address] - if !ok { - // get nonce from eth network - uintNonce, err := this.ethClient.PendingNonceAt(context.Background(), address) - if err != nil { - log.Infof("GetAddressNonce: cannot get account %s nonce, err: %s, set it to nil!", - address, err) - } - this.addressNonce[address] = uintNonce - nonce = uintNonce - } - // increase record - this.addressNonce[address]++ - return nonce -} - -func (this *NonceManager) DecreaseAddressNonce(address common.Address) { - this.lock.Lock() - defer this.lock.Unlock() - - nonce, ok := this.addressNonce[address] - if ok && nonce > 0 { - this.addressNonce[address]-- - } -} - -// clear nonce per -func (this *NonceManager) clearNonce() { - for { - <-time.After(ClearNonceInterval) - this.lock.Lock() - for addr := range this.addressNonce { - delete(this.addressNonce, addr) - } - this.lock.Unlock() - //log.Infof("clearNonce: clear all cache nonce") - } -} diff --git a/chains/kai/signer.go b/chains/kai/signer.go deleted file mode 100644 index ac33360..0000000 --- a/chains/kai/signer.go +++ /dev/null @@ -1,58 +0,0 @@ -package kai - -import ( - "bytes" - "crypto/ecdsa" - "encoding/hex" - "fmt" - - ethComm "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/rlp" - "github.com/kardiachain/go-kardia/types" - "github.com/ontio/ontology/common" -) - -type Signer struct { - PrivateKey *ecdsa.PrivateKey - Address ethComm.Address -} - -func NewSigner(privateKey string) (*Signer, error) { - priKey, err := crypto.HexToECDSA(privateKey) - if err != nil { - return nil, fmt.Errorf("ApproveERC20, cannot decode private key") - } - address := crypto.PubkeyToAddress(priKey.PublicKey) - return &Signer{ - PrivateKey: priKey, - Address: address, - }, nil -} - -func DeserializeTx(rawTx string) (*types.Transaction, error) { - txData := ethComm.FromHex(rawTx) - tx := &types.Transaction{} - err := rlp.DecodeBytes(txData, tx) - if err != nil { - return nil, fmt.Errorf("deserializeTx: err: %s", err) - } - return tx, nil -} - -func SerializeTx(tx *types.Transaction) (string, error) { - bf := new(bytes.Buffer) - err := rlp.Encode(bf, tx) - if err != nil { - return "", fmt.Errorf("signTx: encode signed tx err: %s", err) - } - signedRawTx := hexutil.Encode(bf.Bytes()) - return signedRawTx, nil -} - -func ReverseOntAddress(ontAddress string) string { - addr, _ := common.AddressFromBase58(ontAddress) - //fmt.Printf("Address Form Base58 is %s\n", "0x"+hex.EncodeToString(addr[:])) - return hex.EncodeToString(addr[:]) -} diff --git a/cmd/cctest/main.go b/cmd/cctest/main.go index d75f8ab..0135c45 100644 --- a/cmd/cctest/main.go +++ b/cmd/cctest/main.go @@ -28,7 +28,6 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" - "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" @@ -68,7 +67,7 @@ func main() { mscInvoker *eth.EInvoker o3Invoker *eth.EInvoker cmInvoker *cosmos.CosmosInvoker - kaiInvoker *kai.Invoker + kaiInvoker *eth.EInvoker ontInvoker *ont.OntInvoker neoInvoker *neo.NeoInvoker ) @@ -89,7 +88,7 @@ func main() { } if config.DefConfig.KaiChainID > 0 { - kaiInvoker = kai.NewInvoker(config.DefConfig.KaiChainID) + kaiInvoker = eth.NewEInvoker(config.DefConfig.KaiChainID) } //btcInvoker, err := btc.NewBtcInvoker(config.DefConfig.RchainJsonRpcAddress, config.DefConfig.RCWallet, diff --git a/cmd/kai_deployer/run.go b/cmd/kai_deployer/run.go index 47e64a8..bfc009f 100644 --- a/cmd/kai_deployer/run.go +++ b/cmd/kai_deployer/run.go @@ -1,3 +1,19 @@ +/* +* Copyright (C) 2020 The poly network Authors +* This file is part of The poly network library. +* +* The poly network is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* The poly network is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License for more details. +* You should have received a copy of the GNU Lesser General Public License +* along with The poly network . If not, see . + */ package main import ( @@ -6,40 +22,39 @@ import ( "fmt" common2 "github.com/ethereum/go-ethereum/common" - "github.com/joeqian10/neo-gogogo/helper" "github.com/ontio/ontology/common" "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/config" ) var ( - fnKai string - kaiConfFile string + fnEth string + ethConfFile string eccmRedeploy int ) func init() { - flag.StringVar(&fnKai, "func", "deploy", "choose function to run: deploy or setup") - flag.StringVar(&kaiConfFile, "conf", "./config.json", "config file path") + flag.StringVar(&fnEth, "func", "deploy", "choose function to run: deploy or setup") + flag.StringVar(ðConfFile, "conf", "./config.json", "config file path") flag.IntVar(&eccmRedeploy, "redeploy_eccm", 1, "redeploy eccd, eccm and eccmp or not") flag.Parse() } func main() { - err := config.DefConfig.Init(kaiConfFile) + err := config.DefConfig.Init(ethConfFile) if err != nil { panic(err) } - switch fnKai { + switch fnEth { case "deploy": - DeploySmartContract() + DeployETHSmartContract() case "setup": - SetUpContracts() + SetUpEthContracts() } } -func DeploySmartContract() { +func DeployETHSmartContract() { invoker := kai.NewInvoker(config.DefConfig.KaiChainID) var ( eccdAddr common2.Address @@ -111,14 +126,14 @@ func DeploySmartContract() { } fmt.Println("=============================ETH info=============================") - fmt.Println("kai krc20:", erc20Addr.Hex()) - fmt.Println("kai ope4:", oep4Addr.Hex()) - fmt.Println("kai eccd address:", eccdAddr.Hex()) - fmt.Println("kai eccm address:", eccmAddr.Hex()) - fmt.Println("kai eccmp address:", eccmpAddr.Hex()) - fmt.Println("kai lock proxy address: ", lockProxyAddr.Hex()) - fmt.Println("kai ongx address: ", ongxAddr.Hex()) - fmt.Println("kai ontx proxy address: ", ontxAddr.Hex()) + fmt.Println("krc20:", erc20Addr.Hex()) + fmt.Println("ope4:", oep4Addr.Hex()) + fmt.Println("eccd address:", eccdAddr.Hex()) + fmt.Println("eccm address:", eccmAddr.Hex()) + fmt.Println("eccmp address:", eccmpAddr.Hex()) + fmt.Println("lock proxy address: ", lockProxyAddr.Hex()) + fmt.Println("ongx address: ", ongxAddr.Hex()) + fmt.Println("ontx proxy address: ", ontxAddr.Hex()) fmt.Println("==================================================================") config.DefConfig.Krc20 = erc20Addr.Hex() @@ -130,92 +145,92 @@ func DeploySmartContract() { config.DefConfig.KaiOngx = ongxAddr.Hex() config.DefConfig.KaiOntx = ontxAddr.Hex() - if err := config.DefConfig.Save(kaiConfFile); err != nil { + if err := config.DefConfig.Save(ethConfFile); err != nil { panic(fmt.Errorf("failed to save config, you better save it youself: %v", err)) } } -func SetupBep20(invoker *kai.Invoker) { - if config.DefConfig.OntBep20 != "" { - bindTx, err := invoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.Bep20, - config.DefConfig.OntBep20, config.DefConfig.OntChainID, 0) +func SetupERC20(ethInvoker *kai.Invoker) { + if config.DefConfig.OntKrc20 != "" { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.Krc20, + config.DefConfig.OntKrc20, config.DefConfig.OntChainID, 0) if err != nil { - panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + panic(fmt.Errorf("SetupERC20ToONT, failed to BindAssetHash: %v", err)) } - invoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() - fmt.Printf("binding bep20 of ontology on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding erc20 of ontology on ethereum: ( txhash: %s )\n", hash.String()) } - bindTx, err := invoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.Bep20, - config.CM_BEP20, config.DefConfig.CMCrossChainId, 0) + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.Krc20, + config.CM_KRC20, config.DefConfig.CMCrossChainId, 0) if err != nil { - panic(fmt.Errorf("SetupBep20ToONT, failed to BindAssetHash: %v", err)) + panic(fmt.Errorf("SetupERC20ToONT, failed to BindAssetHash: %v", err)) } - invoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() - fmt.Printf("binding bep20 of cosmos on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding erc20 of cosmos on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupWBTC(kaiInvoker *kai.Invoker) { - bindTx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiWBTC, +func SetupWBTC(ethInvoker *kai.Invoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiWBTC, config.DefConfig.OntWBTC, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupWBTC, failed to BindAssetHash: %v", err)) } - kaiInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() - fmt.Printf("binding WBTC of ontology on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding WBTC of ontology on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupDAI(kaiInvoker *kai.Invoker) { - bindTx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiDai, +func SetupDAI(ethInvoker *kai.Invoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiDai, config.DefConfig.OntDai, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupDAI, failed to BindAssetHash: %v", err)) } - kaiInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() - fmt.Printf("binding DAI of ontology on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding DAI of ontology on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupUSDT(kaiInvoker *kai.Invoker) { - bindTx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiUSDT, +func SetupUSDT(ethInvoker *kai.Invoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiUSDT, config.DefConfig.OntUSDT, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupUSDT, failed to BindAssetHash: %v", err)) } - kaiInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() - fmt.Printf("binding USDT of ontology on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding USDT of ontology on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupUSDC(kaiInvoker *kai.Invoker) { - bindTx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiUSDC, +func SetupUSDC(ethInvoker *kai.Invoker) { + bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiUSDC, config.DefConfig.OntUSDC, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupUSDC, failed to BindAssetHash: %v", err)) } - kaiInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() - fmt.Printf("binding USDC of ontology on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding USDC of ontology on ethereum: ( txhash: %s )\n", hash.String()) } func SetupOntAsset(invoker *kai.Invoker) { if config.DefConfig.KaiLockProxy == "" { - panic(fmt.Errorf("KaiLockProxy is blank")) + panic(fmt.Errorf("EthLockProxy is blank")) } if config.DefConfig.KaiOntx == "" { - panic(fmt.Errorf("KaicOntx is blank")) + panic(fmt.Errorf("EthOntx is blank")) } if config.DefConfig.KaiOngx == "" { - panic(fmt.Errorf("KaiOngx is blank")) + panic(fmt.Errorf("EthOntx is blank")) } if config.DefConfig.KaiOep4 == "" { - panic(fmt.Errorf("KaiOep4 is blank")) + panic(fmt.Errorf("EthOep4 is blank")) } - if config.DefConfig.OntOep4 == "" { - panic(fmt.Errorf("KaiOep4 is blank")) + if config.DefConfig.KaiOep4 == "" { + panic(fmt.Errorf("OntOep4 is blank")) } txs, err := invoker.BindOntAsset(config.DefConfig.KaiLockProxy, config.DefConfig.KaiOntx, config.DefConfig.KaiOngx, @@ -230,47 +245,30 @@ func SetupOntAsset(invoker *kai.Invoker) { fmt.Printf("ont/ong/oep4 binding tx on cosmos: %s/%s/%s\n", hash4.String(), hash5.String(), hash6.String()) } -func SetupBnb(kaiInvoker *kai.Invoker) { - kaiNativeAddr := "0x0000000000000000000000000000000000000000" - if config.DefConfig.OntBnb != "" { - tx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, config.DefConfig.OntBnb, config.DefConfig.OntChainID, 0) +func SetupETH(ethInvoker *kai.Invoker) { + ethNativeAddr := "0x0000000000000000000000000000000000000000" + if config.DefConfig.OntKai != "" { + tx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, ethNativeAddr, config.DefConfig.OntKai, config.DefConfig.OntChainID, 0) if err != nil { - panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) + panic(fmt.Errorf("SetupETH2ONT, failed to bind asset hash: %v", err)) } hash := tx.Hash() - fmt.Printf("binding bnbx of ontology on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding ethx of ontology on ethereum: ( txhash: %s )\n", hash.String()) } - if config.DefConfig.EthBnb != "" { - tx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, config.DefConfig.EthBnb, config.DefConfig.EthChainID, 0) - if err != nil { - panic(fmt.Errorf("SetupBnb2ONT, failed to bind asset hash: %v", err)) - } - hash := tx.Hash() - fmt.Printf("binding bnb of kai on ethereum: ( txhash: %s )\n", hash.String()) - } - if config.DefConfig.NeoBnb != "" { - tx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, config.DefConfig.NeoBnb, config.DefConfig.NeoChainID, 0) - if err != nil { - panic(fmt.Errorf("SetupBnb2Neo, failed to bind asset hash: %v", err)) - } - hash := tx.Hash() - fmt.Printf("binding bnb of kai on neo: ( txhash: %s )\n", hash.String()) - } - - tx, err := kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, config.CM_BNBX, config.DefConfig.CMCrossChainId, 0) + tx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, ethNativeAddr, config.CM_KAIX, config.DefConfig.CMCrossChainId, 0) if err != nil { - panic(fmt.Errorf("SetupBnb2COSMOS, failed to bind asset hash: %v", err)) + panic(fmt.Errorf("SetupETH2ONT, failed to bind asset hash: %v", err)) } hash := tx.Hash() - fmt.Printf("binding bnbx of cosmos on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding ethx of cosmos on ethereum: ( txhash: %s )\n", hash.String()) - tx, err = kaiInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, kaiNativeAddr, kaiNativeAddr, config.DefConfig.KaiChainID, 0) + tx, err = ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, ethNativeAddr, ethNativeAddr, config.DefConfig.KaiChainID, 0) if err != nil { panic(fmt.Errorf("BindAssetHash, failed to bind asset hash: %v", err)) } hash = tx.Hash() - fmt.Printf("binding bnb of kai on kai: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding eth of ethereum on ethereum: ( txhash: %s )\n", hash.String()) } func SetOtherLockProxy(invoker *kai.Invoker) { @@ -289,7 +287,7 @@ func SetOtherLockProxy(invoker *kai.Invoker) { } tx, err := contract.BindProxyHash(auth, config.DefConfig.OntChainID, other[:]) if err != nil { - panic(fmt.Errorf("failed to bind proxy: %s", err)) + panic(fmt.Errorf("failed to bind proxy: %")) } hash := tx.Hash() invoker.Client().WaitTransactionConfirm(hash) @@ -322,52 +320,19 @@ func SetOtherLockProxy(invoker *kai.Invoker) { other := common2.HexToAddress(config.DefConfig.KaiLockProxy) tx, err := contract.BindProxyHash(auth, config.DefConfig.KaiChainID, other[:]) if err != nil { - panic(fmt.Errorf("failed to bind proxy: %v", err)) + panic(fmt.Errorf("failed to bind proxy: %")) } hash := tx.Hash() invoker.Client().WaitTransactionConfirm(hash) - fmt.Printf("binding kai proxy: ( txhash: %s )\n", hash.String()) - } - - if config.DefConfig.EthLockProxy != "" { - auth, err := invoker.MakeSmartContractAuth() - if err != nil { - panic(fmt.Errorf("failed to get auth: %v", err)) - } - other := common2.HexToAddress(config.DefConfig.EthLockProxy) - tx, err := contract.BindProxyHash(auth, config.DefConfig.EthChainID, other[:]) - if err != nil { - panic(fmt.Errorf("failed to bind proxy: %v", err)) - } - hash := tx.Hash() - invoker.Client().WaitTransactionConfirm(hash) - fmt.Printf("binding kai proxy: ( txhash: %s )\n", hash.String()) - } - - if config.DefConfig.NeoLockProxy != "" { - auth, err := invoker.MakeSmartContractAuth() - if err != nil { - panic(fmt.Errorf("failed to get auth: %v", err)) - } - other, err := helper.UInt160FromString(config.DefConfig.NeoLockProxy) - if err != nil { - panic(fmt.Errorf("UInt160FromString error: %v", err)) - } - tx, err := contract.BindProxyHash(auth, config.DefConfig.NeoChainID, other[:]) - if err != nil { - panic(fmt.Errorf("failed to bind proxy: %v", err)) - } - hash := tx.Hash() - invoker.Client().WaitTransactionConfirm(hash) - fmt.Printf("binding neo proxy: ( txhash: %s )\n", hash.String()) + fmt.Printf("binding eth proxy: ( txhash: %s )\n", hash.String()) } } -func SetUpContracts() { +func SetUpEthContracts() { invoker := kai.NewInvoker(config.DefConfig.KaiChainID) - SetupBnb(invoker) - if config.DefConfig.Bep20 != "" { - SetupBep20(invoker) + SetupETH(invoker) + if config.DefConfig.Krc20 != "" { + SetupERC20(invoker) } if config.DefConfig.OntLockProxy != "" { SetupOntAsset(invoker) @@ -381,7 +346,6 @@ func SetUpContracts() { if config.DefConfig.KaiUSDT != "" { SetupUSDT(invoker) } - //SetupUSDC(invoker) SetOtherLockProxy(invoker) } diff --git a/config.json b/config.json index 2ad3c3b..910c504 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,6 @@ { "BtcChainID": 0, - "EthChainID": 0, + "EthChainID": 97, "OntChainID": 0, "NeoChainID": 0, "Neo3ChainID": 0, @@ -27,8 +27,8 @@ "BtcMinOutputValFromContract": 20000, "BtcSignerPrivateKey": "cRRMYv...rAcX", "BtcExistingVendorPrivks": "cTqbqaR...wY6QSag,cT2HP4Q...PXH9Jk2ua,cSQmGg6...9mWzTxEY5A,cPYAx61...zPSbkkZqrzQ5b,cVV9Umt...qvwD5zg,cNK7Bw...oq1vWau8,cUZdDF9s...RePVbQTZ", - "EthURL": "http://ethereum_node", - "ETHPrivateKey": "AEE6358...A2608A9", + "EthURL": "https://data-seed-prebsc-1-s1.binance.org:8545", + "ETHPrivateKey": "fedc1b2f43e18fb7c2e12f993cee187c8e162dd01d67a08323d9344fb49ef157", "MSCURL": "", "MSCPrivateKey": "", "OKURL": "", @@ -133,14 +133,14 @@ "HecoUSDC": "", "HecoNeo": "", "HecoRenBTC": "", - "KaiEccd": "0x319aD69d324BE79d24e1Cc71e464E9F50F26F880", - "KaiEccm": "0x8FD7708c9e17F739BcaA13A809022F94b26b8aB8", - "KaiEccmp": "0x853249c97FC100b01C46cbeE1C9C3dcA9925CCef", - "KaiLockProxy": "0x006029DFcacaC453eC6dFc7703bdba5E3138C5A7", - "Krc20": "0x8e5dcfecbEdf15d5026633eA3c7beF5391c6ab03", - "KaiOep4": "0x185040E5E5efe4841EC7D558057de5AC65289b7C", - "KaiOngx": "0xee4b18d47d6d274D417E5dF1b2b332c7b9f2078f", - "KaiOntx": "0xaf194cc85f28Ee2294320bab221443398D346655", + "KaiEccd": "0xad8673ba653c75494EF43F3431b67aD597B21314", + "KaiEccm": "0x14E8226B63C77c6fdCB3830e1bde2b6981F01AAe", + "KaiEccmp": "0xaf09C7D8FaB374C7dbF329DBC21c5EF0503A0F96", + "KaiLockProxy": "0xa60D0aba17c6925991E3c09845cc39C8382088D8", + "Krc20": "0x82f89eE78c5563422d342E4FBd0aB7A6bE56E069", + "KaiOep4": "0x83D2cD8DB5Bd9606D2A24D49B3CE6d11d5e68C30", + "KaiOngx": "0xD0D717fc4524349341BA87056977B2cB99eFAF29", + "KaiOntx": "0x7715994b29854C0FFA20aF79B5F8e2f951a21782", "KaiWBTC": "", "KaiUSDT": "", "KaiDai": "", @@ -165,14 +165,14 @@ "ZilEccdImpl": "", "ZilLockProxy": "", "EthBnb": "", - "EthErc20": "", - "EthOep4": "", - "Eccd": "", - "Eccm": "", - "Eccmp": "", - "EthLockProxy": "", - "EthOngx": "", - "EthOntx": "", + "EthErc20": "0xc1Ee06f49eF783D41e57d381a1835B5135D6B48d", + "EthOep4": "0x2b399198ecE1cdA062BE619f920717976B31C3E0", + "Eccd": "0xcBeAE3FC1B8000ae88453C12887d1C16aA111cfA", + "Eccm": "0x9Ec66E019B266A7717C0F74F02B29Fc542dA18A6", + "Eccmp": "0x36214842A7238Af0D04F49c5dde13a51f58D6224", + "EthLockProxy": "0x61DC57F9c0CEccEd31d7b79416753C1211618976", + "EthOngx": "0x83d87A85fc0c83D10D59c4F0A59756aCE8724c6f", + "EthOntx": "0x557e5567DB61a99b5bc498683a37263128ba14CF", "EthOntd": "", "EthUSDT": "", "EthWBTC": "", @@ -183,6 +183,7 @@ "BtceContractAddress": "", "OntErc20": "", "OntBep20": "", + "OntKrc20": "", "OntOep4": "", "OntLockProxy": "", "OntEth": "", @@ -195,6 +196,7 @@ "OntONTD": "", "OntRenBTC": "", "BtcoContractAddress": "", + "OntKai": "", "NeoCCMC": "", "NeoLockProxy": "", "CNeo": "", diff --git a/config/config.go b/config/config.go index 4ded0e3..95ce136 100644 --- a/config/config.go +++ b/config/config.go @@ -35,6 +35,8 @@ const ( CM_ONT = "ontx" CM_ONG = "ongx" CM_OEP4 = "oep4x" + CM_KRC20 = "krc20" + CM_KAIX = "kaix" ) //Config object used by ontology-instance @@ -265,6 +267,7 @@ type TestConfig struct { // ont contracts: auto set after deploy OntErc20 string OntBep20 string + OntKrc20 string OntOep4 string OntLockProxy string OntEth string @@ -277,6 +280,7 @@ type TestConfig struct { OntONTD string OntRenBTC string BtcoContractAddress string + OntKai string // neo NeoCCMC string diff --git a/go.mod b/go.mod index 5e758d5..f126e82 100644 --- a/go.mod +++ b/go.mod @@ -45,4 +45,4 @@ replace github.com/polynetwork/poly-go-sdk => github.com/joeqian10/poly-go-sdk v //replace github.com/ontio/ontology => github.com/ontio/ontology v1.11.0 -replace github.com/polynetwork/kai-relayer => github.com/dogecoindev/kai-relayer v0.0.0-20210602042052-c1c2c1f145f3 +replace github.com/polynetwork/kai-relayer => github.com/dogecoindev/kai-relayer v0.0.0-20210608044355-c91f4a1c9c7c diff --git a/go.sum b/go.sum index bb92396..acd0abf 100644 --- a/go.sum +++ b/go.sum @@ -262,6 +262,10 @@ github.com/dogecoindev/kai-relayer v0.0.0-20210602041540-c6aba2dd1cc5 h1:N1m+PXn github.com/dogecoindev/kai-relayer v0.0.0-20210602041540-c6aba2dd1cc5/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= github.com/dogecoindev/kai-relayer v0.0.0-20210602042052-c1c2c1f145f3 h1:DGE+BwUN4X8045hHHMvi5VL32PKTX/3X1XOyqxIaoj8= github.com/dogecoindev/kai-relayer v0.0.0-20210602042052-c1c2c1f145f3/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dogecoindev/kai-relayer v0.0.0-20210608042742-840fea4203ea h1:FxXymOqH/C1C2uM2YG9of2Ov0/XbjL3ZYthit+gtnCw= +github.com/dogecoindev/kai-relayer v0.0.0-20210608042742-840fea4203ea/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= +github.com/dogecoindev/kai-relayer v0.0.0-20210608044355-c91f4a1c9c7c h1:IuGJxABWUxPoKSKBWR+Rwq467uc7MvSoq3msnh62Ooo= +github.com/dogecoindev/kai-relayer v0.0.0-20210608044355-c91f4a1c9c7c/go.mod h1:oUxckkLFb0IynGMKgJ4sIOwn3riZoDLpu5pDYyo2zdg= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87 h1:OMbqMXf9OAXzH1dDH82mQMrddBE8LIIwDtxeK4wE1/A= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs= diff --git a/testcase/kai.go b/testcase/kai.go index 09b96fc..a5e6c3f 100644 --- a/testcase/kai.go +++ b/testcase/kai.go @@ -24,7 +24,7 @@ import ( ) func SendKaiToEthChain(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus) bool { - err := SendKaiCrossEth(ctx, status, GetRandAmount(config.DefConfig.OntValLimit, 1)) + err := SendKaiCrossEth(ctx, status, 1000000000000000000) if err != nil { log.Error("SendKaiToEthChain: %s", err) return false @@ -46,7 +46,7 @@ func SendEthToKaiChain(ctx *testframework.TestFrameworkContext, status *testfram } func SendKaiCrossEth(ctx *testframework.TestFrameworkContext, status *testframework.CaseStatus, amount uint64) error { - kclient := ctx.KaiInvoker.Client() + kclient := ctx.KaiInvoker.ETHUtil.GetEthClient() gasPrice, err := kclient.SuggestGasPrice(context.Background()) if err != nil { return fmt.Errorf("SendKaiCrossEth, get suggest gas price failed error: %s", err.Error()) @@ -57,7 +57,7 @@ func SendKaiCrossEth(ctx *testframework.TestFrameworkContext, status *testframew if err != nil { return fmt.Errorf("SendKaiCrossEth, abi.JSON error:" + err.Error()) } - rawFrom := ctx.KaiInvoker.Signer.Address.Bytes() + rawFrom := ctx.KaiInvoker.EthTestSigner.Address.Bytes() assetaddress := ethcommon.HexToAddress("0000000000000000000000000000000000000000") txData, err := contractabi.Pack("lock", assetaddress, uint64(config.DefConfig.KaiChainID), rawFrom[:], big.NewInt(int64(amount))) @@ -67,7 +67,7 @@ func SendKaiCrossEth(ctx *testframework.TestFrameworkContext, status *testframew contractAddr := ethcommon.HexToAddress(config.DefConfig.KaiLockProxy) callMsg := ethereum.CallMsg{ - From: ctx.KaiInvoker.Signer.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + From: ctx.KaiInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, Value: big.NewInt(int64(amount)), Data: txData, } gasLimit, err := kclient.EstimateGas(context.Background(), callMsg) @@ -75,7 +75,7 @@ func SendKaiCrossEth(ctx *testframework.TestFrameworkContext, status *testframew return fmt.Errorf("SendKaiCrossEth, estimate gas limit error: %s", err.Error()) } - nonce := ctx.KaiInvoker.NM.GetAddressNonce(ctx.KaiInvoker.Signer.Address) + nonce := ctx.KaiInvoker.NM.GetAddressNonce(ctx.KaiInvoker.EthTestSigner.Address) tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) bf := new(bytes.Buffer) rlp.Encode(bf, tx) @@ -95,7 +95,7 @@ func SendKaiCrossEth(ctx *testframework.TestFrameworkContext, status *testframew return fmt.Errorf("SendKaiCrossEth, send transaction error:%s", err.Error()) } status.AddTx(signedtx.Hash().String()[2:], &testframework.TxInfo{"KaiToEth", time.Now()}) - kclient.WaitTransactionConfirm(signedtx.Hash()) + ctx.KaiInvoker.ETHUtil.WaitTransactionConfirm(signedtx.Hash()) return nil } @@ -122,7 +122,7 @@ func SendEthCrossKai(ctx *testframework.TestFrameworkContext, status *testframew contractAddr := ethcommon.HexToAddress(config.DefConfig.KaiLockProxy) callMsg := ethereum.CallMsg{ - From: ctx.KaiInvoker.Signer.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, + From: ctx.KaiInvoker.EthTestSigner.Address, To: &contractAddr, Gas: 0, GasPrice: gasPrice, Value: big.NewInt(int64(amount)), Data: txData, } gasLimit, err := client.EstimateGas(context.Background(), callMsg) @@ -130,7 +130,7 @@ func SendEthCrossKai(ctx *testframework.TestFrameworkContext, status *testframew return fmt.Errorf("SendEthCrossKai, estimate gas limit error: %s", err.Error()) } - nonce := ctx.KaiInvoker.NM.GetAddressNonce(ctx.KaiInvoker.Signer.Address) + nonce := ctx.KaiInvoker.NM.GetAddressNonce(ctx.KaiInvoker.EthTestSigner.Address) tx := types.NewTransaction(nonce, contractAddr, big.NewInt(int64(amount)), gasLimit, gasPrice, txData) bf := new(bytes.Buffer) _ = rlp.Encode(bf, tx) @@ -140,7 +140,7 @@ func SendEthCrossKai(ctx *testframework.TestFrameworkContext, status *testframew if err != nil { return fmt.Errorf("SendEthCrossKai, eth.DeserializeTx error: %s", err.Error()) } - signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.KaiInvoker.Signer.PrivateKey) + signedtx, err := types.SignTx(unsignedTx, types.HomesteadSigner{}, ctx.KaiInvoker.EthTestSigner.PrivateKey) if err != nil { return fmt.Errorf("SendEthCrossKai, types.SignTx error: %s", err.Error()) } diff --git a/testframework/framework.go b/testframework/framework.go index a81f38c..c66dfb9 100644 --- a/testframework/framework.go +++ b/testframework/framework.go @@ -26,7 +26,6 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" - "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" "github.com/polynetwork/poly-io-test/config" @@ -64,7 +63,7 @@ type TestFramework struct { ontInvoker *ont.OntInvoker cosmosInvoker *cosmos.CosmosInvoker neoInvoker *neo.NeoInvoker - kaiInvoker *kai.Invoker + kaiInvoker *eth.EInvoker } //NewTestFramework return a TestFramework instance @@ -200,7 +199,7 @@ func (this *TestFramework) SetO3Invoker(invoker *eth.EInvoker) { } //SetO3Invoker instance to test framework -func (this *TestFramework) SeKaiInvoker(invoker *kai.Invoker) { +func (this *TestFramework) SeKaiInvoker(invoker *eth.EInvoker) { this.kaiInvoker = invoker } diff --git a/testframework/framework_context.go b/testframework/framework_context.go index 1747e2d..bfa64c6 100644 --- a/testframework/framework_context.go +++ b/testframework/framework_context.go @@ -25,7 +25,6 @@ import ( "github.com/polynetwork/poly-io-test/chains/btc" "github.com/polynetwork/poly-io-test/chains/cosmos" "github.com/polynetwork/poly-io-test/chains/eth" - "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/chains/neo" "github.com/polynetwork/poly-io-test/chains/ont" ) @@ -45,12 +44,12 @@ type TestFrameworkContext struct { OntInvoker *ont.OntInvoker CMInvoker *cosmos.CosmosInvoker NeoInvoker *neo.NeoInvoker - KaiInvoker *kai.Invoker + KaiInvoker *eth.EInvoker } //NewTestFrameworkContext return a TestFrameworkContext instance func NewTestFrameworkContext(fw *TestFramework, caseArr []TestCase, rcSdk *poly_go_sdk.PolySdk, eInvkr, bscInvkr, mscInvkr, o3Invkr *eth.EInvoker, - btcInvkr *btc.BtcInvoker, ontInvkr *ont.OntInvoker, cmInvoker *cosmos.CosmosInvoker, neoInvoker *neo.NeoInvoker, kaiInvoker *kai.Invoker) *TestFrameworkContext { + btcInvkr *btc.BtcInvoker, ontInvkr *ont.OntInvoker, cmInvoker *cosmos.CosmosInvoker, neoInvoker *neo.NeoInvoker, kaiInvoker *eth.EInvoker) *TestFrameworkContext { ctx := &TestFrameworkContext{ Framework: fw, Cases: caseArr, diff --git a/testframework/kai.go b/testframework/kai.go index 357976e..75cf688 100644 --- a/testframework/kai.go +++ b/testframework/kai.go @@ -1,20 +1,18 @@ package testframework import ( - "context" "encoding/hex" "math/big" "os" "time" - "github.com/polynetwork/poly-io-test/chains/kai" + "github.com/polynetwork/poly-io-test/chains/eth" "github.com/polynetwork/poly-io-test/log" ) func MonitorKai(ctx *TestFrameworkContext) { invoker := ctx.KaiInvoker - ctx2 := context.Background() - currentHeight, err := invoker.Client().BlockNumber(ctx2) + currentHeight, err := invoker.ETHUtil.GetNodeHeight() if err != nil { log.Errorf("MonitorEthChain - ctx.EthTools.GetNodeHeight error: %s", err) os.Exit(1) @@ -24,7 +22,7 @@ func MonitorKai(ctx *TestFrameworkContext) { for { select { case <-updateTicker.C: - currentHeight, err := invoker.Client().BlockNumber(ctx2) + currentHeight, err := invoker.ETHUtil.GetNodeHeight() if err != nil { log.Errorf("ctx.EthTools.GetNodeHeight error: %s", err) continue @@ -45,9 +43,9 @@ func MonitorKai(ctx *TestFrameworkContext) { } } -func parseKaiChainBlock(ctx *TestFrameworkContext, invoker *kai.Invoker, height uint32) error { +func parseKaiChainBlock(ctx *TestFrameworkContext, invoker *eth.EInvoker, height uint32) error { // contract is different - lockevents, unlockevents, err := invoker.GetSmartContractEventByBlock(getEccm(invoker.ChainID), uint64(height)) + lockevents, unlockevents, err := invoker.ETHUtil.GetSmartContractEventByBlock(getEccm(invoker.ChainID), uint64(height)) if err != nil { return err } From 39e8c6a59cc57ca6574bd307245e1190993b7392 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Tue, 8 Jun 2021 18:24:36 +0700 Subject: [PATCH 93/96] update --- cmd/kai_deployer/run.go | 1 - testcase/kai.go | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/kai_deployer/run.go b/cmd/kai_deployer/run.go index bfc009f..41fb9f5 100644 --- a/cmd/kai_deployer/run.go +++ b/cmd/kai_deployer/run.go @@ -23,7 +23,6 @@ import ( common2 "github.com/ethereum/go-ethereum/common" "github.com/ontio/ontology/common" - "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/config" ) diff --git a/testcase/kai.go b/testcase/kai.go index a5e6c3f..06f59b7 100644 --- a/testcase/kai.go +++ b/testcase/kai.go @@ -17,7 +17,6 @@ import ( "github.com/ethereum/go-ethereum/rlp" "github.com/polynetwork/eth-contracts/go_abi/lock_proxy_abi" "github.com/polynetwork/poly-io-test/chains/eth" - "github.com/polynetwork/poly-io-test/chains/kai" "github.com/polynetwork/poly-io-test/config" "github.com/polynetwork/poly-io-test/log" "github.com/polynetwork/poly-io-test/testframework" @@ -154,7 +153,7 @@ func SendEthCrossKai(ctx *testframework.TestFrameworkContext, status *testframew return nil } -func MakeKaiAuth(signer *kai.Signer, nonce, gasPrice, gasLimit uint64) *bind.TransactOpts { +func MakeKaiAuth(signer *eth.EthSigner, nonce, gasPrice, gasLimit uint64) *bind.TransactOpts { auth := bind.NewKeyedTransactor(signer.PrivateKey) auth.Nonce = big.NewInt(int64(nonce)) auth.Value = big.NewInt(int64(0)) // in wei From f65c214919ff35301faa3aa4fc5f2af52ed12726 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Wed, 9 Jun 2021 17:38:35 +0700 Subject: [PATCH 94/96] fix register kai --- cmd/kai_deployer/run.go | 41 ++++++++++++++++++----------------- cmd/tools/run.go | 48 +++++++++++++++++++++-------------------- config.json | 8 +++---- 3 files changed, 50 insertions(+), 47 deletions(-) diff --git a/cmd/kai_deployer/run.go b/cmd/kai_deployer/run.go index 41fb9f5..07d1abd 100644 --- a/cmd/kai_deployer/run.go +++ b/cmd/kai_deployer/run.go @@ -23,6 +23,7 @@ import ( common2 "github.com/ethereum/go-ethereum/common" "github.com/ontio/ontology/common" + "github.com/polynetwork/poly-io-test/chains/eth" "github.com/polynetwork/poly-io-test/config" ) @@ -54,7 +55,7 @@ func main() { } func DeployETHSmartContract() { - invoker := kai.NewInvoker(config.DefConfig.KaiChainID) + invoker := eth.NewEInvoker(config.DefConfig.KaiChainID) var ( eccdAddr common2.Address eccmAddr common2.Address @@ -109,7 +110,7 @@ func DeployETHSmartContract() { if err != nil { panic(fmt.Errorf("failed to approve erc20 to lockproxy: %v", err)) } - invoker.Client().WaitTransactionConfirm(tx.Hash()) + invoker.ETHUtil.WaitTransactionConfirm(tx.Hash()) oep4Addr, _, err := invoker.DeployOEP4(lockproxyAddrHex) if err != nil { @@ -149,14 +150,14 @@ func DeployETHSmartContract() { } } -func SetupERC20(ethInvoker *kai.Invoker) { +func SetupERC20(ethInvoker *eth.EInvoker) { if config.DefConfig.OntKrc20 != "" { bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.Krc20, config.DefConfig.OntKrc20, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupERC20ToONT, failed to BindAssetHash: %v", err)) } - ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() fmt.Printf("binding erc20 of ontology on ethereum: ( txhash: %s )\n", hash.String()) } @@ -166,56 +167,56 @@ func SetupERC20(ethInvoker *kai.Invoker) { if err != nil { panic(fmt.Errorf("SetupERC20ToONT, failed to BindAssetHash: %v", err)) } - ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() fmt.Printf("binding erc20 of cosmos on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupWBTC(ethInvoker *kai.Invoker) { +func SetupWBTC(ethInvoker *eth.EInvoker) { bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiWBTC, config.DefConfig.OntWBTC, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupWBTC, failed to BindAssetHash: %v", err)) } - ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() fmt.Printf("binding WBTC of ontology on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupDAI(ethInvoker *kai.Invoker) { +func SetupDAI(ethInvoker *eth.EInvoker) { bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiDai, config.DefConfig.OntDai, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupDAI, failed to BindAssetHash: %v", err)) } - ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() fmt.Printf("binding DAI of ontology on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupUSDT(ethInvoker *kai.Invoker) { +func SetupUSDT(ethInvoker *eth.EInvoker) { bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiUSDT, config.DefConfig.OntUSDT, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupUSDT, failed to BindAssetHash: %v", err)) } - ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() fmt.Printf("binding USDT of ontology on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupUSDC(ethInvoker *kai.Invoker) { +func SetupUSDC(ethInvoker *eth.EInvoker) { bindTx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, config.DefConfig.KaiUSDC, config.DefConfig.OntUSDC, config.DefConfig.OntChainID, 0) if err != nil { panic(fmt.Errorf("SetupUSDC, failed to BindAssetHash: %v", err)) } - ethInvoker.Client().WaitTransactionConfirm(bindTx.Hash()) + ethInvoker.ETHUtil.WaitTransactionConfirm(bindTx.Hash()) hash := bindTx.Hash() fmt.Printf("binding USDC of ontology on ethereum: ( txhash: %s )\n", hash.String()) } -func SetupOntAsset(invoker *kai.Invoker) { +func SetupOntAsset(invoker *eth.EInvoker) { if config.DefConfig.KaiLockProxy == "" { panic(fmt.Errorf("EthLockProxy is blank")) } @@ -244,7 +245,7 @@ func SetupOntAsset(invoker *kai.Invoker) { fmt.Printf("ont/ong/oep4 binding tx on cosmos: %s/%s/%s\n", hash4.String(), hash5.String(), hash6.String()) } -func SetupETH(ethInvoker *kai.Invoker) { +func SetupETH(ethInvoker *eth.EInvoker) { ethNativeAddr := "0x0000000000000000000000000000000000000000" if config.DefConfig.OntKai != "" { tx, err := ethInvoker.BindAssetHash(config.DefConfig.KaiLockProxy, ethNativeAddr, config.DefConfig.OntKai, config.DefConfig.OntChainID, 0) @@ -270,7 +271,7 @@ func SetupETH(ethInvoker *kai.Invoker) { fmt.Printf("binding eth of ethereum on ethereum: ( txhash: %s )\n", hash.String()) } -func SetOtherLockProxy(invoker *kai.Invoker) { +func SetOtherLockProxy(invoker *eth.EInvoker) { _, contract, err := invoker.MakeLockProxy(config.DefConfig.KaiLockProxy) if err != nil { panic(fmt.Errorf("failed to MakeLockProxy: %v", err)) @@ -289,7 +290,7 @@ func SetOtherLockProxy(invoker *kai.Invoker) { panic(fmt.Errorf("failed to bind proxy: %")) } hash := tx.Hash() - invoker.Client().WaitTransactionConfirm(hash) + invoker.ETHUtil.WaitTransactionConfirm(hash) fmt.Printf("binding ont proxy: ( txhash: %s )\n", hash.String()) } @@ -307,7 +308,7 @@ func SetOtherLockProxy(invoker *kai.Invoker) { panic(fmt.Errorf("failed to bind COSMOS proxy: %v", err)) } hash := tx.Hash() - invoker.Client().WaitTransactionConfirm(hash) + invoker.ETHUtil.WaitTransactionConfirm(hash) fmt.Printf("binding cosmos proxy: ( txhash: %s )\n", hash.String()) } @@ -322,13 +323,13 @@ func SetOtherLockProxy(invoker *kai.Invoker) { panic(fmt.Errorf("failed to bind proxy: %")) } hash := tx.Hash() - invoker.Client().WaitTransactionConfirm(hash) + invoker.ETHUtil.WaitTransactionConfirm(hash) fmt.Printf("binding eth proxy: ( txhash: %s )\n", hash.String()) } } func SetUpEthContracts() { - invoker := kai.NewInvoker(config.DefConfig.KaiChainID) + invoker := eth.NewEInvoker(config.DefConfig.KaiChainID) SetupETH(invoker) if config.DefConfig.Krc20 != "" { SetupERC20(invoker) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 7332985..5840354 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -1631,6 +1631,31 @@ func RegisterBtcChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool return true } +func RegisterKai(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { + blkToWait := uint64(1) + eccd, err := hex.DecodeString(strings.Replace(config.DefConfig.KaiEccd, "0x", "", 1)) + if err != nil { + panic(fmt.Errorf("RegisterKai, failed to decode eccd '%s' : %v", config.DefConfig.KaiEccd, err)) + } + txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.KaiChainID, 12, "kai", + blkToWait, eccd, acc) + if err != nil { + if strings.Contains(err.Error(), "already registered") { + log.Infof("eth chain %d already registered", config.DefConfig.KaiChainID) + return false + } + if strings.Contains(err.Error(), "already requested") { + log.Infof("eth chain %d already requested", config.DefConfig.KaiChainID) + return true + } + panic(fmt.Errorf("RegisterKai failed: %v", err)) + } + testcase.WaitPolyTx(txhash, poly) + log.Infof("successful to register eth chain: ( txhash: %s )", txhash.ToHexString()) + + return true +} + func RegisterEthChain(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { blkToWait := uint64(1) if config.BtcNet.Name == "testnet3" { @@ -2358,29 +2383,6 @@ func GetRelayer(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) { log.Infof("get relayer success: %s", addr.ToBase58()) } -func RegisterKai(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { - blkToWait := uint64(1) - txhash, err := poly.Native.Scm.RegisterSideChain(acc.Address, config.DefConfig.KaiChainID, 13, "kai", - blkToWait, []byte{}, acc) - if err != nil { - if strings.Contains(err.Error(), "already registered") { - log.Infof("Kardia chain %d already registered", config.DefConfig.KaiChainID) - return false - } - if strings.Contains(err.Error(), "already requested") { - log.Infof("Kardia chain %d already requested", config.DefConfig.KaiChainID) - return true - } - panic(fmt.Errorf("RegisterKai failed: %v", err)) - } - - testcase.WaitPolyTx(txhash, poly) - log.Infof("successful to register kardia chain: ( txhash: %s )", txhash.ToHexString()) - - return true - -} - func RegisterStateValidator(poly *poly_go_sdk.PolySdk, neo3PubKeys []string, signer *poly_go_sdk.Account) uint64 { txhash, err := poly.Native.Sm.RegisterStateValidator(neo3PubKeys, signer) if err != nil { diff --git a/config.json b/config.json index 910c504..4cda805 100644 --- a/config.json +++ b/config.json @@ -10,7 +10,7 @@ "O3ChainID": 0, "MscChainID": 0, "OkChainID": 0, - "KaiChainID": 141, + "KaiChainID": 142, "BtcRestAddr": "http://btc_node", "BtcRestUser": "test", "BtcRestPwd": "test", @@ -67,9 +67,9 @@ "Neo3Epoch": 0, "KaiUrl": "https://dev-6.kardiachain.io", "KaiPrivateKey": "8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", - "KaiEpoch": 584820, - "RCWallet": ".wallets/wallet.dat", - "RCWalletPwd": "", + "KaiEpoch": 763428, + "RCWallet": "./wallet.dat", + "RCWalletPwd": "123456", "RchainJsonRpcAddress": "http://138.91.6.226:40336", "RCEpoch": 0, "ReportInterval": 60, From b62117e626e4f6c67056d883272c755118067b45 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Fri, 11 Jun 2021 09:29:12 +0700 Subject: [PATCH 95/96] uncomment ontInvoker, neoInvoker. revert max confirmation time in eth_tools.go --- chains/eth/eth_tools.go | 2 +- cmd/cctest/main.go | 52 +++++++++++++++++------------------------ config.json | 2 +- 3 files changed, 23 insertions(+), 33 deletions(-) diff --git a/chains/eth/eth_tools.go b/chains/eth/eth_tools.go index 4d5dfb8..0ed7086 100644 --- a/chains/eth/eth_tools.go +++ b/chains/eth/eth_tools.go @@ -328,7 +328,7 @@ func (self *ETHTools) WaitTransactionConfirm(hash common.Hash) { start := time.Now() for { time.Sleep(time.Millisecond * 100) - if time.Now().After(start.Add(time.Second * 30)) { + if time.Now().After(start.Add(time.Second * 10)) { log.Errorf("WaitTransactionConfirm max wait time exceeded, quit") return } diff --git a/cmd/cctest/main.go b/cmd/cctest/main.go index 0135c45..19e20bc 100644 --- a/cmd/cctest/main.go +++ b/cmd/cctest/main.go @@ -68,8 +68,6 @@ func main() { o3Invoker *eth.EInvoker cmInvoker *cosmos.CosmosInvoker kaiInvoker *eth.EInvoker - ontInvoker *ont.OntInvoker - neoInvoker *neo.NeoInvoker ) if config.DefConfig.EthChainID > 0 { ethInvoker = eth.NewEInvoker(config.DefConfig.EthChainID) @@ -86,7 +84,7 @@ func main() { if config.DefConfig.O3ChainID > 0 { o3Invoker = eth.NewEInvoker(config.DefConfig.O3ChainID) } - + if config.DefConfig.KaiChainID > 0 { kaiInvoker = eth.NewEInvoker(config.DefConfig.KaiChainID) } @@ -97,22 +95,22 @@ func main() { //if err != nil { // log.Errorf("failed to new a btc invoker, do not test cases about BTC: %v", err) //} - // ontInvoker, err := ont.NewOntInvoker(config.DefConfig.OntJsonRpcAddress, config.DefConfig.OntContractsAvmPath, - // config.DefConfig.OntWallet, config.DefConfig.OntWalletPassword) - // if err != nil { - // log.Warnf("failed to new a ont invoker, do not test cases about ONT: %v", err) - // } - // if config.DefConfig.CMCrossChainId > 0 { - // cmInvoker, err = cosmos.NewCosmosInvoker() - // if err != nil { - // log.Warnf("failed to new a cosmos invoker, do not test cases about COSMOS: %v", err) - // } - // } - - // neoInvoker, err := neo.NewNeoInvoker() - // if err != nil { - // log.Warnf("failed to new a neo invoker, do not test cases about NEO: %v", err) - // } + ontInvoker, err := ont.NewOntInvoker(config.DefConfig.OntJsonRpcAddress, config.DefConfig.OntContractsAvmPath, + config.DefConfig.OntWallet, config.DefConfig.OntWalletPassword) + if err != nil { + log.Warnf("failed to new a ont invoker, do not test cases about ONT: %v", err) + } + if config.DefConfig.CMCrossChainId > 0 { + cmInvoker, err = cosmos.NewCosmosInvoker() + if err != nil { + log.Warnf("failed to new a cosmos invoker, do not test cases about COSMOS: %v", err) + } + } + + neoInvoker, err := neo.NewNeoInvoker() + if err != nil { + log.Warnf("failed to new a neo invoker, do not test cases about NEO: %v", err) + } testCases := make([]string, 0) if TestCases != "" { @@ -135,20 +133,12 @@ func main() { if kaiInvoker != nil { testframework.TFramework.SeKaiInvoker(kaiInvoker) } - + //testframework.TFramework.SetBtcInvoker(btcInvoker) + testframework.TFramework.SetOntInvoker(ontInvoker) + testframework.TFramework.SetCosmosInvoker(cmInvoker) + testframework.TFramework.SetNeoInvoker(neoInvoker) - if ontInvoker != nil { - testframework.TFramework.SetOntInvoker(ontInvoker) - } - - if cmInvoker != nil { - testframework.TFramework.SetCosmosInvoker(cmInvoker) - } - - if neoInvoker != nil { - testframework.TFramework.SetNeoInvoker(neoInvoker) - } //Start run test case testframework.TFramework.Run(testCases, LoopNumber) waitToExit() diff --git a/config.json b/config.json index 4cda805..94ab11e 100644 --- a/config.json +++ b/config.json @@ -10,7 +10,7 @@ "O3ChainID": 0, "MscChainID": 0, "OkChainID": 0, - "KaiChainID": 142, + "KaiChainID": 141, "BtcRestAddr": "http://btc_node", "BtcRestUser": "test", "BtcRestPwd": "test", From ba8604dd36c87dbd24d1f4da039205bcfbda6e60 Mon Sep 17 00:00:00 2001 From: dogecoindev Date: Fri, 11 Jun 2021 16:46:33 +0700 Subject: [PATCH 96/96] update kai config, log register kai chain --- cmd/tools/run.go | 2 +- config.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/tools/run.go b/cmd/tools/run.go index 5840354..7d80404 100644 --- a/cmd/tools/run.go +++ b/cmd/tools/run.go @@ -1651,7 +1651,7 @@ func RegisterKai(poly *poly_go_sdk.PolySdk, acc *poly_go_sdk.Account) bool { panic(fmt.Errorf("RegisterKai failed: %v", err)) } testcase.WaitPolyTx(txhash, poly) - log.Infof("successful to register eth chain: ( txhash: %s )", txhash.ToHexString()) + log.Infof("successful to register kai chain: ( chain_id:%s txhash: %s, eccd: %s )", config.DefConfig.KaiChainID, txhash.ToHexString(), config.DefConfig.KaiEccd) return true } diff --git a/config.json b/config.json index 94ab11e..8fba7c2 100644 --- a/config.json +++ b/config.json @@ -10,7 +10,7 @@ "O3ChainID": 0, "MscChainID": 0, "OkChainID": 0, - "KaiChainID": 141, + "KaiChainID": 143, "BtcRestAddr": "http://btc_node", "BtcRestUser": "test", "BtcRestPwd": "test", @@ -67,7 +67,7 @@ "Neo3Epoch": 0, "KaiUrl": "https://dev-6.kardiachain.io", "KaiPrivateKey": "8468546595e96bae824160b2f019d0007f5f16f412923abdc4753f2f7d4562e8", - "KaiEpoch": 763428, + "KaiEpoch": 799716, "RCWallet": "./wallet.dat", "RCWalletPwd": "123456", "RchainJsonRpcAddress": "http://138.91.6.226:40336",